1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package dfareporting provides access to the DCM/DFA Reporting And Trafficking API.
8//
9// For product documentation, see: https://developers.google.com/doubleclick-advertisers/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/dfareporting/v3.3"
16//   ...
17//   ctx := context.Background()
18//   dfareportingService, err := dfareporting.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
27//
28//   dfareportingService, err := dfareporting.NewService(ctx, option.WithScopes(dfareporting.DfatraffickingScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   dfareportingService, err := dfareporting.NewService(ctx, option.WithAPIKey("AIza..."))
33//
34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
35//
36//   config := &oauth2.Config{...}
37//   // ...
38//   token, err := config.Exchange(ctx, ...)
39//   dfareportingService, err := dfareporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package dfareporting // import "google.golang.org/api/dfareporting/v3.3"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	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.3"
77const apiName = "dfareporting"
78const apiVersion = "v3.3"
79const basePath = "https://www.googleapis.com/dfareporting/v3.3/"
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.DirectorySites = NewDirectorySitesService(s)
152	s.DynamicTargetingKeys = NewDynamicTargetingKeysService(s)
153	s.EventTags = NewEventTagsService(s)
154	s.Files = NewFilesService(s)
155	s.FloodlightActivities = NewFloodlightActivitiesService(s)
156	s.FloodlightActivityGroups = NewFloodlightActivityGroupsService(s)
157	s.FloodlightConfigurations = NewFloodlightConfigurationsService(s)
158	s.InventoryItems = NewInventoryItemsService(s)
159	s.Languages = NewLanguagesService(s)
160	s.Metros = NewMetrosService(s)
161	s.MobileApps = NewMobileAppsService(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	DirectorySites *DirectorySitesService
244
245	DynamicTargetingKeys *DynamicTargetingKeysService
246
247	EventTags *EventTagsService
248
249	Files *FilesService
250
251	FloodlightActivities *FloodlightActivitiesService
252
253	FloodlightActivityGroups *FloodlightActivityGroupsService
254
255	FloodlightConfigurations *FloodlightConfigurationsService
256
257	InventoryItems *InventoryItemsService
258
259	Languages *LanguagesService
260
261	Metros *MetrosService
262
263	MobileApps *MobileAppsService
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 NewDirectorySitesService(s *Service) *DirectorySitesService {
540	rs := &DirectorySitesService{s: s}
541	return rs
542}
543
544type DirectorySitesService struct {
545	s *Service
546}
547
548func NewDynamicTargetingKeysService(s *Service) *DynamicTargetingKeysService {
549	rs := &DynamicTargetingKeysService{s: s}
550	return rs
551}
552
553type DynamicTargetingKeysService struct {
554	s *Service
555}
556
557func NewEventTagsService(s *Service) *EventTagsService {
558	rs := &EventTagsService{s: s}
559	return rs
560}
561
562type EventTagsService struct {
563	s *Service
564}
565
566func NewFilesService(s *Service) *FilesService {
567	rs := &FilesService{s: s}
568	return rs
569}
570
571type FilesService struct {
572	s *Service
573}
574
575func NewFloodlightActivitiesService(s *Service) *FloodlightActivitiesService {
576	rs := &FloodlightActivitiesService{s: s}
577	return rs
578}
579
580type FloodlightActivitiesService struct {
581	s *Service
582}
583
584func NewFloodlightActivityGroupsService(s *Service) *FloodlightActivityGroupsService {
585	rs := &FloodlightActivityGroupsService{s: s}
586	return rs
587}
588
589type FloodlightActivityGroupsService struct {
590	s *Service
591}
592
593func NewFloodlightConfigurationsService(s *Service) *FloodlightConfigurationsService {
594	rs := &FloodlightConfigurationsService{s: s}
595	return rs
596}
597
598type FloodlightConfigurationsService struct {
599	s *Service
600}
601
602func NewInventoryItemsService(s *Service) *InventoryItemsService {
603	rs := &InventoryItemsService{s: s}
604	return rs
605}
606
607type InventoryItemsService struct {
608	s *Service
609}
610
611func NewLanguagesService(s *Service) *LanguagesService {
612	rs := &LanguagesService{s: s}
613	return rs
614}
615
616type LanguagesService struct {
617	s *Service
618}
619
620func NewMetrosService(s *Service) *MetrosService {
621	rs := &MetrosService{s: s}
622	return rs
623}
624
625type MetrosService struct {
626	s *Service
627}
628
629func NewMobileAppsService(s *Service) *MobileAppsService {
630	rs := &MobileAppsService{s: s}
631	return rs
632}
633
634type MobileAppsService 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	// - "51" for EGP
982	CurrencyId int64 `json:"currencyId,omitempty,string"`
983
984	// DefaultCreativeSizeId: Default placement dimensions for this account.
985	DefaultCreativeSizeId int64 `json:"defaultCreativeSizeId,omitempty,string"`
986
987	// Description: Description of this account.
988	Description string `json:"description,omitempty"`
989
990	// Id: ID of this account. This is a read-only, auto-generated field.
991	Id int64 `json:"id,omitempty,string"`
992
993	// Kind: Identifies what kind of resource this is. Value: the fixed
994	// string "dfareporting#account".
995	Kind string `json:"kind,omitempty"`
996
997	// Locale: Locale of this account.
998	// Acceptable values are:
999	// - "cs" (Czech)
1000	// - "de" (German)
1001	// - "en" (English)
1002	// - "en-GB" (English United Kingdom)
1003	// - "es" (Spanish)
1004	// - "fr" (French)
1005	// - "it" (Italian)
1006	// - "ja" (Japanese)
1007	// - "ko" (Korean)
1008	// - "pl" (Polish)
1009	// - "pt-BR" (Portuguese Brazil)
1010	// - "ru" (Russian)
1011	// - "sv" (Swedish)
1012	// - "tr" (Turkish)
1013	// - "zh-CN" (Chinese Simplified)
1014	// - "zh-TW" (Chinese Traditional)
1015	Locale string `json:"locale,omitempty"`
1016
1017	// MaximumImageSize: Maximum image size allowed for this account, in
1018	// kilobytes. Value must be greater than or equal to 1.
1019	MaximumImageSize int64 `json:"maximumImageSize,omitempty,string"`
1020
1021	// Name: Name of this account. This is a required field, and must be
1022	// less than 128 characters long and be globally unique.
1023	Name string `json:"name,omitempty"`
1024
1025	// NielsenOcrEnabled: Whether campaigns created in this account will be
1026	// enabled for Nielsen OCR reach ratings by default.
1027	NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
1028
1029	// ReportsConfiguration: Reporting configuration of this account.
1030	ReportsConfiguration *ReportsConfiguration `json:"reportsConfiguration,omitempty"`
1031
1032	// ShareReportsWithTwitter: Share Path to Conversion reports with
1033	// Twitter.
1034	ShareReportsWithTwitter bool `json:"shareReportsWithTwitter,omitempty"`
1035
1036	// TeaserSizeLimit: File size limit in kilobytes of Rich Media teaser
1037	// creatives. Acceptable values are 1 to 10240, inclusive.
1038	TeaserSizeLimit int64 `json:"teaserSizeLimit,omitempty,string"`
1039
1040	// ServerResponse contains the HTTP response code and headers from the
1041	// server.
1042	googleapi.ServerResponse `json:"-"`
1043
1044	// ForceSendFields is a list of field names (e.g.
1045	// "AccountPermissionIds") to unconditionally include in API requests.
1046	// By default, fields with empty values are omitted from API requests.
1047	// However, any non-pointer, non-interface field appearing in
1048	// ForceSendFields will be sent to the server regardless of whether the
1049	// field is empty or not. This may be used to include empty fields in
1050	// Patch requests.
1051	ForceSendFields []string `json:"-"`
1052
1053	// NullFields is a list of field names (e.g. "AccountPermissionIds") to
1054	// include in API requests with the JSON null value. By default, fields
1055	// with empty values are omitted from API requests. However, any field
1056	// with an empty value appearing in NullFields will be sent to the
1057	// server as null. It is an error if a field in this list has a
1058	// non-empty value. This may be used to include null fields in Patch
1059	// requests.
1060	NullFields []string `json:"-"`
1061}
1062
1063func (s *Account) MarshalJSON() ([]byte, error) {
1064	type NoMethod Account
1065	raw := NoMethod(*s)
1066	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1067}
1068
1069// AccountActiveAdSummary: Gets a summary of active ads in an account.
1070type AccountActiveAdSummary struct {
1071	// AccountId: ID of the account.
1072	AccountId int64 `json:"accountId,omitempty,string"`
1073
1074	// ActiveAds: Ads that have been activated for the account
1075	ActiveAds int64 `json:"activeAds,omitempty,string"`
1076
1077	// ActiveAdsLimitTier: Maximum number of active ads allowed for the
1078	// account.
1079	//
1080	// Possible values:
1081	//   "ACTIVE_ADS_TIER_100K"
1082	//   "ACTIVE_ADS_TIER_1M"
1083	//   "ACTIVE_ADS_TIER_200K"
1084	//   "ACTIVE_ADS_TIER_300K"
1085	//   "ACTIVE_ADS_TIER_40K"
1086	//   "ACTIVE_ADS_TIER_500K"
1087	//   "ACTIVE_ADS_TIER_750K"
1088	//   "ACTIVE_ADS_TIER_75K"
1089	ActiveAdsLimitTier string `json:"activeAdsLimitTier,omitempty"`
1090
1091	// AvailableAds: Ads that can be activated for the account.
1092	AvailableAds int64 `json:"availableAds,omitempty,string"`
1093
1094	// Kind: Identifies what kind of resource this is. Value: the fixed
1095	// string "dfareporting#accountActiveAdSummary".
1096	Kind string `json:"kind,omitempty"`
1097
1098	// ServerResponse contains the HTTP response code and headers from the
1099	// server.
1100	googleapi.ServerResponse `json:"-"`
1101
1102	// ForceSendFields is a list of field names (e.g. "AccountId") to
1103	// unconditionally include in API requests. By default, fields with
1104	// empty values are omitted from API requests. However, any non-pointer,
1105	// non-interface field appearing in ForceSendFields will be sent to the
1106	// server regardless of whether the field is empty or not. This may be
1107	// used to include empty fields in Patch requests.
1108	ForceSendFields []string `json:"-"`
1109
1110	// NullFields is a list of field names (e.g. "AccountId") to include in
1111	// API requests with the JSON null value. By default, fields with empty
1112	// values are omitted from API requests. However, any field with an
1113	// empty value appearing in NullFields will be sent to the server as
1114	// null. It is an error if a field in this list has a non-empty value.
1115	// This may be used to include null fields in Patch requests.
1116	NullFields []string `json:"-"`
1117}
1118
1119func (s *AccountActiveAdSummary) MarshalJSON() ([]byte, error) {
1120	type NoMethod AccountActiveAdSummary
1121	raw := NoMethod(*s)
1122	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1123}
1124
1125// AccountPermission: AccountPermissions contains information about a
1126// particular account permission. Some features of Campaign Manager
1127// require an account permission to be present in the account.
1128type AccountPermission struct {
1129	// AccountProfiles: Account profiles associated with this account
1130	// permission.
1131	//
1132	// Possible values are:
1133	// - "ACCOUNT_PROFILE_BASIC"
1134	// - "ACCOUNT_PROFILE_STANDARD"
1135	//
1136	// Possible values:
1137	//   "ACCOUNT_PROFILE_BASIC"
1138	//   "ACCOUNT_PROFILE_STANDARD"
1139	AccountProfiles []string `json:"accountProfiles,omitempty"`
1140
1141	// Id: ID of this account permission.
1142	Id int64 `json:"id,omitempty,string"`
1143
1144	// Kind: Identifies what kind of resource this is. Value: the fixed
1145	// string "dfareporting#accountPermission".
1146	Kind string `json:"kind,omitempty"`
1147
1148	// Level: Administrative level required to enable this account
1149	// permission.
1150	//
1151	// Possible values:
1152	//   "ADMINISTRATOR"
1153	//   "USER"
1154	Level string `json:"level,omitempty"`
1155
1156	// Name: Name of this account permission.
1157	Name string `json:"name,omitempty"`
1158
1159	// PermissionGroupId: Permission group of this account permission.
1160	PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
1161
1162	// ServerResponse contains the HTTP response code and headers from the
1163	// server.
1164	googleapi.ServerResponse `json:"-"`
1165
1166	// ForceSendFields is a list of field names (e.g. "AccountProfiles") to
1167	// unconditionally include in API requests. By default, fields with
1168	// empty values are omitted from API requests. However, any non-pointer,
1169	// non-interface field appearing in ForceSendFields will be sent to the
1170	// server regardless of whether the field is empty or not. This may be
1171	// used to include empty fields in Patch requests.
1172	ForceSendFields []string `json:"-"`
1173
1174	// NullFields is a list of field names (e.g. "AccountProfiles") to
1175	// include in API requests with the JSON null value. By default, fields
1176	// with empty values are omitted from API requests. However, any field
1177	// with an empty value appearing in NullFields will be sent to the
1178	// server as null. It is an error if a field in this list has a
1179	// non-empty value. This may be used to include null fields in Patch
1180	// requests.
1181	NullFields []string `json:"-"`
1182}
1183
1184func (s *AccountPermission) MarshalJSON() ([]byte, error) {
1185	type NoMethod AccountPermission
1186	raw := NoMethod(*s)
1187	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1188}
1189
1190// AccountPermissionGroup: AccountPermissionGroups contains a mapping of
1191// permission group IDs to names. A permission group is a grouping of
1192// account permissions.
1193type AccountPermissionGroup struct {
1194	// Id: ID of this account permission group.
1195	Id int64 `json:"id,omitempty,string"`
1196
1197	// Kind: Identifies what kind of resource this is. Value: the fixed
1198	// string "dfareporting#accountPermissionGroup".
1199	Kind string `json:"kind,omitempty"`
1200
1201	// Name: Name of this account permission group.
1202	Name string `json:"name,omitempty"`
1203
1204	// ServerResponse contains the HTTP response code and headers from the
1205	// server.
1206	googleapi.ServerResponse `json:"-"`
1207
1208	// ForceSendFields is a list of field names (e.g. "Id") to
1209	// unconditionally include in API requests. By default, fields with
1210	// empty values are omitted from API requests. However, any non-pointer,
1211	// non-interface field appearing in ForceSendFields will be sent to the
1212	// server regardless of whether the field is empty or not. This may be
1213	// used to include empty fields in Patch requests.
1214	ForceSendFields []string `json:"-"`
1215
1216	// NullFields is a list of field names (e.g. "Id") to include in API
1217	// requests with the JSON null value. By default, fields with empty
1218	// values are omitted from API requests. However, any field with an
1219	// empty value appearing in NullFields will be sent to the server as
1220	// null. It is an error if a field in this list has a non-empty value.
1221	// This may be used to include null fields in Patch requests.
1222	NullFields []string `json:"-"`
1223}
1224
1225func (s *AccountPermissionGroup) MarshalJSON() ([]byte, error) {
1226	type NoMethod AccountPermissionGroup
1227	raw := NoMethod(*s)
1228	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1229}
1230
1231// AccountPermissionGroupsListResponse: Account Permission Group List
1232// Response
1233type AccountPermissionGroupsListResponse struct {
1234	// AccountPermissionGroups: Account permission group collection.
1235	AccountPermissionGroups []*AccountPermissionGroup `json:"accountPermissionGroups,omitempty"`
1236
1237	// Kind: Identifies what kind of resource this is. Value: the fixed
1238	// string "dfareporting#accountPermissionGroupsListResponse".
1239	Kind string `json:"kind,omitempty"`
1240
1241	// ServerResponse contains the HTTP response code and headers from the
1242	// server.
1243	googleapi.ServerResponse `json:"-"`
1244
1245	// ForceSendFields is a list of field names (e.g.
1246	// "AccountPermissionGroups") to unconditionally include in API
1247	// requests. By default, fields with empty values are omitted from API
1248	// requests. However, any non-pointer, non-interface field appearing in
1249	// ForceSendFields will be sent to the server regardless of whether the
1250	// field is empty or not. This may be used to include empty fields in
1251	// Patch requests.
1252	ForceSendFields []string `json:"-"`
1253
1254	// NullFields is a list of field names (e.g. "AccountPermissionGroups")
1255	// to include in API requests with the JSON null value. By default,
1256	// fields with empty values are omitted from API requests. However, any
1257	// field with an empty value appearing in NullFields will be sent to the
1258	// server as null. It is an error if a field in this list has a
1259	// non-empty value. This may be used to include null fields in Patch
1260	// requests.
1261	NullFields []string `json:"-"`
1262}
1263
1264func (s *AccountPermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
1265	type NoMethod AccountPermissionGroupsListResponse
1266	raw := NoMethod(*s)
1267	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1268}
1269
1270// AccountPermissionsListResponse: Account Permission List Response
1271type AccountPermissionsListResponse struct {
1272	// AccountPermissions: Account permission collection.
1273	AccountPermissions []*AccountPermission `json:"accountPermissions,omitempty"`
1274
1275	// Kind: Identifies what kind of resource this is. Value: the fixed
1276	// string "dfareporting#accountPermissionsListResponse".
1277	Kind string `json:"kind,omitempty"`
1278
1279	// ServerResponse contains the HTTP response code and headers from the
1280	// server.
1281	googleapi.ServerResponse `json:"-"`
1282
1283	// ForceSendFields is a list of field names (e.g. "AccountPermissions")
1284	// to unconditionally include in API requests. By default, fields with
1285	// empty values are omitted from API requests. However, any non-pointer,
1286	// non-interface field appearing in ForceSendFields will be sent to the
1287	// server regardless of whether the field is empty or not. This may be
1288	// used to include empty fields in Patch requests.
1289	ForceSendFields []string `json:"-"`
1290
1291	// NullFields is a list of field names (e.g. "AccountPermissions") to
1292	// include in API requests with the JSON null value. By default, fields
1293	// with empty values are omitted from API requests. However, any field
1294	// with an empty value appearing in NullFields will be sent to the
1295	// server as null. It is an error if a field in this list has a
1296	// non-empty value. This may be used to include null fields in Patch
1297	// requests.
1298	NullFields []string `json:"-"`
1299}
1300
1301func (s *AccountPermissionsListResponse) MarshalJSON() ([]byte, error) {
1302	type NoMethod AccountPermissionsListResponse
1303	raw := NoMethod(*s)
1304	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1305}
1306
1307// AccountUserProfile: AccountUserProfiles contains properties of a
1308// Campaign Manager user profile. This resource is specifically for
1309// managing user profiles, whereas UserProfiles is for accessing the
1310// API.
1311type AccountUserProfile struct {
1312	// AccountId: Account ID of the user profile. This is a read-only field
1313	// that can be left blank.
1314	AccountId int64 `json:"accountId,omitempty,string"`
1315
1316	// Active: Whether this user profile is active. This defaults to false,
1317	// and must be set true on insert for the user profile to be usable.
1318	Active bool `json:"active,omitempty"`
1319
1320	// AdvertiserFilter: Filter that describes which advertisers are visible
1321	// to the user profile.
1322	AdvertiserFilter *ObjectFilter `json:"advertiserFilter,omitempty"`
1323
1324	// CampaignFilter: Filter that describes which campaigns are visible to
1325	// the user profile.
1326	CampaignFilter *ObjectFilter `json:"campaignFilter,omitempty"`
1327
1328	// Comments: Comments for this user profile.
1329	Comments string `json:"comments,omitempty"`
1330
1331	// Email: Email of the user profile. The email addresss must be linked
1332	// to a Google Account. This field is required on insertion and is
1333	// read-only after insertion.
1334	Email string `json:"email,omitempty"`
1335
1336	// Id: ID of the user profile. This is a read-only, auto-generated
1337	// field.
1338	Id int64 `json:"id,omitempty,string"`
1339
1340	// Kind: Identifies what kind of resource this is. Value: the fixed
1341	// string "dfareporting#accountUserProfile".
1342	Kind string `json:"kind,omitempty"`
1343
1344	// Locale: Locale of the user profile. This is a required
1345	// field.
1346	// Acceptable values are:
1347	// - "cs" (Czech)
1348	// - "de" (German)
1349	// - "en" (English)
1350	// - "en-GB" (English United Kingdom)
1351	// - "es" (Spanish)
1352	// - "fr" (French)
1353	// - "it" (Italian)
1354	// - "ja" (Japanese)
1355	// - "ko" (Korean)
1356	// - "pl" (Polish)
1357	// - "pt-BR" (Portuguese Brazil)
1358	// - "ru" (Russian)
1359	// - "sv" (Swedish)
1360	// - "tr" (Turkish)
1361	// - "zh-CN" (Chinese Simplified)
1362	// - "zh-TW" (Chinese Traditional)
1363	Locale string `json:"locale,omitempty"`
1364
1365	// Name: Name of the user profile. This is a required field. Must be
1366	// less than 64 characters long, must be globally unique, and cannot
1367	// contain whitespace or any of the following characters: "&;"#%,".
1368	Name string `json:"name,omitempty"`
1369
1370	// SiteFilter: Filter that describes which sites are visible to the user
1371	// profile.
1372	SiteFilter *ObjectFilter `json:"siteFilter,omitempty"`
1373
1374	// SubaccountId: Subaccount ID of the user profile. This is a read-only
1375	// field that can be left blank.
1376	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1377
1378	// TraffickerType: Trafficker type of this user profile. This is a
1379	// read-only field.
1380	//
1381	// Possible values:
1382	//   "EXTERNAL_TRAFFICKER"
1383	//   "INTERNAL_NON_TRAFFICKER"
1384	//   "INTERNAL_TRAFFICKER"
1385	TraffickerType string `json:"traffickerType,omitempty"`
1386
1387	// UserAccessType: User type of the user profile. This is a read-only
1388	// field that can be left blank.
1389	//
1390	// Possible values:
1391	//   "INTERNAL_ADMINISTRATOR"
1392	//   "NORMAL_USER"
1393	//   "READ_ONLY_SUPER_USER"
1394	//   "SUPER_USER"
1395	UserAccessType string `json:"userAccessType,omitempty"`
1396
1397	// UserRoleFilter: Filter that describes which user roles are visible to
1398	// the user profile.
1399	UserRoleFilter *ObjectFilter `json:"userRoleFilter,omitempty"`
1400
1401	// UserRoleId: User role ID of the user profile. This is a required
1402	// field.
1403	UserRoleId int64 `json:"userRoleId,omitempty,string"`
1404
1405	// ServerResponse contains the HTTP response code and headers from the
1406	// server.
1407	googleapi.ServerResponse `json:"-"`
1408
1409	// ForceSendFields is a list of field names (e.g. "AccountId") to
1410	// unconditionally include in API requests. By default, fields with
1411	// empty values are omitted from API requests. However, any non-pointer,
1412	// non-interface field appearing in ForceSendFields will be sent to the
1413	// server regardless of whether the field is empty or not. This may be
1414	// used to include empty fields in Patch requests.
1415	ForceSendFields []string `json:"-"`
1416
1417	// NullFields is a list of field names (e.g. "AccountId") to include in
1418	// API requests with the JSON null value. By default, fields with empty
1419	// values are omitted from API requests. However, any field with an
1420	// empty value appearing in NullFields will be sent to the server as
1421	// null. It is an error if a field in this list has a non-empty value.
1422	// This may be used to include null fields in Patch requests.
1423	NullFields []string `json:"-"`
1424}
1425
1426func (s *AccountUserProfile) MarshalJSON() ([]byte, error) {
1427	type NoMethod AccountUserProfile
1428	raw := NoMethod(*s)
1429	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1430}
1431
1432// AccountUserProfilesListResponse: Account User Profile List Response
1433type AccountUserProfilesListResponse struct {
1434	// AccountUserProfiles: Account user profile collection.
1435	AccountUserProfiles []*AccountUserProfile `json:"accountUserProfiles,omitempty"`
1436
1437	// Kind: Identifies what kind of resource this is. Value: the fixed
1438	// string "dfareporting#accountUserProfilesListResponse".
1439	Kind string `json:"kind,omitempty"`
1440
1441	// NextPageToken: Pagination token to be used for the next list
1442	// operation.
1443	NextPageToken string `json:"nextPageToken,omitempty"`
1444
1445	// ServerResponse contains the HTTP response code and headers from the
1446	// server.
1447	googleapi.ServerResponse `json:"-"`
1448
1449	// ForceSendFields is a list of field names (e.g. "AccountUserProfiles")
1450	// to unconditionally include in API requests. By default, fields with
1451	// empty values are omitted from API requests. However, any non-pointer,
1452	// non-interface field appearing in ForceSendFields will be sent to the
1453	// server regardless of whether the field is empty or not. This may be
1454	// used to include empty fields in Patch requests.
1455	ForceSendFields []string `json:"-"`
1456
1457	// NullFields is a list of field names (e.g. "AccountUserProfiles") to
1458	// include in API requests with the JSON null value. By default, fields
1459	// with empty values are omitted from API requests. However, any field
1460	// with an empty value appearing in NullFields will be sent to the
1461	// server as null. It is an error if a field in this list has a
1462	// non-empty value. This may be used to include null fields in Patch
1463	// requests.
1464	NullFields []string `json:"-"`
1465}
1466
1467func (s *AccountUserProfilesListResponse) MarshalJSON() ([]byte, error) {
1468	type NoMethod AccountUserProfilesListResponse
1469	raw := NoMethod(*s)
1470	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1471}
1472
1473// AccountsListResponse: Account List Response
1474type AccountsListResponse struct {
1475	// Accounts: Account collection.
1476	Accounts []*Account `json:"accounts,omitempty"`
1477
1478	// Kind: Identifies what kind of resource this is. Value: the fixed
1479	// string "dfareporting#accountsListResponse".
1480	Kind string `json:"kind,omitempty"`
1481
1482	// NextPageToken: Pagination token to be used for the next list
1483	// operation.
1484	NextPageToken string `json:"nextPageToken,omitempty"`
1485
1486	// ServerResponse contains the HTTP response code and headers from the
1487	// server.
1488	googleapi.ServerResponse `json:"-"`
1489
1490	// ForceSendFields is a list of field names (e.g. "Accounts") to
1491	// unconditionally include in API requests. By default, fields with
1492	// empty values are omitted from API requests. However, any non-pointer,
1493	// non-interface field appearing in ForceSendFields will be sent to the
1494	// server regardless of whether the field is empty or not. This may be
1495	// used to include empty fields in Patch requests.
1496	ForceSendFields []string `json:"-"`
1497
1498	// NullFields is a list of field names (e.g. "Accounts") to include in
1499	// API requests with the JSON null value. By default, fields with empty
1500	// values are omitted from API requests. However, any field with an
1501	// empty value appearing in NullFields will be sent to the server as
1502	// null. It is an error if a field in this list has a non-empty value.
1503	// This may be used to include null fields in Patch requests.
1504	NullFields []string `json:"-"`
1505}
1506
1507func (s *AccountsListResponse) MarshalJSON() ([]byte, error) {
1508	type NoMethod AccountsListResponse
1509	raw := NoMethod(*s)
1510	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1511}
1512
1513// Activities: Represents an activity group.
1514type Activities struct {
1515	// Filters: List of activity filters. The dimension values need to be
1516	// all either of type "dfa:activity" or "dfa:activityGroup".
1517	Filters []*DimensionValue `json:"filters,omitempty"`
1518
1519	// Kind: The kind of resource this is, in this case
1520	// dfareporting#activities.
1521	Kind string `json:"kind,omitempty"`
1522
1523	// MetricNames: List of names of floodlight activity metrics.
1524	MetricNames []string `json:"metricNames,omitempty"`
1525
1526	// ForceSendFields is a list of field names (e.g. "Filters") to
1527	// unconditionally include in API requests. By default, fields with
1528	// empty values are omitted from API requests. However, any non-pointer,
1529	// non-interface field appearing in ForceSendFields will be sent to the
1530	// server regardless of whether the field is empty or not. This may be
1531	// used to include empty fields in Patch requests.
1532	ForceSendFields []string `json:"-"`
1533
1534	// NullFields is a list of field names (e.g. "Filters") to include in
1535	// API requests with the JSON null value. By default, fields with empty
1536	// values are omitted from API requests. However, any field with an
1537	// empty value appearing in NullFields will be sent to the server as
1538	// null. It is an error if a field in this list has a non-empty value.
1539	// This may be used to include null fields in Patch requests.
1540	NullFields []string `json:"-"`
1541}
1542
1543func (s *Activities) MarshalJSON() ([]byte, error) {
1544	type NoMethod Activities
1545	raw := NoMethod(*s)
1546	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1547}
1548
1549// Ad: Contains properties of a Campaign Manager ad.
1550type Ad struct {
1551	// AccountId: Account ID of this ad. This is a read-only field that can
1552	// be left blank.
1553	AccountId int64 `json:"accountId,omitempty,string"`
1554
1555	// Active: Whether this ad is active. When true, archived must be false.
1556	Active bool `json:"active,omitempty"`
1557
1558	// AdvertiserId: Advertiser ID of this ad. This is a required field on
1559	// insertion.
1560	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
1561
1562	// AdvertiserIdDimensionValue: Dimension value for the ID of the
1563	// advertiser. This is a read-only, auto-generated field.
1564	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
1565
1566	// Archived: Whether this ad is archived. When true, active must be
1567	// false.
1568	Archived bool `json:"archived,omitempty"`
1569
1570	// AudienceSegmentId: Audience segment ID that is being targeted for
1571	// this ad. Applicable when type is AD_SERVING_STANDARD_AD.
1572	AudienceSegmentId int64 `json:"audienceSegmentId,omitempty,string"`
1573
1574	// CampaignId: Campaign ID of this ad. This is a required field on
1575	// insertion.
1576	CampaignId int64 `json:"campaignId,omitempty,string"`
1577
1578	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
1579	// This is a read-only, auto-generated field.
1580	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
1581
1582	// ClickThroughUrl: Click-through URL for this ad. This is a required
1583	// field on insertion. Applicable when type is AD_SERVING_CLICK_TRACKER.
1584	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
1585
1586	// ClickThroughUrlSuffixProperties: Click-through URL suffix properties
1587	// for this ad. Applies to the URL in the ad or (if overriding ad
1588	// properties) the URL in the creative.
1589	ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
1590
1591	// Comments: Comments for this ad.
1592	Comments string `json:"comments,omitempty"`
1593
1594	// Compatibility: Compatibility of this ad. Applicable when type is
1595	// AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to
1596	// either rendering on desktop or on mobile devices or in mobile apps
1597	// for regular or interstitial ads, respectively. APP and
1598	// APP_INTERSTITIAL are only used for existing default ads. New mobile
1599	// placements must be assigned DISPLAY or DISPLAY_INTERSTITIAL and
1600	// default ads created for those placements will be limited to those
1601	// compatibility types. IN_STREAM_VIDEO refers to rendering in-stream
1602	// video ads developed with the VAST standard.
1603	//
1604	// Possible values:
1605	//   "APP"
1606	//   "APP_INTERSTITIAL"
1607	//   "DISPLAY"
1608	//   "DISPLAY_INTERSTITIAL"
1609	//   "IN_STREAM_AUDIO"
1610	//   "IN_STREAM_VIDEO"
1611	Compatibility string `json:"compatibility,omitempty"`
1612
1613	// CreateInfo: Information about the creation of this ad. This is a
1614	// read-only field.
1615	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
1616
1617	// CreativeGroupAssignments: Creative group assignments for this ad.
1618	// Applicable when type is AD_SERVING_CLICK_TRACKER. Only one assignment
1619	// per creative group number is allowed for a maximum of two
1620	// assignments.
1621	CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
1622
1623	// CreativeRotation: Creative rotation for this ad. Applicable when type
1624	// is AD_SERVING_DEFAULT_AD, AD_SERVING_STANDARD_AD, or
1625	// AD_SERVING_TRACKING. When type is AD_SERVING_DEFAULT_AD, this field
1626	// should have exactly one creativeAssignment.
1627	CreativeRotation *CreativeRotation `json:"creativeRotation,omitempty"`
1628
1629	// DayPartTargeting: Time and day targeting information for this ad.
1630	// This field must be left blank if the ad is using a targeting
1631	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1632	DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
1633
1634	// DefaultClickThroughEventTagProperties: Default click-through event
1635	// tag properties for this ad.
1636	DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
1637
1638	// DeliverySchedule: Delivery schedule information for this ad.
1639	// Applicable when type is AD_SERVING_STANDARD_AD or
1640	// AD_SERVING_TRACKING. This field along with subfields priority and
1641	// impressionRatio are required on insertion when type is
1642	// AD_SERVING_STANDARD_AD.
1643	DeliverySchedule *DeliverySchedule `json:"deliverySchedule,omitempty"`
1644
1645	// DynamicClickTracker: Whether this ad is a dynamic click tracker.
1646	// Applicable when type is AD_SERVING_CLICK_TRACKER. This is a required
1647	// field on insert, and is read-only after insert.
1648	DynamicClickTracker bool `json:"dynamicClickTracker,omitempty"`
1649
1650	// EndTime: Date and time that this ad should stop serving. Must be
1651	// later than the start time. This is a required field on insertion.
1652	EndTime string `json:"endTime,omitempty"`
1653
1654	// EventTagOverrides: Event tag overrides for this ad.
1655	EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
1656
1657	// GeoTargeting: Geographical targeting information for this ad. This
1658	// field must be left blank if the ad is using a targeting template.
1659	// Applicable when type is AD_SERVING_STANDARD_AD.
1660	GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
1661
1662	// Id: ID of this ad. This is a read-only, auto-generated field.
1663	Id int64 `json:"id,omitempty,string"`
1664
1665	// IdDimensionValue: Dimension value for the ID of this ad. This is a
1666	// read-only, auto-generated field.
1667	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1668
1669	// KeyValueTargetingExpression: Key-value targeting information for this
1670	// ad. This field must be left blank if the ad is using a targeting
1671	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1672	KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
1673
1674	// Kind: Identifies what kind of resource this is. Value: the fixed
1675	// string "dfareporting#ad".
1676	Kind string `json:"kind,omitempty"`
1677
1678	// LanguageTargeting: Language targeting information for this ad. This
1679	// field must be left blank if the ad is using a targeting template.
1680	// Applicable when type is AD_SERVING_STANDARD_AD.
1681	LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
1682
1683	// LastModifiedInfo: Information about the most recent modification of
1684	// this ad. This is a read-only field.
1685	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
1686
1687	// Name: Name of this ad. This is a required field and must be less than
1688	// 256 characters long.
1689	Name string `json:"name,omitempty"`
1690
1691	// PlacementAssignments: Placement assignments for this ad.
1692	PlacementAssignments []*PlacementAssignment `json:"placementAssignments,omitempty"`
1693
1694	// RemarketingListExpression: Remarketing list targeting expression for
1695	// this ad. This field must be left blank if the ad is using a targeting
1696	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1697	RemarketingListExpression *ListTargetingExpression `json:"remarketingListExpression,omitempty"`
1698
1699	// Size: Size of this ad. Applicable when type is AD_SERVING_DEFAULT_AD.
1700	Size *Size `json:"size,omitempty"`
1701
1702	// SslCompliant: Whether this ad is ssl compliant. This is a read-only
1703	// field that is auto-generated when the ad is inserted or updated.
1704	SslCompliant bool `json:"sslCompliant,omitempty"`
1705
1706	// SslRequired: Whether this ad requires ssl. This is a read-only field
1707	// that is auto-generated when the ad is inserted or updated.
1708	SslRequired bool `json:"sslRequired,omitempty"`
1709
1710	// StartTime: Date and time that this ad should start serving. If
1711	// creating an ad, this field must be a time in the future. This is a
1712	// required field on insertion.
1713	StartTime string `json:"startTime,omitempty"`
1714
1715	// SubaccountId: Subaccount ID of this ad. This is a read-only field
1716	// that can be left blank.
1717	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1718
1719	// TargetingTemplateId: Targeting template ID, used to apply
1720	// preconfigured targeting information to this ad. This cannot be set
1721	// while any of dayPartTargeting, geoTargeting,
1722	// keyValueTargetingExpression, languageTargeting,
1723	// remarketingListExpression, or technologyTargeting are set. Applicable
1724	// when type is AD_SERVING_STANDARD_AD.
1725	TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
1726
1727	// TechnologyTargeting: Technology platform targeting information for
1728	// this ad. This field must be left blank if the ad is using a targeting
1729	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1730	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
1731
1732	// Type: Type of ad. This is a required field on insertion. Note that
1733	// default ads (AD_SERVING_DEFAULT_AD) cannot be created directly (see
1734	// Creative resource).
1735	//
1736	// Possible values:
1737	//   "AD_SERVING_CLICK_TRACKER"
1738	//   "AD_SERVING_DEFAULT_AD"
1739	//   "AD_SERVING_STANDARD_AD"
1740	//   "AD_SERVING_TRACKING"
1741	Type string `json:"type,omitempty"`
1742
1743	// ServerResponse contains the HTTP response code and headers from the
1744	// server.
1745	googleapi.ServerResponse `json:"-"`
1746
1747	// ForceSendFields is a list of field names (e.g. "AccountId") to
1748	// unconditionally include in API requests. By default, fields with
1749	// empty values are omitted from API requests. However, any non-pointer,
1750	// non-interface field appearing in ForceSendFields will be sent to the
1751	// server regardless of whether the field is empty or not. This may be
1752	// used to include empty fields in Patch requests.
1753	ForceSendFields []string `json:"-"`
1754
1755	// NullFields is a list of field names (e.g. "AccountId") to include in
1756	// API requests with the JSON null value. By default, fields with empty
1757	// values are omitted from API requests. However, any field with an
1758	// empty value appearing in NullFields will be sent to the server as
1759	// null. It is an error if a field in this list has a non-empty value.
1760	// This may be used to include null fields in Patch requests.
1761	NullFields []string `json:"-"`
1762}
1763
1764func (s *Ad) MarshalJSON() ([]byte, error) {
1765	type NoMethod Ad
1766	raw := NoMethod(*s)
1767	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1768}
1769
1770// AdBlockingConfiguration: Campaign ad blocking settings.
1771type AdBlockingConfiguration struct {
1772	// ClickThroughUrl: Click-through URL used by brand-neutral ads. This is
1773	// a required field when overrideClickThroughUrl is set to true.
1774	ClickThroughUrl string `json:"clickThroughUrl,omitempty"`
1775
1776	// CreativeBundleId: ID of a creative bundle to use for this campaign.
1777	// If set, brand-neutral ads will select creatives from this bundle.
1778	// Otherwise, a default transparent pixel will be used.
1779	CreativeBundleId int64 `json:"creativeBundleId,omitempty,string"`
1780
1781	// Enabled: Whether this campaign has enabled ad blocking. When true, ad
1782	// blocking is enabled for placements in the campaign, but this may be
1783	// overridden by site and placement settings. When false, ad blocking is
1784	// disabled for all placements under the campaign, regardless of site
1785	// and placement settings.
1786	Enabled bool `json:"enabled,omitempty"`
1787
1788	// OverrideClickThroughUrl: Whether the brand-neutral ad's click-through
1789	// URL comes from the campaign's creative bundle or the override URL.
1790	// Must be set to true if ad blocking is enabled and no creative bundle
1791	// is configured.
1792	OverrideClickThroughUrl bool `json:"overrideClickThroughUrl,omitempty"`
1793
1794	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
1795	// unconditionally include in API requests. By default, fields with
1796	// empty values are omitted from API requests. However, any non-pointer,
1797	// non-interface field appearing in ForceSendFields will be sent to the
1798	// server regardless of whether the field is empty or not. This may be
1799	// used to include empty fields in Patch requests.
1800	ForceSendFields []string `json:"-"`
1801
1802	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
1803	// include in API requests with the JSON null value. By default, fields
1804	// with empty values are omitted from API requests. However, any field
1805	// with an empty value appearing in NullFields will be sent to the
1806	// server as null. It is an error if a field in this list has a
1807	// non-empty value. This may be used to include null fields in Patch
1808	// requests.
1809	NullFields []string `json:"-"`
1810}
1811
1812func (s *AdBlockingConfiguration) MarshalJSON() ([]byte, error) {
1813	type NoMethod AdBlockingConfiguration
1814	raw := NoMethod(*s)
1815	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1816}
1817
1818// AdSlot: Ad Slot
1819type AdSlot struct {
1820	// Comment: Comment for this ad slot.
1821	Comment string `json:"comment,omitempty"`
1822
1823	// Compatibility: Ad slot compatibility. DISPLAY and
1824	// DISPLAY_INTERSTITIAL refer to rendering either on desktop, mobile
1825	// devices or in mobile apps for regular or interstitial ads
1826	// respectively. APP and APP_INTERSTITIAL are for rendering in mobile
1827	// apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads
1828	// developed with the VAST standard.
1829	//
1830	// Possible values:
1831	//   "APP"
1832	//   "APP_INTERSTITIAL"
1833	//   "DISPLAY"
1834	//   "DISPLAY_INTERSTITIAL"
1835	//   "IN_STREAM_AUDIO"
1836	//   "IN_STREAM_VIDEO"
1837	Compatibility string `json:"compatibility,omitempty"`
1838
1839	// Height: Height of this ad slot.
1840	Height int64 `json:"height,omitempty,string"`
1841
1842	// LinkedPlacementId: ID of the placement from an external platform that
1843	// is linked to this ad slot.
1844	LinkedPlacementId int64 `json:"linkedPlacementId,omitempty,string"`
1845
1846	// Name: Name of this ad slot.
1847	Name string `json:"name,omitempty"`
1848
1849	// PaymentSourceType: Payment source type of this ad slot.
1850	//
1851	// Possible values:
1852	//   "PLANNING_PAYMENT_SOURCE_TYPE_AGENCY_PAID"
1853	//   "PLANNING_PAYMENT_SOURCE_TYPE_PUBLISHER_PAID"
1854	PaymentSourceType string `json:"paymentSourceType,omitempty"`
1855
1856	// Primary: Primary ad slot of a roadblock inventory item.
1857	Primary bool `json:"primary,omitempty"`
1858
1859	// Width: Width of this ad slot.
1860	Width int64 `json:"width,omitempty,string"`
1861
1862	// ForceSendFields is a list of field names (e.g. "Comment") to
1863	// unconditionally include in API requests. By default, fields with
1864	// empty values are omitted from API requests. However, any non-pointer,
1865	// non-interface field appearing in ForceSendFields will be sent to the
1866	// server regardless of whether the field is empty or not. This may be
1867	// used to include empty fields in Patch requests.
1868	ForceSendFields []string `json:"-"`
1869
1870	// NullFields is a list of field names (e.g. "Comment") to include in
1871	// API requests with the JSON null value. By default, fields with empty
1872	// values are omitted from API requests. However, any field with an
1873	// empty value appearing in NullFields will be sent to the server as
1874	// null. It is an error if a field in this list has a non-empty value.
1875	// This may be used to include null fields in Patch requests.
1876	NullFields []string `json:"-"`
1877}
1878
1879func (s *AdSlot) MarshalJSON() ([]byte, error) {
1880	type NoMethod AdSlot
1881	raw := NoMethod(*s)
1882	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1883}
1884
1885// AdsListResponse: Ad List Response
1886type AdsListResponse struct {
1887	// Ads: Ad collection.
1888	Ads []*Ad `json:"ads,omitempty"`
1889
1890	// Kind: Identifies what kind of resource this is. Value: the fixed
1891	// string "dfareporting#adsListResponse".
1892	Kind string `json:"kind,omitempty"`
1893
1894	// NextPageToken: Pagination token to be used for the next list
1895	// operation.
1896	NextPageToken string `json:"nextPageToken,omitempty"`
1897
1898	// ServerResponse contains the HTTP response code and headers from the
1899	// server.
1900	googleapi.ServerResponse `json:"-"`
1901
1902	// ForceSendFields is a list of field names (e.g. "Ads") to
1903	// unconditionally include in API requests. By default, fields with
1904	// empty values are omitted from API requests. However, any non-pointer,
1905	// non-interface field appearing in ForceSendFields will be sent to the
1906	// server regardless of whether the field is empty or not. This may be
1907	// used to include empty fields in Patch requests.
1908	ForceSendFields []string `json:"-"`
1909
1910	// NullFields is a list of field names (e.g. "Ads") to include in API
1911	// requests with the JSON null value. By default, fields with empty
1912	// values are omitted from API requests. However, any field with an
1913	// empty value appearing in NullFields will be sent to the server as
1914	// null. It is an error if a field in this list has a non-empty value.
1915	// This may be used to include null fields in Patch requests.
1916	NullFields []string `json:"-"`
1917}
1918
1919func (s *AdsListResponse) MarshalJSON() ([]byte, error) {
1920	type NoMethod AdsListResponse
1921	raw := NoMethod(*s)
1922	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1923}
1924
1925// Advertiser: Contains properties of a Campaign Manager advertiser.
1926type Advertiser struct {
1927	// AccountId: Account ID of this advertiser.This is a read-only field
1928	// that can be left blank.
1929	AccountId int64 `json:"accountId,omitempty,string"`
1930
1931	// AdvertiserGroupId: ID of the advertiser group this advertiser belongs
1932	// to. You can group advertisers for reporting purposes, allowing you to
1933	// see aggregated information for all advertisers in each group.
1934	AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
1935
1936	// ClickThroughUrlSuffix: Suffix added to click-through URL of ad
1937	// creative associations under this advertiser. Must be less than 129
1938	// characters long.
1939	ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
1940
1941	// DefaultClickThroughEventTagId: ID of the click-through event tag to
1942	// apply by default to the landing pages of this advertiser's campaigns.
1943	DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
1944
1945	// DefaultEmail: Default email address used in sender field for tag
1946	// emails.
1947	DefaultEmail string `json:"defaultEmail,omitempty"`
1948
1949	// FloodlightConfigurationId: Floodlight configuration ID of this
1950	// advertiser. The floodlight configuration ID will be created
1951	// automatically, so on insert this field should be left blank. This
1952	// field can be set to another advertiser's floodlight configuration ID
1953	// in order to share that advertiser's floodlight configuration with
1954	// this advertiser, so long as:
1955	// - This advertiser's original floodlight configuration is not already
1956	// associated with floodlight activities or floodlight activity groups.
1957	//
1958	// - This advertiser's original floodlight configuration is not already
1959	// shared with another advertiser.
1960	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
1961
1962	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
1963	// of the floodlight configuration. This is a read-only, auto-generated
1964	// field.
1965	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
1966
1967	// Id: ID of this advertiser. This is a read-only, auto-generated field.
1968	Id int64 `json:"id,omitempty,string"`
1969
1970	// IdDimensionValue: Dimension value for the ID of this advertiser. This
1971	// is a read-only, auto-generated field.
1972	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1973
1974	// Kind: Identifies what kind of resource this is. Value: the fixed
1975	// string "dfareporting#advertiser".
1976	Kind string `json:"kind,omitempty"`
1977
1978	// Name: Name of this advertiser. This is a required field and must be
1979	// less than 256 characters long and unique among advertisers of the
1980	// same account.
1981	Name string `json:"name,omitempty"`
1982
1983	// OriginalFloodlightConfigurationId: Original floodlight configuration
1984	// before any sharing occurred. Set the floodlightConfigurationId of
1985	// this advertiser to originalFloodlightConfigurationId to unshare the
1986	// advertiser's current floodlight configuration. You cannot unshare an
1987	// advertiser's floodlight configuration if the shared configuration has
1988	// activities associated with any campaign or placement.
1989	OriginalFloodlightConfigurationId int64 `json:"originalFloodlightConfigurationId,omitempty,string"`
1990
1991	// Status: Status of this advertiser.
1992	//
1993	// Possible values:
1994	//   "APPROVED"
1995	//   "ON_HOLD"
1996	Status string `json:"status,omitempty"`
1997
1998	// SubaccountId: Subaccount ID of this advertiser.This is a read-only
1999	// field that can be left blank.
2000	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2001
2002	// Suspended: Suspension status of this advertiser.
2003	Suspended bool `json:"suspended,omitempty"`
2004
2005	// ServerResponse contains the HTTP response code and headers from the
2006	// server.
2007	googleapi.ServerResponse `json:"-"`
2008
2009	// ForceSendFields is a list of field names (e.g. "AccountId") to
2010	// unconditionally include in API requests. By default, fields with
2011	// empty values are omitted from API requests. However, any non-pointer,
2012	// non-interface field appearing in ForceSendFields will be sent to the
2013	// server regardless of whether the field is empty or not. This may be
2014	// used to include empty fields in Patch requests.
2015	ForceSendFields []string `json:"-"`
2016
2017	// NullFields is a list of field names (e.g. "AccountId") to include in
2018	// API requests with the JSON null value. By default, fields with empty
2019	// values are omitted from API requests. However, any field with an
2020	// empty value appearing in NullFields will be sent to the server as
2021	// null. It is an error if a field in this list has a non-empty value.
2022	// This may be used to include null fields in Patch requests.
2023	NullFields []string `json:"-"`
2024}
2025
2026func (s *Advertiser) MarshalJSON() ([]byte, error) {
2027	type NoMethod Advertiser
2028	raw := NoMethod(*s)
2029	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2030}
2031
2032// AdvertiserGroup: Groups advertisers together so that reports can be
2033// generated for the entire group at once.
2034type AdvertiserGroup struct {
2035	// AccountId: Account ID of this advertiser group. This is a read-only
2036	// field that can be left blank.
2037	AccountId int64 `json:"accountId,omitempty,string"`
2038
2039	// Id: ID of this advertiser group. This is a read-only, auto-generated
2040	// field.
2041	Id int64 `json:"id,omitempty,string"`
2042
2043	// Kind: Identifies what kind of resource this is. Value: the fixed
2044	// string "dfareporting#advertiserGroup".
2045	Kind string `json:"kind,omitempty"`
2046
2047	// Name: Name of this advertiser group. This is a required field and
2048	// must be less than 256 characters long and unique among advertiser
2049	// groups of the same account.
2050	Name string `json:"name,omitempty"`
2051
2052	// ServerResponse contains the HTTP response code and headers from the
2053	// server.
2054	googleapi.ServerResponse `json:"-"`
2055
2056	// ForceSendFields is a list of field names (e.g. "AccountId") to
2057	// unconditionally include in API requests. By default, fields with
2058	// empty values are omitted from API requests. However, any non-pointer,
2059	// non-interface field appearing in ForceSendFields will be sent to the
2060	// server regardless of whether the field is empty or not. This may be
2061	// used to include empty fields in Patch requests.
2062	ForceSendFields []string `json:"-"`
2063
2064	// NullFields is a list of field names (e.g. "AccountId") to include in
2065	// API requests with the JSON null value. By default, fields with empty
2066	// values are omitted from API requests. However, any field with an
2067	// empty value appearing in NullFields will be sent to the server as
2068	// null. It is an error if a field in this list has a non-empty value.
2069	// This may be used to include null fields in Patch requests.
2070	NullFields []string `json:"-"`
2071}
2072
2073func (s *AdvertiserGroup) MarshalJSON() ([]byte, error) {
2074	type NoMethod AdvertiserGroup
2075	raw := NoMethod(*s)
2076	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2077}
2078
2079// AdvertiserGroupsListResponse: Advertiser Group List Response
2080type AdvertiserGroupsListResponse struct {
2081	// AdvertiserGroups: Advertiser group collection.
2082	AdvertiserGroups []*AdvertiserGroup `json:"advertiserGroups,omitempty"`
2083
2084	// Kind: Identifies what kind of resource this is. Value: the fixed
2085	// string "dfareporting#advertiserGroupsListResponse".
2086	Kind string `json:"kind,omitempty"`
2087
2088	// NextPageToken: Pagination token to be used for the next list
2089	// operation.
2090	NextPageToken string `json:"nextPageToken,omitempty"`
2091
2092	// ServerResponse contains the HTTP response code and headers from the
2093	// server.
2094	googleapi.ServerResponse `json:"-"`
2095
2096	// ForceSendFields is a list of field names (e.g. "AdvertiserGroups") to
2097	// unconditionally include in API requests. By default, fields with
2098	// empty values are omitted from API requests. However, any non-pointer,
2099	// non-interface field appearing in ForceSendFields will be sent to the
2100	// server regardless of whether the field is empty or not. This may be
2101	// used to include empty fields in Patch requests.
2102	ForceSendFields []string `json:"-"`
2103
2104	// NullFields is a list of field names (e.g. "AdvertiserGroups") to
2105	// include in API requests with the JSON null value. By default, fields
2106	// with empty values are omitted from API requests. However, any field
2107	// with an empty value appearing in NullFields will be sent to the
2108	// server as null. It is an error if a field in this list has a
2109	// non-empty value. This may be used to include null fields in Patch
2110	// requests.
2111	NullFields []string `json:"-"`
2112}
2113
2114func (s *AdvertiserGroupsListResponse) MarshalJSON() ([]byte, error) {
2115	type NoMethod AdvertiserGroupsListResponse
2116	raw := NoMethod(*s)
2117	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2118}
2119
2120// AdvertiserLandingPagesListResponse: Landing Page List Response
2121type AdvertiserLandingPagesListResponse struct {
2122	// Kind: Identifies what kind of resource this is. Value: the fixed
2123	// string "dfareporting#advertiserLandingPagesListResponse".
2124	Kind string `json:"kind,omitempty"`
2125
2126	// LandingPages: Landing page collection
2127	LandingPages []*LandingPage `json:"landingPages,omitempty"`
2128
2129	// NextPageToken: Pagination token to be used for the next list
2130	// operation.
2131	NextPageToken string `json:"nextPageToken,omitempty"`
2132
2133	// ServerResponse contains the HTTP response code and headers from the
2134	// server.
2135	googleapi.ServerResponse `json:"-"`
2136
2137	// ForceSendFields is a list of field names (e.g. "Kind") to
2138	// unconditionally include in API requests. By default, fields with
2139	// empty values are omitted from API requests. However, any non-pointer,
2140	// non-interface field appearing in ForceSendFields will be sent to the
2141	// server regardless of whether the field is empty or not. This may be
2142	// used to include empty fields in Patch requests.
2143	ForceSendFields []string `json:"-"`
2144
2145	// NullFields is a list of field names (e.g. "Kind") to include in API
2146	// requests with the JSON null value. By default, fields with empty
2147	// values are omitted from API requests. However, any field with an
2148	// empty value appearing in NullFields will be sent to the server as
2149	// null. It is an error if a field in this list has a non-empty value.
2150	// This may be used to include null fields in Patch requests.
2151	NullFields []string `json:"-"`
2152}
2153
2154func (s *AdvertiserLandingPagesListResponse) MarshalJSON() ([]byte, error) {
2155	type NoMethod AdvertiserLandingPagesListResponse
2156	raw := NoMethod(*s)
2157	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2158}
2159
2160// AdvertisersListResponse: Advertiser List Response
2161type AdvertisersListResponse struct {
2162	// Advertisers: Advertiser collection.
2163	Advertisers []*Advertiser `json:"advertisers,omitempty"`
2164
2165	// Kind: Identifies what kind of resource this is. Value: the fixed
2166	// string "dfareporting#advertisersListResponse".
2167	Kind string `json:"kind,omitempty"`
2168
2169	// NextPageToken: Pagination token to be used for the next list
2170	// operation.
2171	NextPageToken string `json:"nextPageToken,omitempty"`
2172
2173	// ServerResponse contains the HTTP response code and headers from the
2174	// server.
2175	googleapi.ServerResponse `json:"-"`
2176
2177	// ForceSendFields is a list of field names (e.g. "Advertisers") to
2178	// unconditionally include in API requests. By default, fields with
2179	// empty values are omitted from API requests. However, any non-pointer,
2180	// non-interface field appearing in ForceSendFields will be sent to the
2181	// server regardless of whether the field is empty or not. This may be
2182	// used to include empty fields in Patch requests.
2183	ForceSendFields []string `json:"-"`
2184
2185	// NullFields is a list of field names (e.g. "Advertisers") to include
2186	// in API requests with the JSON null value. By default, fields with
2187	// empty values are omitted from API requests. However, any field with
2188	// an empty value appearing in NullFields will be sent to the server as
2189	// null. It is an error if a field in this list has a non-empty value.
2190	// This may be used to include null fields in Patch requests.
2191	NullFields []string `json:"-"`
2192}
2193
2194func (s *AdvertisersListResponse) MarshalJSON() ([]byte, error) {
2195	type NoMethod AdvertisersListResponse
2196	raw := NoMethod(*s)
2197	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2198}
2199
2200// AudienceSegment: Audience Segment.
2201type AudienceSegment struct {
2202	// Allocation: Weight allocated to this segment. The weight assigned
2203	// will be understood in proportion to the weights assigned to other
2204	// segments in the same segment group. Acceptable values are 1 to 1000,
2205	// inclusive.
2206	Allocation int64 `json:"allocation,omitempty"`
2207
2208	// Id: ID of this audience segment. This is a read-only, auto-generated
2209	// field.
2210	Id int64 `json:"id,omitempty,string"`
2211
2212	// Name: Name of this audience segment. This is a required field and
2213	// must be less than 65 characters long.
2214	Name string `json:"name,omitempty"`
2215
2216	// ForceSendFields is a list of field names (e.g. "Allocation") to
2217	// unconditionally include in API requests. By default, fields with
2218	// empty values are omitted from API requests. However, any non-pointer,
2219	// non-interface field appearing in ForceSendFields will be sent to the
2220	// server regardless of whether the field is empty or not. This may be
2221	// used to include empty fields in Patch requests.
2222	ForceSendFields []string `json:"-"`
2223
2224	// NullFields is a list of field names (e.g. "Allocation") to include in
2225	// API requests with the JSON null value. By default, fields with empty
2226	// values are omitted from API requests. However, any field with an
2227	// empty value appearing in NullFields will be sent to the server as
2228	// null. It is an error if a field in this list has a non-empty value.
2229	// This may be used to include null fields in Patch requests.
2230	NullFields []string `json:"-"`
2231}
2232
2233func (s *AudienceSegment) MarshalJSON() ([]byte, error) {
2234	type NoMethod AudienceSegment
2235	raw := NoMethod(*s)
2236	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2237}
2238
2239// AudienceSegmentGroup: Audience Segment Group.
2240type AudienceSegmentGroup struct {
2241	// AudienceSegments: Audience segments assigned to this group. The
2242	// number of segments must be between 2 and 100.
2243	AudienceSegments []*AudienceSegment `json:"audienceSegments,omitempty"`
2244
2245	// Id: ID of this audience segment group. This is a read-only,
2246	// auto-generated field.
2247	Id int64 `json:"id,omitempty,string"`
2248
2249	// Name: Name of this audience segment group. This is a required field
2250	// and must be less than 65 characters long.
2251	Name string `json:"name,omitempty"`
2252
2253	// ForceSendFields is a list of field names (e.g. "AudienceSegments") to
2254	// unconditionally include in API requests. By default, fields with
2255	// empty values are omitted from API requests. However, any non-pointer,
2256	// non-interface field appearing in ForceSendFields will be sent to the
2257	// server regardless of whether the field is empty or not. This may be
2258	// used to include empty fields in Patch requests.
2259	ForceSendFields []string `json:"-"`
2260
2261	// NullFields is a list of field names (e.g. "AudienceSegments") to
2262	// include in API requests with the JSON null value. By default, fields
2263	// with empty values are omitted from API requests. However, any field
2264	// with an empty value appearing in NullFields will be sent to the
2265	// server as null. It is an error if a field in this list has a
2266	// non-empty value. This may be used to include null fields in Patch
2267	// requests.
2268	NullFields []string `json:"-"`
2269}
2270
2271func (s *AudienceSegmentGroup) MarshalJSON() ([]byte, error) {
2272	type NoMethod AudienceSegmentGroup
2273	raw := NoMethod(*s)
2274	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2275}
2276
2277// Browser: Contains information about a browser that can be targeted by
2278// ads.
2279type Browser struct {
2280	// BrowserVersionId: ID referring to this grouping of browser and
2281	// version numbers. This is the ID used for targeting.
2282	BrowserVersionId int64 `json:"browserVersionId,omitempty,string"`
2283
2284	// DartId: DART ID of this browser. This is the ID used when generating
2285	// reports.
2286	DartId int64 `json:"dartId,omitempty,string"`
2287
2288	// Kind: Identifies what kind of resource this is. Value: the fixed
2289	// string "dfareporting#browser".
2290	Kind string `json:"kind,omitempty"`
2291
2292	// MajorVersion: Major version number (leftmost number) of this browser.
2293	// For example, for Chrome 5.0.376.86 beta, this field should be set to
2294	// 5. An asterisk (*) may be used to target any version number, and a
2295	// question mark (?) may be used to target cases where the version
2296	// number cannot be identified. For example, Chrome *.* targets any
2297	// version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets
2298	// Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad
2299	// server knows the browser is Firefox but can't tell which version it
2300	// is.
2301	MajorVersion string `json:"majorVersion,omitempty"`
2302
2303	// MinorVersion: Minor version number (number after first dot on left)
2304	// of this browser. For example, for Chrome 5.0.375.86 beta, this field
2305	// should be set to 0. An asterisk (*) may be used to target any version
2306	// number, and a question mark (?) may be used to target cases where the
2307	// version number cannot be identified. For example, Chrome *.* targets
2308	// any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets
2309	// Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad
2310	// server knows the browser is Firefox but can't tell which version it
2311	// is.
2312	MinorVersion string `json:"minorVersion,omitempty"`
2313
2314	// Name: Name of this browser.
2315	Name string `json:"name,omitempty"`
2316
2317	// ForceSendFields is a list of field names (e.g. "BrowserVersionId") to
2318	// unconditionally include in API requests. By default, fields with
2319	// empty values are omitted from API requests. However, any non-pointer,
2320	// non-interface field appearing in ForceSendFields will be sent to the
2321	// server regardless of whether the field is empty or not. This may be
2322	// used to include empty fields in Patch requests.
2323	ForceSendFields []string `json:"-"`
2324
2325	// NullFields is a list of field names (e.g. "BrowserVersionId") to
2326	// include in API requests with the JSON null value. By default, fields
2327	// with empty values are omitted from API requests. However, any field
2328	// with an empty value appearing in NullFields will be sent to the
2329	// server as null. It is an error if a field in this list has a
2330	// non-empty value. This may be used to include null fields in Patch
2331	// requests.
2332	NullFields []string `json:"-"`
2333}
2334
2335func (s *Browser) MarshalJSON() ([]byte, error) {
2336	type NoMethod Browser
2337	raw := NoMethod(*s)
2338	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2339}
2340
2341// BrowsersListResponse: Browser List Response
2342type BrowsersListResponse struct {
2343	// Browsers: Browser collection.
2344	Browsers []*Browser `json:"browsers,omitempty"`
2345
2346	// Kind: Identifies what kind of resource this is. Value: the fixed
2347	// string "dfareporting#browsersListResponse".
2348	Kind string `json:"kind,omitempty"`
2349
2350	// ServerResponse contains the HTTP response code and headers from the
2351	// server.
2352	googleapi.ServerResponse `json:"-"`
2353
2354	// ForceSendFields is a list of field names (e.g. "Browsers") to
2355	// unconditionally include in API requests. By default, fields with
2356	// empty values are omitted from API requests. However, any non-pointer,
2357	// non-interface field appearing in ForceSendFields will be sent to the
2358	// server regardless of whether the field is empty or not. This may be
2359	// used to include empty fields in Patch requests.
2360	ForceSendFields []string `json:"-"`
2361
2362	// NullFields is a list of field names (e.g. "Browsers") to include in
2363	// API requests with the JSON null value. By default, fields with empty
2364	// values are omitted from API requests. However, any field with an
2365	// empty value appearing in NullFields will be sent to the server as
2366	// null. It is an error if a field in this list has a non-empty value.
2367	// This may be used to include null fields in Patch requests.
2368	NullFields []string `json:"-"`
2369}
2370
2371func (s *BrowsersListResponse) MarshalJSON() ([]byte, error) {
2372	type NoMethod BrowsersListResponse
2373	raw := NoMethod(*s)
2374	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2375}
2376
2377// Campaign: Contains properties of a Campaign Manager campaign.
2378type Campaign struct {
2379	// AccountId: Account ID of this campaign. This is a read-only field
2380	// that can be left blank.
2381	AccountId int64 `json:"accountId,omitempty,string"`
2382
2383	// AdBlockingConfiguration: Ad blocking settings for this campaign.
2384	AdBlockingConfiguration *AdBlockingConfiguration `json:"adBlockingConfiguration,omitempty"`
2385
2386	// AdditionalCreativeOptimizationConfigurations: Additional creative
2387	// optimization configurations for the campaign.
2388	AdditionalCreativeOptimizationConfigurations []*CreativeOptimizationConfiguration `json:"additionalCreativeOptimizationConfigurations,omitempty"`
2389
2390	// AdvertiserGroupId: Advertiser group ID of the associated advertiser.
2391	AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
2392
2393	// AdvertiserId: Advertiser ID of this campaign. This is a required
2394	// field.
2395	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
2396
2397	// AdvertiserIdDimensionValue: Dimension value for the advertiser ID of
2398	// this campaign. This is a read-only, auto-generated field.
2399	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
2400
2401	// Archived: Whether this campaign has been archived.
2402	Archived bool `json:"archived,omitempty"`
2403
2404	// AudienceSegmentGroups: Audience segment groups assigned to this
2405	// campaign. Cannot have more than 300 segment groups.
2406	AudienceSegmentGroups []*AudienceSegmentGroup `json:"audienceSegmentGroups,omitempty"`
2407
2408	// BillingInvoiceCode: Billing invoice code included in the Campaign
2409	// Manager client billing invoices associated with the campaign.
2410	BillingInvoiceCode string `json:"billingInvoiceCode,omitempty"`
2411
2412	// ClickThroughUrlSuffixProperties: Click-through URL suffix override
2413	// properties for this campaign.
2414	ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
2415
2416	// Comment: Arbitrary comments about this campaign. Must be less than
2417	// 256 characters long.
2418	Comment string `json:"comment,omitempty"`
2419
2420	// CreateInfo: Information about the creation of this campaign. This is
2421	// a read-only field.
2422	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
2423
2424	// CreativeGroupIds: List of creative group IDs that are assigned to the
2425	// campaign.
2426	CreativeGroupIds googleapi.Int64s `json:"creativeGroupIds,omitempty"`
2427
2428	// CreativeOptimizationConfiguration: Creative optimization
2429	// configuration for the campaign.
2430	CreativeOptimizationConfiguration *CreativeOptimizationConfiguration `json:"creativeOptimizationConfiguration,omitempty"`
2431
2432	// DefaultClickThroughEventTagProperties: Click-through event tag ID
2433	// override properties for this campaign.
2434	DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
2435
2436	// DefaultLandingPageId: The default landing page ID for this campaign.
2437	DefaultLandingPageId int64 `json:"defaultLandingPageId,omitempty,string"`
2438
2439	// EndDate: Date on which the campaign will stop running. On insert, the
2440	// end date must be today or a future date. The end date must be later
2441	// than or be the same as the start date. If, for example, you set
2442	// 6/25/2015 as both the start and end dates, the effective campaign run
2443	// date is just that day only, 6/25/2015. The hours, minutes, and
2444	// seconds of the end date should not be set, as doing so will result in
2445	// an error. This is a required field.
2446	EndDate string `json:"endDate,omitempty"`
2447
2448	// EventTagOverrides: Overrides that can be used to activate or
2449	// deactivate advertiser event tags.
2450	EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
2451
2452	// ExternalId: External ID for this campaign.
2453	ExternalId string `json:"externalId,omitempty"`
2454
2455	// Id: ID of this campaign. This is a read-only auto-generated field.
2456	Id int64 `json:"id,omitempty,string"`
2457
2458	// IdDimensionValue: Dimension value for the ID of this campaign. This
2459	// is a read-only, auto-generated field.
2460	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
2461
2462	// Kind: Identifies what kind of resource this is. Value: the fixed
2463	// string "dfareporting#campaign".
2464	Kind string `json:"kind,omitempty"`
2465
2466	// LastModifiedInfo: Information about the most recent modification of
2467	// this campaign. This is a read-only field.
2468	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
2469
2470	// Name: Name of this campaign. This is a required field and must be
2471	// less than 256 characters long and unique among campaigns of the same
2472	// advertiser.
2473	Name string `json:"name,omitempty"`
2474
2475	// NielsenOcrEnabled: Whether Nielsen reports are enabled for this
2476	// campaign.
2477	NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
2478
2479	// StartDate: Date on which the campaign starts running. The start date
2480	// can be any date. The hours, minutes, and seconds of the start date
2481	// should not be set, as doing so will result in an error. This is a
2482	// required field.
2483	StartDate string `json:"startDate,omitempty"`
2484
2485	// SubaccountId: Subaccount ID of this campaign. This is a read-only
2486	// field that can be left blank.
2487	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2488
2489	// TraffickerEmails: Campaign trafficker contact emails.
2490	TraffickerEmails []string `json:"traffickerEmails,omitempty"`
2491
2492	// ServerResponse contains the HTTP response code and headers from the
2493	// server.
2494	googleapi.ServerResponse `json:"-"`
2495
2496	// ForceSendFields is a list of field names (e.g. "AccountId") to
2497	// unconditionally include in API requests. By default, fields with
2498	// empty values are omitted from API requests. However, any non-pointer,
2499	// non-interface field appearing in ForceSendFields will be sent to the
2500	// server regardless of whether the field is empty or not. This may be
2501	// used to include empty fields in Patch requests.
2502	ForceSendFields []string `json:"-"`
2503
2504	// NullFields is a list of field names (e.g. "AccountId") to include in
2505	// API requests with the JSON null value. By default, fields with empty
2506	// values are omitted from API requests. However, any field with an
2507	// empty value appearing in NullFields will be sent to the server as
2508	// null. It is an error if a field in this list has a non-empty value.
2509	// This may be used to include null fields in Patch requests.
2510	NullFields []string `json:"-"`
2511}
2512
2513func (s *Campaign) MarshalJSON() ([]byte, error) {
2514	type NoMethod Campaign
2515	raw := NoMethod(*s)
2516	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2517}
2518
2519// CampaignCreativeAssociation: Identifies a creative which has been
2520// associated with a given campaign.
2521type CampaignCreativeAssociation struct {
2522	// CreativeId: ID of the creative associated with the campaign. This is
2523	// a required field.
2524	CreativeId int64 `json:"creativeId,omitempty,string"`
2525
2526	// Kind: Identifies what kind of resource this is. Value: the fixed
2527	// string "dfareporting#campaignCreativeAssociation".
2528	Kind string `json:"kind,omitempty"`
2529
2530	// ServerResponse contains the HTTP response code and headers from the
2531	// server.
2532	googleapi.ServerResponse `json:"-"`
2533
2534	// ForceSendFields is a list of field names (e.g. "CreativeId") to
2535	// unconditionally include in API requests. By default, fields with
2536	// empty values are omitted from API requests. However, any non-pointer,
2537	// non-interface field appearing in ForceSendFields will be sent to the
2538	// server regardless of whether the field is empty or not. This may be
2539	// used to include empty fields in Patch requests.
2540	ForceSendFields []string `json:"-"`
2541
2542	// NullFields is a list of field names (e.g. "CreativeId") to include in
2543	// API requests with the JSON null value. By default, fields with empty
2544	// values are omitted from API requests. However, any field with an
2545	// empty value appearing in NullFields will be sent to the server as
2546	// null. It is an error if a field in this list has a non-empty value.
2547	// This may be used to include null fields in Patch requests.
2548	NullFields []string `json:"-"`
2549}
2550
2551func (s *CampaignCreativeAssociation) MarshalJSON() ([]byte, error) {
2552	type NoMethod CampaignCreativeAssociation
2553	raw := NoMethod(*s)
2554	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2555}
2556
2557// CampaignCreativeAssociationsListResponse: Campaign Creative
2558// Association List Response
2559type CampaignCreativeAssociationsListResponse struct {
2560	// CampaignCreativeAssociations: Campaign creative association
2561	// collection
2562	CampaignCreativeAssociations []*CampaignCreativeAssociation `json:"campaignCreativeAssociations,omitempty"`
2563
2564	// Kind: Identifies what kind of resource this is. Value: the fixed
2565	// string "dfareporting#campaignCreativeAssociationsListResponse".
2566	Kind string `json:"kind,omitempty"`
2567
2568	// NextPageToken: Pagination token to be used for the next list
2569	// operation.
2570	NextPageToken string `json:"nextPageToken,omitempty"`
2571
2572	// ServerResponse contains the HTTP response code and headers from the
2573	// server.
2574	googleapi.ServerResponse `json:"-"`
2575
2576	// ForceSendFields is a list of field names (e.g.
2577	// "CampaignCreativeAssociations") to unconditionally include in API
2578	// requests. By default, fields with empty values are omitted from API
2579	// requests. However, any non-pointer, non-interface field appearing in
2580	// ForceSendFields will be sent to the server regardless of whether the
2581	// field is empty or not. This may be used to include empty fields in
2582	// Patch requests.
2583	ForceSendFields []string `json:"-"`
2584
2585	// NullFields is a list of field names (e.g.
2586	// "CampaignCreativeAssociations") to include in API requests with the
2587	// JSON null value. By default, fields with empty values are omitted
2588	// from API requests. However, any field with an empty value appearing
2589	// in NullFields will be sent to the server as null. It is an error if a
2590	// field in this list has a non-empty value. This may be used to include
2591	// null fields in Patch requests.
2592	NullFields []string `json:"-"`
2593}
2594
2595func (s *CampaignCreativeAssociationsListResponse) MarshalJSON() ([]byte, error) {
2596	type NoMethod CampaignCreativeAssociationsListResponse
2597	raw := NoMethod(*s)
2598	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2599}
2600
2601// CampaignsListResponse: Campaign List Response
2602type CampaignsListResponse struct {
2603	// Campaigns: Campaign collection.
2604	Campaigns []*Campaign `json:"campaigns,omitempty"`
2605
2606	// Kind: Identifies what kind of resource this is. Value: the fixed
2607	// string "dfareporting#campaignsListResponse".
2608	Kind string `json:"kind,omitempty"`
2609
2610	// NextPageToken: Pagination token to be used for the next list
2611	// operation.
2612	NextPageToken string `json:"nextPageToken,omitempty"`
2613
2614	// ServerResponse contains the HTTP response code and headers from the
2615	// server.
2616	googleapi.ServerResponse `json:"-"`
2617
2618	// ForceSendFields is a list of field names (e.g. "Campaigns") to
2619	// unconditionally include in API requests. By default, fields with
2620	// empty values are omitted from API requests. However, any non-pointer,
2621	// non-interface field appearing in ForceSendFields will be sent to the
2622	// server regardless of whether the field is empty or not. This may be
2623	// used to include empty fields in Patch requests.
2624	ForceSendFields []string `json:"-"`
2625
2626	// NullFields is a list of field names (e.g. "Campaigns") to include in
2627	// API requests with the JSON null value. By default, fields with empty
2628	// values are omitted from API requests. However, any field with an
2629	// empty value appearing in NullFields will be sent to the server as
2630	// null. It is an error if a field in this list has a non-empty value.
2631	// This may be used to include null fields in Patch requests.
2632	NullFields []string `json:"-"`
2633}
2634
2635func (s *CampaignsListResponse) MarshalJSON() ([]byte, error) {
2636	type NoMethod CampaignsListResponse
2637	raw := NoMethod(*s)
2638	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2639}
2640
2641// ChangeLog: Describes a change that a user has made to a resource.
2642type ChangeLog struct {
2643	// AccountId: Account ID of the modified object.
2644	AccountId int64 `json:"accountId,omitempty,string"`
2645
2646	// Action: Action which caused the change.
2647	Action string `json:"action,omitempty"`
2648
2649	// ChangeTime: Time when the object was modified.
2650	ChangeTime string `json:"changeTime,omitempty"`
2651
2652	// FieldName: Field name of the object which changed.
2653	FieldName string `json:"fieldName,omitempty"`
2654
2655	// Id: ID of this change log.
2656	Id int64 `json:"id,omitempty,string"`
2657
2658	// Kind: Identifies what kind of resource this is. Value: the fixed
2659	// string "dfareporting#changeLog".
2660	Kind string `json:"kind,omitempty"`
2661
2662	// NewValue: New value of the object field.
2663	NewValue string `json:"newValue,omitempty"`
2664
2665	// ObjectId: ID of the object of this change log. The object could be a
2666	// campaign, placement, ad, or other type.
2667	ObjectId int64 `json:"objectId,omitempty,string"`
2668
2669	// ObjectType: Object type of the change log.
2670	ObjectType string `json:"objectType,omitempty"`
2671
2672	// OldValue: Old value of the object field.
2673	OldValue string `json:"oldValue,omitempty"`
2674
2675	// SubaccountId: Subaccount ID of the modified object.
2676	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2677
2678	// TransactionId: Transaction ID of this change log. When a single API
2679	// call results in many changes, each change will have a separate ID in
2680	// the change log but will share the same transactionId.
2681	TransactionId int64 `json:"transactionId,omitempty,string"`
2682
2683	// UserProfileId: ID of the user who modified the object.
2684	UserProfileId int64 `json:"userProfileId,omitempty,string"`
2685
2686	// UserProfileName: User profile name of the user who modified the
2687	// object.
2688	UserProfileName string `json:"userProfileName,omitempty"`
2689
2690	// ServerResponse contains the HTTP response code and headers from the
2691	// server.
2692	googleapi.ServerResponse `json:"-"`
2693
2694	// ForceSendFields is a list of field names (e.g. "AccountId") to
2695	// unconditionally include in API requests. By default, fields with
2696	// empty values are omitted from API requests. However, any non-pointer,
2697	// non-interface field appearing in ForceSendFields will be sent to the
2698	// server regardless of whether the field is empty or not. This may be
2699	// used to include empty fields in Patch requests.
2700	ForceSendFields []string `json:"-"`
2701
2702	// NullFields is a list of field names (e.g. "AccountId") to include in
2703	// API requests with the JSON null value. By default, fields with empty
2704	// values are omitted from API requests. However, any field with an
2705	// empty value appearing in NullFields will be sent to the server as
2706	// null. It is an error if a field in this list has a non-empty value.
2707	// This may be used to include null fields in Patch requests.
2708	NullFields []string `json:"-"`
2709}
2710
2711func (s *ChangeLog) MarshalJSON() ([]byte, error) {
2712	type NoMethod ChangeLog
2713	raw := NoMethod(*s)
2714	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2715}
2716
2717// ChangeLogsListResponse: Change Log List Response
2718type ChangeLogsListResponse struct {
2719	// ChangeLogs: Change log collection.
2720	ChangeLogs []*ChangeLog `json:"changeLogs,omitempty"`
2721
2722	// Kind: Identifies what kind of resource this is. Value: the fixed
2723	// string "dfareporting#changeLogsListResponse".
2724	Kind string `json:"kind,omitempty"`
2725
2726	// NextPageToken: Pagination token to be used for the next list
2727	// operation.
2728	NextPageToken string `json:"nextPageToken,omitempty"`
2729
2730	// ServerResponse contains the HTTP response code and headers from the
2731	// server.
2732	googleapi.ServerResponse `json:"-"`
2733
2734	// ForceSendFields is a list of field names (e.g. "ChangeLogs") to
2735	// unconditionally include in API requests. By default, fields with
2736	// empty values are omitted from API requests. However, any non-pointer,
2737	// non-interface field appearing in ForceSendFields will be sent to the
2738	// server regardless of whether the field is empty or not. This may be
2739	// used to include empty fields in Patch requests.
2740	ForceSendFields []string `json:"-"`
2741
2742	// NullFields is a list of field names (e.g. "ChangeLogs") to include in
2743	// API requests with the JSON null value. By default, fields with empty
2744	// values are omitted from API requests. However, any field with an
2745	// empty value appearing in NullFields will be sent to the server as
2746	// null. It is an error if a field in this list has a non-empty value.
2747	// This may be used to include null fields in Patch requests.
2748	NullFields []string `json:"-"`
2749}
2750
2751func (s *ChangeLogsListResponse) MarshalJSON() ([]byte, error) {
2752	type NoMethod ChangeLogsListResponse
2753	raw := NoMethod(*s)
2754	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2755}
2756
2757// CitiesListResponse: City List Response
2758type CitiesListResponse struct {
2759	// Cities: City collection.
2760	Cities []*City `json:"cities,omitempty"`
2761
2762	// Kind: Identifies what kind of resource this is. Value: the fixed
2763	// string "dfareporting#citiesListResponse".
2764	Kind string `json:"kind,omitempty"`
2765
2766	// ServerResponse contains the HTTP response code and headers from the
2767	// server.
2768	googleapi.ServerResponse `json:"-"`
2769
2770	// ForceSendFields is a list of field names (e.g. "Cities") to
2771	// unconditionally include in API requests. By default, fields with
2772	// empty values are omitted from API requests. However, any non-pointer,
2773	// non-interface field appearing in ForceSendFields will be sent to the
2774	// server regardless of whether the field is empty or not. This may be
2775	// used to include empty fields in Patch requests.
2776	ForceSendFields []string `json:"-"`
2777
2778	// NullFields is a list of field names (e.g. "Cities") to include in API
2779	// requests with the JSON null value. By default, fields with empty
2780	// values are omitted from API requests. However, any field with an
2781	// empty value appearing in NullFields will be sent to the server as
2782	// null. It is an error if a field in this list has a non-empty value.
2783	// This may be used to include null fields in Patch requests.
2784	NullFields []string `json:"-"`
2785}
2786
2787func (s *CitiesListResponse) MarshalJSON() ([]byte, error) {
2788	type NoMethod CitiesListResponse
2789	raw := NoMethod(*s)
2790	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2791}
2792
2793// City: Contains information about a city that can be targeted by ads.
2794type City struct {
2795	// CountryCode: Country code of the country to which this city belongs.
2796	CountryCode string `json:"countryCode,omitempty"`
2797
2798	// CountryDartId: DART ID of the country to which this city belongs.
2799	CountryDartId int64 `json:"countryDartId,omitempty,string"`
2800
2801	// DartId: DART ID of this city. This is the ID used for targeting and
2802	// generating reports.
2803	DartId int64 `json:"dartId,omitempty,string"`
2804
2805	// Kind: Identifies what kind of resource this is. Value: the fixed
2806	// string "dfareporting#city".
2807	Kind string `json:"kind,omitempty"`
2808
2809	// MetroCode: Metro region code of the metro region (DMA) to which this
2810	// city belongs.
2811	MetroCode string `json:"metroCode,omitempty"`
2812
2813	// MetroDmaId: ID of the metro region (DMA) to which this city belongs.
2814	MetroDmaId int64 `json:"metroDmaId,omitempty,string"`
2815
2816	// Name: Name of this city.
2817	Name string `json:"name,omitempty"`
2818
2819	// RegionCode: Region code of the region to which this city belongs.
2820	RegionCode string `json:"regionCode,omitempty"`
2821
2822	// RegionDartId: DART ID of the region to which this city belongs.
2823	RegionDartId int64 `json:"regionDartId,omitempty,string"`
2824
2825	// ForceSendFields is a list of field names (e.g. "CountryCode") to
2826	// unconditionally include in API requests. By default, fields with
2827	// empty values are omitted from API requests. However, any non-pointer,
2828	// non-interface field appearing in ForceSendFields will be sent to the
2829	// server regardless of whether the field is empty or not. This may be
2830	// used to include empty fields in Patch requests.
2831	ForceSendFields []string `json:"-"`
2832
2833	// NullFields is a list of field names (e.g. "CountryCode") to include
2834	// in API requests with the JSON null value. By default, fields with
2835	// empty values are omitted from API requests. However, any field with
2836	// an empty value appearing in NullFields will be sent to the server as
2837	// null. It is an error if a field in this list has a non-empty value.
2838	// This may be used to include null fields in Patch requests.
2839	NullFields []string `json:"-"`
2840}
2841
2842func (s *City) MarshalJSON() ([]byte, error) {
2843	type NoMethod City
2844	raw := NoMethod(*s)
2845	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2846}
2847
2848// ClickTag: Creative Click Tag.
2849type ClickTag struct {
2850	// ClickThroughUrl: Parameter value for the specified click tag. This
2851	// field contains a click-through url.
2852	ClickThroughUrl *CreativeClickThroughUrl `json:"clickThroughUrl,omitempty"`
2853
2854	// EventName: Advertiser event name associated with the click tag. This
2855	// field is used by DISPLAY_IMAGE_GALLERY and HTML5_BANNER creatives.
2856	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
2857	EventName string `json:"eventName,omitempty"`
2858
2859	// Name: Parameter name for the specified click tag. For
2860	// DISPLAY_IMAGE_GALLERY creative assets, this field must match the
2861	// value of the creative asset's creativeAssetId.name field.
2862	Name string `json:"name,omitempty"`
2863
2864	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
2865	// unconditionally include in API requests. By default, fields with
2866	// empty values are omitted from API requests. However, any non-pointer,
2867	// non-interface field appearing in ForceSendFields will be sent to the
2868	// server regardless of whether the field is empty or not. This may be
2869	// used to include empty fields in Patch requests.
2870	ForceSendFields []string `json:"-"`
2871
2872	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
2873	// include in API requests with the JSON null value. By default, fields
2874	// with empty values are omitted from API requests. However, any field
2875	// with an empty value appearing in NullFields will be sent to the
2876	// server as null. It is an error if a field in this list has a
2877	// non-empty value. This may be used to include null fields in Patch
2878	// requests.
2879	NullFields []string `json:"-"`
2880}
2881
2882func (s *ClickTag) MarshalJSON() ([]byte, error) {
2883	type NoMethod ClickTag
2884	raw := NoMethod(*s)
2885	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2886}
2887
2888// ClickThroughUrl: Click-through URL
2889type ClickThroughUrl struct {
2890	// ComputedClickThroughUrl: Read-only convenience field representing the
2891	// actual URL that will be used for this click-through. The URL is
2892	// computed as follows:
2893	// - If defaultLandingPage is enabled then the campaign's default
2894	// landing page URL is assigned to this field.
2895	// - If defaultLandingPage is not enabled and a landingPageId is
2896	// specified then that landing page's URL is assigned to this field.
2897	// - If neither of the above cases apply, then the customClickThroughUrl
2898	// is assigned to this field.
2899	ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
2900
2901	// CustomClickThroughUrl: Custom click-through URL. Applicable if the
2902	// defaultLandingPage field is set to false and the landingPageId field
2903	// is left unset.
2904	CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
2905
2906	// DefaultLandingPage: Whether the campaign default landing page is
2907	// used.
2908	DefaultLandingPage bool `json:"defaultLandingPage,omitempty"`
2909
2910	// LandingPageId: ID of the landing page for the click-through URL.
2911	// Applicable if the defaultLandingPage field is set to false.
2912	LandingPageId int64 `json:"landingPageId,omitempty,string"`
2913
2914	// ForceSendFields is a list of field names (e.g.
2915	// "ComputedClickThroughUrl") to unconditionally include in API
2916	// requests. By default, fields with empty values are omitted from API
2917	// requests. However, any non-pointer, non-interface field appearing in
2918	// ForceSendFields will be sent to the server regardless of whether the
2919	// field is empty or not. This may be used to include empty fields in
2920	// Patch requests.
2921	ForceSendFields []string `json:"-"`
2922
2923	// NullFields is a list of field names (e.g. "ComputedClickThroughUrl")
2924	// to include in API requests with the JSON null value. By default,
2925	// fields with empty values are omitted from API requests. However, any
2926	// field with an empty value appearing in NullFields will be sent to the
2927	// server as null. It is an error if a field in this list has a
2928	// non-empty value. This may be used to include null fields in Patch
2929	// requests.
2930	NullFields []string `json:"-"`
2931}
2932
2933func (s *ClickThroughUrl) MarshalJSON() ([]byte, error) {
2934	type NoMethod ClickThroughUrl
2935	raw := NoMethod(*s)
2936	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2937}
2938
2939// ClickThroughUrlSuffixProperties: Click Through URL Suffix settings.
2940type ClickThroughUrlSuffixProperties struct {
2941	// ClickThroughUrlSuffix: Click-through URL suffix to apply to all ads
2942	// in this entity's scope. Must be less than 128 characters long.
2943	ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
2944
2945	// OverrideInheritedSuffix: Whether this entity should override the
2946	// inherited click-through URL suffix with its own defined value.
2947	OverrideInheritedSuffix bool `json:"overrideInheritedSuffix,omitempty"`
2948
2949	// ForceSendFields is a list of field names (e.g.
2950	// "ClickThroughUrlSuffix") to unconditionally include in API requests.
2951	// By default, fields with empty values are omitted from API requests.
2952	// However, any non-pointer, non-interface field appearing in
2953	// ForceSendFields will be sent to the server regardless of whether the
2954	// field is empty or not. This may be used to include empty fields in
2955	// Patch requests.
2956	ForceSendFields []string `json:"-"`
2957
2958	// NullFields is a list of field names (e.g. "ClickThroughUrlSuffix") to
2959	// include in API requests with the JSON null value. By default, fields
2960	// with empty values are omitted from API requests. However, any field
2961	// with an empty value appearing in NullFields will be sent to the
2962	// server as null. It is an error if a field in this list has a
2963	// non-empty value. This may be used to include null fields in Patch
2964	// requests.
2965	NullFields []string `json:"-"`
2966}
2967
2968func (s *ClickThroughUrlSuffixProperties) MarshalJSON() ([]byte, error) {
2969	type NoMethod ClickThroughUrlSuffixProperties
2970	raw := NoMethod(*s)
2971	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2972}
2973
2974// CompanionClickThroughOverride: Companion Click-through override.
2975type CompanionClickThroughOverride struct {
2976	// ClickThroughUrl: Click-through URL of this companion click-through
2977	// override.
2978	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
2979
2980	// CreativeId: ID of the creative for this companion click-through
2981	// override.
2982	CreativeId int64 `json:"creativeId,omitempty,string"`
2983
2984	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
2985	// unconditionally include in API requests. By default, fields with
2986	// empty values are omitted from API requests. However, any non-pointer,
2987	// non-interface field appearing in ForceSendFields will be sent to the
2988	// server regardless of whether the field is empty or not. This may be
2989	// used to include empty fields in Patch requests.
2990	ForceSendFields []string `json:"-"`
2991
2992	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
2993	// include in API requests with the JSON null value. By default, fields
2994	// with empty values are omitted from API requests. However, any field
2995	// with an empty value appearing in NullFields will be sent to the
2996	// server as null. It is an error if a field in this list has a
2997	// non-empty value. This may be used to include null fields in Patch
2998	// requests.
2999	NullFields []string `json:"-"`
3000}
3001
3002func (s *CompanionClickThroughOverride) MarshalJSON() ([]byte, error) {
3003	type NoMethod CompanionClickThroughOverride
3004	raw := NoMethod(*s)
3005	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3006}
3007
3008// CompanionSetting: Companion Settings
3009type CompanionSetting struct {
3010	// CompanionsDisabled: Whether companions are disabled for this
3011	// placement.
3012	CompanionsDisabled bool `json:"companionsDisabled,omitempty"`
3013
3014	// EnabledSizes: Whitelist of companion sizes to be served to this
3015	// placement. Set this list to null or empty to serve all companion
3016	// sizes.
3017	EnabledSizes []*Size `json:"enabledSizes,omitempty"`
3018
3019	// ImageOnly: Whether to serve only static images as companions.
3020	ImageOnly bool `json:"imageOnly,omitempty"`
3021
3022	// Kind: Identifies what kind of resource this is. Value: the fixed
3023	// string "dfareporting#companionSetting".
3024	Kind string `json:"kind,omitempty"`
3025
3026	// ForceSendFields is a list of field names (e.g. "CompanionsDisabled")
3027	// to unconditionally include in API requests. By default, fields with
3028	// empty values are omitted from API requests. However, any non-pointer,
3029	// non-interface field appearing in ForceSendFields will be sent to the
3030	// server regardless of whether the field is empty or not. This may be
3031	// used to include empty fields in Patch requests.
3032	ForceSendFields []string `json:"-"`
3033
3034	// NullFields is a list of field names (e.g. "CompanionsDisabled") to
3035	// include in API requests with the JSON null value. By default, fields
3036	// with empty values are omitted from API requests. However, any field
3037	// with an empty value appearing in NullFields will be sent to the
3038	// server as null. It is an error if a field in this list has a
3039	// non-empty value. This may be used to include null fields in Patch
3040	// requests.
3041	NullFields []string `json:"-"`
3042}
3043
3044func (s *CompanionSetting) MarshalJSON() ([]byte, error) {
3045	type NoMethod CompanionSetting
3046	raw := NoMethod(*s)
3047	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3048}
3049
3050// CompatibleFields: Represents a response to the queryCompatibleFields
3051// method.
3052type CompatibleFields struct {
3053	// CrossDimensionReachReportCompatibleFields: Contains items that are
3054	// compatible to be selected for a report of type
3055	// "CROSS_DIMENSION_REACH".
3056	CrossDimensionReachReportCompatibleFields *CrossDimensionReachReportCompatibleFields `json:"crossDimensionReachReportCompatibleFields,omitempty"`
3057
3058	// FloodlightReportCompatibleFields: Contains items that are compatible
3059	// to be selected for a report of type "FLOODLIGHT".
3060	FloodlightReportCompatibleFields *FloodlightReportCompatibleFields `json:"floodlightReportCompatibleFields,omitempty"`
3061
3062	// Kind: The kind of resource this is, in this case
3063	// dfareporting#compatibleFields.
3064	Kind string `json:"kind,omitempty"`
3065
3066	// PathToConversionReportCompatibleFields: Contains items that are
3067	// compatible to be selected for a report of type "PATH_TO_CONVERSION".
3068	PathToConversionReportCompatibleFields *PathToConversionReportCompatibleFields `json:"pathToConversionReportCompatibleFields,omitempty"`
3069
3070	// ReachReportCompatibleFields: Contains items that are compatible to be
3071	// selected for a report of type "REACH".
3072	ReachReportCompatibleFields *ReachReportCompatibleFields `json:"reachReportCompatibleFields,omitempty"`
3073
3074	// ReportCompatibleFields: Contains items that are compatible to be
3075	// selected for a report of type "STANDARD".
3076	ReportCompatibleFields *ReportCompatibleFields `json:"reportCompatibleFields,omitempty"`
3077
3078	// ServerResponse contains the HTTP response code and headers from the
3079	// server.
3080	googleapi.ServerResponse `json:"-"`
3081
3082	// ForceSendFields is a list of field names (e.g.
3083	// "CrossDimensionReachReportCompatibleFields") to unconditionally
3084	// include in API requests. By default, fields with empty values are
3085	// omitted from API requests. However, any non-pointer, non-interface
3086	// field appearing in ForceSendFields will be sent to the server
3087	// regardless of whether the field is empty or not. This may be used to
3088	// include empty fields in Patch requests.
3089	ForceSendFields []string `json:"-"`
3090
3091	// NullFields is a list of field names (e.g.
3092	// "CrossDimensionReachReportCompatibleFields") to include in API
3093	// requests with the JSON null value. By default, fields with empty
3094	// values are omitted from API requests. However, any field with an
3095	// empty value appearing in NullFields will be sent to the server as
3096	// null. It is an error if a field in this list has a non-empty value.
3097	// This may be used to include null fields in Patch requests.
3098	NullFields []string `json:"-"`
3099}
3100
3101func (s *CompatibleFields) MarshalJSON() ([]byte, error) {
3102	type NoMethod CompatibleFields
3103	raw := NoMethod(*s)
3104	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3105}
3106
3107// ConnectionType: Contains information about an internet connection
3108// type that can be targeted by ads. Clients can use the connection type
3109// to target mobile vs. broadband users.
3110type ConnectionType struct {
3111	// Id: ID of this connection type.
3112	Id int64 `json:"id,omitempty,string"`
3113
3114	// Kind: Identifies what kind of resource this is. Value: the fixed
3115	// string "dfareporting#connectionType".
3116	Kind string `json:"kind,omitempty"`
3117
3118	// Name: Name of this connection type.
3119	Name string `json:"name,omitempty"`
3120
3121	// ServerResponse contains the HTTP response code and headers from the
3122	// server.
3123	googleapi.ServerResponse `json:"-"`
3124
3125	// ForceSendFields is a list of field names (e.g. "Id") to
3126	// unconditionally include in API requests. By default, fields with
3127	// empty values are omitted from API requests. However, any non-pointer,
3128	// non-interface field appearing in ForceSendFields will be sent to the
3129	// server regardless of whether the field is empty or not. This may be
3130	// used to include empty fields in Patch requests.
3131	ForceSendFields []string `json:"-"`
3132
3133	// NullFields is a list of field names (e.g. "Id") to include in API
3134	// requests with the JSON null value. By default, fields with empty
3135	// values are omitted from API requests. However, any field with an
3136	// empty value appearing in NullFields will be sent to the server as
3137	// null. It is an error if a field in this list has a non-empty value.
3138	// This may be used to include null fields in Patch requests.
3139	NullFields []string `json:"-"`
3140}
3141
3142func (s *ConnectionType) MarshalJSON() ([]byte, error) {
3143	type NoMethod ConnectionType
3144	raw := NoMethod(*s)
3145	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3146}
3147
3148// ConnectionTypesListResponse: Connection Type List Response
3149type ConnectionTypesListResponse struct {
3150	// ConnectionTypes: Collection of connection types such as broadband and
3151	// mobile.
3152	ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
3153
3154	// Kind: Identifies what kind of resource this is. Value: the fixed
3155	// string "dfareporting#connectionTypesListResponse".
3156	Kind string `json:"kind,omitempty"`
3157
3158	// ServerResponse contains the HTTP response code and headers from the
3159	// server.
3160	googleapi.ServerResponse `json:"-"`
3161
3162	// ForceSendFields is a list of field names (e.g. "ConnectionTypes") to
3163	// unconditionally include in API requests. By default, fields with
3164	// empty values are omitted from API requests. However, any non-pointer,
3165	// non-interface field appearing in ForceSendFields will be sent to the
3166	// server regardless of whether the field is empty or not. This may be
3167	// used to include empty fields in Patch requests.
3168	ForceSendFields []string `json:"-"`
3169
3170	// NullFields is a list of field names (e.g. "ConnectionTypes") to
3171	// include in API requests with the JSON null value. By default, fields
3172	// with empty values are omitted from API requests. However, any field
3173	// with an empty value appearing in NullFields will be sent to the
3174	// server as null. It is an error if a field in this list has a
3175	// non-empty value. This may be used to include null fields in Patch
3176	// requests.
3177	NullFields []string `json:"-"`
3178}
3179
3180func (s *ConnectionTypesListResponse) MarshalJSON() ([]byte, error) {
3181	type NoMethod ConnectionTypesListResponse
3182	raw := NoMethod(*s)
3183	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3184}
3185
3186// ContentCategoriesListResponse: Content Category List Response
3187type ContentCategoriesListResponse struct {
3188	// ContentCategories: Content category collection.
3189	ContentCategories []*ContentCategory `json:"contentCategories,omitempty"`
3190
3191	// Kind: Identifies what kind of resource this is. Value: the fixed
3192	// string "dfareporting#contentCategoriesListResponse".
3193	Kind string `json:"kind,omitempty"`
3194
3195	// NextPageToken: Pagination token to be used for the next list
3196	// operation.
3197	NextPageToken string `json:"nextPageToken,omitempty"`
3198
3199	// ServerResponse contains the HTTP response code and headers from the
3200	// server.
3201	googleapi.ServerResponse `json:"-"`
3202
3203	// ForceSendFields is a list of field names (e.g. "ContentCategories")
3204	// to unconditionally include in API requests. By default, fields with
3205	// empty values are omitted from API requests. However, any non-pointer,
3206	// non-interface field appearing in ForceSendFields will be sent to the
3207	// server regardless of whether the field is empty or not. This may be
3208	// used to include empty fields in Patch requests.
3209	ForceSendFields []string `json:"-"`
3210
3211	// NullFields is a list of field names (e.g. "ContentCategories") to
3212	// include in API requests with the JSON null value. By default, fields
3213	// with empty values are omitted from API requests. However, any field
3214	// with an empty value appearing in NullFields will be sent to the
3215	// server as null. It is an error if a field in this list has a
3216	// non-empty value. This may be used to include null fields in Patch
3217	// requests.
3218	NullFields []string `json:"-"`
3219}
3220
3221func (s *ContentCategoriesListResponse) MarshalJSON() ([]byte, error) {
3222	type NoMethod ContentCategoriesListResponse
3223	raw := NoMethod(*s)
3224	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3225}
3226
3227// ContentCategory: Organizes placements according to the contents of
3228// their associated webpages.
3229type ContentCategory struct {
3230	// AccountId: Account ID of this content category. This is a read-only
3231	// field that can be left blank.
3232	AccountId int64 `json:"accountId,omitempty,string"`
3233
3234	// Id: ID of this content category. This is a read-only, auto-generated
3235	// field.
3236	Id int64 `json:"id,omitempty,string"`
3237
3238	// Kind: Identifies what kind of resource this is. Value: the fixed
3239	// string "dfareporting#contentCategory".
3240	Kind string `json:"kind,omitempty"`
3241
3242	// Name: Name of this content category. This is a required field and
3243	// must be less than 256 characters long and unique among content
3244	// categories of the same account.
3245	Name string `json:"name,omitempty"`
3246
3247	// ServerResponse contains the HTTP response code and headers from the
3248	// server.
3249	googleapi.ServerResponse `json:"-"`
3250
3251	// ForceSendFields is a list of field names (e.g. "AccountId") to
3252	// unconditionally include in API requests. By default, fields with
3253	// empty values are omitted from API requests. However, any non-pointer,
3254	// non-interface field appearing in ForceSendFields will be sent to the
3255	// server regardless of whether the field is empty or not. This may be
3256	// used to include empty fields in Patch requests.
3257	ForceSendFields []string `json:"-"`
3258
3259	// NullFields is a list of field names (e.g. "AccountId") to include in
3260	// API requests with the JSON null value. By default, fields with empty
3261	// values are omitted from API requests. However, any field with an
3262	// empty value appearing in NullFields will be sent to the server as
3263	// null. It is an error if a field in this list has a non-empty value.
3264	// This may be used to include null fields in Patch requests.
3265	NullFields []string `json:"-"`
3266}
3267
3268func (s *ContentCategory) MarshalJSON() ([]byte, error) {
3269	type NoMethod ContentCategory
3270	raw := NoMethod(*s)
3271	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3272}
3273
3274// Conversion: A Conversion represents when a user successfully performs
3275// a desired action after seeing an ad.
3276type Conversion struct {
3277	// ChildDirectedTreatment: Whether this particular request may come from
3278	// a user under the age of 13, under COPPA compliance.
3279	ChildDirectedTreatment bool `json:"childDirectedTreatment,omitempty"`
3280
3281	// CustomVariables: Custom floodlight variables.
3282	CustomVariables []*CustomFloodlightVariable `json:"customVariables,omitempty"`
3283
3284	// EncryptedUserId: The alphanumeric encrypted user ID. When set,
3285	// encryptionInfo should also be specified. This field is mutually
3286	// exclusive with encryptedUserIdCandidates[], matchId, mobileDeviceId
3287	// and gclid. This or encryptedUserIdCandidates[] or matchId or
3288	// mobileDeviceId or gclid is a required field.
3289	EncryptedUserId string `json:"encryptedUserId,omitempty"`
3290
3291	// EncryptedUserIdCandidates: A list of the alphanumeric encrypted user
3292	// IDs. Any user ID with exposure prior to the conversion timestamp will
3293	// be used in the inserted conversion. If no such user ID is found then
3294	// the conversion will be rejected with INVALID_ARGUMENT error. When
3295	// set, encryptionInfo should also be specified. This field may only be
3296	// used when calling batchinsert; it is not supported by batchupdate.
3297	// This field is mutually exclusive with encryptedUserId, matchId,
3298	// mobileDeviceId and gclid. This or encryptedUserId or matchId or
3299	// mobileDeviceId or gclid is a required field.
3300	EncryptedUserIdCandidates []string `json:"encryptedUserIdCandidates,omitempty"`
3301
3302	// FloodlightActivityId: Floodlight Activity ID of this conversion. This
3303	// is a required field.
3304	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
3305
3306	// FloodlightConfigurationId: Floodlight Configuration ID of this
3307	// conversion. This is a required field.
3308	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
3309
3310	// Gclid: The Google click ID. This field is mutually exclusive with
3311	// encryptedUserId, encryptedUserIdCandidates[], matchId and
3312	// mobileDeviceId. This or encryptedUserId or
3313	// encryptedUserIdCandidates[] or matchId or mobileDeviceId is a
3314	// required field.
3315	Gclid string `json:"gclid,omitempty"`
3316
3317	// Kind: Identifies what kind of resource this is. Value: the fixed
3318	// string "dfareporting#conversion".
3319	Kind string `json:"kind,omitempty"`
3320
3321	// LimitAdTracking: Whether Limit Ad Tracking is enabled. When set to
3322	// true, the conversion will be used for reporting but not targeting.
3323	// This will prevent remarketing.
3324	LimitAdTracking bool `json:"limitAdTracking,omitempty"`
3325
3326	// MatchId: The match ID field. A match ID is your own first-party
3327	// identifier that has been synced with Google using the match ID
3328	// feature in Floodlight. This field is mutually exclusive with
3329	// encryptedUserId, encryptedUserIdCandidates[],mobileDeviceId and
3330	// gclid. This or encryptedUserId or encryptedUserIdCandidates[] or
3331	// mobileDeviceId or gclid is a required field.
3332	MatchId string `json:"matchId,omitempty"`
3333
3334	// MobileDeviceId: The mobile device ID. This field is mutually
3335	// exclusive with encryptedUserId, encryptedUserIdCandidates[], matchId
3336	// and gclid. This or encryptedUserId or encryptedUserIdCandidates[] or
3337	// matchId or gclid is a required field.
3338	MobileDeviceId string `json:"mobileDeviceId,omitempty"`
3339
3340	// NonPersonalizedAd: Whether the conversion was for a non personalized
3341	// ad.
3342	NonPersonalizedAd bool `json:"nonPersonalizedAd,omitempty"`
3343
3344	// Ordinal: The ordinal of the conversion. Use this field to control how
3345	// conversions of the same user and day are de-duplicated. This is a
3346	// required field.
3347	Ordinal string `json:"ordinal,omitempty"`
3348
3349	// Quantity: The quantity of the conversion.
3350	Quantity int64 `json:"quantity,omitempty,string"`
3351
3352	// TimestampMicros: The timestamp of conversion, in Unix epoch micros.
3353	// This is a required field.
3354	TimestampMicros int64 `json:"timestampMicros,omitempty,string"`
3355
3356	// TreatmentForUnderage: Whether this particular request may come from a
3357	// user under the age of 16 (may differ by country), under compliance
3358	// with the European Union's General Data Protection Regulation (GDPR).
3359	TreatmentForUnderage bool `json:"treatmentForUnderage,omitempty"`
3360
3361	// Value: The value of the conversion.
3362	Value float64 `json:"value,omitempty"`
3363
3364	// ForceSendFields is a list of field names (e.g.
3365	// "ChildDirectedTreatment") to unconditionally include in API requests.
3366	// By default, fields with empty values are omitted from API requests.
3367	// However, any non-pointer, non-interface field appearing in
3368	// ForceSendFields will be sent to the server regardless of whether the
3369	// field is empty or not. This may be used to include empty fields in
3370	// Patch requests.
3371	ForceSendFields []string `json:"-"`
3372
3373	// NullFields is a list of field names (e.g. "ChildDirectedTreatment")
3374	// to include in API requests with the JSON null value. By default,
3375	// fields with empty values are omitted from API requests. However, any
3376	// field with an empty value appearing in NullFields will be sent to the
3377	// server as null. It is an error if a field in this list has a
3378	// non-empty value. This may be used to include null fields in Patch
3379	// requests.
3380	NullFields []string `json:"-"`
3381}
3382
3383func (s *Conversion) MarshalJSON() ([]byte, error) {
3384	type NoMethod Conversion
3385	raw := NoMethod(*s)
3386	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3387}
3388
3389func (s *Conversion) UnmarshalJSON(data []byte) error {
3390	type NoMethod Conversion
3391	var s1 struct {
3392		Value gensupport.JSONFloat64 `json:"value"`
3393		*NoMethod
3394	}
3395	s1.NoMethod = (*NoMethod)(s)
3396	if err := json.Unmarshal(data, &s1); err != nil {
3397		return err
3398	}
3399	s.Value = float64(s1.Value)
3400	return nil
3401}
3402
3403// ConversionError: The error code and description for a conversion that
3404// failed to insert or update.
3405type ConversionError struct {
3406	// Code: The error code.
3407	//
3408	// Possible values:
3409	//   "INTERNAL"
3410	//   "INVALID_ARGUMENT"
3411	//   "NOT_FOUND"
3412	//   "PERMISSION_DENIED"
3413	Code string `json:"code,omitempty"`
3414
3415	// Kind: Identifies what kind of resource this is. Value: the fixed
3416	// string "dfareporting#conversionError".
3417	Kind string `json:"kind,omitempty"`
3418
3419	// Message: A description of the error.
3420	Message string `json:"message,omitempty"`
3421
3422	// ForceSendFields is a list of field names (e.g. "Code") to
3423	// unconditionally include in API requests. By default, fields with
3424	// empty values are omitted from API requests. However, any non-pointer,
3425	// non-interface field appearing in ForceSendFields will be sent to the
3426	// server regardless of whether the field is empty or not. This may be
3427	// used to include empty fields in Patch requests.
3428	ForceSendFields []string `json:"-"`
3429
3430	// NullFields is a list of field names (e.g. "Code") to include in API
3431	// requests with the JSON null value. By default, fields with empty
3432	// values are omitted from API requests. However, any field with an
3433	// empty value appearing in NullFields will be sent to the server as
3434	// null. It is an error if a field in this list has a non-empty value.
3435	// This may be used to include null fields in Patch requests.
3436	NullFields []string `json:"-"`
3437}
3438
3439func (s *ConversionError) MarshalJSON() ([]byte, error) {
3440	type NoMethod ConversionError
3441	raw := NoMethod(*s)
3442	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3443}
3444
3445// ConversionStatus: The original conversion that was inserted or
3446// updated and whether there were any errors.
3447type ConversionStatus struct {
3448	// Conversion: The original conversion that was inserted or updated.
3449	Conversion *Conversion `json:"conversion,omitempty"`
3450
3451	// Errors: A list of errors related to this conversion.
3452	Errors []*ConversionError `json:"errors,omitempty"`
3453
3454	// Kind: Identifies what kind of resource this is. Value: the fixed
3455	// string "dfareporting#conversionStatus".
3456	Kind string `json:"kind,omitempty"`
3457
3458	// ForceSendFields is a list of field names (e.g. "Conversion") to
3459	// unconditionally include in API requests. By default, fields with
3460	// empty values are omitted from API requests. However, any non-pointer,
3461	// non-interface field appearing in ForceSendFields will be sent to the
3462	// server regardless of whether the field is empty or not. This may be
3463	// used to include empty fields in Patch requests.
3464	ForceSendFields []string `json:"-"`
3465
3466	// NullFields is a list of field names (e.g. "Conversion") to include in
3467	// API requests with the JSON null value. By default, fields with empty
3468	// values are omitted from API requests. However, any field with an
3469	// empty value appearing in NullFields will be sent to the server as
3470	// null. It is an error if a field in this list has a non-empty value.
3471	// This may be used to include null fields in Patch requests.
3472	NullFields []string `json:"-"`
3473}
3474
3475func (s *ConversionStatus) MarshalJSON() ([]byte, error) {
3476	type NoMethod ConversionStatus
3477	raw := NoMethod(*s)
3478	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3479}
3480
3481// ConversionsBatchInsertRequest: Insert Conversions Request.
3482type ConversionsBatchInsertRequest struct {
3483	// Conversions: The set of conversions to insert.
3484	Conversions []*Conversion `json:"conversions,omitempty"`
3485
3486	// EncryptionInfo: Describes how encryptedUserId or
3487	// encryptedUserIdCandidates[] is encrypted. This is a required field if
3488	// encryptedUserId or encryptedUserIdCandidates[] is used.
3489	EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3490
3491	// Kind: Identifies what kind of resource this is. Value: the fixed
3492	// string "dfareporting#conversionsBatchInsertRequest".
3493	Kind string `json:"kind,omitempty"`
3494
3495	// ForceSendFields is a list of field names (e.g. "Conversions") to
3496	// unconditionally include in API requests. By default, fields with
3497	// empty values are omitted from API requests. However, any non-pointer,
3498	// non-interface field appearing in ForceSendFields will be sent to the
3499	// server regardless of whether the field is empty or not. This may be
3500	// used to include empty fields in Patch requests.
3501	ForceSendFields []string `json:"-"`
3502
3503	// NullFields is a list of field names (e.g. "Conversions") to include
3504	// in API requests with the JSON null value. By default, fields with
3505	// empty values are omitted from API requests. However, any field with
3506	// an empty value appearing in NullFields will be sent to the server as
3507	// null. It is an error if a field in this list has a non-empty value.
3508	// This may be used to include null fields in Patch requests.
3509	NullFields []string `json:"-"`
3510}
3511
3512func (s *ConversionsBatchInsertRequest) MarshalJSON() ([]byte, error) {
3513	type NoMethod ConversionsBatchInsertRequest
3514	raw := NoMethod(*s)
3515	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3516}
3517
3518// ConversionsBatchInsertResponse: Insert Conversions Response.
3519type ConversionsBatchInsertResponse struct {
3520	// HasFailures: Indicates that some or all conversions failed to insert.
3521	HasFailures bool `json:"hasFailures,omitempty"`
3522
3523	// Kind: Identifies what kind of resource this is. Value: the fixed
3524	// string "dfareporting#conversionsBatchInsertResponse".
3525	Kind string `json:"kind,omitempty"`
3526
3527	// Status: The insert status of each conversion. Statuses are returned
3528	// in the same order that conversions are inserted.
3529	Status []*ConversionStatus `json:"status,omitempty"`
3530
3531	// ServerResponse contains the HTTP response code and headers from the
3532	// server.
3533	googleapi.ServerResponse `json:"-"`
3534
3535	// ForceSendFields is a list of field names (e.g. "HasFailures") to
3536	// unconditionally include in API requests. By default, fields with
3537	// empty values are omitted from API requests. However, any non-pointer,
3538	// non-interface field appearing in ForceSendFields will be sent to the
3539	// server regardless of whether the field is empty or not. This may be
3540	// used to include empty fields in Patch requests.
3541	ForceSendFields []string `json:"-"`
3542
3543	// NullFields is a list of field names (e.g. "HasFailures") to include
3544	// in API requests with the JSON null value. By default, fields with
3545	// empty values are omitted from API requests. However, any field with
3546	// an empty value appearing in NullFields will be sent to the server as
3547	// null. It is an error if a field in this list has a non-empty value.
3548	// This may be used to include null fields in Patch requests.
3549	NullFields []string `json:"-"`
3550}
3551
3552func (s *ConversionsBatchInsertResponse) MarshalJSON() ([]byte, error) {
3553	type NoMethod ConversionsBatchInsertResponse
3554	raw := NoMethod(*s)
3555	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3556}
3557
3558// ConversionsBatchUpdateRequest: Update Conversions Request.
3559type ConversionsBatchUpdateRequest struct {
3560	// Conversions: The set of conversions to update.
3561	Conversions []*Conversion `json:"conversions,omitempty"`
3562
3563	// EncryptionInfo: Describes how encryptedUserId is encrypted. This is a
3564	// required field if encryptedUserId is used.
3565	EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3566
3567	// Kind: Identifies what kind of resource this is. Value: the fixed
3568	// string "dfareporting#conversionsBatchUpdateRequest".
3569	Kind string `json:"kind,omitempty"`
3570
3571	// ForceSendFields is a list of field names (e.g. "Conversions") to
3572	// unconditionally include in API requests. By default, fields with
3573	// empty values are omitted from API requests. However, any non-pointer,
3574	// non-interface field appearing in ForceSendFields will be sent to the
3575	// server regardless of whether the field is empty or not. This may be
3576	// used to include empty fields in Patch requests.
3577	ForceSendFields []string `json:"-"`
3578
3579	// NullFields is a list of field names (e.g. "Conversions") to include
3580	// in API requests with the JSON null value. By default, fields with
3581	// empty values are omitted from API requests. However, any field with
3582	// an empty value appearing in NullFields will be sent to the server as
3583	// null. It is an error if a field in this list has a non-empty value.
3584	// This may be used to include null fields in Patch requests.
3585	NullFields []string `json:"-"`
3586}
3587
3588func (s *ConversionsBatchUpdateRequest) MarshalJSON() ([]byte, error) {
3589	type NoMethod ConversionsBatchUpdateRequest
3590	raw := NoMethod(*s)
3591	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3592}
3593
3594// ConversionsBatchUpdateResponse: Update Conversions Response.
3595type ConversionsBatchUpdateResponse struct {
3596	// HasFailures: Indicates that some or all conversions failed to update.
3597	HasFailures bool `json:"hasFailures,omitempty"`
3598
3599	// Kind: Identifies what kind of resource this is. Value: the fixed
3600	// string "dfareporting#conversionsBatchUpdateResponse".
3601	Kind string `json:"kind,omitempty"`
3602
3603	// Status: The update status of each conversion. Statuses are returned
3604	// in the same order that conversions are updated.
3605	Status []*ConversionStatus `json:"status,omitempty"`
3606
3607	// ServerResponse contains the HTTP response code and headers from the
3608	// server.
3609	googleapi.ServerResponse `json:"-"`
3610
3611	// ForceSendFields is a list of field names (e.g. "HasFailures") to
3612	// unconditionally include in API requests. By default, fields with
3613	// empty values are omitted from API requests. However, any non-pointer,
3614	// non-interface field appearing in ForceSendFields will be sent to the
3615	// server regardless of whether the field is empty or not. This may be
3616	// used to include empty fields in Patch requests.
3617	ForceSendFields []string `json:"-"`
3618
3619	// NullFields is a list of field names (e.g. "HasFailures") to include
3620	// in API requests with the JSON null value. By default, fields with
3621	// empty values are omitted from API requests. However, any field with
3622	// an empty value appearing in NullFields will be sent to the server as
3623	// null. It is an error if a field in this list has a non-empty value.
3624	// This may be used to include null fields in Patch requests.
3625	NullFields []string `json:"-"`
3626}
3627
3628func (s *ConversionsBatchUpdateResponse) MarshalJSON() ([]byte, error) {
3629	type NoMethod ConversionsBatchUpdateResponse
3630	raw := NoMethod(*s)
3631	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3632}
3633
3634// CountriesListResponse: Country List Response
3635type CountriesListResponse struct {
3636	// Countries: Country collection.
3637	Countries []*Country `json:"countries,omitempty"`
3638
3639	// Kind: Identifies what kind of resource this is. Value: the fixed
3640	// string "dfareporting#countriesListResponse".
3641	Kind string `json:"kind,omitempty"`
3642
3643	// ServerResponse contains the HTTP response code and headers from the
3644	// server.
3645	googleapi.ServerResponse `json:"-"`
3646
3647	// ForceSendFields is a list of field names (e.g. "Countries") to
3648	// unconditionally include in API requests. By default, fields with
3649	// empty values are omitted from API requests. However, any non-pointer,
3650	// non-interface field appearing in ForceSendFields will be sent to the
3651	// server regardless of whether the field is empty or not. This may be
3652	// used to include empty fields in Patch requests.
3653	ForceSendFields []string `json:"-"`
3654
3655	// NullFields is a list of field names (e.g. "Countries") to include in
3656	// API requests with the JSON null value. By default, fields with empty
3657	// values are omitted from API requests. However, any field with an
3658	// empty value appearing in NullFields will be sent to the server as
3659	// null. It is an error if a field in this list has a non-empty value.
3660	// This may be used to include null fields in Patch requests.
3661	NullFields []string `json:"-"`
3662}
3663
3664func (s *CountriesListResponse) MarshalJSON() ([]byte, error) {
3665	type NoMethod CountriesListResponse
3666	raw := NoMethod(*s)
3667	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3668}
3669
3670// Country: Contains information about a country that can be targeted by
3671// ads.
3672type Country struct {
3673	// CountryCode: Country code.
3674	CountryCode string `json:"countryCode,omitempty"`
3675
3676	// DartId: DART ID of this country. This is the ID used for targeting
3677	// and generating reports.
3678	DartId int64 `json:"dartId,omitempty,string"`
3679
3680	// Kind: Identifies what kind of resource this is. Value: the fixed
3681	// string "dfareporting#country".
3682	Kind string `json:"kind,omitempty"`
3683
3684	// Name: Name of this country.
3685	Name string `json:"name,omitempty"`
3686
3687	// SslEnabled: Whether ad serving supports secure servers in this
3688	// country.
3689	SslEnabled bool `json:"sslEnabled,omitempty"`
3690
3691	// ServerResponse contains the HTTP response code and headers from the
3692	// server.
3693	googleapi.ServerResponse `json:"-"`
3694
3695	// ForceSendFields is a list of field names (e.g. "CountryCode") to
3696	// unconditionally include in API requests. By default, fields with
3697	// empty values are omitted from API requests. However, any non-pointer,
3698	// non-interface field appearing in ForceSendFields will be sent to the
3699	// server regardless of whether the field is empty or not. This may be
3700	// used to include empty fields in Patch requests.
3701	ForceSendFields []string `json:"-"`
3702
3703	// NullFields is a list of field names (e.g. "CountryCode") to include
3704	// in API requests with the JSON null value. By default, fields with
3705	// empty values are omitted from API requests. However, any field with
3706	// an empty value appearing in NullFields will be sent to the server as
3707	// null. It is an error if a field in this list has a non-empty value.
3708	// This may be used to include null fields in Patch requests.
3709	NullFields []string `json:"-"`
3710}
3711
3712func (s *Country) MarshalJSON() ([]byte, error) {
3713	type NoMethod Country
3714	raw := NoMethod(*s)
3715	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3716}
3717
3718// Creative: Contains properties of a Creative.
3719type Creative struct {
3720	// AccountId: Account ID of this creative. This field, if left unset,
3721	// will be auto-generated for both insert and update operations.
3722	// Applicable to all creative types.
3723	AccountId int64 `json:"accountId,omitempty,string"`
3724
3725	// Active: Whether the creative is active. Applicable to all creative
3726	// types.
3727	Active bool `json:"active,omitempty"`
3728
3729	// AdParameters: Ad parameters user for VPAID creative. This is a
3730	// read-only field. Applicable to the following creative types: all
3731	// VPAID.
3732	AdParameters string `json:"adParameters,omitempty"`
3733
3734	// AdTagKeys: Keywords for a Rich Media creative. Keywords let you
3735	// customize the creative settings of a Rich Media ad running on your
3736	// site without having to contact the advertiser. You can use keywords
3737	// to dynamically change the look or functionality of a creative.
3738	// Applicable to the following creative types: all RICH_MEDIA, and all
3739	// VPAID.
3740	AdTagKeys []string `json:"adTagKeys,omitempty"`
3741
3742	// AdditionalSizes: Additional sizes associated with a responsive
3743	// creative. When inserting or updating a creative either the size ID
3744	// field or size width and height fields can be used. Applicable to
3745	// DISPLAY creatives when the primary asset type is HTML_IMAGE.
3746	AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
3747
3748	// AdvertiserId: Advertiser ID of this creative. This is a required
3749	// field. Applicable to all creative types.
3750	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
3751
3752	// AllowScriptAccess: Whether script access is allowed for this
3753	// creative. This is a read-only and deprecated field which will
3754	// automatically be set to true on update. Applicable to the following
3755	// creative types: FLASH_INPAGE.
3756	AllowScriptAccess bool `json:"allowScriptAccess,omitempty"`
3757
3758	// Archived: Whether the creative is archived. Applicable to all
3759	// creative types.
3760	Archived bool `json:"archived,omitempty"`
3761
3762	// ArtworkType: Type of artwork used for the creative. This is a
3763	// read-only field. Applicable to the following creative types: all
3764	// RICH_MEDIA, and all VPAID.
3765	//
3766	// Possible values:
3767	//   "ARTWORK_TYPE_FLASH"
3768	//   "ARTWORK_TYPE_HTML5"
3769	//   "ARTWORK_TYPE_IMAGE"
3770	//   "ARTWORK_TYPE_MIXED"
3771	ArtworkType string `json:"artworkType,omitempty"`
3772
3773	// AuthoringSource: Source application where creative was authored.
3774	// Presently, only DBM authored creatives will have this field set.
3775	// Applicable to all creative types.
3776	//
3777	// Possible values:
3778	//   "CREATIVE_AUTHORING_SOURCE_DBM"
3779	//   "CREATIVE_AUTHORING_SOURCE_DCM"
3780	//   "CREATIVE_AUTHORING_SOURCE_STUDIO"
3781	AuthoringSource string `json:"authoringSource,omitempty"`
3782
3783	// AuthoringTool: Authoring tool for HTML5 banner creatives. This is a
3784	// read-only field. Applicable to the following creative types:
3785	// HTML5_BANNER.
3786	//
3787	// Possible values:
3788	//   "NINJA"
3789	//   "SWIFFY"
3790	AuthoringTool string `json:"authoringTool,omitempty"`
3791
3792	// AutoAdvanceImages: Whether images are automatically advanced for
3793	// image gallery creatives. Applicable to the following creative types:
3794	// DISPLAY_IMAGE_GALLERY.
3795	AutoAdvanceImages bool `json:"autoAdvanceImages,omitempty"`
3796
3797	// BackgroundColor: The 6-character HTML color code, beginning with #,
3798	// for the background of the window area where the Flash file is
3799	// displayed. Default is white. Applicable to the following creative
3800	// types: FLASH_INPAGE.
3801	BackgroundColor string `json:"backgroundColor,omitempty"`
3802
3803	// BackupImageClickThroughUrl: Click-through URL for backup image.
3804	// Applicable to ENHANCED_BANNER when the primary asset type is not
3805	// HTML_IMAGE.
3806	BackupImageClickThroughUrl *CreativeClickThroughUrl `json:"backupImageClickThroughUrl,omitempty"`
3807
3808	// BackupImageFeatures: List of feature dependencies that will cause a
3809	// backup image to be served if the browser that serves the ad does not
3810	// support them. Feature dependencies are features that a browser must
3811	// be able to support in order to render your HTML5 creative asset
3812	// correctly. This field is initially auto-generated to contain all
3813	// features detected by Campaign Manager for all the assets of this
3814	// creative and can then be modified by the client. To reset this field,
3815	// copy over all the creativeAssets' detected features. Applicable to
3816	// the following creative types: HTML5_BANNER. Applicable to DISPLAY
3817	// when the primary asset type is not HTML_IMAGE.
3818	//
3819	// Possible values:
3820	//   "APPLICATION_CACHE"
3821	//   "AUDIO"
3822	//   "CANVAS"
3823	//   "CANVAS_TEXT"
3824	//   "CSS_ANIMATIONS"
3825	//   "CSS_BACKGROUND_SIZE"
3826	//   "CSS_BORDER_IMAGE"
3827	//   "CSS_BORDER_RADIUS"
3828	//   "CSS_BOX_SHADOW"
3829	//   "CSS_COLUMNS"
3830	//   "CSS_FLEX_BOX"
3831	//   "CSS_FONT_FACE"
3832	//   "CSS_GENERATED_CONTENT"
3833	//   "CSS_GRADIENTS"
3834	//   "CSS_HSLA"
3835	//   "CSS_MULTIPLE_BGS"
3836	//   "CSS_OPACITY"
3837	//   "CSS_REFLECTIONS"
3838	//   "CSS_RGBA"
3839	//   "CSS_TEXT_SHADOW"
3840	//   "CSS_TRANSFORMS"
3841	//   "CSS_TRANSFORMS3D"
3842	//   "CSS_TRANSITIONS"
3843	//   "DRAG_AND_DROP"
3844	//   "GEO_LOCATION"
3845	//   "HASH_CHANGE"
3846	//   "HISTORY"
3847	//   "INDEXED_DB"
3848	//   "INLINE_SVG"
3849	//   "INPUT_ATTR_AUTOCOMPLETE"
3850	//   "INPUT_ATTR_AUTOFOCUS"
3851	//   "INPUT_ATTR_LIST"
3852	//   "INPUT_ATTR_MAX"
3853	//   "INPUT_ATTR_MIN"
3854	//   "INPUT_ATTR_MULTIPLE"
3855	//   "INPUT_ATTR_PATTERN"
3856	//   "INPUT_ATTR_PLACEHOLDER"
3857	//   "INPUT_ATTR_REQUIRED"
3858	//   "INPUT_ATTR_STEP"
3859	//   "INPUT_TYPE_COLOR"
3860	//   "INPUT_TYPE_DATE"
3861	//   "INPUT_TYPE_DATETIME"
3862	//   "INPUT_TYPE_DATETIME_LOCAL"
3863	//   "INPUT_TYPE_EMAIL"
3864	//   "INPUT_TYPE_MONTH"
3865	//   "INPUT_TYPE_NUMBER"
3866	//   "INPUT_TYPE_RANGE"
3867	//   "INPUT_TYPE_SEARCH"
3868	//   "INPUT_TYPE_TEL"
3869	//   "INPUT_TYPE_TIME"
3870	//   "INPUT_TYPE_URL"
3871	//   "INPUT_TYPE_WEEK"
3872	//   "LOCAL_STORAGE"
3873	//   "POST_MESSAGE"
3874	//   "SESSION_STORAGE"
3875	//   "SMIL"
3876	//   "SVG_CLIP_PATHS"
3877	//   "SVG_FE_IMAGE"
3878	//   "SVG_FILTERS"
3879	//   "SVG_HREF"
3880	//   "TOUCH"
3881	//   "VIDEO"
3882	//   "WEBGL"
3883	//   "WEB_SOCKETS"
3884	//   "WEB_SQL_DATABASE"
3885	//   "WEB_WORKERS"
3886	BackupImageFeatures []string `json:"backupImageFeatures,omitempty"`
3887
3888	// BackupImageReportingLabel: Reporting label used for HTML5 banner
3889	// backup image. Applicable to the following creative types: DISPLAY
3890	// when the primary asset type is not HTML_IMAGE.
3891	BackupImageReportingLabel string `json:"backupImageReportingLabel,omitempty"`
3892
3893	// BackupImageTargetWindow: Target window for backup image. Applicable
3894	// to the following creative types: FLASH_INPAGE and HTML5_BANNER.
3895	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
3896	BackupImageTargetWindow *TargetWindow `json:"backupImageTargetWindow,omitempty"`
3897
3898	// ClickTags: Click tags of the creative. For DISPLAY, FLASH_INPAGE, and
3899	// HTML5_BANNER creatives, this is a subset of detected click tags for
3900	// the assets associated with this creative. After creating a flash
3901	// asset, detected click tags will be returned in the
3902	// creativeAssetMetadata. When inserting the creative, populate the
3903	// creative clickTags field using the creativeAssetMetadata.clickTags
3904	// field. For DISPLAY_IMAGE_GALLERY creatives, there should be exactly
3905	// one entry in this list for each image creative asset. A click tag is
3906	// matched with a corresponding creative asset by matching the
3907	// clickTag.name field with the creativeAsset.assetIdentifier.name
3908	// field. Applicable to the following creative types:
3909	// DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER. Applicable to
3910	// DISPLAY when the primary asset type is not HTML_IMAGE.
3911	ClickTags []*ClickTag `json:"clickTags,omitempty"`
3912
3913	// CommercialId: Industry standard ID assigned to creative for reach and
3914	// frequency. Applicable to INSTREAM_VIDEO_REDIRECT creatives.
3915	CommercialId string `json:"commercialId,omitempty"`
3916
3917	// CompanionCreatives: List of companion creatives assigned to an
3918	// in-Stream video creative. Acceptable values include IDs of existing
3919	// flash and image creatives. Applicable to the following creative
3920	// types: all VPAID, all INSTREAM_AUDIO and all INSTREAM_VIDEO with
3921	// dynamicAssetSelection set to false.
3922	CompanionCreatives googleapi.Int64s `json:"companionCreatives,omitempty"`
3923
3924	// Compatibility: Compatibilities associated with this creative. This is
3925	// a read-only field. DISPLAY and DISPLAY_INTERSTITIAL refer to
3926	// rendering either on desktop or on mobile devices or in mobile apps
3927	// for regular or interstitial ads, respectively. APP and
3928	// APP_INTERSTITIAL are for rendering in mobile apps. Only pre-existing
3929	// creatives may have these compatibilities since new creatives will
3930	// either be assigned DISPLAY or DISPLAY_INTERSTITIAL instead.
3931	// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
3932	// with the VAST standard. IN_STREAM_AUDIO refers to rendering in
3933	// in-stream audio ads developed with the VAST standard. Applicable to
3934	// all creative types.
3935	//
3936	// Acceptable values are:
3937	// - "APP"
3938	// - "APP_INTERSTITIAL"
3939	// - "IN_STREAM_VIDEO"
3940	// - "IN_STREAM_AUDIO"
3941	// - "DISPLAY"
3942	// - "DISPLAY_INTERSTITIAL"
3943	//
3944	// Possible values:
3945	//   "APP"
3946	//   "APP_INTERSTITIAL"
3947	//   "DISPLAY"
3948	//   "DISPLAY_INTERSTITIAL"
3949	//   "IN_STREAM_AUDIO"
3950	//   "IN_STREAM_VIDEO"
3951	Compatibility []string `json:"compatibility,omitempty"`
3952
3953	// ConvertFlashToHtml5: Whether Flash assets associated with the
3954	// creative need to be automatically converted to HTML5. This flag is
3955	// enabled by default and users can choose to disable it if they don't
3956	// want the system to generate and use HTML5 asset for this creative.
3957	// Applicable to the following creative type: FLASH_INPAGE. Applicable
3958	// to DISPLAY when the primary asset type is not HTML_IMAGE.
3959	ConvertFlashToHtml5 bool `json:"convertFlashToHtml5,omitempty"`
3960
3961	// CounterCustomEvents: List of counter events configured for the
3962	// creative. For DISPLAY_IMAGE_GALLERY creatives, these are read-only
3963	// and auto-generated from clickTags. Applicable to the following
3964	// creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
3965	CounterCustomEvents []*CreativeCustomEvent `json:"counterCustomEvents,omitempty"`
3966
3967	// CreativeAssetSelection: Required if dynamicAssetSelection is true.
3968	CreativeAssetSelection *CreativeAssetSelection `json:"creativeAssetSelection,omitempty"`
3969
3970	// CreativeAssets: Assets associated with a creative. Applicable to all
3971	// but the following creative types: INTERNAL_REDIRECT,
3972	// INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT
3973	CreativeAssets []*CreativeAsset `json:"creativeAssets,omitempty"`
3974
3975	// CreativeFieldAssignments: Creative field assignments for this
3976	// creative. Applicable to all creative types.
3977	CreativeFieldAssignments []*CreativeFieldAssignment `json:"creativeFieldAssignments,omitempty"`
3978
3979	// CustomKeyValues: Custom key-values for a Rich Media creative.
3980	// Key-values let you customize the creative settings of a Rich Media ad
3981	// running on your site without having to contact the advertiser. You
3982	// can use key-values to dynamically change the look or functionality of
3983	// a creative. Applicable to the following creative types: all
3984	// RICH_MEDIA, and all VPAID.
3985	CustomKeyValues []string `json:"customKeyValues,omitempty"`
3986
3987	// DynamicAssetSelection: Set this to true to enable the use of rules to
3988	// target individual assets in this creative. When set to true
3989	// creativeAssetSelection must be set. This also controls asset-level
3990	// companions. When this is true, companion creatives should be assigned
3991	// to creative assets. Learn more. Applicable to INSTREAM_VIDEO
3992	// creatives.
3993	DynamicAssetSelection bool `json:"dynamicAssetSelection,omitempty"`
3994
3995	// ExitCustomEvents: List of exit events configured for the creative.
3996	// For DISPLAY and DISPLAY_IMAGE_GALLERY creatives, these are read-only
3997	// and auto-generated from clickTags, For DISPLAY, an event is also
3998	// created from the backupImageReportingLabel. Applicable to the
3999	// following creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and
4000	// all VPAID. Applicable to DISPLAY when the primary asset type is not
4001	// HTML_IMAGE.
4002	ExitCustomEvents []*CreativeCustomEvent `json:"exitCustomEvents,omitempty"`
4003
4004	// FsCommand: OpenWindow FSCommand of this creative. This lets the SWF
4005	// file communicate with either Flash Player or the program hosting
4006	// Flash Player, such as a web browser. This is only triggered if
4007	// allowScriptAccess field is true. Applicable to the following creative
4008	// types: FLASH_INPAGE.
4009	FsCommand *FsCommand `json:"fsCommand,omitempty"`
4010
4011	// HtmlCode: HTML code for the creative. This is a required field when
4012	// applicable. This field is ignored if htmlCodeLocked is true.
4013	// Applicable to the following creative types: all CUSTOM, FLASH_INPAGE,
4014	// and HTML5_BANNER, and all RICH_MEDIA.
4015	HtmlCode string `json:"htmlCode,omitempty"`
4016
4017	// HtmlCodeLocked: Whether HTML code is generated by Campaign Manager or
4018	// manually entered. Set to true to ignore changes to htmlCode.
4019	// Applicable to the following creative types: FLASH_INPAGE and
4020	// HTML5_BANNER.
4021	HtmlCodeLocked bool `json:"htmlCodeLocked,omitempty"`
4022
4023	// Id: ID of this creative. This is a read-only, auto-generated field.
4024	// Applicable to all creative types.
4025	Id int64 `json:"id,omitempty,string"`
4026
4027	// IdDimensionValue: Dimension value for the ID of this creative. This
4028	// is a read-only field. Applicable to all creative types.
4029	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4030
4031	// Kind: Identifies what kind of resource this is. Value: the fixed
4032	// string "dfareporting#creative".
4033	Kind string `json:"kind,omitempty"`
4034
4035	// LastModifiedInfo: Creative last modification information. This is a
4036	// read-only field. Applicable to all creative types.
4037	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
4038
4039	// LatestTraffickedCreativeId: Latest Studio trafficked creative ID
4040	// associated with rich media and VPAID creatives. This is a read-only
4041	// field. Applicable to the following creative types: all RICH_MEDIA,
4042	// and all VPAID.
4043	LatestTraffickedCreativeId int64 `json:"latestTraffickedCreativeId,omitempty,string"`
4044
4045	// MediaDescription: Description of the audio or video ad. Applicable to
4046	// the following creative types: all INSTREAM_VIDEO, INSTREAM_AUDIO, and
4047	// all VPAID.
4048	MediaDescription string `json:"mediaDescription,omitempty"`
4049
4050	// MediaDuration: Creative audio or video duration in seconds. This is a
4051	// read-only field. Applicable to the following creative types:
4052	// INSTREAM_VIDEO, INSTREAM_AUDIO, all RICH_MEDIA, and all VPAID.
4053	MediaDuration float64 `json:"mediaDuration,omitempty"`
4054
4055	// Name: Name of the creative. This is a required field and must be less
4056	// than 256 characters long. Applicable to all creative types.
4057	Name string `json:"name,omitempty"`
4058
4059	// OverrideCss: Override CSS value for rich media creatives. Applicable
4060	// to the following creative types: all RICH_MEDIA.
4061	OverrideCss string `json:"overrideCss,omitempty"`
4062
4063	// ProgressOffset: Amount of time to play the video before counting a
4064	// view. Applicable to the following creative types: all INSTREAM_VIDEO.
4065	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
4066
4067	// RedirectUrl: URL of hosted image or hosted video or another ad tag.
4068	// For INSTREAM_VIDEO_REDIRECT creatives this is the in-stream video
4069	// redirect URL. The standard for a VAST (Video Ad Serving Template) ad
4070	// response allows for a redirect link to another VAST 2.0 or 3.0 call.
4071	// This is a required field when applicable. Applicable to the following
4072	// creative types: DISPLAY_REDIRECT, INTERNAL_REDIRECT,
4073	// INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO_REDIRECT
4074	RedirectUrl string `json:"redirectUrl,omitempty"`
4075
4076	// RenderingId: ID of current rendering version. This is a read-only
4077	// field. Applicable to all creative types.
4078	RenderingId int64 `json:"renderingId,omitempty,string"`
4079
4080	// RenderingIdDimensionValue: Dimension value for the rendering ID of
4081	// this creative. This is a read-only field. Applicable to all creative
4082	// types.
4083	RenderingIdDimensionValue *DimensionValue `json:"renderingIdDimensionValue,omitempty"`
4084
4085	// RequiredFlashPluginVersion: The minimum required Flash plugin version
4086	// for this creative. For example, 11.2.202.235. This is a read-only
4087	// field. Applicable to the following creative types: all RICH_MEDIA,
4088	// and all VPAID.
4089	RequiredFlashPluginVersion string `json:"requiredFlashPluginVersion,omitempty"`
4090
4091	// RequiredFlashVersion: The internal Flash version for this creative as
4092	// calculated by Studio. This is a read-only field. Applicable to the
4093	// following creative types: FLASH_INPAGE all RICH_MEDIA, and all VPAID.
4094	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
4095	RequiredFlashVersion int64 `json:"requiredFlashVersion,omitempty"`
4096
4097	// Size: Size associated with this creative. When inserting or updating
4098	// a creative either the size ID field or size width and height fields
4099	// can be used. This is a required field when applicable; however for
4100	// IMAGE, FLASH_INPAGE creatives, and for DISPLAY creatives with a
4101	// primary asset of type HTML_IMAGE, if left blank, this field will be
4102	// automatically set using the actual size of the associated image
4103	// assets. Applicable to the following creative types: DISPLAY,
4104	// DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all
4105	// RICH_MEDIA.
4106	Size *Size `json:"size,omitempty"`
4107
4108	// SkipOffset: Amount of time to play the video before the skip button
4109	// appears. Applicable to the following creative types: all
4110	// INSTREAM_VIDEO.
4111	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
4112
4113	// Skippable: Whether the user can choose to skip the creative.
4114	// Applicable to the following creative types: all INSTREAM_VIDEO and
4115	// all VPAID.
4116	Skippable bool `json:"skippable,omitempty"`
4117
4118	// SslCompliant: Whether the creative is SSL-compliant. This is a
4119	// read-only field. Applicable to all creative types.
4120	SslCompliant bool `json:"sslCompliant,omitempty"`
4121
4122	// SslOverride: Whether creative should be treated as SSL compliant even
4123	// if the system scan shows it's not. Applicable to all creative types.
4124	SslOverride bool `json:"sslOverride,omitempty"`
4125
4126	// StudioAdvertiserId: Studio advertiser ID associated with rich media
4127	// and VPAID creatives. This is a read-only field. Applicable to the
4128	// following creative types: all RICH_MEDIA, and all VPAID.
4129	StudioAdvertiserId int64 `json:"studioAdvertiserId,omitempty,string"`
4130
4131	// StudioCreativeId: Studio creative ID associated with rich media and
4132	// VPAID creatives. This is a read-only field. Applicable to the
4133	// following creative types: all RICH_MEDIA, and all VPAID.
4134	StudioCreativeId int64 `json:"studioCreativeId,omitempty,string"`
4135
4136	// StudioTraffickedCreativeId: Studio trafficked creative ID associated
4137	// with rich media and VPAID creatives. This is a read-only field.
4138	// Applicable to the following creative types: all RICH_MEDIA, and all
4139	// VPAID.
4140	StudioTraffickedCreativeId int64 `json:"studioTraffickedCreativeId,omitempty,string"`
4141
4142	// SubaccountId: Subaccount ID of this creative. This field, if left
4143	// unset, will be auto-generated for both insert and update operations.
4144	// Applicable to all creative types.
4145	SubaccountId int64 `json:"subaccountId,omitempty,string"`
4146
4147	// ThirdPartyBackupImageImpressionsUrl: Third-party URL used to record
4148	// backup image impressions. Applicable to the following creative types:
4149	// all RICH_MEDIA.
4150	ThirdPartyBackupImageImpressionsUrl string `json:"thirdPartyBackupImageImpressionsUrl,omitempty"`
4151
4152	// ThirdPartyRichMediaImpressionsUrl: Third-party URL used to record
4153	// rich media impressions. Applicable to the following creative types:
4154	// all RICH_MEDIA.
4155	ThirdPartyRichMediaImpressionsUrl string `json:"thirdPartyRichMediaImpressionsUrl,omitempty"`
4156
4157	// ThirdPartyUrls: Third-party URLs for tracking in-stream creative
4158	// events. Applicable to the following creative types: all
4159	// INSTREAM_VIDEO, all INSTREAM_AUDIO, and all VPAID.
4160	ThirdPartyUrls []*ThirdPartyTrackingUrl `json:"thirdPartyUrls,omitempty"`
4161
4162	// TimerCustomEvents: List of timer events configured for the creative.
4163	// For DISPLAY_IMAGE_GALLERY creatives, these are read-only and
4164	// auto-generated from clickTags. Applicable to the following creative
4165	// types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
4166	// Applicable to DISPLAY when the primary asset is not HTML_IMAGE.
4167	TimerCustomEvents []*CreativeCustomEvent `json:"timerCustomEvents,omitempty"`
4168
4169	// TotalFileSize: Combined size of all creative assets. This is a
4170	// read-only field. Applicable to the following creative types: all
4171	// RICH_MEDIA, and all VPAID.
4172	TotalFileSize int64 `json:"totalFileSize,omitempty,string"`
4173
4174	// Type: Type of this creative. This is a required field. Applicable to
4175	// all creative types.
4176	//
4177	// Note: FLASH_INPAGE, HTML5_BANNER, and IMAGE are only used for
4178	// existing creatives. New creatives should use DISPLAY as a replacement
4179	// for these types.
4180	//
4181	// Possible values:
4182	//   "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
4183	//   "CUSTOM_DISPLAY"
4184	//   "CUSTOM_DISPLAY_INTERSTITIAL"
4185	//   "DISPLAY"
4186	//   "DISPLAY_IMAGE_GALLERY"
4187	//   "DISPLAY_REDIRECT"
4188	//   "FLASH_INPAGE"
4189	//   "HTML5_BANNER"
4190	//   "IMAGE"
4191	//   "INSTREAM_AUDIO"
4192	//   "INSTREAM_VIDEO"
4193	//   "INSTREAM_VIDEO_REDIRECT"
4194	//   "INTERNAL_REDIRECT"
4195	//   "INTERSTITIAL_INTERNAL_REDIRECT"
4196	//   "RICH_MEDIA_DISPLAY_BANNER"
4197	//   "RICH_MEDIA_DISPLAY_EXPANDING"
4198	//   "RICH_MEDIA_DISPLAY_INTERSTITIAL"
4199	//   "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL"
4200	//   "RICH_MEDIA_IM_EXPAND"
4201	//   "RICH_MEDIA_INPAGE_FLOATING"
4202	//   "RICH_MEDIA_MOBILE_IN_APP"
4203	//   "RICH_MEDIA_PEEL_DOWN"
4204	//   "TRACKING_TEXT"
4205	//   "VPAID_LINEAR_VIDEO"
4206	//   "VPAID_NON_LINEAR_VIDEO"
4207	Type string `json:"type,omitempty"`
4208
4209	// UniversalAdId: A Universal Ad ID as per the VAST 4.0 spec. Applicable
4210	// to the following creative types: INSTREAM_AUDIO and INSTREAM_VIDEO
4211	// and VPAID.
4212	UniversalAdId *UniversalAdId `json:"universalAdId,omitempty"`
4213
4214	// Version: The version number helps you keep track of multiple versions
4215	// of your creative in your reports. The version number will always be
4216	// auto-generated during insert operations to start at 1. For tracking
4217	// creatives the version cannot be incremented and will always remain at
4218	// 1. For all other creative types the version can be incremented only
4219	// by 1 during update operations. In addition, the version will be
4220	// automatically incremented by 1 when undergoing Rich Media creative
4221	// merging. Applicable to all creative types.
4222	Version int64 `json:"version,omitempty"`
4223
4224	// ServerResponse contains the HTTP response code and headers from the
4225	// server.
4226	googleapi.ServerResponse `json:"-"`
4227
4228	// ForceSendFields is a list of field names (e.g. "AccountId") to
4229	// unconditionally include in API requests. By default, fields with
4230	// empty values are omitted from API requests. However, any non-pointer,
4231	// non-interface field appearing in ForceSendFields will be sent to the
4232	// server regardless of whether the field is empty or not. This may be
4233	// used to include empty fields in Patch requests.
4234	ForceSendFields []string `json:"-"`
4235
4236	// NullFields is a list of field names (e.g. "AccountId") to include in
4237	// API requests with the JSON null value. By default, fields with empty
4238	// values are omitted from API requests. However, any field with an
4239	// empty value appearing in NullFields will be sent to the server as
4240	// null. It is an error if a field in this list has a non-empty value.
4241	// This may be used to include null fields in Patch requests.
4242	NullFields []string `json:"-"`
4243}
4244
4245func (s *Creative) MarshalJSON() ([]byte, error) {
4246	type NoMethod Creative
4247	raw := NoMethod(*s)
4248	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4249}
4250
4251func (s *Creative) UnmarshalJSON(data []byte) error {
4252	type NoMethod Creative
4253	var s1 struct {
4254		MediaDuration gensupport.JSONFloat64 `json:"mediaDuration"`
4255		*NoMethod
4256	}
4257	s1.NoMethod = (*NoMethod)(s)
4258	if err := json.Unmarshal(data, &s1); err != nil {
4259		return err
4260	}
4261	s.MediaDuration = float64(s1.MediaDuration)
4262	return nil
4263}
4264
4265// CreativeAsset: Creative Asset.
4266type CreativeAsset struct {
4267	// ActionScript3: Whether ActionScript3 is enabled for the flash asset.
4268	// This is a read-only field. Applicable to the following creative type:
4269	// FLASH_INPAGE. Applicable to DISPLAY when the primary asset type is
4270	// not HTML_IMAGE.
4271	ActionScript3 bool `json:"actionScript3,omitempty"`
4272
4273	// Active: Whether the video or audio asset is active. This is a
4274	// read-only field for VPAID_NON_LINEAR_VIDEO assets. Applicable to the
4275	// following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and all
4276	// VPAID.
4277	Active bool `json:"active,omitempty"`
4278
4279	// AdditionalSizes: Additional sizes associated with this creative
4280	// asset. HTML5 asset generated by compatible software such as GWD will
4281	// be able to support more sizes this creative asset can render.
4282	AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
4283
4284	// Alignment: Possible alignments for an asset. This is a read-only
4285	// field. Applicable to the following creative types:
4286	// RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL.
4287	//
4288	// Possible values:
4289	//   "ALIGNMENT_BOTTOM"
4290	//   "ALIGNMENT_LEFT"
4291	//   "ALIGNMENT_RIGHT"
4292	//   "ALIGNMENT_TOP"
4293	Alignment string `json:"alignment,omitempty"`
4294
4295	// ArtworkType: Artwork type of rich media creative. This is a read-only
4296	// field. Applicable to the following creative types: all RICH_MEDIA.
4297	//
4298	// Possible values:
4299	//   "ARTWORK_TYPE_FLASH"
4300	//   "ARTWORK_TYPE_HTML5"
4301	//   "ARTWORK_TYPE_IMAGE"
4302	//   "ARTWORK_TYPE_MIXED"
4303	ArtworkType string `json:"artworkType,omitempty"`
4304
4305	// AssetIdentifier: Identifier of this asset. This is the same
4306	// identifier returned during creative asset insert operation. This is a
4307	// required field. Applicable to all but the following creative types:
4308	// all REDIRECT and TRACKING_TEXT.
4309	AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4310
4311	// AudioBitRate: Audio stream bit rate in kbps. This is a read-only
4312	// field. Applicable to the following creative types: INSTREAM_AUDIO,
4313	// INSTREAM_VIDEO and all VPAID.
4314	AudioBitRate int64 `json:"audioBitRate,omitempty"`
4315
4316	// AudioSampleRate: Audio sample bit rate in hertz. This is a read-only
4317	// field. Applicable to the following creative types: INSTREAM_AUDIO,
4318	// INSTREAM_VIDEO and all VPAID.
4319	AudioSampleRate int64 `json:"audioSampleRate,omitempty"`
4320
4321	// BackupImageExit: Exit event configured for the backup image.
4322	// Applicable to the following creative types: all RICH_MEDIA.
4323	BackupImageExit *CreativeCustomEvent `json:"backupImageExit,omitempty"`
4324
4325	// BitRate: Detected bit-rate for audio or video asset. This is a
4326	// read-only field. Applicable to the following creative types:
4327	// INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
4328	BitRate int64 `json:"bitRate,omitempty"`
4329
4330	// ChildAssetType: Rich media child asset type. This is a read-only
4331	// field. Applicable to the following creative types: all VPAID.
4332	//
4333	// Possible values:
4334	//   "CHILD_ASSET_TYPE_DATA"
4335	//   "CHILD_ASSET_TYPE_FLASH"
4336	//   "CHILD_ASSET_TYPE_IMAGE"
4337	//   "CHILD_ASSET_TYPE_VIDEO"
4338	ChildAssetType string `json:"childAssetType,omitempty"`
4339
4340	// CollapsedSize: Size of an asset when collapsed. This is a read-only
4341	// field. Applicable to the following creative types: all RICH_MEDIA and
4342	// all VPAID. Additionally, applicable to assets whose displayType is
4343	// ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN.
4344	CollapsedSize *Size `json:"collapsedSize,omitempty"`
4345
4346	// CompanionCreativeIds: List of companion creatives assigned to an
4347	// in-stream video creative asset. Acceptable values include IDs of
4348	// existing flash and image creatives. Applicable to INSTREAM_VIDEO
4349	// creative type with dynamicAssetSelection set to true.
4350	CompanionCreativeIds googleapi.Int64s `json:"companionCreativeIds,omitempty"`
4351
4352	// CustomStartTimeValue: Custom start time in seconds for making the
4353	// asset visible. Applicable to the following creative types: all
4354	// RICH_MEDIA. Value must be greater than or equal to 0.
4355	CustomStartTimeValue int64 `json:"customStartTimeValue,omitempty"`
4356
4357	// DetectedFeatures: List of feature dependencies for the creative asset
4358	// that are detected by Campaign Manager. Feature dependencies are
4359	// features that a browser must be able to support in order to render
4360	// your HTML5 creative correctly. This is a read-only, auto-generated
4361	// field. Applicable to the following creative types: HTML5_BANNER.
4362	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
4363	//
4364	// Possible values:
4365	//   "APPLICATION_CACHE"
4366	//   "AUDIO"
4367	//   "CANVAS"
4368	//   "CANVAS_TEXT"
4369	//   "CSS_ANIMATIONS"
4370	//   "CSS_BACKGROUND_SIZE"
4371	//   "CSS_BORDER_IMAGE"
4372	//   "CSS_BORDER_RADIUS"
4373	//   "CSS_BOX_SHADOW"
4374	//   "CSS_COLUMNS"
4375	//   "CSS_FLEX_BOX"
4376	//   "CSS_FONT_FACE"
4377	//   "CSS_GENERATED_CONTENT"
4378	//   "CSS_GRADIENTS"
4379	//   "CSS_HSLA"
4380	//   "CSS_MULTIPLE_BGS"
4381	//   "CSS_OPACITY"
4382	//   "CSS_REFLECTIONS"
4383	//   "CSS_RGBA"
4384	//   "CSS_TEXT_SHADOW"
4385	//   "CSS_TRANSFORMS"
4386	//   "CSS_TRANSFORMS3D"
4387	//   "CSS_TRANSITIONS"
4388	//   "DRAG_AND_DROP"
4389	//   "GEO_LOCATION"
4390	//   "HASH_CHANGE"
4391	//   "HISTORY"
4392	//   "INDEXED_DB"
4393	//   "INLINE_SVG"
4394	//   "INPUT_ATTR_AUTOCOMPLETE"
4395	//   "INPUT_ATTR_AUTOFOCUS"
4396	//   "INPUT_ATTR_LIST"
4397	//   "INPUT_ATTR_MAX"
4398	//   "INPUT_ATTR_MIN"
4399	//   "INPUT_ATTR_MULTIPLE"
4400	//   "INPUT_ATTR_PATTERN"
4401	//   "INPUT_ATTR_PLACEHOLDER"
4402	//   "INPUT_ATTR_REQUIRED"
4403	//   "INPUT_ATTR_STEP"
4404	//   "INPUT_TYPE_COLOR"
4405	//   "INPUT_TYPE_DATE"
4406	//   "INPUT_TYPE_DATETIME"
4407	//   "INPUT_TYPE_DATETIME_LOCAL"
4408	//   "INPUT_TYPE_EMAIL"
4409	//   "INPUT_TYPE_MONTH"
4410	//   "INPUT_TYPE_NUMBER"
4411	//   "INPUT_TYPE_RANGE"
4412	//   "INPUT_TYPE_SEARCH"
4413	//   "INPUT_TYPE_TEL"
4414	//   "INPUT_TYPE_TIME"
4415	//   "INPUT_TYPE_URL"
4416	//   "INPUT_TYPE_WEEK"
4417	//   "LOCAL_STORAGE"
4418	//   "POST_MESSAGE"
4419	//   "SESSION_STORAGE"
4420	//   "SMIL"
4421	//   "SVG_CLIP_PATHS"
4422	//   "SVG_FE_IMAGE"
4423	//   "SVG_FILTERS"
4424	//   "SVG_HREF"
4425	//   "TOUCH"
4426	//   "VIDEO"
4427	//   "WEBGL"
4428	//   "WEB_SOCKETS"
4429	//   "WEB_SQL_DATABASE"
4430	//   "WEB_WORKERS"
4431	DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4432
4433	// DisplayType: Type of rich media asset. This is a read-only field.
4434	// Applicable to the following creative types: all RICH_MEDIA.
4435	//
4436	// Possible values:
4437	//   "ASSET_DISPLAY_TYPE_BACKDROP"
4438	//   "ASSET_DISPLAY_TYPE_EXPANDING"
4439	//   "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH"
4440	//   "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH_EXPANDING"
4441	//   "ASSET_DISPLAY_TYPE_FLOATING"
4442	//   "ASSET_DISPLAY_TYPE_INPAGE"
4443	//   "ASSET_DISPLAY_TYPE_OVERLAY"
4444	//   "ASSET_DISPLAY_TYPE_PEEL_DOWN"
4445	//   "ASSET_DISPLAY_TYPE_VPAID_LINEAR"
4446	//   "ASSET_DISPLAY_TYPE_VPAID_NON_LINEAR"
4447	DisplayType string `json:"displayType,omitempty"`
4448
4449	// Duration: Duration in seconds for which an asset will be displayed.
4450	// Applicable to the following creative types: INSTREAM_AUDIO,
4451	// INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. Value must be greater than or
4452	// equal to 1.
4453	Duration int64 `json:"duration,omitempty"`
4454
4455	// DurationType: Duration type for which an asset will be displayed.
4456	// Applicable to the following creative types: all RICH_MEDIA.
4457	//
4458	// Possible values:
4459	//   "ASSET_DURATION_TYPE_AUTO"
4460	//   "ASSET_DURATION_TYPE_CUSTOM"
4461	//   "ASSET_DURATION_TYPE_NONE"
4462	DurationType string `json:"durationType,omitempty"`
4463
4464	// ExpandedDimension: Detected expanded dimension for video asset. This
4465	// is a read-only field. Applicable to the following creative types:
4466	// INSTREAM_VIDEO and all VPAID.
4467	ExpandedDimension *Size `json:"expandedDimension,omitempty"`
4468
4469	// FileSize: File size associated with this creative asset. This is a
4470	// read-only field. Applicable to all but the following creative types:
4471	// all REDIRECT and TRACKING_TEXT.
4472	FileSize int64 `json:"fileSize,omitempty,string"`
4473
4474	// FlashVersion: Flash version of the asset. This is a read-only field.
4475	// Applicable to the following creative types: FLASH_INPAGE, all
4476	// RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary
4477	// asset type is not HTML_IMAGE.
4478	FlashVersion int64 `json:"flashVersion,omitempty"`
4479
4480	// FrameRate: Video frame rate for video asset in frames per second.
4481	// This is a read-only field. Applicable to the following creative
4482	// types: INSTREAM_VIDEO and all VPAID.
4483	FrameRate float64 `json:"frameRate,omitempty"`
4484
4485	// HideFlashObjects: Whether to hide Flash objects flag for an asset.
4486	// Applicable to the following creative types: all RICH_MEDIA.
4487	HideFlashObjects bool `json:"hideFlashObjects,omitempty"`
4488
4489	// HideSelectionBoxes: Whether to hide selection boxes flag for an
4490	// asset. Applicable to the following creative types: all RICH_MEDIA.
4491	HideSelectionBoxes bool `json:"hideSelectionBoxes,omitempty"`
4492
4493	// HorizontallyLocked: Whether the asset is horizontally locked. This is
4494	// a read-only field. Applicable to the following creative types: all
4495	// RICH_MEDIA.
4496	HorizontallyLocked bool `json:"horizontallyLocked,omitempty"`
4497
4498	// Id: Numeric ID of this creative asset. This is a required field and
4499	// should not be modified. Applicable to all but the following creative
4500	// types: all REDIRECT and TRACKING_TEXT.
4501	Id int64 `json:"id,omitempty,string"`
4502
4503	// IdDimensionValue: Dimension value for the ID of the asset. This is a
4504	// read-only, auto-generated field.
4505	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4506
4507	// MediaDuration: Detected duration for audio or video asset. This is a
4508	// read-only field. Applicable to the following creative types:
4509	// INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
4510	MediaDuration float64 `json:"mediaDuration,omitempty"`
4511
4512	// MimeType: Detected MIME type for audio or video asset. This is a
4513	// read-only field. Applicable to the following creative types:
4514	// INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
4515	MimeType string `json:"mimeType,omitempty"`
4516
4517	// Offset: Offset position for an asset in collapsed mode. This is a
4518	// read-only field. Applicable to the following creative types: all
4519	// RICH_MEDIA and all VPAID. Additionally, only applicable to assets
4520	// whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or
4521	// ASSET_DISPLAY_TYPE_PEEL_DOWN.
4522	Offset *OffsetPosition `json:"offset,omitempty"`
4523
4524	// Orientation: Orientation of video asset. This is a read-only,
4525	// auto-generated field.
4526	//
4527	// Possible values:
4528	//   "LANDSCAPE"
4529	//   "PORTRAIT"
4530	//   "SQUARE"
4531	Orientation string `json:"orientation,omitempty"`
4532
4533	// OriginalBackup: Whether the backup asset is original or changed by
4534	// the user in Campaign Manager. Applicable to the following creative
4535	// types: all RICH_MEDIA.
4536	OriginalBackup bool `json:"originalBackup,omitempty"`
4537
4538	// PoliteLoad: Whether this asset is used as a polite load asset.
4539	PoliteLoad bool `json:"politeLoad,omitempty"`
4540
4541	// Position: Offset position for an asset. Applicable to the following
4542	// creative types: all RICH_MEDIA.
4543	Position *OffsetPosition `json:"position,omitempty"`
4544
4545	// PositionLeftUnit: Offset left unit for an asset. This is a read-only
4546	// field. Applicable to the following creative types: all RICH_MEDIA.
4547	//
4548	// Possible values:
4549	//   "OFFSET_UNIT_PERCENT"
4550	//   "OFFSET_UNIT_PIXEL"
4551	//   "OFFSET_UNIT_PIXEL_FROM_CENTER"
4552	PositionLeftUnit string `json:"positionLeftUnit,omitempty"`
4553
4554	// PositionTopUnit: Offset top unit for an asset. This is a read-only
4555	// field if the asset displayType is ASSET_DISPLAY_TYPE_OVERLAY.
4556	// Applicable to the following creative types: all RICH_MEDIA.
4557	//
4558	// Possible values:
4559	//   "OFFSET_UNIT_PERCENT"
4560	//   "OFFSET_UNIT_PIXEL"
4561	//   "OFFSET_UNIT_PIXEL_FROM_CENTER"
4562	PositionTopUnit string `json:"positionTopUnit,omitempty"`
4563
4564	// ProgressiveServingUrl: Progressive URL for video asset. This is a
4565	// read-only field. Applicable to the following creative types:
4566	// INSTREAM_VIDEO and all VPAID.
4567	ProgressiveServingUrl string `json:"progressiveServingUrl,omitempty"`
4568
4569	// Pushdown: Whether the asset pushes down other content. Applicable to
4570	// the following creative types: all RICH_MEDIA. Additionally, only
4571	// applicable when the asset offsets are 0, the collapsedSize.width
4572	// matches size.width, and the collapsedSize.height is less than
4573	// size.height.
4574	Pushdown bool `json:"pushdown,omitempty"`
4575
4576	// PushdownDuration: Pushdown duration in seconds for an asset.
4577	// Applicable to the following creative types: all
4578	// RICH_MEDIA.Additionally, only applicable when the asset pushdown
4579	// field is true, the offsets are 0, the collapsedSize.width matches
4580	// size.width, and the collapsedSize.height is less than size.height.
4581	// Acceptable values are 0 to 9.99, inclusive.
4582	PushdownDuration float64 `json:"pushdownDuration,omitempty"`
4583
4584	// Role: Role of the asset in relation to creative. Applicable to all
4585	// but the following creative types: all REDIRECT and TRACKING_TEXT.
4586	// This is a required field.
4587	// PRIMARY applies to DISPLAY, FLASH_INPAGE, HTML5_BANNER, IMAGE,
4588	// DISPLAY_IMAGE_GALLERY, all RICH_MEDIA (which may contain multiple
4589	// primary assets), and all VPAID creatives.
4590	// BACKUP_IMAGE applies to FLASH_INPAGE, HTML5_BANNER, all RICH_MEDIA,
4591	// and all VPAID creatives. Applicable to DISPLAY when the primary asset
4592	// type is not HTML_IMAGE.
4593	// ADDITIONAL_IMAGE and ADDITIONAL_FLASH apply to FLASH_INPAGE
4594	// creatives.
4595	// OTHER refers to assets from sources other than Campaign Manager, such
4596	// as Studio uploaded assets, applicable to all RICH_MEDIA and all VPAID
4597	// creatives.
4598	// PARENT_VIDEO refers to videos uploaded by the user in Campaign
4599	// Manager and is applicable to INSTREAM_VIDEO and VPAID_LINEAR_VIDEO
4600	// creatives.
4601	// TRANSCODED_VIDEO refers to videos transcoded by Campaign Manager from
4602	// PARENT_VIDEO assets and is applicable to INSTREAM_VIDEO and
4603	// VPAID_LINEAR_VIDEO creatives.
4604	// ALTERNATE_VIDEO refers to the Campaign Manager representation of
4605	// child asset videos from Studio, and is applicable to
4606	// VPAID_LINEAR_VIDEO creatives. These cannot be added or removed within
4607	// Campaign Manager.
4608	// For VPAID_LINEAR_VIDEO creatives, PARENT_VIDEO, TRANSCODED_VIDEO and
4609	// ALTERNATE_VIDEO assets that are marked active serve as backup in case
4610	// the VPAID creative cannot be served. Only PARENT_VIDEO assets can be
4611	// added or removed for an INSTREAM_VIDEO or VPAID_LINEAR_VIDEO
4612	// creative.
4613	// PARENT_AUDIO refers to audios uploaded by the user in Campaign
4614	// Manager and is applicable to INSTREAM_AUDIO
4615	// creatives.
4616	// TRANSCODED_AUDIO refers to audios transcoded by Campaign Manager from
4617	// PARENT_AUDIO assets and is applicable to INSTREAM_AUDIO creatives.
4618	//
4619	// Possible values:
4620	//   "ADDITIONAL_FLASH"
4621	//   "ADDITIONAL_IMAGE"
4622	//   "ALTERNATE_VIDEO"
4623	//   "BACKUP_IMAGE"
4624	//   "OTHER"
4625	//   "PARENT_AUDIO"
4626	//   "PARENT_VIDEO"
4627	//   "PRIMARY"
4628	//   "TRANSCODED_AUDIO"
4629	//   "TRANSCODED_VIDEO"
4630	Role string `json:"role,omitempty"`
4631
4632	// Size: Size associated with this creative asset. This is a required
4633	// field when applicable; however for IMAGE and FLASH_INPAGE, creatives
4634	// if left blank, this field will be automatically set using the actual
4635	// size of the associated image asset. Applicable to the following
4636	// creative types: DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER,
4637	// IMAGE, and all RICH_MEDIA. Applicable to DISPLAY when the primary
4638	// asset type is not HTML_IMAGE.
4639	Size *Size `json:"size,omitempty"`
4640
4641	// SslCompliant: Whether the asset is SSL-compliant. This is a read-only
4642	// field. Applicable to all but the following creative types: all
4643	// REDIRECT and TRACKING_TEXT.
4644	SslCompliant bool `json:"sslCompliant,omitempty"`
4645
4646	// StartTimeType: Initial wait time type before making the asset
4647	// visible. Applicable to the following creative types: all RICH_MEDIA.
4648	//
4649	// Possible values:
4650	//   "ASSET_START_TIME_TYPE_CUSTOM"
4651	//   "ASSET_START_TIME_TYPE_NONE"
4652	StartTimeType string `json:"startTimeType,omitempty"`
4653
4654	// StreamingServingUrl: Streaming URL for video asset. This is a
4655	// read-only field. Applicable to the following creative types:
4656	// INSTREAM_VIDEO and all VPAID.
4657	StreamingServingUrl string `json:"streamingServingUrl,omitempty"`
4658
4659	// Transparency: Whether the asset is transparent. Applicable to the
4660	// following creative types: all RICH_MEDIA. Additionally, only
4661	// applicable to HTML5 assets.
4662	Transparency bool `json:"transparency,omitempty"`
4663
4664	// VerticallyLocked: Whether the asset is vertically locked. This is a
4665	// read-only field. Applicable to the following creative types: all
4666	// RICH_MEDIA.
4667	VerticallyLocked bool `json:"verticallyLocked,omitempty"`
4668
4669	// WindowMode: Window mode options for flash assets. Applicable to the
4670	// following creative types: FLASH_INPAGE, RICH_MEDIA_DISPLAY_EXPANDING,
4671	// RICH_MEDIA_IM_EXPAND, RICH_MEDIA_DISPLAY_BANNER, and
4672	// RICH_MEDIA_INPAGE_FLOATING.
4673	//
4674	// Possible values:
4675	//   "OPAQUE"
4676	//   "TRANSPARENT"
4677	//   "WINDOW"
4678	WindowMode string `json:"windowMode,omitempty"`
4679
4680	// ZIndex: zIndex value of an asset. Applicable to the following
4681	// creative types: all RICH_MEDIA.Additionally, only applicable to
4682	// assets whose displayType is NOT one of the following types:
4683	// ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable
4684	// values are -999999999 to 999999999, inclusive.
4685	ZIndex int64 `json:"zIndex,omitempty"`
4686
4687	// ZipFilename: File name of zip file. This is a read-only field.
4688	// Applicable to the following creative types: HTML5_BANNER.
4689	ZipFilename string `json:"zipFilename,omitempty"`
4690
4691	// ZipFilesize: Size of zip file. This is a read-only field. Applicable
4692	// to the following creative types: HTML5_BANNER.
4693	ZipFilesize string `json:"zipFilesize,omitempty"`
4694
4695	// ForceSendFields is a list of field names (e.g. "ActionScript3") to
4696	// unconditionally include in API requests. By default, fields with
4697	// empty values are omitted from API requests. However, any non-pointer,
4698	// non-interface field appearing in ForceSendFields will be sent to the
4699	// server regardless of whether the field is empty or not. This may be
4700	// used to include empty fields in Patch requests.
4701	ForceSendFields []string `json:"-"`
4702
4703	// NullFields is a list of field names (e.g. "ActionScript3") to include
4704	// in API requests with the JSON null value. By default, fields with
4705	// empty values are omitted from API requests. However, any field with
4706	// an empty value appearing in NullFields will be sent to the server as
4707	// null. It is an error if a field in this list has a non-empty value.
4708	// This may be used to include null fields in Patch requests.
4709	NullFields []string `json:"-"`
4710}
4711
4712func (s *CreativeAsset) MarshalJSON() ([]byte, error) {
4713	type NoMethod CreativeAsset
4714	raw := NoMethod(*s)
4715	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4716}
4717
4718func (s *CreativeAsset) UnmarshalJSON(data []byte) error {
4719	type NoMethod CreativeAsset
4720	var s1 struct {
4721		FrameRate        gensupport.JSONFloat64 `json:"frameRate"`
4722		MediaDuration    gensupport.JSONFloat64 `json:"mediaDuration"`
4723		PushdownDuration gensupport.JSONFloat64 `json:"pushdownDuration"`
4724		*NoMethod
4725	}
4726	s1.NoMethod = (*NoMethod)(s)
4727	if err := json.Unmarshal(data, &s1); err != nil {
4728		return err
4729	}
4730	s.FrameRate = float64(s1.FrameRate)
4731	s.MediaDuration = float64(s1.MediaDuration)
4732	s.PushdownDuration = float64(s1.PushdownDuration)
4733	return nil
4734}
4735
4736// CreativeAssetId: Creative Asset ID.
4737type CreativeAssetId struct {
4738	// Name: Name of the creative asset. This is a required field while
4739	// inserting an asset. After insertion, this assetIdentifier is used to
4740	// identify the uploaded asset. Characters in the name must be
4741	// alphanumeric or one of the following: ".-_ ". Spaces are allowed.
4742	Name string `json:"name,omitempty"`
4743
4744	// Type: Type of asset to upload. This is a required field. FLASH and
4745	// IMAGE are no longer supported for new uploads. All image assets
4746	// should use HTML_IMAGE.
4747	//
4748	// Possible values:
4749	//   "AUDIO"
4750	//   "FLASH"
4751	//   "HTML"
4752	//   "HTML_IMAGE"
4753	//   "IMAGE"
4754	//   "VIDEO"
4755	Type string `json:"type,omitempty"`
4756
4757	// ForceSendFields is a list of field names (e.g. "Name") to
4758	// unconditionally include in API requests. By default, fields with
4759	// empty values are omitted from API requests. However, any non-pointer,
4760	// non-interface field appearing in ForceSendFields will be sent to the
4761	// server regardless of whether the field is empty or not. This may be
4762	// used to include empty fields in Patch requests.
4763	ForceSendFields []string `json:"-"`
4764
4765	// NullFields is a list of field names (e.g. "Name") to include in API
4766	// requests with the JSON null value. By default, fields with empty
4767	// values are omitted from API requests. However, any field with an
4768	// empty value appearing in NullFields will be sent to the server as
4769	// null. It is an error if a field in this list has a non-empty value.
4770	// This may be used to include null fields in Patch requests.
4771	NullFields []string `json:"-"`
4772}
4773
4774func (s *CreativeAssetId) MarshalJSON() ([]byte, error) {
4775	type NoMethod CreativeAssetId
4776	raw := NoMethod(*s)
4777	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4778}
4779
4780// CreativeAssetMetadata: CreativeAssets contains properties of a
4781// creative asset file which will be uploaded or has already been
4782// uploaded. Refer to the creative sample code for how to upload assets
4783// and insert a creative.
4784type CreativeAssetMetadata struct {
4785	// AssetIdentifier: ID of the creative asset. This is a required field.
4786	AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4787
4788	// ClickTags: List of detected click tags for assets. This is a
4789	// read-only auto-generated field.
4790	ClickTags []*ClickTag `json:"clickTags,omitempty"`
4791
4792	// DetectedFeatures: List of feature dependencies for the creative asset
4793	// that are detected by Campaign Manager. Feature dependencies are
4794	// features that a browser must be able to support in order to render
4795	// your HTML5 creative correctly. This is a read-only, auto-generated
4796	// field.
4797	//
4798	// Possible values:
4799	//   "APPLICATION_CACHE"
4800	//   "AUDIO"
4801	//   "CANVAS"
4802	//   "CANVAS_TEXT"
4803	//   "CSS_ANIMATIONS"
4804	//   "CSS_BACKGROUND_SIZE"
4805	//   "CSS_BORDER_IMAGE"
4806	//   "CSS_BORDER_RADIUS"
4807	//   "CSS_BOX_SHADOW"
4808	//   "CSS_COLUMNS"
4809	//   "CSS_FLEX_BOX"
4810	//   "CSS_FONT_FACE"
4811	//   "CSS_GENERATED_CONTENT"
4812	//   "CSS_GRADIENTS"
4813	//   "CSS_HSLA"
4814	//   "CSS_MULTIPLE_BGS"
4815	//   "CSS_OPACITY"
4816	//   "CSS_REFLECTIONS"
4817	//   "CSS_RGBA"
4818	//   "CSS_TEXT_SHADOW"
4819	//   "CSS_TRANSFORMS"
4820	//   "CSS_TRANSFORMS3D"
4821	//   "CSS_TRANSITIONS"
4822	//   "DRAG_AND_DROP"
4823	//   "GEO_LOCATION"
4824	//   "HASH_CHANGE"
4825	//   "HISTORY"
4826	//   "INDEXED_DB"
4827	//   "INLINE_SVG"
4828	//   "INPUT_ATTR_AUTOCOMPLETE"
4829	//   "INPUT_ATTR_AUTOFOCUS"
4830	//   "INPUT_ATTR_LIST"
4831	//   "INPUT_ATTR_MAX"
4832	//   "INPUT_ATTR_MIN"
4833	//   "INPUT_ATTR_MULTIPLE"
4834	//   "INPUT_ATTR_PATTERN"
4835	//   "INPUT_ATTR_PLACEHOLDER"
4836	//   "INPUT_ATTR_REQUIRED"
4837	//   "INPUT_ATTR_STEP"
4838	//   "INPUT_TYPE_COLOR"
4839	//   "INPUT_TYPE_DATE"
4840	//   "INPUT_TYPE_DATETIME"
4841	//   "INPUT_TYPE_DATETIME_LOCAL"
4842	//   "INPUT_TYPE_EMAIL"
4843	//   "INPUT_TYPE_MONTH"
4844	//   "INPUT_TYPE_NUMBER"
4845	//   "INPUT_TYPE_RANGE"
4846	//   "INPUT_TYPE_SEARCH"
4847	//   "INPUT_TYPE_TEL"
4848	//   "INPUT_TYPE_TIME"
4849	//   "INPUT_TYPE_URL"
4850	//   "INPUT_TYPE_WEEK"
4851	//   "LOCAL_STORAGE"
4852	//   "POST_MESSAGE"
4853	//   "SESSION_STORAGE"
4854	//   "SMIL"
4855	//   "SVG_CLIP_PATHS"
4856	//   "SVG_FE_IMAGE"
4857	//   "SVG_FILTERS"
4858	//   "SVG_HREF"
4859	//   "TOUCH"
4860	//   "VIDEO"
4861	//   "WEBGL"
4862	//   "WEB_SOCKETS"
4863	//   "WEB_SQL_DATABASE"
4864	//   "WEB_WORKERS"
4865	DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4866
4867	// Id: Numeric ID of the asset. This is a read-only, auto-generated
4868	// field.
4869	Id int64 `json:"id,omitempty,string"`
4870
4871	// IdDimensionValue: Dimension value for the numeric ID of the asset.
4872	// This is a read-only, auto-generated field.
4873	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4874
4875	// Kind: Identifies what kind of resource this is. Value: the fixed
4876	// string "dfareporting#creativeAssetMetadata".
4877	Kind string `json:"kind,omitempty"`
4878
4879	// WarnedValidationRules: Rules validated during code generation that
4880	// generated a warning. This is a read-only, auto-generated
4881	// field.
4882	//
4883	// Possible values are:
4884	// - "ADMOB_REFERENCED"
4885	// - "ASSET_FORMAT_UNSUPPORTED_DCM"
4886	// - "ASSET_INVALID"
4887	// - "CLICK_TAG_HARD_CODED"
4888	// - "CLICK_TAG_INVALID"
4889	// - "CLICK_TAG_IN_GWD"
4890	// - "CLICK_TAG_MISSING"
4891	// - "CLICK_TAG_MORE_THAN_ONE"
4892	// - "CLICK_TAG_NON_TOP_LEVEL"
4893	// - "COMPONENT_UNSUPPORTED_DCM"
4894	// - "ENABLER_UNSUPPORTED_METHOD_DCM"
4895	// - "EXTERNAL_FILE_REFERENCED"
4896	// - "FILE_DETAIL_EMPTY"
4897	// - "FILE_TYPE_INVALID"
4898	// - "GWD_PROPERTIES_INVALID"
4899	// - "HTML5_FEATURE_UNSUPPORTED"
4900	// - "LINKED_FILE_NOT_FOUND"
4901	// - "MAX_FLASH_VERSION_11"
4902	// - "MRAID_REFERENCED"
4903	// - "NOT_SSL_COMPLIANT"
4904	// - "ORPHANED_ASSET"
4905	// - "PRIMARY_HTML_MISSING"
4906	// - "SVG_INVALID"
4907	// - "ZIP_INVALID"
4908	//
4909	// Possible values:
4910	//   "ADMOB_REFERENCED"
4911	//   "ASSET_FORMAT_UNSUPPORTED_DCM"
4912	//   "ASSET_INVALID"
4913	//   "CLICK_TAG_HARD_CODED"
4914	//   "CLICK_TAG_INVALID"
4915	//   "CLICK_TAG_IN_GWD"
4916	//   "CLICK_TAG_MISSING"
4917	//   "CLICK_TAG_MORE_THAN_ONE"
4918	//   "CLICK_TAG_NON_TOP_LEVEL"
4919	//   "COMPONENT_UNSUPPORTED_DCM"
4920	//   "ENABLER_UNSUPPORTED_METHOD_DCM"
4921	//   "EXTERNAL_FILE_REFERENCED"
4922	//   "FILE_DETAIL_EMPTY"
4923	//   "FILE_TYPE_INVALID"
4924	//   "GWD_PROPERTIES_INVALID"
4925	//   "HTML5_FEATURE_UNSUPPORTED"
4926	//   "LINKED_FILE_NOT_FOUND"
4927	//   "MAX_FLASH_VERSION_11"
4928	//   "MRAID_REFERENCED"
4929	//   "NOT_SSL_COMPLIANT"
4930	//   "ORPHANED_ASSET"
4931	//   "PRIMARY_HTML_MISSING"
4932	//   "SVG_INVALID"
4933	//   "ZIP_INVALID"
4934	WarnedValidationRules []string `json:"warnedValidationRules,omitempty"`
4935
4936	// ServerResponse contains the HTTP response code and headers from the
4937	// server.
4938	googleapi.ServerResponse `json:"-"`
4939
4940	// ForceSendFields is a list of field names (e.g. "AssetIdentifier") to
4941	// unconditionally include in API requests. By default, fields with
4942	// empty values are omitted from API requests. However, any non-pointer,
4943	// non-interface field appearing in ForceSendFields will be sent to the
4944	// server regardless of whether the field is empty or not. This may be
4945	// used to include empty fields in Patch requests.
4946	ForceSendFields []string `json:"-"`
4947
4948	// NullFields is a list of field names (e.g. "AssetIdentifier") to
4949	// include in API requests with the JSON null value. By default, fields
4950	// with empty values are omitted from API requests. However, any field
4951	// with an empty value appearing in NullFields will be sent to the
4952	// server as null. It is an error if a field in this list has a
4953	// non-empty value. This may be used to include null fields in Patch
4954	// requests.
4955	NullFields []string `json:"-"`
4956}
4957
4958func (s *CreativeAssetMetadata) MarshalJSON() ([]byte, error) {
4959	type NoMethod CreativeAssetMetadata
4960	raw := NoMethod(*s)
4961	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4962}
4963
4964// CreativeAssetSelection: Encapsulates the list of rules for asset
4965// selection and a default asset in case none of the rules match.
4966// Applicable to INSTREAM_VIDEO creatives.
4967type CreativeAssetSelection struct {
4968	// DefaultAssetId: A creativeAssets[].id. This should refer to one of
4969	// the parent assets in this creative, and will be served if none of the
4970	// rules match. This is a required field.
4971	DefaultAssetId int64 `json:"defaultAssetId,omitempty,string"`
4972
4973	// Rules: Rules determine which asset will be served to a viewer. Rules
4974	// will be evaluated in the order in which they are stored in this list.
4975	// This list must contain at least one rule. Applicable to
4976	// INSTREAM_VIDEO creatives.
4977	Rules []*Rule `json:"rules,omitempty"`
4978
4979	// ForceSendFields is a list of field names (e.g. "DefaultAssetId") to
4980	// unconditionally include in API requests. By default, fields with
4981	// empty values are omitted from API requests. However, any non-pointer,
4982	// non-interface field appearing in ForceSendFields will be sent to the
4983	// server regardless of whether the field is empty or not. This may be
4984	// used to include empty fields in Patch requests.
4985	ForceSendFields []string `json:"-"`
4986
4987	// NullFields is a list of field names (e.g. "DefaultAssetId") to
4988	// include in API requests with the JSON null value. By default, fields
4989	// with empty values are omitted from API requests. However, any field
4990	// with an empty value appearing in NullFields will be sent to the
4991	// server as null. It is an error if a field in this list has a
4992	// non-empty value. This may be used to include null fields in Patch
4993	// requests.
4994	NullFields []string `json:"-"`
4995}
4996
4997func (s *CreativeAssetSelection) MarshalJSON() ([]byte, error) {
4998	type NoMethod CreativeAssetSelection
4999	raw := NoMethod(*s)
5000	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5001}
5002
5003// CreativeAssignment: Creative Assignment.
5004type CreativeAssignment struct {
5005	// Active: Whether this creative assignment is active. When true, the
5006	// creative will be included in the ad's rotation.
5007	Active bool `json:"active,omitempty"`
5008
5009	// ApplyEventTags: Whether applicable event tags should fire when this
5010	// creative assignment is rendered. If this value is unset when the ad
5011	// is inserted or updated, it will default to true for all creative
5012	// types EXCEPT for INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT,
5013	// and INSTREAM_VIDEO.
5014	ApplyEventTags bool `json:"applyEventTags,omitempty"`
5015
5016	// ClickThroughUrl: Click-through URL of the creative assignment.
5017	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
5018
5019	// CompanionCreativeOverrides: Companion creative overrides for this
5020	// creative assignment. Applicable to video ads.
5021	CompanionCreativeOverrides []*CompanionClickThroughOverride `json:"companionCreativeOverrides,omitempty"`
5022
5023	// CreativeGroupAssignments: Creative group assignments for this
5024	// creative assignment. Only one assignment per creative group number is
5025	// allowed for a maximum of two assignments.
5026	CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
5027
5028	// CreativeId: ID of the creative to be assigned. This is a required
5029	// field.
5030	CreativeId int64 `json:"creativeId,omitempty,string"`
5031
5032	// CreativeIdDimensionValue: Dimension value for the ID of the creative.
5033	// This is a read-only, auto-generated field.
5034	CreativeIdDimensionValue *DimensionValue `json:"creativeIdDimensionValue,omitempty"`
5035
5036	// EndTime: Date and time that the assigned creative should stop
5037	// serving. Must be later than the start time.
5038	EndTime string `json:"endTime,omitempty"`
5039
5040	// RichMediaExitOverrides: Rich media exit overrides for this creative
5041	// assignment.
5042	// Applicable when the creative type is any of the following:
5043	// - DISPLAY
5044	// - RICH_MEDIA_INPAGE
5045	// - RICH_MEDIA_INPAGE_FLOATING
5046	// - RICH_MEDIA_IM_EXPAND
5047	// - RICH_MEDIA_EXPANDING
5048	// - RICH_MEDIA_INTERSTITIAL_FLOAT
5049	// - RICH_MEDIA_MOBILE_IN_APP
5050	// - RICH_MEDIA_MULTI_FLOATING
5051	// - RICH_MEDIA_PEEL_DOWN
5052	// - VPAID_LINEAR
5053	// - VPAID_NON_LINEAR
5054	RichMediaExitOverrides []*RichMediaExitOverride `json:"richMediaExitOverrides,omitempty"`
5055
5056	// Sequence: Sequence number of the creative assignment, applicable when
5057	// the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable
5058	// values are 1 to 65535, inclusive.
5059	Sequence int64 `json:"sequence,omitempty"`
5060
5061	// SslCompliant: Whether the creative to be assigned is SSL-compliant.
5062	// This is a read-only field that is auto-generated when the ad is
5063	// inserted or updated.
5064	SslCompliant bool `json:"sslCompliant,omitempty"`
5065
5066	// StartTime: Date and time that the assigned creative should start
5067	// serving.
5068	StartTime string `json:"startTime,omitempty"`
5069
5070	// Weight: Weight of the creative assignment, applicable when the
5071	// rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater
5072	// than or equal to 1.
5073	Weight int64 `json:"weight,omitempty"`
5074
5075	// ForceSendFields is a list of field names (e.g. "Active") to
5076	// unconditionally include in API requests. By default, fields with
5077	// empty values are omitted from API requests. However, any non-pointer,
5078	// non-interface field appearing in ForceSendFields will be sent to the
5079	// server regardless of whether the field is empty or not. This may be
5080	// used to include empty fields in Patch requests.
5081	ForceSendFields []string `json:"-"`
5082
5083	// NullFields is a list of field names (e.g. "Active") to include in API
5084	// requests with the JSON null value. By default, fields with empty
5085	// values are omitted from API requests. However, any field with an
5086	// empty value appearing in NullFields will be sent to the server as
5087	// null. It is an error if a field in this list has a non-empty value.
5088	// This may be used to include null fields in Patch requests.
5089	NullFields []string `json:"-"`
5090}
5091
5092func (s *CreativeAssignment) MarshalJSON() ([]byte, error) {
5093	type NoMethod CreativeAssignment
5094	raw := NoMethod(*s)
5095	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5096}
5097
5098// CreativeClickThroughUrl: Click-through URL
5099type CreativeClickThroughUrl struct {
5100	// ComputedClickThroughUrl: Read-only convenience field representing the
5101	// actual URL that will be used for this click-through. The URL is
5102	// computed as follows:
5103	// - If landingPageId is specified then that landing page's URL is
5104	// assigned to this field.
5105	// - Otherwise, the customClickThroughUrl is assigned to this field.
5106	ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
5107
5108	// CustomClickThroughUrl: Custom click-through URL. Applicable if the
5109	// landingPageId field is left unset.
5110	CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
5111
5112	// LandingPageId: ID of the landing page for the click-through URL.
5113	LandingPageId int64 `json:"landingPageId,omitempty,string"`
5114
5115	// ForceSendFields is a list of field names (e.g.
5116	// "ComputedClickThroughUrl") to unconditionally include in API
5117	// requests. By default, fields with empty values are omitted from API
5118	// requests. However, any non-pointer, non-interface field appearing in
5119	// ForceSendFields will be sent to the server regardless of whether the
5120	// field is empty or not. This may be used to include empty fields in
5121	// Patch requests.
5122	ForceSendFields []string `json:"-"`
5123
5124	// NullFields is a list of field names (e.g. "ComputedClickThroughUrl")
5125	// to include in API requests with the JSON null value. By default,
5126	// fields with empty values are omitted from API requests. However, any
5127	// field with an empty value appearing in NullFields will be sent to the
5128	// server as null. It is an error if a field in this list has a
5129	// non-empty value. This may be used to include null fields in Patch
5130	// requests.
5131	NullFields []string `json:"-"`
5132}
5133
5134func (s *CreativeClickThroughUrl) MarshalJSON() ([]byte, error) {
5135	type NoMethod CreativeClickThroughUrl
5136	raw := NoMethod(*s)
5137	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5138}
5139
5140// CreativeCustomEvent: Creative Custom Event.
5141type CreativeCustomEvent struct {
5142	// AdvertiserCustomEventId: Unique ID of this event used by Reporting
5143	// and Data Transfer. This is a read-only field.
5144	AdvertiserCustomEventId int64 `json:"advertiserCustomEventId,omitempty,string"`
5145
5146	// AdvertiserCustomEventName: User-entered name for the event.
5147	AdvertiserCustomEventName string `json:"advertiserCustomEventName,omitempty"`
5148
5149	// AdvertiserCustomEventType: Type of the event. This is a read-only
5150	// field.
5151	//
5152	// Possible values:
5153	//   "ADVERTISER_EVENT_COUNTER"
5154	//   "ADVERTISER_EVENT_EXIT"
5155	//   "ADVERTISER_EVENT_TIMER"
5156	AdvertiserCustomEventType string `json:"advertiserCustomEventType,omitempty"`
5157
5158	// ArtworkLabel: Artwork label column, used to link events in Campaign
5159	// Manager back to events in Studio. This is a required field and should
5160	// not be modified after insertion.
5161	ArtworkLabel string `json:"artworkLabel,omitempty"`
5162
5163	// ArtworkType: Artwork type used by the creative.This is a read-only
5164	// field.
5165	//
5166	// Possible values:
5167	//   "ARTWORK_TYPE_FLASH"
5168	//   "ARTWORK_TYPE_HTML5"
5169	//   "ARTWORK_TYPE_IMAGE"
5170	//   "ARTWORK_TYPE_MIXED"
5171	ArtworkType string `json:"artworkType,omitempty"`
5172
5173	// ExitClickThroughUrl: Exit click-through URL for the event. This field
5174	// is used only for exit events.
5175	ExitClickThroughUrl *CreativeClickThroughUrl `json:"exitClickThroughUrl,omitempty"`
5176
5177	// Id: ID of this event. This is a required field and should not be
5178	// modified after insertion.
5179	Id int64 `json:"id,omitempty,string"`
5180
5181	// PopupWindowProperties: Properties for rich media popup windows. This
5182	// field is used only for exit events.
5183	PopupWindowProperties *PopupWindowProperties `json:"popupWindowProperties,omitempty"`
5184
5185	// TargetType: Target type used by the event.
5186	//
5187	// Possible values:
5188	//   "TARGET_BLANK"
5189	//   "TARGET_PARENT"
5190	//   "TARGET_POPUP"
5191	//   "TARGET_SELF"
5192	//   "TARGET_TOP"
5193	TargetType string `json:"targetType,omitempty"`
5194
5195	// VideoReportingId: Video reporting ID, used to differentiate multiple
5196	// videos in a single creative. This is a read-only field.
5197	VideoReportingId string `json:"videoReportingId,omitempty"`
5198
5199	// ForceSendFields is a list of field names (e.g.
5200	// "AdvertiserCustomEventId") to unconditionally include in API
5201	// requests. By default, fields with empty values are omitted from API
5202	// requests. However, any non-pointer, non-interface field appearing in
5203	// ForceSendFields will be sent to the server regardless of whether the
5204	// field is empty or not. This may be used to include empty fields in
5205	// Patch requests.
5206	ForceSendFields []string `json:"-"`
5207
5208	// NullFields is a list of field names (e.g. "AdvertiserCustomEventId")
5209	// to include in API requests with the JSON null value. By default,
5210	// fields with empty values are omitted from API requests. However, any
5211	// field with an empty value appearing in NullFields will be sent to the
5212	// server as null. It is an error if a field in this list has a
5213	// non-empty value. This may be used to include null fields in Patch
5214	// requests.
5215	NullFields []string `json:"-"`
5216}
5217
5218func (s *CreativeCustomEvent) MarshalJSON() ([]byte, error) {
5219	type NoMethod CreativeCustomEvent
5220	raw := NoMethod(*s)
5221	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5222}
5223
5224// CreativeField: Contains properties of a creative field.
5225type CreativeField struct {
5226	// AccountId: Account ID of this creative field. This is a read-only
5227	// field that can be left blank.
5228	AccountId int64 `json:"accountId,omitempty,string"`
5229
5230	// AdvertiserId: Advertiser ID of this creative field. This is a
5231	// required field on insertion.
5232	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5233
5234	// AdvertiserIdDimensionValue: Dimension value for the ID of the
5235	// advertiser. This is a read-only, auto-generated field.
5236	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5237
5238	// Id: ID of this creative field. This is a read-only, auto-generated
5239	// field.
5240	Id int64 `json:"id,omitempty,string"`
5241
5242	// Kind: Identifies what kind of resource this is. Value: the fixed
5243	// string "dfareporting#creativeField".
5244	Kind string `json:"kind,omitempty"`
5245
5246	// Name: Name of this creative field. This is a required field and must
5247	// be less than 256 characters long and unique among creative fields of
5248	// the same advertiser.
5249	Name string `json:"name,omitempty"`
5250
5251	// SubaccountId: Subaccount ID of this creative field. This is a
5252	// read-only field that can be left blank.
5253	SubaccountId int64 `json:"subaccountId,omitempty,string"`
5254
5255	// ServerResponse contains the HTTP response code and headers from the
5256	// server.
5257	googleapi.ServerResponse `json:"-"`
5258
5259	// ForceSendFields is a list of field names (e.g. "AccountId") to
5260	// unconditionally include in API requests. By default, fields with
5261	// empty values are omitted from API requests. However, any non-pointer,
5262	// non-interface field appearing in ForceSendFields will be sent to the
5263	// server regardless of whether the field is empty or not. This may be
5264	// used to include empty fields in Patch requests.
5265	ForceSendFields []string `json:"-"`
5266
5267	// NullFields is a list of field names (e.g. "AccountId") to include in
5268	// API requests with the JSON null value. By default, fields with empty
5269	// values are omitted from API requests. However, any field with an
5270	// empty value appearing in NullFields will be sent to the server as
5271	// null. It is an error if a field in this list has a non-empty value.
5272	// This may be used to include null fields in Patch requests.
5273	NullFields []string `json:"-"`
5274}
5275
5276func (s *CreativeField) MarshalJSON() ([]byte, error) {
5277	type NoMethod CreativeField
5278	raw := NoMethod(*s)
5279	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5280}
5281
5282// CreativeFieldAssignment: Creative Field Assignment.
5283type CreativeFieldAssignment struct {
5284	// CreativeFieldId: ID of the creative field.
5285	CreativeFieldId int64 `json:"creativeFieldId,omitempty,string"`
5286
5287	// CreativeFieldValueId: ID of the creative field value.
5288	CreativeFieldValueId int64 `json:"creativeFieldValueId,omitempty,string"`
5289
5290	// ForceSendFields is a list of field names (e.g. "CreativeFieldId") to
5291	// unconditionally include in API requests. By default, fields with
5292	// empty values are omitted from API requests. However, any non-pointer,
5293	// non-interface field appearing in ForceSendFields will be sent to the
5294	// server regardless of whether the field is empty or not. This may be
5295	// used to include empty fields in Patch requests.
5296	ForceSendFields []string `json:"-"`
5297
5298	// NullFields is a list of field names (e.g. "CreativeFieldId") to
5299	// include in API requests with the JSON null value. By default, fields
5300	// with empty values are omitted from API requests. However, any field
5301	// with an empty value appearing in NullFields will be sent to the
5302	// server as null. It is an error if a field in this list has a
5303	// non-empty value. This may be used to include null fields in Patch
5304	// requests.
5305	NullFields []string `json:"-"`
5306}
5307
5308func (s *CreativeFieldAssignment) MarshalJSON() ([]byte, error) {
5309	type NoMethod CreativeFieldAssignment
5310	raw := NoMethod(*s)
5311	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5312}
5313
5314// CreativeFieldValue: Contains properties of a creative field value.
5315type CreativeFieldValue struct {
5316	// Id: ID of this creative field value. This is a read-only,
5317	// auto-generated field.
5318	Id int64 `json:"id,omitempty,string"`
5319
5320	// Kind: Identifies what kind of resource this is. Value: the fixed
5321	// string "dfareporting#creativeFieldValue".
5322	Kind string `json:"kind,omitempty"`
5323
5324	// Value: Value of this creative field value. It needs to be less than
5325	// 256 characters in length and unique per creative field.
5326	Value string `json:"value,omitempty"`
5327
5328	// ServerResponse contains the HTTP response code and headers from the
5329	// server.
5330	googleapi.ServerResponse `json:"-"`
5331
5332	// ForceSendFields is a list of field names (e.g. "Id") to
5333	// unconditionally include in API requests. By default, fields with
5334	// empty values are omitted from API requests. However, any non-pointer,
5335	// non-interface field appearing in ForceSendFields will be sent to the
5336	// server regardless of whether the field is empty or not. This may be
5337	// used to include empty fields in Patch requests.
5338	ForceSendFields []string `json:"-"`
5339
5340	// NullFields is a list of field names (e.g. "Id") to include in API
5341	// requests with the JSON null value. By default, fields with empty
5342	// values are omitted from API requests. However, any field with an
5343	// empty value appearing in NullFields will be sent to the server as
5344	// null. It is an error if a field in this list has a non-empty value.
5345	// This may be used to include null fields in Patch requests.
5346	NullFields []string `json:"-"`
5347}
5348
5349func (s *CreativeFieldValue) MarshalJSON() ([]byte, error) {
5350	type NoMethod CreativeFieldValue
5351	raw := NoMethod(*s)
5352	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5353}
5354
5355// CreativeFieldValuesListResponse: Creative Field Value List Response
5356type CreativeFieldValuesListResponse struct {
5357	// CreativeFieldValues: Creative field value collection.
5358	CreativeFieldValues []*CreativeFieldValue `json:"creativeFieldValues,omitempty"`
5359
5360	// Kind: Identifies what kind of resource this is. Value: the fixed
5361	// string "dfareporting#creativeFieldValuesListResponse".
5362	Kind string `json:"kind,omitempty"`
5363
5364	// NextPageToken: Pagination token to be used for the next list
5365	// operation.
5366	NextPageToken string `json:"nextPageToken,omitempty"`
5367
5368	// ServerResponse contains the HTTP response code and headers from the
5369	// server.
5370	googleapi.ServerResponse `json:"-"`
5371
5372	// ForceSendFields is a list of field names (e.g. "CreativeFieldValues")
5373	// to unconditionally include in API requests. By default, fields with
5374	// empty values are omitted from API requests. However, any non-pointer,
5375	// non-interface field appearing in ForceSendFields will be sent to the
5376	// server regardless of whether the field is empty or not. This may be
5377	// used to include empty fields in Patch requests.
5378	ForceSendFields []string `json:"-"`
5379
5380	// NullFields is a list of field names (e.g. "CreativeFieldValues") to
5381	// include in API requests with the JSON null value. By default, fields
5382	// with empty values are omitted from API requests. However, any field
5383	// with an empty value appearing in NullFields will be sent to the
5384	// server as null. It is an error if a field in this list has a
5385	// non-empty value. This may be used to include null fields in Patch
5386	// requests.
5387	NullFields []string `json:"-"`
5388}
5389
5390func (s *CreativeFieldValuesListResponse) MarshalJSON() ([]byte, error) {
5391	type NoMethod CreativeFieldValuesListResponse
5392	raw := NoMethod(*s)
5393	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5394}
5395
5396// CreativeFieldsListResponse: Creative Field List Response
5397type CreativeFieldsListResponse struct {
5398	// CreativeFields: Creative field collection.
5399	CreativeFields []*CreativeField `json:"creativeFields,omitempty"`
5400
5401	// Kind: Identifies what kind of resource this is. Value: the fixed
5402	// string "dfareporting#creativeFieldsListResponse".
5403	Kind string `json:"kind,omitempty"`
5404
5405	// NextPageToken: Pagination token to be used for the next list
5406	// operation.
5407	NextPageToken string `json:"nextPageToken,omitempty"`
5408
5409	// ServerResponse contains the HTTP response code and headers from the
5410	// server.
5411	googleapi.ServerResponse `json:"-"`
5412
5413	// ForceSendFields is a list of field names (e.g. "CreativeFields") to
5414	// unconditionally include in API requests. By default, fields with
5415	// empty values are omitted from API requests. However, any non-pointer,
5416	// non-interface field appearing in ForceSendFields will be sent to the
5417	// server regardless of whether the field is empty or not. This may be
5418	// used to include empty fields in Patch requests.
5419	ForceSendFields []string `json:"-"`
5420
5421	// NullFields is a list of field names (e.g. "CreativeFields") to
5422	// include in API requests with the JSON null value. By default, fields
5423	// with empty values are omitted from API requests. However, any field
5424	// with an empty value appearing in NullFields will be sent to the
5425	// server as null. It is an error if a field in this list has a
5426	// non-empty value. This may be used to include null fields in Patch
5427	// requests.
5428	NullFields []string `json:"-"`
5429}
5430
5431func (s *CreativeFieldsListResponse) MarshalJSON() ([]byte, error) {
5432	type NoMethod CreativeFieldsListResponse
5433	raw := NoMethod(*s)
5434	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5435}
5436
5437// CreativeGroup: Contains properties of a creative group.
5438type CreativeGroup struct {
5439	// AccountId: Account ID of this creative group. This is a read-only
5440	// field that can be left blank.
5441	AccountId int64 `json:"accountId,omitempty,string"`
5442
5443	// AdvertiserId: Advertiser ID of this creative group. This is a
5444	// required field on insertion.
5445	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5446
5447	// AdvertiserIdDimensionValue: Dimension value for the ID of the
5448	// advertiser. This is a read-only, auto-generated field.
5449	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5450
5451	// GroupNumber: Subgroup of the creative group. Assign your creative
5452	// groups to a subgroup in order to filter or manage them more easily.
5453	// This field is required on insertion and is read-only after insertion.
5454	// Acceptable values are 1 to 2, inclusive.
5455	GroupNumber int64 `json:"groupNumber,omitempty"`
5456
5457	// Id: ID of this creative group. This is a read-only, auto-generated
5458	// field.
5459	Id int64 `json:"id,omitempty,string"`
5460
5461	// Kind: Identifies what kind of resource this is. Value: the fixed
5462	// string "dfareporting#creativeGroup".
5463	Kind string `json:"kind,omitempty"`
5464
5465	// Name: Name of this creative group. This is a required field and must
5466	// be less than 256 characters long and unique among creative groups of
5467	// the same advertiser.
5468	Name string `json:"name,omitempty"`
5469
5470	// SubaccountId: Subaccount ID of this creative group. This is a
5471	// read-only field that can be left blank.
5472	SubaccountId int64 `json:"subaccountId,omitempty,string"`
5473
5474	// ServerResponse contains the HTTP response code and headers from the
5475	// server.
5476	googleapi.ServerResponse `json:"-"`
5477
5478	// ForceSendFields is a list of field names (e.g. "AccountId") to
5479	// unconditionally include in API requests. By default, fields with
5480	// empty values are omitted from API requests. However, any non-pointer,
5481	// non-interface field appearing in ForceSendFields will be sent to the
5482	// server regardless of whether the field is empty or not. This may be
5483	// used to include empty fields in Patch requests.
5484	ForceSendFields []string `json:"-"`
5485
5486	// NullFields is a list of field names (e.g. "AccountId") to include in
5487	// API requests with the JSON null value. By default, fields with empty
5488	// values are omitted from API requests. However, any field with an
5489	// empty value appearing in NullFields will be sent to the server as
5490	// null. It is an error if a field in this list has a non-empty value.
5491	// This may be used to include null fields in Patch requests.
5492	NullFields []string `json:"-"`
5493}
5494
5495func (s *CreativeGroup) MarshalJSON() ([]byte, error) {
5496	type NoMethod CreativeGroup
5497	raw := NoMethod(*s)
5498	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5499}
5500
5501// CreativeGroupAssignment: Creative Group Assignment.
5502type CreativeGroupAssignment struct {
5503	// CreativeGroupId: ID of the creative group to be assigned.
5504	CreativeGroupId int64 `json:"creativeGroupId,omitempty,string"`
5505
5506	// CreativeGroupNumber: Creative group number of the creative group
5507	// assignment.
5508	//
5509	// Possible values:
5510	//   "CREATIVE_GROUP_ONE"
5511	//   "CREATIVE_GROUP_TWO"
5512	CreativeGroupNumber string `json:"creativeGroupNumber,omitempty"`
5513
5514	// ForceSendFields is a list of field names (e.g. "CreativeGroupId") to
5515	// unconditionally include in API requests. By default, fields with
5516	// empty values are omitted from API requests. However, any non-pointer,
5517	// non-interface field appearing in ForceSendFields will be sent to the
5518	// server regardless of whether the field is empty or not. This may be
5519	// used to include empty fields in Patch requests.
5520	ForceSendFields []string `json:"-"`
5521
5522	// NullFields is a list of field names (e.g. "CreativeGroupId") to
5523	// include in API requests with the JSON null value. By default, fields
5524	// with empty values are omitted from API requests. However, any field
5525	// with an empty value appearing in NullFields will be sent to the
5526	// server as null. It is an error if a field in this list has a
5527	// non-empty value. This may be used to include null fields in Patch
5528	// requests.
5529	NullFields []string `json:"-"`
5530}
5531
5532func (s *CreativeGroupAssignment) MarshalJSON() ([]byte, error) {
5533	type NoMethod CreativeGroupAssignment
5534	raw := NoMethod(*s)
5535	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5536}
5537
5538// CreativeGroupsListResponse: Creative Group List Response
5539type CreativeGroupsListResponse struct {
5540	// CreativeGroups: Creative group collection.
5541	CreativeGroups []*CreativeGroup `json:"creativeGroups,omitempty"`
5542
5543	// Kind: Identifies what kind of resource this is. Value: the fixed
5544	// string "dfareporting#creativeGroupsListResponse".
5545	Kind string `json:"kind,omitempty"`
5546
5547	// NextPageToken: Pagination token to be used for the next list
5548	// operation.
5549	NextPageToken string `json:"nextPageToken,omitempty"`
5550
5551	// ServerResponse contains the HTTP response code and headers from the
5552	// server.
5553	googleapi.ServerResponse `json:"-"`
5554
5555	// ForceSendFields is a list of field names (e.g. "CreativeGroups") to
5556	// unconditionally include in API requests. By default, fields with
5557	// empty values are omitted from API requests. However, any non-pointer,
5558	// non-interface field appearing in ForceSendFields will be sent to the
5559	// server regardless of whether the field is empty or not. This may be
5560	// used to include empty fields in Patch requests.
5561	ForceSendFields []string `json:"-"`
5562
5563	// NullFields is a list of field names (e.g. "CreativeGroups") to
5564	// include in API requests with the JSON null value. By default, fields
5565	// with empty values are omitted from API requests. However, any field
5566	// with an empty value appearing in NullFields will be sent to the
5567	// server as null. It is an error if a field in this list has a
5568	// non-empty value. This may be used to include null fields in Patch
5569	// requests.
5570	NullFields []string `json:"-"`
5571}
5572
5573func (s *CreativeGroupsListResponse) MarshalJSON() ([]byte, error) {
5574	type NoMethod CreativeGroupsListResponse
5575	raw := NoMethod(*s)
5576	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5577}
5578
5579// CreativeOptimizationConfiguration: Creative optimization settings.
5580type CreativeOptimizationConfiguration struct {
5581	// Id: ID of this creative optimization config. This field is
5582	// auto-generated when the campaign is inserted or updated. It can be
5583	// null for existing campaigns.
5584	Id int64 `json:"id,omitempty,string"`
5585
5586	// Name: Name of this creative optimization config. This is a required
5587	// field and must be less than 129 characters long.
5588	Name string `json:"name,omitempty"`
5589
5590	// OptimizationActivitys: List of optimization activities associated
5591	// with this configuration.
5592	OptimizationActivitys []*OptimizationActivity `json:"optimizationActivitys,omitempty"`
5593
5594	// OptimizationModel: Optimization model for this configuration.
5595	//
5596	// Possible values:
5597	//   "CLICK"
5598	//   "POST_CLICK"
5599	//   "POST_CLICK_AND_IMPRESSION"
5600	//   "POST_IMPRESSION"
5601	//   "VIDEO_COMPLETION"
5602	OptimizationModel string `json:"optimizationModel,omitempty"`
5603
5604	// ForceSendFields is a list of field names (e.g. "Id") to
5605	// unconditionally include in API requests. By default, fields with
5606	// empty values are omitted from API requests. However, any non-pointer,
5607	// non-interface field appearing in ForceSendFields will be sent to the
5608	// server regardless of whether the field is empty or not. This may be
5609	// used to include empty fields in Patch requests.
5610	ForceSendFields []string `json:"-"`
5611
5612	// NullFields is a list of field names (e.g. "Id") to include in API
5613	// requests with the JSON null value. By default, fields with empty
5614	// values are omitted from API requests. However, any field with an
5615	// empty value appearing in NullFields will be sent to the server as
5616	// null. It is an error if a field in this list has a non-empty value.
5617	// This may be used to include null fields in Patch requests.
5618	NullFields []string `json:"-"`
5619}
5620
5621func (s *CreativeOptimizationConfiguration) MarshalJSON() ([]byte, error) {
5622	type NoMethod CreativeOptimizationConfiguration
5623	raw := NoMethod(*s)
5624	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5625}
5626
5627// CreativeRotation: Creative Rotation.
5628type CreativeRotation struct {
5629	// CreativeAssignments: Creative assignments in this creative rotation.
5630	CreativeAssignments []*CreativeAssignment `json:"creativeAssignments,omitempty"`
5631
5632	// CreativeOptimizationConfigurationId: Creative optimization
5633	// configuration that is used by this ad. It should refer to one of the
5634	// existing optimization configurations in the ad's campaign. If it is
5635	// unset or set to 0, then the campaign's default optimization
5636	// configuration will be used for this ad.
5637	CreativeOptimizationConfigurationId int64 `json:"creativeOptimizationConfigurationId,omitempty,string"`
5638
5639	// Type: Type of creative rotation. Can be used to specify whether to
5640	// use sequential or random rotation.
5641	//
5642	// Possible values:
5643	//   "CREATIVE_ROTATION_TYPE_RANDOM"
5644	//   "CREATIVE_ROTATION_TYPE_SEQUENTIAL"
5645	Type string `json:"type,omitempty"`
5646
5647	// WeightCalculationStrategy: Strategy for calculating weights. Used
5648	// with CREATIVE_ROTATION_TYPE_RANDOM.
5649	//
5650	// Possible values:
5651	//   "WEIGHT_STRATEGY_CUSTOM"
5652	//   "WEIGHT_STRATEGY_EQUAL"
5653	//   "WEIGHT_STRATEGY_HIGHEST_CTR"
5654	//   "WEIGHT_STRATEGY_OPTIMIZED"
5655	WeightCalculationStrategy string `json:"weightCalculationStrategy,omitempty"`
5656
5657	// ForceSendFields is a list of field names (e.g. "CreativeAssignments")
5658	// to unconditionally include in API requests. By default, fields with
5659	// empty values are omitted from API requests. However, any non-pointer,
5660	// non-interface field appearing in ForceSendFields will be sent to the
5661	// server regardless of whether the field is empty or not. This may be
5662	// used to include empty fields in Patch requests.
5663	ForceSendFields []string `json:"-"`
5664
5665	// NullFields is a list of field names (e.g. "CreativeAssignments") to
5666	// include in API requests with the JSON null value. By default, fields
5667	// with empty values are omitted from API requests. However, any field
5668	// with an empty value appearing in NullFields will be sent to the
5669	// server as null. It is an error if a field in this list has a
5670	// non-empty value. This may be used to include null fields in Patch
5671	// requests.
5672	NullFields []string `json:"-"`
5673}
5674
5675func (s *CreativeRotation) MarshalJSON() ([]byte, error) {
5676	type NoMethod CreativeRotation
5677	raw := NoMethod(*s)
5678	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5679}
5680
5681// CreativesListResponse: Creative List Response
5682type CreativesListResponse struct {
5683	// Creatives: Creative collection.
5684	Creatives []*Creative `json:"creatives,omitempty"`
5685
5686	// Kind: Identifies what kind of resource this is. Value: the fixed
5687	// string "dfareporting#creativesListResponse".
5688	Kind string `json:"kind,omitempty"`
5689
5690	// NextPageToken: Pagination token to be used for the next list
5691	// operation.
5692	NextPageToken string `json:"nextPageToken,omitempty"`
5693
5694	// ServerResponse contains the HTTP response code and headers from the
5695	// server.
5696	googleapi.ServerResponse `json:"-"`
5697
5698	// ForceSendFields is a list of field names (e.g. "Creatives") to
5699	// unconditionally include in API requests. By default, fields with
5700	// empty values are omitted from API requests. However, any non-pointer,
5701	// non-interface field appearing in ForceSendFields will be sent to the
5702	// server regardless of whether the field is empty or not. This may be
5703	// used to include empty fields in Patch requests.
5704	ForceSendFields []string `json:"-"`
5705
5706	// NullFields is a list of field names (e.g. "Creatives") to include in
5707	// API requests with the JSON null value. By default, fields with empty
5708	// values are omitted from API requests. However, any field with an
5709	// empty value appearing in NullFields will be sent to the server as
5710	// null. It is an error if a field in this list has a non-empty value.
5711	// This may be used to include null fields in Patch requests.
5712	NullFields []string `json:"-"`
5713}
5714
5715func (s *CreativesListResponse) MarshalJSON() ([]byte, error) {
5716	type NoMethod CreativesListResponse
5717	raw := NoMethod(*s)
5718	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5719}
5720
5721// CrossDimensionReachReportCompatibleFields: Represents fields that are
5722// compatible to be selected for a report of type
5723// "CROSS_DIMENSION_REACH".
5724type CrossDimensionReachReportCompatibleFields struct {
5725	// Breakdown: Dimensions which are compatible to be selected in the
5726	// "breakdown" section of the report.
5727	Breakdown []*Dimension `json:"breakdown,omitempty"`
5728
5729	// DimensionFilters: Dimensions which are compatible to be selected in
5730	// the "dimensionFilters" section of the report.
5731	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
5732
5733	// Kind: The kind of resource this is, in this case
5734	// dfareporting#crossDimensionReachReportCompatibleFields.
5735	Kind string `json:"kind,omitempty"`
5736
5737	// Metrics: Metrics which are compatible to be selected in the
5738	// "metricNames" section of the report.
5739	Metrics []*Metric `json:"metrics,omitempty"`
5740
5741	// OverlapMetrics: Metrics which are compatible to be selected in the
5742	// "overlapMetricNames" section of the report.
5743	OverlapMetrics []*Metric `json:"overlapMetrics,omitempty"`
5744
5745	// ForceSendFields is a list of field names (e.g. "Breakdown") to
5746	// unconditionally include in API requests. By default, fields with
5747	// empty values are omitted from API requests. However, any non-pointer,
5748	// non-interface field appearing in ForceSendFields will be sent to the
5749	// server regardless of whether the field is empty or not. This may be
5750	// used to include empty fields in Patch requests.
5751	ForceSendFields []string `json:"-"`
5752
5753	// NullFields is a list of field names (e.g. "Breakdown") to include in
5754	// API requests with the JSON null value. By default, fields with empty
5755	// values are omitted from API requests. However, any field with an
5756	// empty value appearing in NullFields will be sent to the server as
5757	// null. It is an error if a field in this list has a non-empty value.
5758	// This may be used to include null fields in Patch requests.
5759	NullFields []string `json:"-"`
5760}
5761
5762func (s *CrossDimensionReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
5763	type NoMethod CrossDimensionReachReportCompatibleFields
5764	raw := NoMethod(*s)
5765	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5766}
5767
5768// CustomFloodlightVariable: A custom floodlight variable.
5769type CustomFloodlightVariable struct {
5770	// Kind: Identifies what kind of resource this is. Value: the fixed
5771	// string "dfareporting#customFloodlightVariable".
5772	Kind string `json:"kind,omitempty"`
5773
5774	// Type: The type of custom floodlight variable to supply a value for.
5775	// These map to the "u[1-20]=" in the tags.
5776	//
5777	// Possible values:
5778	//   "U1"
5779	//   "U10"
5780	//   "U100"
5781	//   "U11"
5782	//   "U12"
5783	//   "U13"
5784	//   "U14"
5785	//   "U15"
5786	//   "U16"
5787	//   "U17"
5788	//   "U18"
5789	//   "U19"
5790	//   "U2"
5791	//   "U20"
5792	//   "U21"
5793	//   "U22"
5794	//   "U23"
5795	//   "U24"
5796	//   "U25"
5797	//   "U26"
5798	//   "U27"
5799	//   "U28"
5800	//   "U29"
5801	//   "U3"
5802	//   "U30"
5803	//   "U31"
5804	//   "U32"
5805	//   "U33"
5806	//   "U34"
5807	//   "U35"
5808	//   "U36"
5809	//   "U37"
5810	//   "U38"
5811	//   "U39"
5812	//   "U4"
5813	//   "U40"
5814	//   "U41"
5815	//   "U42"
5816	//   "U43"
5817	//   "U44"
5818	//   "U45"
5819	//   "U46"
5820	//   "U47"
5821	//   "U48"
5822	//   "U49"
5823	//   "U5"
5824	//   "U50"
5825	//   "U51"
5826	//   "U52"
5827	//   "U53"
5828	//   "U54"
5829	//   "U55"
5830	//   "U56"
5831	//   "U57"
5832	//   "U58"
5833	//   "U59"
5834	//   "U6"
5835	//   "U60"
5836	//   "U61"
5837	//   "U62"
5838	//   "U63"
5839	//   "U64"
5840	//   "U65"
5841	//   "U66"
5842	//   "U67"
5843	//   "U68"
5844	//   "U69"
5845	//   "U7"
5846	//   "U70"
5847	//   "U71"
5848	//   "U72"
5849	//   "U73"
5850	//   "U74"
5851	//   "U75"
5852	//   "U76"
5853	//   "U77"
5854	//   "U78"
5855	//   "U79"
5856	//   "U8"
5857	//   "U80"
5858	//   "U81"
5859	//   "U82"
5860	//   "U83"
5861	//   "U84"
5862	//   "U85"
5863	//   "U86"
5864	//   "U87"
5865	//   "U88"
5866	//   "U89"
5867	//   "U9"
5868	//   "U90"
5869	//   "U91"
5870	//   "U92"
5871	//   "U93"
5872	//   "U94"
5873	//   "U95"
5874	//   "U96"
5875	//   "U97"
5876	//   "U98"
5877	//   "U99"
5878	Type string `json:"type,omitempty"`
5879
5880	// Value: The value of the custom floodlight variable. The length of
5881	// string must not exceed 50 characters.
5882	Value string `json:"value,omitempty"`
5883
5884	// ForceSendFields is a list of field names (e.g. "Kind") to
5885	// unconditionally include in API requests. By default, fields with
5886	// empty values are omitted from API requests. However, any non-pointer,
5887	// non-interface field appearing in ForceSendFields will be sent to the
5888	// server regardless of whether the field is empty or not. This may be
5889	// used to include empty fields in Patch requests.
5890	ForceSendFields []string `json:"-"`
5891
5892	// NullFields is a list of field names (e.g. "Kind") to include in API
5893	// requests with the JSON null value. By default, fields with empty
5894	// values are omitted from API requests. However, any field with an
5895	// empty value appearing in NullFields will be sent to the server as
5896	// null. It is an error if a field in this list has a non-empty value.
5897	// This may be used to include null fields in Patch requests.
5898	NullFields []string `json:"-"`
5899}
5900
5901func (s *CustomFloodlightVariable) MarshalJSON() ([]byte, error) {
5902	type NoMethod CustomFloodlightVariable
5903	raw := NoMethod(*s)
5904	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5905}
5906
5907// CustomRichMediaEvents: Represents a Custom Rich Media Events group.
5908type CustomRichMediaEvents struct {
5909	// FilteredEventIds: List of custom rich media event IDs. Dimension
5910	// values must be all of type dfa:richMediaEventTypeIdAndName.
5911	FilteredEventIds []*DimensionValue `json:"filteredEventIds,omitempty"`
5912
5913	// Kind: The kind of resource this is, in this case
5914	// dfareporting#customRichMediaEvents.
5915	Kind string `json:"kind,omitempty"`
5916
5917	// ForceSendFields is a list of field names (e.g. "FilteredEventIds") to
5918	// unconditionally include in API requests. By default, fields with
5919	// empty values are omitted from API requests. However, any non-pointer,
5920	// non-interface field appearing in ForceSendFields will be sent to the
5921	// server regardless of whether the field is empty or not. This may be
5922	// used to include empty fields in Patch requests.
5923	ForceSendFields []string `json:"-"`
5924
5925	// NullFields is a list of field names (e.g. "FilteredEventIds") to
5926	// include in API requests with the JSON null value. By default, fields
5927	// with empty values are omitted from API requests. However, any field
5928	// with an empty value appearing in NullFields will be sent to the
5929	// server as null. It is an error if a field in this list has a
5930	// non-empty value. This may be used to include null fields in Patch
5931	// requests.
5932	NullFields []string `json:"-"`
5933}
5934
5935func (s *CustomRichMediaEvents) MarshalJSON() ([]byte, error) {
5936	type NoMethod CustomRichMediaEvents
5937	raw := NoMethod(*s)
5938	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5939}
5940
5941// CustomViewabilityMetric: Custom Viewability Metric
5942type CustomViewabilityMetric struct {
5943	// Configuration: Configuration of the custom viewability metric.
5944	Configuration *CustomViewabilityMetricConfiguration `json:"configuration,omitempty"`
5945
5946	// Id: ID of the custom viewability metric.
5947	Id int64 `json:"id,omitempty,string"`
5948
5949	// Name: Name of the custom viewability metric.
5950	Name string `json:"name,omitempty"`
5951
5952	// ForceSendFields is a list of field names (e.g. "Configuration") to
5953	// unconditionally include in API requests. By default, fields with
5954	// empty values are omitted from API requests. However, any non-pointer,
5955	// non-interface field appearing in ForceSendFields will be sent to the
5956	// server regardless of whether the field is empty or not. This may be
5957	// used to include empty fields in Patch requests.
5958	ForceSendFields []string `json:"-"`
5959
5960	// NullFields is a list of field names (e.g. "Configuration") to include
5961	// in API requests with the JSON null value. By default, fields with
5962	// empty values are omitted from API requests. However, any field with
5963	// an empty value appearing in NullFields will be sent to the server as
5964	// null. It is an error if a field in this list has a non-empty value.
5965	// This may be used to include null fields in Patch requests.
5966	NullFields []string `json:"-"`
5967}
5968
5969func (s *CustomViewabilityMetric) MarshalJSON() ([]byte, error) {
5970	type NoMethod CustomViewabilityMetric
5971	raw := NoMethod(*s)
5972	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5973}
5974
5975// CustomViewabilityMetricConfiguration: The attributes, like playtime
5976// and percent onscreen, that define the Custom Viewability Metric.
5977type CustomViewabilityMetricConfiguration struct {
5978	// Audible: Whether the video must be audible to count an impression.
5979	Audible bool `json:"audible,omitempty"`
5980
5981	// TimeMillis: The time in milliseconds the video must play for the
5982	// Custom Viewability Metric to count an impression. If both this and
5983	// timePercent are specified, the earlier of the two will be used.
5984	TimeMillis int64 `json:"timeMillis,omitempty"`
5985
5986	// TimePercent: The percentage of video that must play for the Custom
5987	// Viewability Metric to count an impression. If both this and
5988	// timeMillis are specified, the earlier of the two will be used.
5989	TimePercent int64 `json:"timePercent,omitempty"`
5990
5991	// ViewabilityPercent: The percentage of video that must be on screen
5992	// for the Custom Viewability Metric to count an impression.
5993	ViewabilityPercent int64 `json:"viewabilityPercent,omitempty"`
5994
5995	// ForceSendFields is a list of field names (e.g. "Audible") to
5996	// unconditionally include in API requests. By default, fields with
5997	// empty values are omitted from API requests. However, any non-pointer,
5998	// non-interface field appearing in ForceSendFields will be sent to the
5999	// server regardless of whether the field is empty or not. This may be
6000	// used to include empty fields in Patch requests.
6001	ForceSendFields []string `json:"-"`
6002
6003	// NullFields is a list of field names (e.g. "Audible") to include in
6004	// API requests with the JSON null value. By default, fields with empty
6005	// values are omitted from API requests. However, any field with an
6006	// empty value appearing in NullFields will be sent to the server as
6007	// null. It is an error if a field in this list has a non-empty value.
6008	// This may be used to include null fields in Patch requests.
6009	NullFields []string `json:"-"`
6010}
6011
6012func (s *CustomViewabilityMetricConfiguration) MarshalJSON() ([]byte, error) {
6013	type NoMethod CustomViewabilityMetricConfiguration
6014	raw := NoMethod(*s)
6015	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6016}
6017
6018// DateRange: Represents a date range.
6019type DateRange struct {
6020	// EndDate: The end date of the date range, inclusive. A string of the
6021	// format: "yyyy-MM-dd".
6022	EndDate string `json:"endDate,omitempty"`
6023
6024	// Kind: The kind of resource this is, in this case
6025	// dfareporting#dateRange.
6026	Kind string `json:"kind,omitempty"`
6027
6028	// RelativeDateRange: The date range relative to the date of when the
6029	// report is run.
6030	//
6031	// Possible values:
6032	//   "LAST_14_DAYS"
6033	//   "LAST_24_MONTHS"
6034	//   "LAST_30_DAYS"
6035	//   "LAST_365_DAYS"
6036	//   "LAST_60_DAYS"
6037	//   "LAST_7_DAYS"
6038	//   "LAST_90_DAYS"
6039	//   "MONTH_TO_DATE"
6040	//   "PREVIOUS_MONTH"
6041	//   "PREVIOUS_QUARTER"
6042	//   "PREVIOUS_WEEK"
6043	//   "PREVIOUS_YEAR"
6044	//   "QUARTER_TO_DATE"
6045	//   "TODAY"
6046	//   "WEEK_TO_DATE"
6047	//   "YEAR_TO_DATE"
6048	//   "YESTERDAY"
6049	RelativeDateRange string `json:"relativeDateRange,omitempty"`
6050
6051	// StartDate: The start date of the date range, inclusive. A string of
6052	// the format: "yyyy-MM-dd".
6053	StartDate string `json:"startDate,omitempty"`
6054
6055	// ForceSendFields is a list of field names (e.g. "EndDate") to
6056	// unconditionally include in API requests. By default, fields with
6057	// empty values are omitted from API requests. However, any non-pointer,
6058	// non-interface field appearing in ForceSendFields will be sent to the
6059	// server regardless of whether the field is empty or not. This may be
6060	// used to include empty fields in Patch requests.
6061	ForceSendFields []string `json:"-"`
6062
6063	// NullFields is a list of field names (e.g. "EndDate") to include in
6064	// API requests with the JSON null value. By default, fields with empty
6065	// values are omitted from API requests. However, any field with an
6066	// empty value appearing in NullFields will be sent to the server as
6067	// null. It is an error if a field in this list has a non-empty value.
6068	// This may be used to include null fields in Patch requests.
6069	NullFields []string `json:"-"`
6070}
6071
6072func (s *DateRange) MarshalJSON() ([]byte, error) {
6073	type NoMethod DateRange
6074	raw := NoMethod(*s)
6075	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6076}
6077
6078// DayPartTargeting: Day Part Targeting.
6079type DayPartTargeting struct {
6080	// DaysOfWeek: Days of the week when the ad will serve.
6081	//
6082	// Acceptable values are:
6083	// - "SUNDAY"
6084	// - "MONDAY"
6085	// - "TUESDAY"
6086	// - "WEDNESDAY"
6087	// - "THURSDAY"
6088	// - "FRIDAY"
6089	// - "SATURDAY"
6090	//
6091	// Possible values:
6092	//   "FRIDAY"
6093	//   "MONDAY"
6094	//   "SATURDAY"
6095	//   "SUNDAY"
6096	//   "THURSDAY"
6097	//   "TUESDAY"
6098	//   "WEDNESDAY"
6099	DaysOfWeek []string `json:"daysOfWeek,omitempty"`
6100
6101	// HoursOfDay: Hours of the day when the ad will serve, where 0 is
6102	// midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with
6103	// days of week, in which case the ad would serve during these hours on
6104	// the specified days. For example if Monday, Wednesday, Friday are the
6105	// days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is
6106	// specified, the ad would serve Monday, Wednesdays, and Fridays at
6107	// 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive.
6108	HoursOfDay []int64 `json:"hoursOfDay,omitempty"`
6109
6110	// UserLocalTime: Whether or not to use the user's local time. If false,
6111	// the America/New York time zone applies.
6112	UserLocalTime bool `json:"userLocalTime,omitempty"`
6113
6114	// ForceSendFields is a list of field names (e.g. "DaysOfWeek") 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. "DaysOfWeek") to include in
6123	// API requests with the JSON null value. By default, fields with empty
6124	// values are omitted from API requests. However, any field with an
6125	// 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 *DayPartTargeting) MarshalJSON() ([]byte, error) {
6132	type NoMethod DayPartTargeting
6133	raw := NoMethod(*s)
6134	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6135}
6136
6137// DeepLink: Contains information about a landing page deep link.
6138type DeepLink struct {
6139	// AppUrl: The URL of the mobile app being linked to.
6140	AppUrl string `json:"appUrl,omitempty"`
6141
6142	// FallbackUrl: The fallback URL. This URL will be served to users who
6143	// do not have the mobile app installed.
6144	FallbackUrl string `json:"fallbackUrl,omitempty"`
6145
6146	// Kind: Identifies what kind of resource this is. Value: the fixed
6147	// string "dfareporting#deepLink".
6148	Kind string `json:"kind,omitempty"`
6149
6150	// MobileApp: The mobile app targeted by this deep link.
6151	MobileApp *MobileApp `json:"mobileApp,omitempty"`
6152
6153	// RemarketingListIds: Ads served to users on these remarketing lists
6154	// will use this deep link. Applicable when mobileApp.directory is
6155	// APPLE_APP_STORE.
6156	RemarketingListIds googleapi.Int64s `json:"remarketingListIds,omitempty"`
6157
6158	// ForceSendFields is a list of field names (e.g. "AppUrl") to
6159	// unconditionally include in API requests. By default, fields with
6160	// empty values are omitted from API requests. However, any non-pointer,
6161	// non-interface field appearing in ForceSendFields will be sent to the
6162	// server regardless of whether the field is empty or not. This may be
6163	// used to include empty fields in Patch requests.
6164	ForceSendFields []string `json:"-"`
6165
6166	// NullFields is a list of field names (e.g. "AppUrl") to include in API
6167	// requests with the JSON null value. By default, fields with empty
6168	// values are omitted from API requests. However, any field with an
6169	// empty value appearing in NullFields will be sent to the server as
6170	// null. It is an error if a field in this list has a non-empty value.
6171	// This may be used to include null fields in Patch requests.
6172	NullFields []string `json:"-"`
6173}
6174
6175func (s *DeepLink) MarshalJSON() ([]byte, error) {
6176	type NoMethod DeepLink
6177	raw := NoMethod(*s)
6178	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6179}
6180
6181// DefaultClickThroughEventTagProperties: Properties of inheriting and
6182// overriding the default click-through event tag. A campaign may
6183// override the event tag defined at the advertiser level, and an ad may
6184// also override the campaign's setting further.
6185type DefaultClickThroughEventTagProperties struct {
6186	// DefaultClickThroughEventTagId: ID of the click-through event tag to
6187	// apply to all ads in this entity's scope.
6188	DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
6189
6190	// OverrideInheritedEventTag: Whether this entity should override the
6191	// inherited default click-through event tag with its own defined value.
6192	OverrideInheritedEventTag bool `json:"overrideInheritedEventTag,omitempty"`
6193
6194	// ForceSendFields is a list of field names (e.g.
6195	// "DefaultClickThroughEventTagId") to unconditionally include in API
6196	// requests. By default, fields with empty values are omitted from API
6197	// requests. However, any non-pointer, non-interface field appearing in
6198	// ForceSendFields will be sent to the server regardless of whether the
6199	// field is empty or not. This may be used to include empty fields in
6200	// Patch requests.
6201	ForceSendFields []string `json:"-"`
6202
6203	// NullFields is a list of field names (e.g.
6204	// "DefaultClickThroughEventTagId") to include in API requests with the
6205	// JSON null value. By default, fields with empty values are omitted
6206	// from API requests. However, any field with an empty value appearing
6207	// in NullFields will be sent to the server as null. It is an error if a
6208	// field in this list has a non-empty value. This may be used to include
6209	// null fields in Patch requests.
6210	NullFields []string `json:"-"`
6211}
6212
6213func (s *DefaultClickThroughEventTagProperties) MarshalJSON() ([]byte, error) {
6214	type NoMethod DefaultClickThroughEventTagProperties
6215	raw := NoMethod(*s)
6216	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6217}
6218
6219// DeliverySchedule: Delivery Schedule.
6220type DeliverySchedule struct {
6221	// FrequencyCap: Limit on the number of times an individual user can be
6222	// served the ad within a specified period of time.
6223	FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
6224
6225	// HardCutoff: Whether or not hard cutoff is enabled. If true, the ad
6226	// will not serve after the end date and time. Otherwise the ad will
6227	// continue to be served until it has reached its delivery goals.
6228	HardCutoff bool `json:"hardCutoff,omitempty"`
6229
6230	// ImpressionRatio: Impression ratio for this ad. This ratio determines
6231	// how often each ad is served relative to the others. For example, if
6232	// ad A has an impression ratio of 1 and ad B has an impression ratio of
6233	// 3, then Campaign Manager will serve ad B three times as often as ad
6234	// A. Acceptable values are 1 to 10, inclusive.
6235	ImpressionRatio int64 `json:"impressionRatio,omitempty,string"`
6236
6237	// Priority: Serving priority of an ad, with respect to other ads. The
6238	// lower the priority number, the greater the priority with which it is
6239	// served.
6240	//
6241	// Possible values:
6242	//   "AD_PRIORITY_01"
6243	//   "AD_PRIORITY_02"
6244	//   "AD_PRIORITY_03"
6245	//   "AD_PRIORITY_04"
6246	//   "AD_PRIORITY_05"
6247	//   "AD_PRIORITY_06"
6248	//   "AD_PRIORITY_07"
6249	//   "AD_PRIORITY_08"
6250	//   "AD_PRIORITY_09"
6251	//   "AD_PRIORITY_10"
6252	//   "AD_PRIORITY_11"
6253	//   "AD_PRIORITY_12"
6254	//   "AD_PRIORITY_13"
6255	//   "AD_PRIORITY_14"
6256	//   "AD_PRIORITY_15"
6257	//   "AD_PRIORITY_16"
6258	Priority string `json:"priority,omitempty"`
6259
6260	// ForceSendFields is a list of field names (e.g. "FrequencyCap") to
6261	// unconditionally include in API requests. By default, fields with
6262	// empty values are omitted from API requests. However, any non-pointer,
6263	// non-interface field appearing in ForceSendFields will be sent to the
6264	// server regardless of whether the field is empty or not. This may be
6265	// used to include empty fields in Patch requests.
6266	ForceSendFields []string `json:"-"`
6267
6268	// NullFields is a list of field names (e.g. "FrequencyCap") to include
6269	// in API requests with the JSON null value. By default, fields with
6270	// empty values are omitted from API requests. However, any field with
6271	// an empty value appearing in NullFields will be sent to the server as
6272	// null. It is an error if a field in this list has a non-empty value.
6273	// This may be used to include null fields in Patch requests.
6274	NullFields []string `json:"-"`
6275}
6276
6277func (s *DeliverySchedule) MarshalJSON() ([]byte, error) {
6278	type NoMethod DeliverySchedule
6279	raw := NoMethod(*s)
6280	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6281}
6282
6283// DfpSettings: Google Ad Manager Settings
6284type DfpSettings struct {
6285	// DfpNetworkCode: Ad Manager network code for this directory site.
6286	DfpNetworkCode string `json:"dfpNetworkCode,omitempty"`
6287
6288	// DfpNetworkName: Ad Manager network name for this directory site.
6289	DfpNetworkName string `json:"dfpNetworkName,omitempty"`
6290
6291	// ProgrammaticPlacementAccepted: Whether this directory site accepts
6292	// programmatic placements.
6293	ProgrammaticPlacementAccepted bool `json:"programmaticPlacementAccepted,omitempty"`
6294
6295	// PubPaidPlacementAccepted: Whether this directory site accepts
6296	// publisher-paid tags.
6297	PubPaidPlacementAccepted bool `json:"pubPaidPlacementAccepted,omitempty"`
6298
6299	// PublisherPortalOnly: Whether this directory site is available only
6300	// via Publisher Portal.
6301	PublisherPortalOnly bool `json:"publisherPortalOnly,omitempty"`
6302
6303	// ForceSendFields is a list of field names (e.g. "DfpNetworkCode") to
6304	// unconditionally include in API requests. By default, fields with
6305	// empty values are omitted from API requests. However, any non-pointer,
6306	// non-interface field appearing in ForceSendFields will be sent to the
6307	// server regardless of whether the field is empty or not. This may be
6308	// used to include empty fields in Patch requests.
6309	ForceSendFields []string `json:"-"`
6310
6311	// NullFields is a list of field names (e.g. "DfpNetworkCode") to
6312	// include in API requests with the JSON null value. By default, fields
6313	// with empty values are omitted from API requests. However, any field
6314	// with an empty value appearing in NullFields will be sent to the
6315	// server as null. It is an error if a field in this list has a
6316	// non-empty value. This may be used to include null fields in Patch
6317	// requests.
6318	NullFields []string `json:"-"`
6319}
6320
6321func (s *DfpSettings) MarshalJSON() ([]byte, error) {
6322	type NoMethod DfpSettings
6323	raw := NoMethod(*s)
6324	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6325}
6326
6327// Dimension: Represents a dimension.
6328type Dimension struct {
6329	// Kind: The kind of resource this is, in this case
6330	// dfareporting#dimension.
6331	Kind string `json:"kind,omitempty"`
6332
6333	// Name: The dimension name, e.g. dfa:advertiser
6334	Name string `json:"name,omitempty"`
6335
6336	// ForceSendFields is a list of field names (e.g. "Kind") to
6337	// unconditionally include in API requests. By default, fields with
6338	// empty values are omitted from API requests. However, any non-pointer,
6339	// non-interface field appearing in ForceSendFields will be sent to the
6340	// server regardless of whether the field is empty or not. This may be
6341	// used to include empty fields in Patch requests.
6342	ForceSendFields []string `json:"-"`
6343
6344	// NullFields is a list of field names (e.g. "Kind") to include in API
6345	// requests with the JSON null value. By default, fields with empty
6346	// values are omitted from API requests. However, any field with an
6347	// empty value appearing in NullFields will be sent to the server as
6348	// null. It is an error if a field in this list has a non-empty value.
6349	// This may be used to include null fields in Patch requests.
6350	NullFields []string `json:"-"`
6351}
6352
6353func (s *Dimension) MarshalJSON() ([]byte, error) {
6354	type NoMethod Dimension
6355	raw := NoMethod(*s)
6356	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6357}
6358
6359// DimensionFilter: Represents a dimension filter.
6360type DimensionFilter struct {
6361	// DimensionName: The name of the dimension to filter.
6362	DimensionName string `json:"dimensionName,omitempty"`
6363
6364	// Kind: The kind of resource this is, in this case
6365	// dfareporting#dimensionFilter.
6366	Kind string `json:"kind,omitempty"`
6367
6368	// Value: The value of the dimension to filter.
6369	Value string `json:"value,omitempty"`
6370
6371	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6372	// unconditionally include in API requests. By default, fields with
6373	// empty values are omitted from API requests. However, any non-pointer,
6374	// non-interface field appearing in ForceSendFields will be sent to the
6375	// server regardless of whether the field is empty or not. This may be
6376	// used to include empty fields in Patch requests.
6377	ForceSendFields []string `json:"-"`
6378
6379	// NullFields is a list of field names (e.g. "DimensionName") to include
6380	// in API requests with the JSON null value. By default, fields with
6381	// empty values are omitted from API requests. However, any field with
6382	// an empty value appearing in NullFields will be sent to the server as
6383	// null. It is an error if a field in this list has a non-empty value.
6384	// This may be used to include null fields in Patch requests.
6385	NullFields []string `json:"-"`
6386}
6387
6388func (s *DimensionFilter) MarshalJSON() ([]byte, error) {
6389	type NoMethod DimensionFilter
6390	raw := NoMethod(*s)
6391	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6392}
6393
6394// DimensionValue: Represents a DimensionValue resource.
6395type DimensionValue struct {
6396	// DimensionName: The name of the dimension.
6397	DimensionName string `json:"dimensionName,omitempty"`
6398
6399	// Etag: The eTag of this response for caching purposes.
6400	Etag string `json:"etag,omitempty"`
6401
6402	// Id: The ID associated with the value if available.
6403	Id string `json:"id,omitempty"`
6404
6405	// Kind: The kind of resource this is, in this case
6406	// dfareporting#dimensionValue.
6407	Kind string `json:"kind,omitempty"`
6408
6409	// MatchType: Determines how the 'value' field is matched when
6410	// filtering. If not specified, defaults to EXACT. If set to
6411	// WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable
6412	// length character sequences, and it can be escaped with a backslash.
6413	// Note, only paid search dimensions ('dfa:paidSearch*') allow a
6414	// matchType other than EXACT.
6415	//
6416	// Possible values:
6417	//   "BEGINS_WITH"
6418	//   "CONTAINS"
6419	//   "EXACT"
6420	//   "WILDCARD_EXPRESSION"
6421	MatchType string `json:"matchType,omitempty"`
6422
6423	// Value: The value of the dimension.
6424	Value string `json:"value,omitempty"`
6425
6426	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6427	// unconditionally include in API requests. By default, fields with
6428	// empty values are omitted from API requests. However, any non-pointer,
6429	// non-interface field appearing in ForceSendFields will be sent to the
6430	// server regardless of whether the field is empty or not. This may be
6431	// used to include empty fields in Patch requests.
6432	ForceSendFields []string `json:"-"`
6433
6434	// NullFields is a list of field names (e.g. "DimensionName") to include
6435	// in API requests with the JSON null value. By default, fields with
6436	// empty values are omitted from API requests. However, any field with
6437	// an empty value appearing in NullFields will be sent to the server as
6438	// null. It is an error if a field in this list has a non-empty value.
6439	// This may be used to include null fields in Patch requests.
6440	NullFields []string `json:"-"`
6441}
6442
6443func (s *DimensionValue) MarshalJSON() ([]byte, error) {
6444	type NoMethod DimensionValue
6445	raw := NoMethod(*s)
6446	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6447}
6448
6449// DimensionValueList: Represents the list of DimensionValue resources.
6450type DimensionValueList struct {
6451	// Etag: The eTag of this response for caching purposes.
6452	Etag string `json:"etag,omitempty"`
6453
6454	// Items: The dimension values returned in this response.
6455	Items []*DimensionValue `json:"items,omitempty"`
6456
6457	// Kind: The kind of list this is, in this case
6458	// dfareporting#dimensionValueList.
6459	Kind string `json:"kind,omitempty"`
6460
6461	// NextPageToken: Continuation token used to page through dimension
6462	// values. To retrieve the next page of results, set the next request's
6463	// "pageToken" to the value of this field. The page token is only valid
6464	// for a limited amount of time and should not be persisted.
6465	NextPageToken string `json:"nextPageToken,omitempty"`
6466
6467	// ServerResponse contains the HTTP response code and headers from the
6468	// server.
6469	googleapi.ServerResponse `json:"-"`
6470
6471	// ForceSendFields is a list of field names (e.g. "Etag") to
6472	// unconditionally include in API requests. By default, fields with
6473	// empty values are omitted from API requests. However, any non-pointer,
6474	// non-interface field appearing in ForceSendFields will be sent to the
6475	// server regardless of whether the field is empty or not. This may be
6476	// used to include empty fields in Patch requests.
6477	ForceSendFields []string `json:"-"`
6478
6479	// NullFields is a list of field names (e.g. "Etag") to include in API
6480	// requests with the JSON null value. By default, fields with empty
6481	// values are omitted from API requests. However, any field with an
6482	// empty value appearing in NullFields will be sent to the server as
6483	// null. It is an error if a field in this list has a non-empty value.
6484	// This may be used to include null fields in Patch requests.
6485	NullFields []string `json:"-"`
6486}
6487
6488func (s *DimensionValueList) MarshalJSON() ([]byte, error) {
6489	type NoMethod DimensionValueList
6490	raw := NoMethod(*s)
6491	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6492}
6493
6494// DimensionValueRequest: Represents a DimensionValuesRequest.
6495type DimensionValueRequest struct {
6496	// DimensionName: The name of the dimension for which values should be
6497	// requested.
6498	DimensionName string `json:"dimensionName,omitempty"`
6499
6500	// EndDate: The end date of the date range for which to retrieve
6501	// dimension values. A string of the format "yyyy-MM-dd".
6502	EndDate string `json:"endDate,omitempty"`
6503
6504	// Filters: The list of filters by which to filter values. The filters
6505	// are ANDed.
6506	Filters []*DimensionFilter `json:"filters,omitempty"`
6507
6508	// Kind: The kind of request this is, in this case
6509	// dfareporting#dimensionValueRequest.
6510	Kind string `json:"kind,omitempty"`
6511
6512	// StartDate: The start date of the date range for which to retrieve
6513	// dimension values. A string of the format "yyyy-MM-dd".
6514	StartDate string `json:"startDate,omitempty"`
6515
6516	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6517	// unconditionally include in API requests. By default, fields with
6518	// empty values are omitted from API requests. However, any non-pointer,
6519	// non-interface field appearing in ForceSendFields will be sent to the
6520	// server regardless of whether the field is empty or not. This may be
6521	// used to include empty fields in Patch requests.
6522	ForceSendFields []string `json:"-"`
6523
6524	// NullFields is a list of field names (e.g. "DimensionName") to include
6525	// in API requests with the JSON null value. By default, fields with
6526	// empty values are omitted from API requests. However, any field with
6527	// an empty value appearing in NullFields will be sent to the server as
6528	// null. It is an error if a field in this list has a non-empty value.
6529	// This may be used to include null fields in Patch requests.
6530	NullFields []string `json:"-"`
6531}
6532
6533func (s *DimensionValueRequest) MarshalJSON() ([]byte, error) {
6534	type NoMethod DimensionValueRequest
6535	raw := NoMethod(*s)
6536	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6537}
6538
6539// DirectorySite: DirectorySites contains properties of a website from
6540// the Site Directory. Sites need to be added to an account via the
6541// Sites resource before they can be assigned to a placement.
6542type DirectorySite struct {
6543	// Active: Whether this directory site is active.
6544	Active bool `json:"active,omitempty"`
6545
6546	// Id: ID of this directory site. This is a read-only, auto-generated
6547	// field.
6548	Id int64 `json:"id,omitempty,string"`
6549
6550	// IdDimensionValue: Dimension value for the ID of this directory site.
6551	// This is a read-only, auto-generated field.
6552	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
6553
6554	// InpageTagFormats: Tag types for regular placements.
6555	//
6556	// Acceptable values are:
6557	// - "STANDARD"
6558	// - "IFRAME_JAVASCRIPT_INPAGE"
6559	// - "INTERNAL_REDIRECT_INPAGE"
6560	// - "JAVASCRIPT_INPAGE"
6561	//
6562	// Possible values:
6563	//   "IFRAME_JAVASCRIPT_INPAGE"
6564	//   "INTERNAL_REDIRECT_INPAGE"
6565	//   "JAVASCRIPT_INPAGE"
6566	//   "STANDARD"
6567	InpageTagFormats []string `json:"inpageTagFormats,omitempty"`
6568
6569	// InterstitialTagFormats: Tag types for interstitial
6570	// placements.
6571	//
6572	// Acceptable values are:
6573	// - "IFRAME_JAVASCRIPT_INTERSTITIAL"
6574	// - "INTERNAL_REDIRECT_INTERSTITIAL"
6575	// - "JAVASCRIPT_INTERSTITIAL"
6576	//
6577	// Possible values:
6578	//   "IFRAME_JAVASCRIPT_INTERSTITIAL"
6579	//   "INTERNAL_REDIRECT_INTERSTITIAL"
6580	//   "JAVASCRIPT_INTERSTITIAL"
6581	InterstitialTagFormats []string `json:"interstitialTagFormats,omitempty"`
6582
6583	// Kind: Identifies what kind of resource this is. Value: the fixed
6584	// string "dfareporting#directorySite".
6585	Kind string `json:"kind,omitempty"`
6586
6587	// Name: Name of this directory site.
6588	Name string `json:"name,omitempty"`
6589
6590	// Settings: Directory site settings.
6591	Settings *DirectorySiteSettings `json:"settings,omitempty"`
6592
6593	// Url: URL of this directory site.
6594	Url string `json:"url,omitempty"`
6595
6596	// ServerResponse contains the HTTP response code and headers from the
6597	// server.
6598	googleapi.ServerResponse `json:"-"`
6599
6600	// ForceSendFields is a list of field names (e.g. "Active") to
6601	// unconditionally include in API requests. By default, fields with
6602	// empty values are omitted from API requests. However, any non-pointer,
6603	// non-interface field appearing in ForceSendFields will be sent to the
6604	// server regardless of whether the field is empty or not. This may be
6605	// used to include empty fields in Patch requests.
6606	ForceSendFields []string `json:"-"`
6607
6608	// NullFields is a list of field names (e.g. "Active") to include in API
6609	// requests with the JSON null value. By default, fields with empty
6610	// values are omitted from API requests. However, any field with an
6611	// empty value appearing in NullFields will be sent to the server as
6612	// null. It is an error if a field in this list has a non-empty value.
6613	// This may be used to include null fields in Patch requests.
6614	NullFields []string `json:"-"`
6615}
6616
6617func (s *DirectorySite) MarshalJSON() ([]byte, error) {
6618	type NoMethod DirectorySite
6619	raw := NoMethod(*s)
6620	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6621}
6622
6623// DirectorySiteSettings: Directory Site Settings
6624type DirectorySiteSettings struct {
6625	// ActiveViewOptOut: Whether this directory site has disabled active
6626	// view creatives.
6627	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
6628
6629	// DfpSettings: Directory site Ad Manager settings.
6630	DfpSettings *DfpSettings `json:"dfpSettings,omitempty"`
6631
6632	// InstreamVideoPlacementAccepted: Whether this site accepts in-stream
6633	// video ads.
6634	InstreamVideoPlacementAccepted bool `json:"instreamVideoPlacementAccepted,omitempty"`
6635
6636	// InterstitialPlacementAccepted: Whether this site accepts interstitial
6637	// ads.
6638	InterstitialPlacementAccepted bool `json:"interstitialPlacementAccepted,omitempty"`
6639
6640	// ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to
6641	// unconditionally include in API requests. By default, fields with
6642	// empty values are omitted from API requests. However, any non-pointer,
6643	// non-interface field appearing in ForceSendFields will be sent to the
6644	// server regardless of whether the field is empty or not. This may be
6645	// used to include empty fields in Patch requests.
6646	ForceSendFields []string `json:"-"`
6647
6648	// NullFields is a list of field names (e.g. "ActiveViewOptOut") to
6649	// include in API requests with the JSON null value. By default, fields
6650	// with empty values are omitted from API requests. However, any field
6651	// with an empty value appearing in NullFields will be sent to the
6652	// server as null. It is an error if a field in this list has a
6653	// non-empty value. This may be used to include null fields in Patch
6654	// requests.
6655	NullFields []string `json:"-"`
6656}
6657
6658func (s *DirectorySiteSettings) MarshalJSON() ([]byte, error) {
6659	type NoMethod DirectorySiteSettings
6660	raw := NoMethod(*s)
6661	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6662}
6663
6664// DirectorySitesListResponse: Directory Site List Response
6665type DirectorySitesListResponse struct {
6666	// DirectorySites: Directory site collection.
6667	DirectorySites []*DirectorySite `json:"directorySites,omitempty"`
6668
6669	// Kind: Identifies what kind of resource this is. Value: the fixed
6670	// string "dfareporting#directorySitesListResponse".
6671	Kind string `json:"kind,omitempty"`
6672
6673	// NextPageToken: Pagination token to be used for the next list
6674	// operation.
6675	NextPageToken string `json:"nextPageToken,omitempty"`
6676
6677	// ServerResponse contains the HTTP response code and headers from the
6678	// server.
6679	googleapi.ServerResponse `json:"-"`
6680
6681	// ForceSendFields is a list of field names (e.g. "DirectorySites") to
6682	// unconditionally include in API requests. By default, fields with
6683	// empty values are omitted from API requests. However, any non-pointer,
6684	// non-interface field appearing in ForceSendFields will be sent to the
6685	// server regardless of whether the field is empty or not. This may be
6686	// used to include empty fields in Patch requests.
6687	ForceSendFields []string `json:"-"`
6688
6689	// NullFields is a list of field names (e.g. "DirectorySites") to
6690	// include in API requests with the JSON null value. By default, fields
6691	// with empty values are omitted from API requests. However, any field
6692	// with an empty value appearing in NullFields will be sent to the
6693	// server as null. It is an error if a field in this list has a
6694	// non-empty value. This may be used to include null fields in Patch
6695	// requests.
6696	NullFields []string `json:"-"`
6697}
6698
6699func (s *DirectorySitesListResponse) MarshalJSON() ([]byte, error) {
6700	type NoMethod DirectorySitesListResponse
6701	raw := NoMethod(*s)
6702	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6703}
6704
6705// DynamicTargetingKey: Contains properties of a dynamic targeting key.
6706// Dynamic targeting keys are unique, user-friendly labels, created at
6707// the advertiser level in DCM, that can be assigned to ads, creatives,
6708// and placements and used for targeting with Studio dynamic creatives.
6709// Use these labels instead of numeric Campaign Manager IDs (such as
6710// placement IDs) to save time and avoid errors in your dynamic feeds.
6711type DynamicTargetingKey struct {
6712	// Kind: Identifies what kind of resource this is. Value: the fixed
6713	// string "dfareporting#dynamicTargetingKey".
6714	Kind string `json:"kind,omitempty"`
6715
6716	// Name: Name of this dynamic targeting key. This is a required field.
6717	// Must be less than 256 characters long and cannot contain commas. All
6718	// characters are converted to lowercase.
6719	Name string `json:"name,omitempty"`
6720
6721	// ObjectId: ID of the object of this dynamic targeting key. This is a
6722	// required field.
6723	ObjectId int64 `json:"objectId,omitempty,string"`
6724
6725	// ObjectType: Type of the object of this dynamic targeting key. This is
6726	// a required field.
6727	//
6728	// Possible values:
6729	//   "OBJECT_AD"
6730	//   "OBJECT_ADVERTISER"
6731	//   "OBJECT_CREATIVE"
6732	//   "OBJECT_PLACEMENT"
6733	ObjectType string `json:"objectType,omitempty"`
6734
6735	// ServerResponse contains the HTTP response code and headers from the
6736	// server.
6737	googleapi.ServerResponse `json:"-"`
6738
6739	// ForceSendFields is a list of field names (e.g. "Kind") to
6740	// unconditionally include in API requests. By default, fields with
6741	// empty values are omitted from API requests. However, any non-pointer,
6742	// non-interface field appearing in ForceSendFields will be sent to the
6743	// server regardless of whether the field is empty or not. This may be
6744	// used to include empty fields in Patch requests.
6745	ForceSendFields []string `json:"-"`
6746
6747	// NullFields is a list of field names (e.g. "Kind") to include in API
6748	// requests with the JSON null value. By default, fields with empty
6749	// values are omitted from API requests. However, any field with an
6750	// empty value appearing in NullFields will be sent to the server as
6751	// null. It is an error if a field in this list has a non-empty value.
6752	// This may be used to include null fields in Patch requests.
6753	NullFields []string `json:"-"`
6754}
6755
6756func (s *DynamicTargetingKey) MarshalJSON() ([]byte, error) {
6757	type NoMethod DynamicTargetingKey
6758	raw := NoMethod(*s)
6759	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6760}
6761
6762// DynamicTargetingKeysListResponse: Dynamic Targeting Key List Response
6763type DynamicTargetingKeysListResponse struct {
6764	// DynamicTargetingKeys: Dynamic targeting key collection.
6765	DynamicTargetingKeys []*DynamicTargetingKey `json:"dynamicTargetingKeys,omitempty"`
6766
6767	// Kind: Identifies what kind of resource this is. Value: the fixed
6768	// string "dfareporting#dynamicTargetingKeysListResponse".
6769	Kind string `json:"kind,omitempty"`
6770
6771	// ServerResponse contains the HTTP response code and headers from the
6772	// server.
6773	googleapi.ServerResponse `json:"-"`
6774
6775	// ForceSendFields is a list of field names (e.g.
6776	// "DynamicTargetingKeys") to unconditionally include in API requests.
6777	// By default, fields with empty values are omitted from API requests.
6778	// However, any non-pointer, non-interface field appearing in
6779	// ForceSendFields will be sent to the server regardless of whether the
6780	// field is empty or not. This may be used to include empty fields in
6781	// Patch requests.
6782	ForceSendFields []string `json:"-"`
6783
6784	// NullFields is a list of field names (e.g. "DynamicTargetingKeys") to
6785	// include in API requests with the JSON null value. By default, fields
6786	// with empty values are omitted from API requests. However, any field
6787	// with an empty value appearing in NullFields will be sent to the
6788	// server as null. It is an error if a field in this list has a
6789	// non-empty value. This may be used to include null fields in Patch
6790	// requests.
6791	NullFields []string `json:"-"`
6792}
6793
6794func (s *DynamicTargetingKeysListResponse) MarshalJSON() ([]byte, error) {
6795	type NoMethod DynamicTargetingKeysListResponse
6796	raw := NoMethod(*s)
6797	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6798}
6799
6800// EncryptionInfo: A description of how user IDs are encrypted.
6801type EncryptionInfo struct {
6802	// EncryptionEntityId: The encryption entity ID. This should match the
6803	// encryption configuration for ad serving or Data Transfer.
6804	EncryptionEntityId int64 `json:"encryptionEntityId,omitempty,string"`
6805
6806	// EncryptionEntityType: The encryption entity type. This should match
6807	// the encryption configuration for ad serving or Data Transfer.
6808	//
6809	// Possible values:
6810	//   "ADWORDS_CUSTOMER"
6811	//   "DBM_ADVERTISER"
6812	//   "DBM_PARTNER"
6813	//   "DCM_ACCOUNT"
6814	//   "DCM_ADVERTISER"
6815	//   "DFP_NETWORK_CODE"
6816	//   "ENCRYPTION_ENTITY_TYPE_UNKNOWN"
6817	EncryptionEntityType string `json:"encryptionEntityType,omitempty"`
6818
6819	// EncryptionSource: Describes whether the encrypted cookie was received
6820	// from ad serving (the %m macro) or from Data Transfer.
6821	//
6822	// Possible values:
6823	//   "AD_SERVING"
6824	//   "DATA_TRANSFER"
6825	//   "ENCRYPTION_SCOPE_UNKNOWN"
6826	EncryptionSource string `json:"encryptionSource,omitempty"`
6827
6828	// Kind: Identifies what kind of resource this is. Value: the fixed
6829	// string "dfareporting#encryptionInfo".
6830	Kind string `json:"kind,omitempty"`
6831
6832	// ForceSendFields is a list of field names (e.g. "EncryptionEntityId")
6833	// to unconditionally include in API requests. By default, fields with
6834	// empty values are omitted from API requests. However, any non-pointer,
6835	// non-interface field appearing in ForceSendFields will be sent to the
6836	// server regardless of whether the field is empty or not. This may be
6837	// used to include empty fields in Patch requests.
6838	ForceSendFields []string `json:"-"`
6839
6840	// NullFields is a list of field names (e.g. "EncryptionEntityId") to
6841	// include in API requests with the JSON null value. By default, fields
6842	// with empty values are omitted from API requests. However, any field
6843	// with an empty value appearing in NullFields will be sent to the
6844	// server as null. It is an error if a field in this list has a
6845	// non-empty value. This may be used to include null fields in Patch
6846	// requests.
6847	NullFields []string `json:"-"`
6848}
6849
6850func (s *EncryptionInfo) MarshalJSON() ([]byte, error) {
6851	type NoMethod EncryptionInfo
6852	raw := NoMethod(*s)
6853	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6854}
6855
6856// EventTag: Contains properties of an event tag.
6857type EventTag struct {
6858	// AccountId: Account ID of this event tag. This is a read-only field
6859	// that can be left blank.
6860	AccountId int64 `json:"accountId,omitempty,string"`
6861
6862	// AdvertiserId: Advertiser ID of this event tag. This field or the
6863	// campaignId field is required on insertion.
6864	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
6865
6866	// AdvertiserIdDimensionValue: Dimension value for the ID of the
6867	// advertiser. This is a read-only, auto-generated field.
6868	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
6869
6870	// CampaignId: Campaign ID of this event tag. This field or the
6871	// advertiserId field is required on insertion.
6872	CampaignId int64 `json:"campaignId,omitempty,string"`
6873
6874	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
6875	// This is a read-only, auto-generated field.
6876	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
6877
6878	// EnabledByDefault: Whether this event tag should be automatically
6879	// enabled for all of the advertiser's campaigns and ads.
6880	EnabledByDefault bool `json:"enabledByDefault,omitempty"`
6881
6882	// ExcludeFromAdxRequests: Whether to remove this event tag from ads
6883	// that are trafficked through Display & Video 360 to Ad Exchange. This
6884	// may be useful if the event tag uses a pixel that is unapproved for Ad
6885	// Exchange bids on one or more networks, such as the Google Display
6886	// Network.
6887	ExcludeFromAdxRequests bool `json:"excludeFromAdxRequests,omitempty"`
6888
6889	// Id: ID of this event tag. This is a read-only, auto-generated field.
6890	Id int64 `json:"id,omitempty,string"`
6891
6892	// Kind: Identifies what kind of resource this is. Value: the fixed
6893	// string "dfareporting#eventTag".
6894	Kind string `json:"kind,omitempty"`
6895
6896	// Name: Name of this event tag. This is a required field and must be
6897	// less than 256 characters long.
6898	Name string `json:"name,omitempty"`
6899
6900	// SiteFilterType: Site filter type for this event tag. If no type is
6901	// specified then the event tag will be applied to all sites.
6902	//
6903	// Possible values:
6904	//   "BLACKLIST"
6905	//   "WHITELIST"
6906	SiteFilterType string `json:"siteFilterType,omitempty"`
6907
6908	// SiteIds: Filter list of site IDs associated with this event tag. The
6909	// siteFilterType determines whether this is a whitelist or blacklist
6910	// filter.
6911	SiteIds googleapi.Int64s `json:"siteIds,omitempty"`
6912
6913	// SslCompliant: Whether this tag is SSL-compliant or not. This is a
6914	// read-only field.
6915	SslCompliant bool `json:"sslCompliant,omitempty"`
6916
6917	// Status: Status of this event tag. Must be ENABLED for this event tag
6918	// to fire. This is a required field.
6919	//
6920	// Possible values:
6921	//   "DISABLED"
6922	//   "ENABLED"
6923	Status string `json:"status,omitempty"`
6924
6925	// SubaccountId: Subaccount ID of this event tag. This is a read-only
6926	// field that can be left blank.
6927	SubaccountId int64 `json:"subaccountId,omitempty,string"`
6928
6929	// Type: Event tag type. Can be used to specify whether to use a
6930	// third-party pixel, a third-party JavaScript URL, or a third-party
6931	// click-through URL for either impression or click tracking. This is a
6932	// required field.
6933	//
6934	// Possible values:
6935	//   "CLICK_THROUGH_EVENT_TAG"
6936	//   "IMPRESSION_IMAGE_EVENT_TAG"
6937	//   "IMPRESSION_JAVASCRIPT_EVENT_TAG"
6938	Type string `json:"type,omitempty"`
6939
6940	// Url: Payload URL for this event tag. The URL on a click-through event
6941	// tag should have a landing page URL appended to the end of it. This
6942	// field is required on insertion.
6943	Url string `json:"url,omitempty"`
6944
6945	// UrlEscapeLevels: Number of times the landing page URL should be
6946	// URL-escaped before being appended to the click-through event tag URL.
6947	// Only applies to click-through event tags as specified by the event
6948	// tag type.
6949	UrlEscapeLevels int64 `json:"urlEscapeLevels,omitempty"`
6950
6951	// ServerResponse contains the HTTP response code and headers from the
6952	// server.
6953	googleapi.ServerResponse `json:"-"`
6954
6955	// ForceSendFields is a list of field names (e.g. "AccountId") to
6956	// unconditionally include in API requests. By default, fields with
6957	// empty values are omitted from API requests. However, any non-pointer,
6958	// non-interface field appearing in ForceSendFields will be sent to the
6959	// server regardless of whether the field is empty or not. This may be
6960	// used to include empty fields in Patch requests.
6961	ForceSendFields []string `json:"-"`
6962
6963	// NullFields is a list of field names (e.g. "AccountId") to include in
6964	// API requests with the JSON null value. By default, fields with empty
6965	// values are omitted from API requests. However, any field with an
6966	// empty value appearing in NullFields will be sent to the server as
6967	// null. It is an error if a field in this list has a non-empty value.
6968	// This may be used to include null fields in Patch requests.
6969	NullFields []string `json:"-"`
6970}
6971
6972func (s *EventTag) MarshalJSON() ([]byte, error) {
6973	type NoMethod EventTag
6974	raw := NoMethod(*s)
6975	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6976}
6977
6978// EventTagOverride: Event tag override information.
6979type EventTagOverride struct {
6980	// Enabled: Whether this override is enabled.
6981	Enabled bool `json:"enabled,omitempty"`
6982
6983	// Id: ID of this event tag override. This is a read-only,
6984	// auto-generated field.
6985	Id int64 `json:"id,omitempty,string"`
6986
6987	// ForceSendFields is a list of field names (e.g. "Enabled") to
6988	// unconditionally include in API requests. By default, fields with
6989	// empty values are omitted from API requests. However, any non-pointer,
6990	// non-interface field appearing in ForceSendFields will be sent to the
6991	// server regardless of whether the field is empty or not. This may be
6992	// used to include empty fields in Patch requests.
6993	ForceSendFields []string `json:"-"`
6994
6995	// NullFields is a list of field names (e.g. "Enabled") to include in
6996	// API requests with the JSON null value. By default, fields with empty
6997	// values are omitted from API requests. However, any field with an
6998	// empty value appearing in NullFields will be sent to the server as
6999	// null. It is an error if a field in this list has a non-empty value.
7000	// This may be used to include null fields in Patch requests.
7001	NullFields []string `json:"-"`
7002}
7003
7004func (s *EventTagOverride) MarshalJSON() ([]byte, error) {
7005	type NoMethod EventTagOverride
7006	raw := NoMethod(*s)
7007	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7008}
7009
7010// EventTagsListResponse: Event Tag List Response
7011type EventTagsListResponse struct {
7012	// EventTags: Event tag collection.
7013	EventTags []*EventTag `json:"eventTags,omitempty"`
7014
7015	// Kind: Identifies what kind of resource this is. Value: the fixed
7016	// string "dfareporting#eventTagsListResponse".
7017	Kind string `json:"kind,omitempty"`
7018
7019	// ServerResponse contains the HTTP response code and headers from the
7020	// server.
7021	googleapi.ServerResponse `json:"-"`
7022
7023	// ForceSendFields is a list of field names (e.g. "EventTags") to
7024	// unconditionally include in API requests. By default, fields with
7025	// empty values are omitted from API requests. However, any non-pointer,
7026	// non-interface field appearing in ForceSendFields will be sent to the
7027	// server regardless of whether the field is empty or not. This may be
7028	// used to include empty fields in Patch requests.
7029	ForceSendFields []string `json:"-"`
7030
7031	// NullFields is a list of field names (e.g. "EventTags") to include in
7032	// API requests with the JSON null value. By default, fields with empty
7033	// values are omitted from API requests. However, any field with an
7034	// empty value appearing in NullFields will be sent to the server as
7035	// null. It is an error if a field in this list has a non-empty value.
7036	// This may be used to include null fields in Patch requests.
7037	NullFields []string `json:"-"`
7038}
7039
7040func (s *EventTagsListResponse) MarshalJSON() ([]byte, error) {
7041	type NoMethod EventTagsListResponse
7042	raw := NoMethod(*s)
7043	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7044}
7045
7046// File: Represents a File resource. A file contains the metadata for a
7047// report run. It shows the status of the run and holds the URLs to the
7048// generated report data if the run is finished and the status is
7049// "REPORT_AVAILABLE".
7050type File struct {
7051	// DateRange: The date range for which the file has report data. The
7052	// date range will always be the absolute date range for which the
7053	// report is run.
7054	DateRange *DateRange `json:"dateRange,omitempty"`
7055
7056	// Etag: The eTag of this response for caching purposes.
7057	Etag string `json:"etag,omitempty"`
7058
7059	// FileName: The filename of the file.
7060	FileName string `json:"fileName,omitempty"`
7061
7062	// Format: The output format of the report. Only available once the file
7063	// is available.
7064	//
7065	// Possible values:
7066	//   "CSV"
7067	//   "EXCEL"
7068	Format string `json:"format,omitempty"`
7069
7070	// Id: The unique ID of this report file.
7071	Id int64 `json:"id,omitempty,string"`
7072
7073	// Kind: The kind of resource this is, in this case dfareporting#file.
7074	Kind string `json:"kind,omitempty"`
7075
7076	// LastModifiedTime: The timestamp in milliseconds since epoch when this
7077	// file was last modified.
7078	LastModifiedTime int64 `json:"lastModifiedTime,omitempty,string"`
7079
7080	// ReportId: The ID of the report this file was generated from.
7081	ReportId int64 `json:"reportId,omitempty,string"`
7082
7083	// Status: The status of the report file.
7084	//
7085	// Possible values:
7086	//   "CANCELLED"
7087	//   "FAILED"
7088	//   "PROCESSING"
7089	//   "REPORT_AVAILABLE"
7090	Status string `json:"status,omitempty"`
7091
7092	// Urls: The URLs where the completed report file can be downloaded.
7093	Urls *FileUrls `json:"urls,omitempty"`
7094
7095	// ServerResponse contains the HTTP response code and headers from the
7096	// server.
7097	googleapi.ServerResponse `json:"-"`
7098
7099	// ForceSendFields is a list of field names (e.g. "DateRange") to
7100	// unconditionally include in API requests. By default, fields with
7101	// empty values are omitted from API requests. However, any non-pointer,
7102	// non-interface field appearing in ForceSendFields will be sent to the
7103	// server regardless of whether the field is empty or not. This may be
7104	// used to include empty fields in Patch requests.
7105	ForceSendFields []string `json:"-"`
7106
7107	// NullFields is a list of field names (e.g. "DateRange") to include in
7108	// API requests with the JSON null value. By default, fields with empty
7109	// values are omitted from API requests. However, any field with an
7110	// empty value appearing in NullFields will be sent to the server as
7111	// null. It is an error if a field in this list has a non-empty value.
7112	// This may be used to include null fields in Patch requests.
7113	NullFields []string `json:"-"`
7114}
7115
7116func (s *File) MarshalJSON() ([]byte, error) {
7117	type NoMethod File
7118	raw := NoMethod(*s)
7119	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7120}
7121
7122// FileUrls: The URLs where the completed report file can be downloaded.
7123type FileUrls struct {
7124	// ApiUrl: The URL for downloading the report data through the API.
7125	ApiUrl string `json:"apiUrl,omitempty"`
7126
7127	// BrowserUrl: The URL for downloading the report data through a
7128	// browser.
7129	BrowserUrl string `json:"browserUrl,omitempty"`
7130
7131	// ForceSendFields is a list of field names (e.g. "ApiUrl") to
7132	// unconditionally include in API requests. By default, fields with
7133	// empty values are omitted from API requests. However, any non-pointer,
7134	// non-interface field appearing in ForceSendFields will be sent to the
7135	// server regardless of whether the field is empty or not. This may be
7136	// used to include empty fields in Patch requests.
7137	ForceSendFields []string `json:"-"`
7138
7139	// NullFields is a list of field names (e.g. "ApiUrl") to include in API
7140	// requests with the JSON null value. By default, fields with empty
7141	// values are omitted from API requests. However, any field with an
7142	// empty value appearing in NullFields will be sent to the server as
7143	// null. It is an error if a field in this list has a non-empty value.
7144	// This may be used to include null fields in Patch requests.
7145	NullFields []string `json:"-"`
7146}
7147
7148func (s *FileUrls) MarshalJSON() ([]byte, error) {
7149	type NoMethod FileUrls
7150	raw := NoMethod(*s)
7151	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7152}
7153
7154// FileList: Represents the list of File resources.
7155type FileList struct {
7156	// Etag: The eTag of this response for caching purposes.
7157	Etag string `json:"etag,omitempty"`
7158
7159	// Items: The files returned in this response.
7160	Items []*File `json:"items,omitempty"`
7161
7162	// Kind: The kind of list this is, in this case dfareporting#fileList.
7163	Kind string `json:"kind,omitempty"`
7164
7165	// NextPageToken: Continuation token used to page through files. To
7166	// retrieve the next page of results, set the next request's "pageToken"
7167	// to the value of this field. The page token is only valid for a
7168	// limited amount of time and should not be persisted.
7169	NextPageToken string `json:"nextPageToken,omitempty"`
7170
7171	// ServerResponse contains the HTTP response code and headers from the
7172	// server.
7173	googleapi.ServerResponse `json:"-"`
7174
7175	// ForceSendFields is a list of field names (e.g. "Etag") to
7176	// unconditionally include in API requests. By default, fields with
7177	// empty values are omitted from API requests. However, any non-pointer,
7178	// non-interface field appearing in ForceSendFields will be sent to the
7179	// server regardless of whether the field is empty or not. This may be
7180	// used to include empty fields in Patch requests.
7181	ForceSendFields []string `json:"-"`
7182
7183	// NullFields is a list of field names (e.g. "Etag") to include in API
7184	// requests with the JSON null value. By default, fields with empty
7185	// values are omitted from API requests. However, any field with an
7186	// empty value appearing in NullFields will be sent to the server as
7187	// null. It is an error if a field in this list has a non-empty value.
7188	// This may be used to include null fields in Patch requests.
7189	NullFields []string `json:"-"`
7190}
7191
7192func (s *FileList) MarshalJSON() ([]byte, error) {
7193	type NoMethod FileList
7194	raw := NoMethod(*s)
7195	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7196}
7197
7198// Flight: Flight
7199type Flight struct {
7200	// EndDate: Inventory item flight end date.
7201	EndDate string `json:"endDate,omitempty"`
7202
7203	// RateOrCost: Rate or cost of this flight.
7204	RateOrCost int64 `json:"rateOrCost,omitempty,string"`
7205
7206	// StartDate: Inventory item flight start date.
7207	StartDate string `json:"startDate,omitempty"`
7208
7209	// Units: Units of this flight.
7210	Units int64 `json:"units,omitempty,string"`
7211
7212	// ForceSendFields is a list of field names (e.g. "EndDate") to
7213	// unconditionally include in API requests. By default, fields with
7214	// empty values are omitted from API requests. However, any non-pointer,
7215	// non-interface field appearing in ForceSendFields will be sent to the
7216	// server regardless of whether the field is empty or not. This may be
7217	// used to include empty fields in Patch requests.
7218	ForceSendFields []string `json:"-"`
7219
7220	// NullFields is a list of field names (e.g. "EndDate") to include in
7221	// API requests with the JSON null value. By default, fields with empty
7222	// values are omitted from API requests. However, any field with an
7223	// empty value appearing in NullFields will be sent to the server as
7224	// null. It is an error if a field in this list has a non-empty value.
7225	// This may be used to include null fields in Patch requests.
7226	NullFields []string `json:"-"`
7227}
7228
7229func (s *Flight) MarshalJSON() ([]byte, error) {
7230	type NoMethod Flight
7231	raw := NoMethod(*s)
7232	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7233}
7234
7235// FloodlightActivitiesGenerateTagResponse: Floodlight Activity
7236// GenerateTag Response
7237type FloodlightActivitiesGenerateTagResponse struct {
7238	// FloodlightActivityTag: Generated tag for this Floodlight activity.
7239	// For global site tags, this is the event snippet.
7240	FloodlightActivityTag string `json:"floodlightActivityTag,omitempty"`
7241
7242	// GlobalSiteTagGlobalSnippet: The global snippet section of a global
7243	// site tag. The global site tag sets new cookies on your domain, which
7244	// will store a unique identifier for a user or the ad click that
7245	// brought the user to your site. Learn more.
7246	GlobalSiteTagGlobalSnippet string `json:"globalSiteTagGlobalSnippet,omitempty"`
7247
7248	// Kind: Identifies what kind of resource this is. Value: the fixed
7249	// string "dfareporting#floodlightActivitiesGenerateTagResponse".
7250	Kind string `json:"kind,omitempty"`
7251
7252	// ServerResponse contains the HTTP response code and headers from the
7253	// server.
7254	googleapi.ServerResponse `json:"-"`
7255
7256	// ForceSendFields is a list of field names (e.g.
7257	// "FloodlightActivityTag") to unconditionally include in API requests.
7258	// By default, fields with empty values are omitted from API requests.
7259	// However, any non-pointer, non-interface field appearing in
7260	// ForceSendFields will be sent to the server regardless of whether the
7261	// field is empty or not. This may be used to include empty fields in
7262	// Patch requests.
7263	ForceSendFields []string `json:"-"`
7264
7265	// NullFields is a list of field names (e.g. "FloodlightActivityTag") to
7266	// include in API requests with the JSON null value. By default, fields
7267	// with empty values are omitted from API requests. However, any field
7268	// with an empty value appearing in NullFields will be sent to the
7269	// server as null. It is an error if a field in this list has a
7270	// non-empty value. This may be used to include null fields in Patch
7271	// requests.
7272	NullFields []string `json:"-"`
7273}
7274
7275func (s *FloodlightActivitiesGenerateTagResponse) MarshalJSON() ([]byte, error) {
7276	type NoMethod FloodlightActivitiesGenerateTagResponse
7277	raw := NoMethod(*s)
7278	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7279}
7280
7281// FloodlightActivitiesListResponse: Floodlight Activity List Response
7282type FloodlightActivitiesListResponse struct {
7283	// FloodlightActivities: Floodlight activity collection.
7284	FloodlightActivities []*FloodlightActivity `json:"floodlightActivities,omitempty"`
7285
7286	// Kind: Identifies what kind of resource this is. Value: the fixed
7287	// string "dfareporting#floodlightActivitiesListResponse".
7288	Kind string `json:"kind,omitempty"`
7289
7290	// NextPageToken: Pagination token to be used for the next list
7291	// operation.
7292	NextPageToken string `json:"nextPageToken,omitempty"`
7293
7294	// ServerResponse contains the HTTP response code and headers from the
7295	// server.
7296	googleapi.ServerResponse `json:"-"`
7297
7298	// ForceSendFields is a list of field names (e.g.
7299	// "FloodlightActivities") to unconditionally include in API requests.
7300	// By default, fields with empty values are omitted from API requests.
7301	// However, any non-pointer, non-interface field appearing in
7302	// ForceSendFields will be sent to the server regardless of whether the
7303	// field is empty or not. This may be used to include empty fields in
7304	// Patch requests.
7305	ForceSendFields []string `json:"-"`
7306
7307	// NullFields is a list of field names (e.g. "FloodlightActivities") to
7308	// include in API requests with the JSON null value. By default, fields
7309	// with empty values are omitted from API requests. However, any field
7310	// with an empty value appearing in NullFields will be sent to the
7311	// server as null. It is an error if a field in this list has a
7312	// non-empty value. This may be used to include null fields in Patch
7313	// requests.
7314	NullFields []string `json:"-"`
7315}
7316
7317func (s *FloodlightActivitiesListResponse) MarshalJSON() ([]byte, error) {
7318	type NoMethod FloodlightActivitiesListResponse
7319	raw := NoMethod(*s)
7320	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7321}
7322
7323// FloodlightActivity: Contains properties of a Floodlight activity.
7324type FloodlightActivity struct {
7325	// AccountId: Account ID of this floodlight activity. This is a
7326	// read-only field that can be left blank.
7327	AccountId int64 `json:"accountId,omitempty,string"`
7328
7329	// AdvertiserId: Advertiser ID of this floodlight activity. If this
7330	// field is left blank, the value will be copied over either from the
7331	// activity group's advertiser or the existing activity's advertiser.
7332	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7333
7334	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7335	// advertiser. This is a read-only, auto-generated field.
7336	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7337
7338	// CacheBustingType: Code type used for cache busting in the generated
7339	// tag. Applicable only when floodlightActivityGroupType is COUNTER and
7340	// countingMethod is STANDARD_COUNTING or UNIQUE_COUNTING.
7341	//
7342	// Possible values:
7343	//   "ACTIVE_SERVER_PAGE"
7344	//   "COLD_FUSION"
7345	//   "JAVASCRIPT"
7346	//   "JSP"
7347	//   "PHP"
7348	CacheBustingType string `json:"cacheBustingType,omitempty"`
7349
7350	// CountingMethod: Counting method for conversions for this floodlight
7351	// activity. This is a required field.
7352	//
7353	// Possible values:
7354	//   "ITEMS_SOLD_COUNTING"
7355	//   "SESSION_COUNTING"
7356	//   "STANDARD_COUNTING"
7357	//   "TRANSACTIONS_COUNTING"
7358	//   "UNIQUE_COUNTING"
7359	CountingMethod string `json:"countingMethod,omitempty"`
7360
7361	// DefaultTags: Dynamic floodlight tags.
7362	DefaultTags []*FloodlightActivityDynamicTag `json:"defaultTags,omitempty"`
7363
7364	// ExpectedUrl: URL where this tag will be deployed. If specified, must
7365	// be less than 256 characters long.
7366	ExpectedUrl string `json:"expectedUrl,omitempty"`
7367
7368	// FloodlightActivityGroupId: Floodlight activity group ID of this
7369	// floodlight activity. This is a required field.
7370	FloodlightActivityGroupId int64 `json:"floodlightActivityGroupId,omitempty,string"`
7371
7372	// FloodlightActivityGroupName: Name of the associated floodlight
7373	// activity group. This is a read-only field.
7374	FloodlightActivityGroupName string `json:"floodlightActivityGroupName,omitempty"`
7375
7376	// FloodlightActivityGroupTagString: Tag string of the associated
7377	// floodlight activity group. This is a read-only field.
7378	FloodlightActivityGroupTagString string `json:"floodlightActivityGroupTagString,omitempty"`
7379
7380	// FloodlightActivityGroupType: Type of the associated floodlight
7381	// activity group. This is a read-only field.
7382	//
7383	// Possible values:
7384	//   "COUNTER"
7385	//   "SALE"
7386	FloodlightActivityGroupType string `json:"floodlightActivityGroupType,omitempty"`
7387
7388	// FloodlightConfigurationId: Floodlight configuration ID of this
7389	// floodlight activity. If this field is left blank, the value will be
7390	// copied over either from the activity group's floodlight configuration
7391	// or from the existing activity's floodlight configuration.
7392	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7393
7394	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
7395	// of the floodlight configuration. This is a read-only, auto-generated
7396	// field.
7397	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7398
7399	// FloodlightTagType: The type of Floodlight tag this activity will
7400	// generate. This is a required field.
7401	//
7402	// Possible values:
7403	//   "GLOBAL_SITE_TAG"
7404	//   "IFRAME"
7405	//   "IMAGE"
7406	FloodlightTagType string `json:"floodlightTagType,omitempty"`
7407
7408	// Hidden: Whether this activity is archived.
7409	Hidden bool `json:"hidden,omitempty"`
7410
7411	// Id: ID of this floodlight activity. This is a read-only,
7412	// auto-generated field.
7413	Id int64 `json:"id,omitempty,string"`
7414
7415	// IdDimensionValue: Dimension value for the ID of this floodlight
7416	// activity. This is a read-only, auto-generated field.
7417	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7418
7419	// Kind: Identifies what kind of resource this is. Value: the fixed
7420	// string "dfareporting#floodlightActivity".
7421	Kind string `json:"kind,omitempty"`
7422
7423	// Name: Name of this floodlight activity. This is a required field.
7424	// Must be less than 129 characters long and cannot contain quotes.
7425	Name string `json:"name,omitempty"`
7426
7427	// Notes: General notes or implementation instructions for the tag.
7428	Notes string `json:"notes,omitempty"`
7429
7430	// PublisherTags: Publisher dynamic floodlight tags.
7431	PublisherTags []*FloodlightActivityPublisherDynamicTag `json:"publisherTags,omitempty"`
7432
7433	// Secure: Whether this tag should use SSL.
7434	Secure bool `json:"secure,omitempty"`
7435
7436	// SslCompliant: Whether the floodlight activity is SSL-compliant. This
7437	// is a read-only field, its value detected by the system from the
7438	// floodlight tags.
7439	SslCompliant bool `json:"sslCompliant,omitempty"`
7440
7441	// SslRequired: Whether this floodlight activity must be SSL-compliant.
7442	SslRequired bool `json:"sslRequired,omitempty"`
7443
7444	// SubaccountId: Subaccount ID of this floodlight activity. This is a
7445	// read-only field that can be left blank.
7446	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7447
7448	// TagFormat: Tag format type for the floodlight activity. If left
7449	// blank, the tag format will default to HTML.
7450	//
7451	// Possible values:
7452	//   "HTML"
7453	//   "XHTML"
7454	TagFormat string `json:"tagFormat,omitempty"`
7455
7456	// TagString: Value of the cat= parameter in the floodlight tag, which
7457	// the ad servers use to identify the activity. This is optional: if
7458	// empty, a new tag string will be generated for you. This string must
7459	// be 1 to 8 characters long, with valid characters being
7460	// [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique among
7461	// activities of the same activity group. This field is read-only after
7462	// insertion.
7463	TagString string `json:"tagString,omitempty"`
7464
7465	// UserDefinedVariableTypes: List of the user-defined variables used by
7466	// this conversion tag. These map to the "u[1-100]=" in the tags. Each
7467	// of these can have a user defined type.
7468	// Acceptable values are U1 to U100, inclusive.
7469	//
7470	// Possible values:
7471	//   "U1"
7472	//   "U10"
7473	//   "U100"
7474	//   "U11"
7475	//   "U12"
7476	//   "U13"
7477	//   "U14"
7478	//   "U15"
7479	//   "U16"
7480	//   "U17"
7481	//   "U18"
7482	//   "U19"
7483	//   "U2"
7484	//   "U20"
7485	//   "U21"
7486	//   "U22"
7487	//   "U23"
7488	//   "U24"
7489	//   "U25"
7490	//   "U26"
7491	//   "U27"
7492	//   "U28"
7493	//   "U29"
7494	//   "U3"
7495	//   "U30"
7496	//   "U31"
7497	//   "U32"
7498	//   "U33"
7499	//   "U34"
7500	//   "U35"
7501	//   "U36"
7502	//   "U37"
7503	//   "U38"
7504	//   "U39"
7505	//   "U4"
7506	//   "U40"
7507	//   "U41"
7508	//   "U42"
7509	//   "U43"
7510	//   "U44"
7511	//   "U45"
7512	//   "U46"
7513	//   "U47"
7514	//   "U48"
7515	//   "U49"
7516	//   "U5"
7517	//   "U50"
7518	//   "U51"
7519	//   "U52"
7520	//   "U53"
7521	//   "U54"
7522	//   "U55"
7523	//   "U56"
7524	//   "U57"
7525	//   "U58"
7526	//   "U59"
7527	//   "U6"
7528	//   "U60"
7529	//   "U61"
7530	//   "U62"
7531	//   "U63"
7532	//   "U64"
7533	//   "U65"
7534	//   "U66"
7535	//   "U67"
7536	//   "U68"
7537	//   "U69"
7538	//   "U7"
7539	//   "U70"
7540	//   "U71"
7541	//   "U72"
7542	//   "U73"
7543	//   "U74"
7544	//   "U75"
7545	//   "U76"
7546	//   "U77"
7547	//   "U78"
7548	//   "U79"
7549	//   "U8"
7550	//   "U80"
7551	//   "U81"
7552	//   "U82"
7553	//   "U83"
7554	//   "U84"
7555	//   "U85"
7556	//   "U86"
7557	//   "U87"
7558	//   "U88"
7559	//   "U89"
7560	//   "U9"
7561	//   "U90"
7562	//   "U91"
7563	//   "U92"
7564	//   "U93"
7565	//   "U94"
7566	//   "U95"
7567	//   "U96"
7568	//   "U97"
7569	//   "U98"
7570	//   "U99"
7571	UserDefinedVariableTypes []string `json:"userDefinedVariableTypes,omitempty"`
7572
7573	// ServerResponse contains the HTTP response code and headers from the
7574	// server.
7575	googleapi.ServerResponse `json:"-"`
7576
7577	// ForceSendFields is a list of field names (e.g. "AccountId") to
7578	// unconditionally include in API requests. By default, fields with
7579	// empty values are omitted from API requests. However, any non-pointer,
7580	// non-interface field appearing in ForceSendFields will be sent to the
7581	// server regardless of whether the field is empty or not. This may be
7582	// used to include empty fields in Patch requests.
7583	ForceSendFields []string `json:"-"`
7584
7585	// NullFields is a list of field names (e.g. "AccountId") to include in
7586	// API requests with the JSON null value. By default, fields with empty
7587	// values are omitted from API requests. However, any field with an
7588	// empty value appearing in NullFields will be sent to the server as
7589	// null. It is an error if a field in this list has a non-empty value.
7590	// This may be used to include null fields in Patch requests.
7591	NullFields []string `json:"-"`
7592}
7593
7594func (s *FloodlightActivity) MarshalJSON() ([]byte, error) {
7595	type NoMethod FloodlightActivity
7596	raw := NoMethod(*s)
7597	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7598}
7599
7600// FloodlightActivityDynamicTag: Dynamic Tag
7601type FloodlightActivityDynamicTag struct {
7602	// Id: ID of this dynamic tag. This is a read-only, auto-generated
7603	// field.
7604	Id int64 `json:"id,omitempty,string"`
7605
7606	// Name: Name of this tag.
7607	Name string `json:"name,omitempty"`
7608
7609	// Tag: Tag code.
7610	Tag string `json:"tag,omitempty"`
7611
7612	// ForceSendFields is a list of field names (e.g. "Id") to
7613	// unconditionally include in API requests. By default, fields with
7614	// empty values are omitted from API requests. However, any non-pointer,
7615	// non-interface field appearing in ForceSendFields will be sent to the
7616	// server regardless of whether the field is empty or not. This may be
7617	// used to include empty fields in Patch requests.
7618	ForceSendFields []string `json:"-"`
7619
7620	// NullFields is a list of field names (e.g. "Id") to include in API
7621	// requests with the JSON null value. By default, fields with empty
7622	// values are omitted from API requests. However, any field with an
7623	// empty value appearing in NullFields will be sent to the server as
7624	// null. It is an error if a field in this list has a non-empty value.
7625	// This may be used to include null fields in Patch requests.
7626	NullFields []string `json:"-"`
7627}
7628
7629func (s *FloodlightActivityDynamicTag) MarshalJSON() ([]byte, error) {
7630	type NoMethod FloodlightActivityDynamicTag
7631	raw := NoMethod(*s)
7632	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7633}
7634
7635// FloodlightActivityGroup: Contains properties of a Floodlight activity
7636// group.
7637type FloodlightActivityGroup struct {
7638	// AccountId: Account ID of this floodlight activity group. This is a
7639	// read-only field that can be left blank.
7640	AccountId int64 `json:"accountId,omitempty,string"`
7641
7642	// AdvertiserId: Advertiser ID of this floodlight activity group. If
7643	// this field is left blank, the value will be copied over either from
7644	// the floodlight configuration's advertiser or from the existing
7645	// activity group's advertiser.
7646	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7647
7648	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7649	// advertiser. This is a read-only, auto-generated field.
7650	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7651
7652	// FloodlightConfigurationId: Floodlight configuration ID of this
7653	// floodlight activity group. This is a required field.
7654	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7655
7656	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
7657	// of the floodlight configuration. This is a read-only, auto-generated
7658	// field.
7659	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7660
7661	// Id: ID of this floodlight activity group. This is a read-only,
7662	// auto-generated field.
7663	Id int64 `json:"id,omitempty,string"`
7664
7665	// IdDimensionValue: Dimension value for the ID of this floodlight
7666	// activity group. This is a read-only, auto-generated field.
7667	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7668
7669	// Kind: Identifies what kind of resource this is. Value: the fixed
7670	// string "dfareporting#floodlightActivityGroup".
7671	Kind string `json:"kind,omitempty"`
7672
7673	// Name: Name of this floodlight activity group. This is a required
7674	// field. Must be less than 65 characters long and cannot contain
7675	// quotes.
7676	Name string `json:"name,omitempty"`
7677
7678	// SubaccountId: Subaccount ID of this floodlight activity group. This
7679	// is a read-only field that can be left blank.
7680	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7681
7682	// TagString: Value of the type= parameter in the floodlight tag, which
7683	// the ad servers use to identify the activity group that the activity
7684	// belongs to. This is optional: if empty, a new tag string will be
7685	// generated for you. This string must be 1 to 8 characters long, with
7686	// valid characters being [a-z][A-Z][0-9][-][ _ ]. This tag string must
7687	// also be unique among activity groups of the same floodlight
7688	// configuration. This field is read-only after insertion.
7689	TagString string `json:"tagString,omitempty"`
7690
7691	// Type: Type of the floodlight activity group. This is a required field
7692	// that is read-only after insertion.
7693	//
7694	// Possible values:
7695	//   "COUNTER"
7696	//   "SALE"
7697	Type string `json:"type,omitempty"`
7698
7699	// ServerResponse contains the HTTP response code and headers from the
7700	// server.
7701	googleapi.ServerResponse `json:"-"`
7702
7703	// ForceSendFields is a list of field names (e.g. "AccountId") to
7704	// unconditionally include in API requests. By default, fields with
7705	// empty values are omitted from API requests. However, any non-pointer,
7706	// non-interface field appearing in ForceSendFields will be sent to the
7707	// server regardless of whether the field is empty or not. This may be
7708	// used to include empty fields in Patch requests.
7709	ForceSendFields []string `json:"-"`
7710
7711	// NullFields is a list of field names (e.g. "AccountId") to include in
7712	// API requests with the JSON null value. By default, fields with empty
7713	// values are omitted from API requests. However, any field with an
7714	// empty value appearing in NullFields will be sent to the server as
7715	// null. It is an error if a field in this list has a non-empty value.
7716	// This may be used to include null fields in Patch requests.
7717	NullFields []string `json:"-"`
7718}
7719
7720func (s *FloodlightActivityGroup) MarshalJSON() ([]byte, error) {
7721	type NoMethod FloodlightActivityGroup
7722	raw := NoMethod(*s)
7723	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7724}
7725
7726// FloodlightActivityGroupsListResponse: Floodlight Activity Group List
7727// Response
7728type FloodlightActivityGroupsListResponse struct {
7729	// FloodlightActivityGroups: Floodlight activity group collection.
7730	FloodlightActivityGroups []*FloodlightActivityGroup `json:"floodlightActivityGroups,omitempty"`
7731
7732	// Kind: Identifies what kind of resource this is. Value: the fixed
7733	// string "dfareporting#floodlightActivityGroupsListResponse".
7734	Kind string `json:"kind,omitempty"`
7735
7736	// NextPageToken: Pagination token to be used for the next list
7737	// operation.
7738	NextPageToken string `json:"nextPageToken,omitempty"`
7739
7740	// ServerResponse contains the HTTP response code and headers from the
7741	// server.
7742	googleapi.ServerResponse `json:"-"`
7743
7744	// ForceSendFields is a list of field names (e.g.
7745	// "FloodlightActivityGroups") to unconditionally include in API
7746	// requests. By default, fields with empty values are omitted from API
7747	// requests. However, any non-pointer, non-interface field appearing in
7748	// ForceSendFields will be sent to the server regardless of whether the
7749	// field is empty or not. This may be used to include empty fields in
7750	// Patch requests.
7751	ForceSendFields []string `json:"-"`
7752
7753	// NullFields is a list of field names (e.g. "FloodlightActivityGroups")
7754	// to include in API requests with the JSON null value. By default,
7755	// fields with empty values are omitted from API requests. However, any
7756	// field with an empty value appearing in NullFields will be sent to the
7757	// server as null. It is an error if a field in this list has a
7758	// non-empty value. This may be used to include null fields in Patch
7759	// requests.
7760	NullFields []string `json:"-"`
7761}
7762
7763func (s *FloodlightActivityGroupsListResponse) MarshalJSON() ([]byte, error) {
7764	type NoMethod FloodlightActivityGroupsListResponse
7765	raw := NoMethod(*s)
7766	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7767}
7768
7769// FloodlightActivityPublisherDynamicTag: Publisher Dynamic Tag
7770type FloodlightActivityPublisherDynamicTag struct {
7771	// ClickThrough: Whether this tag is applicable only for click-throughs.
7772	ClickThrough bool `json:"clickThrough,omitempty"`
7773
7774	// DirectorySiteId: Directory site ID of this dynamic tag. This is a
7775	// write-only field that can be used as an alternative to the siteId
7776	// field. When this resource is retrieved, only the siteId field will be
7777	// populated.
7778	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
7779
7780	// DynamicTag: Dynamic floodlight tag.
7781	DynamicTag *FloodlightActivityDynamicTag `json:"dynamicTag,omitempty"`
7782
7783	// SiteId: Site ID of this dynamic tag.
7784	SiteId int64 `json:"siteId,omitempty,string"`
7785
7786	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
7787	// a read-only, auto-generated field.
7788	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
7789
7790	// ViewThrough: Whether this tag is applicable only for view-throughs.
7791	ViewThrough bool `json:"viewThrough,omitempty"`
7792
7793	// ForceSendFields is a list of field names (e.g. "ClickThrough") to
7794	// unconditionally include in API requests. By default, fields with
7795	// empty values are omitted from API requests. However, any non-pointer,
7796	// non-interface field appearing in ForceSendFields will be sent to the
7797	// server regardless of whether the field is empty or not. This may be
7798	// used to include empty fields in Patch requests.
7799	ForceSendFields []string `json:"-"`
7800
7801	// NullFields is a list of field names (e.g. "ClickThrough") to include
7802	// in API requests with the JSON null value. By default, fields with
7803	// empty values are omitted from API requests. However, any field with
7804	// an empty value appearing in NullFields will be sent to the server as
7805	// null. It is an error if a field in this list has a non-empty value.
7806	// This may be used to include null fields in Patch requests.
7807	NullFields []string `json:"-"`
7808}
7809
7810func (s *FloodlightActivityPublisherDynamicTag) MarshalJSON() ([]byte, error) {
7811	type NoMethod FloodlightActivityPublisherDynamicTag
7812	raw := NoMethod(*s)
7813	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7814}
7815
7816// FloodlightConfiguration: Contains properties of a Floodlight
7817// configuration.
7818type FloodlightConfiguration struct {
7819	// AccountId: Account ID of this floodlight configuration. This is a
7820	// read-only field that can be left blank.
7821	AccountId int64 `json:"accountId,omitempty,string"`
7822
7823	// AdvertiserId: Advertiser ID of the parent advertiser of this
7824	// floodlight configuration.
7825	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7826
7827	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7828	// advertiser. This is a read-only, auto-generated field.
7829	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7830
7831	// AnalyticsDataSharingEnabled: Whether advertiser data is shared with
7832	// Google Analytics.
7833	AnalyticsDataSharingEnabled bool `json:"analyticsDataSharingEnabled,omitempty"`
7834
7835	// CustomViewabilityMetric: Custom Viewability metric for the floodlight
7836	// configuration.
7837	CustomViewabilityMetric *CustomViewabilityMetric `json:"customViewabilityMetric,omitempty"`
7838
7839	// ExposureToConversionEnabled: Whether the exposure-to-conversion
7840	// report is enabled. This report shows detailed pathway information on
7841	// up to 10 of the most recent ad exposures seen by a user before
7842	// converting.
7843	ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
7844
7845	// FirstDayOfWeek: Day that will be counted as the first day of the week
7846	// in reports. This is a required field.
7847	//
7848	// Possible values:
7849	//   "MONDAY"
7850	//   "SUNDAY"
7851	FirstDayOfWeek string `json:"firstDayOfWeek,omitempty"`
7852
7853	// Id: ID of this floodlight configuration. This is a read-only,
7854	// auto-generated field.
7855	Id int64 `json:"id,omitempty,string"`
7856
7857	// IdDimensionValue: Dimension value for the ID of this floodlight
7858	// configuration. This is a read-only, auto-generated field.
7859	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7860
7861	// InAppAttributionTrackingEnabled: Whether in-app attribution tracking
7862	// is enabled.
7863	InAppAttributionTrackingEnabled bool `json:"inAppAttributionTrackingEnabled,omitempty"`
7864
7865	// Kind: Identifies what kind of resource this is. Value: the fixed
7866	// string "dfareporting#floodlightConfiguration".
7867	Kind string `json:"kind,omitempty"`
7868
7869	// LookbackConfiguration: Lookback window settings for this floodlight
7870	// configuration.
7871	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
7872
7873	// NaturalSearchConversionAttributionOption: Types of attribution
7874	// options for natural search conversions.
7875	//
7876	// Possible values:
7877	//   "EXCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
7878	//   "INCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
7879	//   "INCLUDE_NATURAL_SEARCH_TIERED_CONVERSION_ATTRIBUTION"
7880	NaturalSearchConversionAttributionOption string `json:"naturalSearchConversionAttributionOption,omitempty"`
7881
7882	// OmnitureSettings: Settings for Campaign Manager Omniture integration.
7883	OmnitureSettings *OmnitureSettings `json:"omnitureSettings,omitempty"`
7884
7885	// SubaccountId: Subaccount ID of this floodlight configuration. This is
7886	// a read-only field that can be left blank.
7887	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7888
7889	// TagSettings: Configuration settings for dynamic and image floodlight
7890	// tags.
7891	TagSettings *TagSettings `json:"tagSettings,omitempty"`
7892
7893	// ThirdPartyAuthenticationTokens: List of third-party authentication
7894	// tokens enabled for this configuration.
7895	ThirdPartyAuthenticationTokens []*ThirdPartyAuthenticationToken `json:"thirdPartyAuthenticationTokens,omitempty"`
7896
7897	// UserDefinedVariableConfigurations: List of user defined variables
7898	// enabled for this configuration.
7899	UserDefinedVariableConfigurations []*UserDefinedVariableConfiguration `json:"userDefinedVariableConfigurations,omitempty"`
7900
7901	// ServerResponse contains the HTTP response code and headers from the
7902	// server.
7903	googleapi.ServerResponse `json:"-"`
7904
7905	// ForceSendFields is a list of field names (e.g. "AccountId") to
7906	// unconditionally include in API requests. By default, fields with
7907	// empty values are omitted from API requests. However, any non-pointer,
7908	// non-interface field appearing in ForceSendFields will be sent to the
7909	// server regardless of whether the field is empty or not. This may be
7910	// used to include empty fields in Patch requests.
7911	ForceSendFields []string `json:"-"`
7912
7913	// NullFields is a list of field names (e.g. "AccountId") to include in
7914	// API requests with the JSON null value. By default, fields with empty
7915	// values are omitted from API requests. However, any field with an
7916	// empty value appearing in NullFields will be sent to the server as
7917	// null. It is an error if a field in this list has a non-empty value.
7918	// This may be used to include null fields in Patch requests.
7919	NullFields []string `json:"-"`
7920}
7921
7922func (s *FloodlightConfiguration) MarshalJSON() ([]byte, error) {
7923	type NoMethod FloodlightConfiguration
7924	raw := NoMethod(*s)
7925	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7926}
7927
7928// FloodlightConfigurationsListResponse: Floodlight Configuration List
7929// Response
7930type FloodlightConfigurationsListResponse struct {
7931	// FloodlightConfigurations: Floodlight configuration collection.
7932	FloodlightConfigurations []*FloodlightConfiguration `json:"floodlightConfigurations,omitempty"`
7933
7934	// Kind: Identifies what kind of resource this is. Value: the fixed
7935	// string "dfareporting#floodlightConfigurationsListResponse".
7936	Kind string `json:"kind,omitempty"`
7937
7938	// ServerResponse contains the HTTP response code and headers from the
7939	// server.
7940	googleapi.ServerResponse `json:"-"`
7941
7942	// ForceSendFields is a list of field names (e.g.
7943	// "FloodlightConfigurations") to unconditionally include in API
7944	// requests. By default, fields with empty values are omitted from API
7945	// requests. However, any non-pointer, non-interface field appearing in
7946	// ForceSendFields will be sent to the server regardless of whether the
7947	// field is empty or not. This may be used to include empty fields in
7948	// Patch requests.
7949	ForceSendFields []string `json:"-"`
7950
7951	// NullFields is a list of field names (e.g. "FloodlightConfigurations")
7952	// to include in API requests with the JSON null value. By default,
7953	// fields with empty values are omitted from API requests. However, any
7954	// field with an empty value appearing in NullFields will be sent to the
7955	// server as null. It is an error if a field in this list has a
7956	// non-empty value. This may be used to include null fields in Patch
7957	// requests.
7958	NullFields []string `json:"-"`
7959}
7960
7961func (s *FloodlightConfigurationsListResponse) MarshalJSON() ([]byte, error) {
7962	type NoMethod FloodlightConfigurationsListResponse
7963	raw := NoMethod(*s)
7964	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7965}
7966
7967// FloodlightReportCompatibleFields: Represents fields that are
7968// compatible to be selected for a report of type "FlOODLIGHT".
7969type FloodlightReportCompatibleFields struct {
7970	// DimensionFilters: Dimensions which are compatible to be selected in
7971	// the "dimensionFilters" section of the report.
7972	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
7973
7974	// Dimensions: Dimensions which are compatible to be selected in the
7975	// "dimensions" section of the report.
7976	Dimensions []*Dimension `json:"dimensions,omitempty"`
7977
7978	// Kind: The kind of resource this is, in this case
7979	// dfareporting#floodlightReportCompatibleFields.
7980	Kind string `json:"kind,omitempty"`
7981
7982	// Metrics: Metrics which are compatible to be selected in the
7983	// "metricNames" section of the report.
7984	Metrics []*Metric `json:"metrics,omitempty"`
7985
7986	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
7987	// unconditionally include in API requests. By default, fields with
7988	// empty values are omitted from API requests. However, any non-pointer,
7989	// non-interface field appearing in ForceSendFields will be sent to the
7990	// server regardless of whether the field is empty or not. This may be
7991	// used to include empty fields in Patch requests.
7992	ForceSendFields []string `json:"-"`
7993
7994	// NullFields is a list of field names (e.g. "DimensionFilters") to
7995	// include in API requests with the JSON null value. By default, fields
7996	// with empty values are omitted from API requests. However, any field
7997	// with an empty value appearing in NullFields will be sent to the
7998	// server as null. It is an error if a field in this list has a
7999	// non-empty value. This may be used to include null fields in Patch
8000	// requests.
8001	NullFields []string `json:"-"`
8002}
8003
8004func (s *FloodlightReportCompatibleFields) MarshalJSON() ([]byte, error) {
8005	type NoMethod FloodlightReportCompatibleFields
8006	raw := NoMethod(*s)
8007	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8008}
8009
8010// FrequencyCap: Frequency Cap.
8011type FrequencyCap struct {
8012	// Duration: Duration of time, in seconds, for this frequency cap. The
8013	// maximum duration is 90 days. Acceptable values are 1 to 7776000,
8014	// inclusive.
8015	Duration int64 `json:"duration,omitempty,string"`
8016
8017	// Impressions: Number of times an individual user can be served the ad
8018	// within the specified duration. Acceptable values are 1 to 15,
8019	// inclusive.
8020	Impressions int64 `json:"impressions,omitempty,string"`
8021
8022	// ForceSendFields is a list of field names (e.g. "Duration") to
8023	// unconditionally include in API requests. By default, fields with
8024	// empty values are omitted from API requests. However, any non-pointer,
8025	// non-interface field appearing in ForceSendFields will be sent to the
8026	// server regardless of whether the field is empty or not. This may be
8027	// used to include empty fields in Patch requests.
8028	ForceSendFields []string `json:"-"`
8029
8030	// NullFields is a list of field names (e.g. "Duration") to include in
8031	// API requests with the JSON null value. By default, fields with empty
8032	// values are omitted from API requests. However, any field with an
8033	// empty value appearing in NullFields will be sent to the server as
8034	// null. It is an error if a field in this list has a non-empty value.
8035	// This may be used to include null fields in Patch requests.
8036	NullFields []string `json:"-"`
8037}
8038
8039func (s *FrequencyCap) MarshalJSON() ([]byte, error) {
8040	type NoMethod FrequencyCap
8041	raw := NoMethod(*s)
8042	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8043}
8044
8045// FsCommand: FsCommand.
8046type FsCommand struct {
8047	// Left: Distance from the left of the browser.Applicable when
8048	// positionOption is DISTANCE_FROM_TOP_LEFT_CORNER.
8049	Left int64 `json:"left,omitempty"`
8050
8051	// PositionOption: Position in the browser where the window will open.
8052	//
8053	// Possible values:
8054	//   "CENTERED"
8055	//   "DISTANCE_FROM_TOP_LEFT_CORNER"
8056	PositionOption string `json:"positionOption,omitempty"`
8057
8058	// Top: Distance from the top of the browser. Applicable when
8059	// positionOption is DISTANCE_FROM_TOP_LEFT_CORNER.
8060	Top int64 `json:"top,omitempty"`
8061
8062	// WindowHeight: Height of the window.
8063	WindowHeight int64 `json:"windowHeight,omitempty"`
8064
8065	// WindowWidth: Width of the window.
8066	WindowWidth int64 `json:"windowWidth,omitempty"`
8067
8068	// ForceSendFields is a list of field names (e.g. "Left") to
8069	// unconditionally include in API requests. By default, fields with
8070	// empty values are omitted from API requests. However, any non-pointer,
8071	// non-interface field appearing in ForceSendFields will be sent to the
8072	// server regardless of whether the field is empty or not. This may be
8073	// used to include empty fields in Patch requests.
8074	ForceSendFields []string `json:"-"`
8075
8076	// NullFields is a list of field names (e.g. "Left") to include in API
8077	// requests with the JSON null value. By default, fields with empty
8078	// values are omitted from API requests. However, any field with an
8079	// empty value appearing in NullFields will be sent to the server as
8080	// null. It is an error if a field in this list has a non-empty value.
8081	// This may be used to include null fields in Patch requests.
8082	NullFields []string `json:"-"`
8083}
8084
8085func (s *FsCommand) MarshalJSON() ([]byte, error) {
8086	type NoMethod FsCommand
8087	raw := NoMethod(*s)
8088	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8089}
8090
8091// GeoTargeting: Geographical Targeting.
8092type GeoTargeting struct {
8093	// Cities: Cities to be targeted. For each city only dartId is required.
8094	// The other fields are populated automatically when the ad is inserted
8095	// or updated. If targeting a city, do not target or exclude the country
8096	// of the city, and do not target the metro or region of the city.
8097	Cities []*City `json:"cities,omitempty"`
8098
8099	// Countries: Countries to be targeted or excluded from targeting,
8100	// depending on the setting of the excludeCountries field. For each
8101	// country only dartId is required. The other fields are populated
8102	// automatically when the ad is inserted or updated. If targeting or
8103	// excluding a country, do not target regions, cities, metros, or postal
8104	// codes in the same country.
8105	Countries []*Country `json:"countries,omitempty"`
8106
8107	// ExcludeCountries: Whether or not to exclude the countries in the
8108	// countries field from targeting. If false, the countries field refers
8109	// to countries which will be targeted by the ad.
8110	ExcludeCountries bool `json:"excludeCountries,omitempty"`
8111
8112	// Metros: Metros to be targeted. For each metro only dmaId is required.
8113	// The other fields are populated automatically when the ad is inserted
8114	// or updated. If targeting a metro, do not target or exclude the
8115	// country of the metro.
8116	Metros []*Metro `json:"metros,omitempty"`
8117
8118	// PostalCodes: Postal codes to be targeted. For each postal code only
8119	// id is required. The other fields are populated automatically when the
8120	// ad is inserted or updated. If targeting a postal code, do not target
8121	// or exclude the country of the postal code.
8122	PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
8123
8124	// Regions: Regions to be targeted. For each region only dartId is
8125	// required. The other fields are populated automatically when the ad is
8126	// inserted or updated. If targeting a region, do not target or exclude
8127	// the country of the region.
8128	Regions []*Region `json:"regions,omitempty"`
8129
8130	// ForceSendFields is a list of field names (e.g. "Cities") to
8131	// unconditionally include in API requests. By default, fields with
8132	// empty values are omitted from API requests. However, any non-pointer,
8133	// non-interface field appearing in ForceSendFields will be sent to the
8134	// server regardless of whether the field is empty or not. This may be
8135	// used to include empty fields in Patch requests.
8136	ForceSendFields []string `json:"-"`
8137
8138	// NullFields is a list of field names (e.g. "Cities") to include in API
8139	// requests with the JSON null value. By default, fields with empty
8140	// values are omitted from API requests. However, any field with an
8141	// empty value appearing in NullFields will be sent to the server as
8142	// null. It is an error if a field in this list has a non-empty value.
8143	// This may be used to include null fields in Patch requests.
8144	NullFields []string `json:"-"`
8145}
8146
8147func (s *GeoTargeting) MarshalJSON() ([]byte, error) {
8148	type NoMethod GeoTargeting
8149	raw := NoMethod(*s)
8150	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8151}
8152
8153// InventoryItem: Represents a buy from the Planning inventory store.
8154type InventoryItem struct {
8155	// AccountId: Account ID of this inventory item.
8156	AccountId int64 `json:"accountId,omitempty,string"`
8157
8158	// AdSlots: Ad slots of this inventory item. If this inventory item
8159	// represents a standalone placement, there will be exactly one ad slot.
8160	// If this inventory item represents a placement group, there will be
8161	// more than one ad slot, each representing one child placement in that
8162	// placement group.
8163	AdSlots []*AdSlot `json:"adSlots,omitempty"`
8164
8165	// AdvertiserId: Advertiser ID of this inventory item.
8166	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8167
8168	// ContentCategoryId: Content category ID of this inventory item.
8169	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
8170
8171	// EstimatedClickThroughRate: Estimated click-through rate of this
8172	// inventory item.
8173	EstimatedClickThroughRate int64 `json:"estimatedClickThroughRate,omitempty,string"`
8174
8175	// EstimatedConversionRate: Estimated conversion rate of this inventory
8176	// item.
8177	EstimatedConversionRate int64 `json:"estimatedConversionRate,omitempty,string"`
8178
8179	// Id: ID of this inventory item.
8180	Id int64 `json:"id,omitempty,string"`
8181
8182	// InPlan: Whether this inventory item is in plan.
8183	InPlan bool `json:"inPlan,omitempty"`
8184
8185	// Kind: Identifies what kind of resource this is. Value: the fixed
8186	// string "dfareporting#inventoryItem".
8187	Kind string `json:"kind,omitempty"`
8188
8189	// LastModifiedInfo: Information about the most recent modification of
8190	// this inventory item.
8191	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
8192
8193	// Name: Name of this inventory item. For standalone inventory items,
8194	// this is the same name as that of its only ad slot. For group
8195	// inventory items, this can differ from the name of any of its ad
8196	// slots.
8197	Name string `json:"name,omitempty"`
8198
8199	// NegotiationChannelId: Negotiation channel ID of this inventory item.
8200	NegotiationChannelId int64 `json:"negotiationChannelId,omitempty,string"`
8201
8202	// OrderId: Order ID of this inventory item.
8203	OrderId int64 `json:"orderId,omitempty,string"`
8204
8205	// PlacementStrategyId: Placement strategy ID of this inventory item.
8206	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
8207
8208	// Pricing: Pricing of this inventory item.
8209	Pricing *Pricing `json:"pricing,omitempty"`
8210
8211	// ProjectId: Project ID of this inventory item.
8212	ProjectId int64 `json:"projectId,omitempty,string"`
8213
8214	// RfpId: RFP ID of this inventory item.
8215	RfpId int64 `json:"rfpId,omitempty,string"`
8216
8217	// SiteId: ID of the site this inventory item is associated with.
8218	SiteId int64 `json:"siteId,omitempty,string"`
8219
8220	// SubaccountId: Subaccount ID of this inventory item.
8221	SubaccountId int64 `json:"subaccountId,omitempty,string"`
8222
8223	// Type: Type of inventory item.
8224	//
8225	// Possible values:
8226	//   "PLANNING_PLACEMENT_TYPE_CREDIT"
8227	//   "PLANNING_PLACEMENT_TYPE_REGULAR"
8228	Type string `json:"type,omitempty"`
8229
8230	// ServerResponse contains the HTTP response code and headers from the
8231	// server.
8232	googleapi.ServerResponse `json:"-"`
8233
8234	// ForceSendFields is a list of field names (e.g. "AccountId") to
8235	// unconditionally include in API requests. By default, fields with
8236	// empty values are omitted from API requests. However, any non-pointer,
8237	// non-interface field appearing in ForceSendFields will be sent to the
8238	// server regardless of whether the field is empty or not. This may be
8239	// used to include empty fields in Patch requests.
8240	ForceSendFields []string `json:"-"`
8241
8242	// NullFields is a list of field names (e.g. "AccountId") to include in
8243	// API requests with the JSON null value. By default, fields with empty
8244	// values are omitted from API requests. However, any field with an
8245	// empty value appearing in NullFields will be sent to the server as
8246	// null. It is an error if a field in this list has a non-empty value.
8247	// This may be used to include null fields in Patch requests.
8248	NullFields []string `json:"-"`
8249}
8250
8251func (s *InventoryItem) MarshalJSON() ([]byte, error) {
8252	type NoMethod InventoryItem
8253	raw := NoMethod(*s)
8254	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8255}
8256
8257// InventoryItemsListResponse: Inventory item List Response
8258type InventoryItemsListResponse struct {
8259	// InventoryItems: Inventory item collection
8260	InventoryItems []*InventoryItem `json:"inventoryItems,omitempty"`
8261
8262	// Kind: Identifies what kind of resource this is. Value: the fixed
8263	// string "dfareporting#inventoryItemsListResponse".
8264	Kind string `json:"kind,omitempty"`
8265
8266	// NextPageToken: Pagination token to be used for the next list
8267	// operation.
8268	NextPageToken string `json:"nextPageToken,omitempty"`
8269
8270	// ServerResponse contains the HTTP response code and headers from the
8271	// server.
8272	googleapi.ServerResponse `json:"-"`
8273
8274	// ForceSendFields is a list of field names (e.g. "InventoryItems") to
8275	// unconditionally include in API requests. By default, fields with
8276	// empty values are omitted from API requests. However, any non-pointer,
8277	// non-interface field appearing in ForceSendFields will be sent to the
8278	// server regardless of whether the field is empty or not. This may be
8279	// used to include empty fields in Patch requests.
8280	ForceSendFields []string `json:"-"`
8281
8282	// NullFields is a list of field names (e.g. "InventoryItems") to
8283	// include in API requests with the JSON null value. By default, fields
8284	// with empty values are omitted from API requests. However, any field
8285	// with an empty value appearing in NullFields will be sent to the
8286	// server as null. It is an error if a field in this list has a
8287	// non-empty value. This may be used to include null fields in Patch
8288	// requests.
8289	NullFields []string `json:"-"`
8290}
8291
8292func (s *InventoryItemsListResponse) MarshalJSON() ([]byte, error) {
8293	type NoMethod InventoryItemsListResponse
8294	raw := NoMethod(*s)
8295	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8296}
8297
8298// KeyValueTargetingExpression: Key Value Targeting Expression.
8299type KeyValueTargetingExpression struct {
8300	// Expression: Keyword expression being targeted by the ad.
8301	Expression string `json:"expression,omitempty"`
8302
8303	// ForceSendFields is a list of field names (e.g. "Expression") to
8304	// unconditionally include in API requests. By default, fields with
8305	// empty values are omitted from API requests. However, any non-pointer,
8306	// non-interface field appearing in ForceSendFields will be sent to the
8307	// server regardless of whether the field is empty or not. This may be
8308	// used to include empty fields in Patch requests.
8309	ForceSendFields []string `json:"-"`
8310
8311	// NullFields is a list of field names (e.g. "Expression") to include in
8312	// API requests with the JSON null value. By default, fields with empty
8313	// values are omitted from API requests. However, any field with an
8314	// empty value appearing in NullFields will be sent to the server as
8315	// null. It is an error if a field in this list has a non-empty value.
8316	// This may be used to include null fields in Patch requests.
8317	NullFields []string `json:"-"`
8318}
8319
8320func (s *KeyValueTargetingExpression) MarshalJSON() ([]byte, error) {
8321	type NoMethod KeyValueTargetingExpression
8322	raw := NoMethod(*s)
8323	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8324}
8325
8326// LandingPage: Contains information about where a user's browser is
8327// taken after the user clicks an ad.
8328type LandingPage struct {
8329	// AdvertiserId: Advertiser ID of this landing page. This is a required
8330	// field.
8331	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8332
8333	// Archived: Whether this landing page has been archived.
8334	Archived bool `json:"archived,omitempty"`
8335
8336	// DeepLinks: Links that will direct the user to a mobile app, if
8337	// installed.
8338	DeepLinks []*DeepLink `json:"deepLinks,omitempty"`
8339
8340	// Id: ID of this landing page. This is a read-only, auto-generated
8341	// field.
8342	Id int64 `json:"id,omitempty,string"`
8343
8344	// Kind: Identifies what kind of resource this is. Value: the fixed
8345	// string "dfareporting#landingPage".
8346	Kind string `json:"kind,omitempty"`
8347
8348	// Name: Name of this landing page. This is a required field. It must be
8349	// less than 256 characters long.
8350	Name string `json:"name,omitempty"`
8351
8352	// Url: URL of this landing page. This is a required field.
8353	Url string `json:"url,omitempty"`
8354
8355	// ServerResponse contains the HTTP response code and headers from the
8356	// server.
8357	googleapi.ServerResponse `json:"-"`
8358
8359	// ForceSendFields is a list of field names (e.g. "AdvertiserId") to
8360	// unconditionally include in API requests. By default, fields with
8361	// empty values are omitted from API requests. However, any non-pointer,
8362	// non-interface field appearing in ForceSendFields will be sent to the
8363	// server regardless of whether the field is empty or not. This may be
8364	// used to include empty fields in Patch requests.
8365	ForceSendFields []string `json:"-"`
8366
8367	// NullFields is a list of field names (e.g. "AdvertiserId") to include
8368	// in API requests with the JSON null value. By default, fields with
8369	// empty values are omitted from API requests. However, any field with
8370	// an empty value appearing in NullFields will be sent to the server as
8371	// null. It is an error if a field in this list has a non-empty value.
8372	// This may be used to include null fields in Patch requests.
8373	NullFields []string `json:"-"`
8374}
8375
8376func (s *LandingPage) MarshalJSON() ([]byte, error) {
8377	type NoMethod LandingPage
8378	raw := NoMethod(*s)
8379	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8380}
8381
8382// Language: Contains information about a language that can be targeted
8383// by ads.
8384type Language struct {
8385	// Id: Language ID of this language. This is the ID used for targeting
8386	// and generating reports.
8387	Id int64 `json:"id,omitempty,string"`
8388
8389	// Kind: Identifies what kind of resource this is. Value: the fixed
8390	// string "dfareporting#language".
8391	Kind string `json:"kind,omitempty"`
8392
8393	// LanguageCode: Format of language code is an ISO 639 two-letter
8394	// language code optionally followed by an underscore followed by an ISO
8395	// 3166 code. Examples are "en" for English or "zh_CN" for Simplified
8396	// Chinese.
8397	LanguageCode string `json:"languageCode,omitempty"`
8398
8399	// Name: Name of this language.
8400	Name string `json:"name,omitempty"`
8401
8402	// ForceSendFields is a list of field names (e.g. "Id") to
8403	// unconditionally include in API requests. By default, fields with
8404	// empty values are omitted from API requests. However, any non-pointer,
8405	// non-interface field appearing in ForceSendFields will be sent to the
8406	// server regardless of whether the field is empty or not. This may be
8407	// used to include empty fields in Patch requests.
8408	ForceSendFields []string `json:"-"`
8409
8410	// NullFields is a list of field names (e.g. "Id") to include in API
8411	// requests with the JSON null value. By default, fields with empty
8412	// values are omitted from API requests. However, any field with an
8413	// empty value appearing in NullFields will be sent to the server as
8414	// null. It is an error if a field in this list has a non-empty value.
8415	// This may be used to include null fields in Patch requests.
8416	NullFields []string `json:"-"`
8417}
8418
8419func (s *Language) MarshalJSON() ([]byte, error) {
8420	type NoMethod Language
8421	raw := NoMethod(*s)
8422	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8423}
8424
8425// LanguageTargeting: Language Targeting.
8426type LanguageTargeting struct {
8427	// Languages: Languages that this ad targets. For each language only
8428	// languageId is required. The other fields are populated automatically
8429	// when the ad is inserted or updated.
8430	Languages []*Language `json:"languages,omitempty"`
8431
8432	// ForceSendFields is a list of field names (e.g. "Languages") to
8433	// unconditionally include in API requests. By default, fields with
8434	// empty values are omitted from API requests. However, any non-pointer,
8435	// non-interface field appearing in ForceSendFields will be sent to the
8436	// server regardless of whether the field is empty or not. This may be
8437	// used to include empty fields in Patch requests.
8438	ForceSendFields []string `json:"-"`
8439
8440	// NullFields is a list of field names (e.g. "Languages") to include in
8441	// API requests with the JSON null value. By default, fields with empty
8442	// values are omitted from API requests. However, any field with an
8443	// empty value appearing in NullFields will be sent to the server as
8444	// null. It is an error if a field in this list has a non-empty value.
8445	// This may be used to include null fields in Patch requests.
8446	NullFields []string `json:"-"`
8447}
8448
8449func (s *LanguageTargeting) MarshalJSON() ([]byte, error) {
8450	type NoMethod LanguageTargeting
8451	raw := NoMethod(*s)
8452	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8453}
8454
8455// LanguagesListResponse: Language List Response
8456type LanguagesListResponse struct {
8457	// Kind: Identifies what kind of resource this is. Value: the fixed
8458	// string "dfareporting#languagesListResponse".
8459	Kind string `json:"kind,omitempty"`
8460
8461	// Languages: Language collection.
8462	Languages []*Language `json:"languages,omitempty"`
8463
8464	// ServerResponse contains the HTTP response code and headers from the
8465	// server.
8466	googleapi.ServerResponse `json:"-"`
8467
8468	// ForceSendFields is a list of field names (e.g. "Kind") to
8469	// unconditionally include in API requests. By default, fields with
8470	// empty values are omitted from API requests. However, any non-pointer,
8471	// non-interface field appearing in ForceSendFields will be sent to the
8472	// server regardless of whether the field is empty or not. This may be
8473	// used to include empty fields in Patch requests.
8474	ForceSendFields []string `json:"-"`
8475
8476	// NullFields is a list of field names (e.g. "Kind") to include in API
8477	// requests with the JSON null value. By default, fields with empty
8478	// values are omitted from API requests. However, any field with an
8479	// empty value appearing in NullFields will be sent to the server as
8480	// null. It is an error if a field in this list has a non-empty value.
8481	// This may be used to include null fields in Patch requests.
8482	NullFields []string `json:"-"`
8483}
8484
8485func (s *LanguagesListResponse) MarshalJSON() ([]byte, error) {
8486	type NoMethod LanguagesListResponse
8487	raw := NoMethod(*s)
8488	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8489}
8490
8491// LastModifiedInfo: Modification timestamp.
8492type LastModifiedInfo struct {
8493	// Time: Timestamp of the last change in milliseconds since epoch.
8494	Time int64 `json:"time,omitempty,string"`
8495
8496	// ForceSendFields is a list of field names (e.g. "Time") to
8497	// unconditionally include in API requests. By default, fields with
8498	// empty values are omitted from API requests. However, any non-pointer,
8499	// non-interface field appearing in ForceSendFields will be sent to the
8500	// server regardless of whether the field is empty or not. This may be
8501	// used to include empty fields in Patch requests.
8502	ForceSendFields []string `json:"-"`
8503
8504	// NullFields is a list of field names (e.g. "Time") to include in API
8505	// requests with the JSON null value. By default, fields with empty
8506	// values are omitted from API requests. However, any field with an
8507	// empty value appearing in NullFields will be sent to the server as
8508	// null. It is an error if a field in this list has a non-empty value.
8509	// This may be used to include null fields in Patch requests.
8510	NullFields []string `json:"-"`
8511}
8512
8513func (s *LastModifiedInfo) MarshalJSON() ([]byte, error) {
8514	type NoMethod LastModifiedInfo
8515	raw := NoMethod(*s)
8516	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8517}
8518
8519// ListPopulationClause: A group clause made up of list population terms
8520// representing constraints joined by ORs.
8521type ListPopulationClause struct {
8522	// Terms: Terms of this list population clause. Each clause is made up
8523	// of list population terms representing constraints and are joined by
8524	// ORs.
8525	Terms []*ListPopulationTerm `json:"terms,omitempty"`
8526
8527	// ForceSendFields is a list of field names (e.g. "Terms") to
8528	// unconditionally include in API requests. By default, fields with
8529	// empty values are omitted from API requests. However, any non-pointer,
8530	// non-interface field appearing in ForceSendFields will be sent to the
8531	// server regardless of whether the field is empty or not. This may be
8532	// used to include empty fields in Patch requests.
8533	ForceSendFields []string `json:"-"`
8534
8535	// NullFields is a list of field names (e.g. "Terms") to include in API
8536	// requests with the JSON null value. By default, fields with empty
8537	// values are omitted from API requests. However, any field with an
8538	// empty value appearing in NullFields will be sent to the server as
8539	// null. It is an error if a field in this list has a non-empty value.
8540	// This may be used to include null fields in Patch requests.
8541	NullFields []string `json:"-"`
8542}
8543
8544func (s *ListPopulationClause) MarshalJSON() ([]byte, error) {
8545	type NoMethod ListPopulationClause
8546	raw := NoMethod(*s)
8547	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8548}
8549
8550// ListPopulationRule: Remarketing List Population Rule.
8551type ListPopulationRule struct {
8552	// FloodlightActivityId: Floodlight activity ID associated with this
8553	// rule. This field can be left blank.
8554	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
8555
8556	// FloodlightActivityName: Name of floodlight activity associated with
8557	// this rule. This is a read-only, auto-generated field.
8558	FloodlightActivityName string `json:"floodlightActivityName,omitempty"`
8559
8560	// ListPopulationClauses: Clauses that make up this list population
8561	// rule. Clauses are joined by ANDs, and the clauses themselves are made
8562	// up of list population terms which are joined by ORs.
8563	ListPopulationClauses []*ListPopulationClause `json:"listPopulationClauses,omitempty"`
8564
8565	// ForceSendFields is a list of field names (e.g.
8566	// "FloodlightActivityId") to unconditionally include in API requests.
8567	// By default, fields with empty values are omitted from API requests.
8568	// However, any non-pointer, non-interface field appearing in
8569	// ForceSendFields will be sent to the server regardless of whether the
8570	// field is empty or not. This may be used to include empty fields in
8571	// Patch requests.
8572	ForceSendFields []string `json:"-"`
8573
8574	// NullFields is a list of field names (e.g. "FloodlightActivityId") to
8575	// include in API requests with the JSON null value. By default, fields
8576	// with empty values are omitted from API requests. However, any field
8577	// with an empty value appearing in NullFields will be sent to the
8578	// server as null. It is an error if a field in this list has a
8579	// non-empty value. This may be used to include null fields in Patch
8580	// requests.
8581	NullFields []string `json:"-"`
8582}
8583
8584func (s *ListPopulationRule) MarshalJSON() ([]byte, error) {
8585	type NoMethod ListPopulationRule
8586	raw := NoMethod(*s)
8587	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8588}
8589
8590// ListPopulationTerm: Remarketing List Population Rule Term.
8591type ListPopulationTerm struct {
8592	// Contains: Will be true if the term should check if the user is in the
8593	// list and false if the term should check if the user is not in the
8594	// list. This field is only relevant when type is set to
8595	// LIST_MEMBERSHIP_TERM. False by default.
8596	Contains bool `json:"contains,omitempty"`
8597
8598	// Negation: Whether to negate the comparison result of this term during
8599	// rule evaluation. This field is only relevant when type is left unset
8600	// or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM.
8601	Negation bool `json:"negation,omitempty"`
8602
8603	// Operator: Comparison operator of this term. This field is only
8604	// relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or
8605	// REFERRER_TERM.
8606	//
8607	// Possible values:
8608	//   "NUM_EQUALS"
8609	//   "NUM_GREATER_THAN"
8610	//   "NUM_GREATER_THAN_EQUAL"
8611	//   "NUM_LESS_THAN"
8612	//   "NUM_LESS_THAN_EQUAL"
8613	//   "STRING_CONTAINS"
8614	//   "STRING_EQUALS"
8615	Operator string `json:"operator,omitempty"`
8616
8617	// RemarketingListId: ID of the list in question. This field is only
8618	// relevant when type is set to LIST_MEMBERSHIP_TERM.
8619	RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
8620
8621	// Type: List population term type determines the applicable fields in
8622	// this object. If left unset or set to CUSTOM_VARIABLE_TERM, then
8623	// variableName, variableFriendlyName, operator, value, and negation are
8624	// applicable. If set to LIST_MEMBERSHIP_TERM then remarketingListId and
8625	// contains are applicable. If set to REFERRER_TERM then operator,
8626	// value, and negation are applicable.
8627	//
8628	// Possible values:
8629	//   "CUSTOM_VARIABLE_TERM"
8630	//   "LIST_MEMBERSHIP_TERM"
8631	//   "REFERRER_TERM"
8632	Type string `json:"type,omitempty"`
8633
8634	// Value: Literal to compare the variable to. This field is only
8635	// relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or
8636	// REFERRER_TERM.
8637	Value string `json:"value,omitempty"`
8638
8639	// VariableFriendlyName: Friendly name of this term's variable. This is
8640	// a read-only, auto-generated field. This field is only relevant when
8641	// type is left unset or set to CUSTOM_VARIABLE_TERM.
8642	VariableFriendlyName string `json:"variableFriendlyName,omitempty"`
8643
8644	// VariableName: Name of the variable (U1, U2, etc.) being compared in
8645	// this term. This field is only relevant when type is set to null,
8646	// CUSTOM_VARIABLE_TERM or REFERRER_TERM.
8647	VariableName string `json:"variableName,omitempty"`
8648
8649	// ForceSendFields is a list of field names (e.g. "Contains") to
8650	// unconditionally include in API requests. By default, fields with
8651	// empty values are omitted from API requests. However, any non-pointer,
8652	// non-interface field appearing in ForceSendFields will be sent to the
8653	// server regardless of whether the field is empty or not. This may be
8654	// used to include empty fields in Patch requests.
8655	ForceSendFields []string `json:"-"`
8656
8657	// NullFields is a list of field names (e.g. "Contains") to include in
8658	// API requests with the JSON null value. By default, fields with empty
8659	// values are omitted from API requests. However, any field with an
8660	// empty value appearing in NullFields will be sent to the server as
8661	// null. It is an error if a field in this list has a non-empty value.
8662	// This may be used to include null fields in Patch requests.
8663	NullFields []string `json:"-"`
8664}
8665
8666func (s *ListPopulationTerm) MarshalJSON() ([]byte, error) {
8667	type NoMethod ListPopulationTerm
8668	raw := NoMethod(*s)
8669	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8670}
8671
8672// ListTargetingExpression: Remarketing List Targeting Expression.
8673type ListTargetingExpression struct {
8674	// Expression: Expression describing which lists are being targeted by
8675	// the ad.
8676	Expression string `json:"expression,omitempty"`
8677
8678	// ForceSendFields is a list of field names (e.g. "Expression") to
8679	// unconditionally include in API requests. By default, fields with
8680	// empty values are omitted from API requests. However, any non-pointer,
8681	// non-interface field appearing in ForceSendFields will be sent to the
8682	// server regardless of whether the field is empty or not. This may be
8683	// used to include empty fields in Patch requests.
8684	ForceSendFields []string `json:"-"`
8685
8686	// NullFields is a list of field names (e.g. "Expression") to include in
8687	// API requests with the JSON null value. By default, fields with empty
8688	// values are omitted from API requests. However, any field with an
8689	// empty value appearing in NullFields will be sent to the server as
8690	// null. It is an error if a field in this list has a non-empty value.
8691	// This may be used to include null fields in Patch requests.
8692	NullFields []string `json:"-"`
8693}
8694
8695func (s *ListTargetingExpression) MarshalJSON() ([]byte, error) {
8696	type NoMethod ListTargetingExpression
8697	raw := NoMethod(*s)
8698	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8699}
8700
8701// LookbackConfiguration: Lookback configuration settings.
8702type LookbackConfiguration struct {
8703	// ClickDuration: Lookback window, in days, from the last time a given
8704	// user clicked on one of your ads. If you enter 0, clicks will not be
8705	// considered as triggering events for floodlight tracking. If you leave
8706	// this field blank, the default value for your account will be used.
8707	// Acceptable values are 0 to 90, inclusive.
8708	ClickDuration int64 `json:"clickDuration,omitempty"`
8709
8710	// PostImpressionActivitiesDuration: Lookback window, in days, from the
8711	// last time a given user viewed one of your ads. If you enter 0,
8712	// impressions will not be considered as triggering events for
8713	// floodlight tracking. If you leave this field blank, the default value
8714	// for your account will be used. Acceptable values are 0 to 90,
8715	// inclusive.
8716	PostImpressionActivitiesDuration int64 `json:"postImpressionActivitiesDuration,omitempty"`
8717
8718	// ForceSendFields is a list of field names (e.g. "ClickDuration") to
8719	// unconditionally include in API requests. By default, fields with
8720	// empty values are omitted from API requests. However, any non-pointer,
8721	// non-interface field appearing in ForceSendFields will be sent to the
8722	// server regardless of whether the field is empty or not. This may be
8723	// used to include empty fields in Patch requests.
8724	ForceSendFields []string `json:"-"`
8725
8726	// NullFields is a list of field names (e.g. "ClickDuration") to include
8727	// in API requests with the JSON null value. By default, fields with
8728	// empty values are omitted from API requests. However, any field with
8729	// an empty value appearing in NullFields will be sent to the server as
8730	// null. It is an error if a field in this list has a non-empty value.
8731	// This may be used to include null fields in Patch requests.
8732	NullFields []string `json:"-"`
8733}
8734
8735func (s *LookbackConfiguration) MarshalJSON() ([]byte, error) {
8736	type NoMethod LookbackConfiguration
8737	raw := NoMethod(*s)
8738	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8739}
8740
8741// Metric: Represents a metric.
8742type Metric struct {
8743	// Kind: The kind of resource this is, in this case dfareporting#metric.
8744	Kind string `json:"kind,omitempty"`
8745
8746	// Name: The metric name, e.g. dfa:impressions
8747	Name string `json:"name,omitempty"`
8748
8749	// ForceSendFields is a list of field names (e.g. "Kind") to
8750	// unconditionally include in API requests. By default, fields with
8751	// empty values are omitted from API requests. However, any non-pointer,
8752	// non-interface field appearing in ForceSendFields will be sent to the
8753	// server regardless of whether the field is empty or not. This may be
8754	// used to include empty fields in Patch requests.
8755	ForceSendFields []string `json:"-"`
8756
8757	// NullFields is a list of field names (e.g. "Kind") to include in API
8758	// requests with the JSON null value. By default, fields with empty
8759	// values are omitted from API requests. However, any field with an
8760	// empty value appearing in NullFields will be sent to the server as
8761	// null. It is an error if a field in this list has a non-empty value.
8762	// This may be used to include null fields in Patch requests.
8763	NullFields []string `json:"-"`
8764}
8765
8766func (s *Metric) MarshalJSON() ([]byte, error) {
8767	type NoMethod Metric
8768	raw := NoMethod(*s)
8769	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8770}
8771
8772// Metro: Contains information about a metro region that can be targeted
8773// by ads.
8774type Metro struct {
8775	// CountryCode: Country code of the country to which this metro region
8776	// belongs.
8777	CountryCode string `json:"countryCode,omitempty"`
8778
8779	// CountryDartId: DART ID of the country to which this metro region
8780	// belongs.
8781	CountryDartId int64 `json:"countryDartId,omitempty,string"`
8782
8783	// DartId: DART ID of this metro region.
8784	DartId int64 `json:"dartId,omitempty,string"`
8785
8786	// DmaId: DMA ID of this metro region. This is the ID used for targeting
8787	// and generating reports, and is equivalent to metro_code.
8788	DmaId int64 `json:"dmaId,omitempty,string"`
8789
8790	// Kind: Identifies what kind of resource this is. Value: the fixed
8791	// string "dfareporting#metro".
8792	Kind string `json:"kind,omitempty"`
8793
8794	// MetroCode: Metro code of this metro region. This is equivalent to
8795	// dma_id.
8796	MetroCode string `json:"metroCode,omitempty"`
8797
8798	// Name: Name of this metro region.
8799	Name string `json:"name,omitempty"`
8800
8801	// ForceSendFields is a list of field names (e.g. "CountryCode") to
8802	// unconditionally include in API requests. By default, fields with
8803	// empty values are omitted from API requests. However, any non-pointer,
8804	// non-interface field appearing in ForceSendFields will be sent to the
8805	// server regardless of whether the field is empty or not. This may be
8806	// used to include empty fields in Patch requests.
8807	ForceSendFields []string `json:"-"`
8808
8809	// NullFields is a list of field names (e.g. "CountryCode") to include
8810	// in API requests with the JSON null value. By default, fields with
8811	// empty values are omitted from API requests. However, any field with
8812	// an empty value appearing in NullFields will be sent to the server as
8813	// null. It is an error if a field in this list has a non-empty value.
8814	// This may be used to include null fields in Patch requests.
8815	NullFields []string `json:"-"`
8816}
8817
8818func (s *Metro) MarshalJSON() ([]byte, error) {
8819	type NoMethod Metro
8820	raw := NoMethod(*s)
8821	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8822}
8823
8824// MetrosListResponse: Metro List Response
8825type MetrosListResponse struct {
8826	// Kind: Identifies what kind of resource this is. Value: the fixed
8827	// string "dfareporting#metrosListResponse".
8828	Kind string `json:"kind,omitempty"`
8829
8830	// Metros: Metro collection.
8831	Metros []*Metro `json:"metros,omitempty"`
8832
8833	// ServerResponse contains the HTTP response code and headers from the
8834	// server.
8835	googleapi.ServerResponse `json:"-"`
8836
8837	// ForceSendFields is a list of field names (e.g. "Kind") to
8838	// unconditionally include in API requests. By default, fields with
8839	// empty values are omitted from API requests. However, any non-pointer,
8840	// non-interface field appearing in ForceSendFields will be sent to the
8841	// server regardless of whether the field is empty or not. This may be
8842	// used to include empty fields in Patch requests.
8843	ForceSendFields []string `json:"-"`
8844
8845	// NullFields is a list of field names (e.g. "Kind") to include in API
8846	// requests with the JSON null value. By default, fields with empty
8847	// values are omitted from API requests. However, any field with an
8848	// empty value appearing in NullFields will be sent to the server as
8849	// null. It is an error if a field in this list has a non-empty value.
8850	// This may be used to include null fields in Patch requests.
8851	NullFields []string `json:"-"`
8852}
8853
8854func (s *MetrosListResponse) MarshalJSON() ([]byte, error) {
8855	type NoMethod MetrosListResponse
8856	raw := NoMethod(*s)
8857	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8858}
8859
8860// MobileApp: Contains information about a mobile app. Used as a landing
8861// page deep link.
8862type MobileApp struct {
8863	// Directory: Mobile app directory.
8864	//
8865	// Possible values:
8866	//   "APPLE_APP_STORE"
8867	//   "GOOGLE_PLAY_STORE"
8868	//   "UNKNOWN"
8869	Directory string `json:"directory,omitempty"`
8870
8871	// Id: ID of this mobile app.
8872	Id string `json:"id,omitempty"`
8873
8874	// Kind: Identifies what kind of resource this is. Value: the fixed
8875	// string "dfareporting#mobileApp".
8876	Kind string `json:"kind,omitempty"`
8877
8878	// PublisherName: Publisher name.
8879	PublisherName string `json:"publisherName,omitempty"`
8880
8881	// Title: Title of this mobile app.
8882	Title string `json:"title,omitempty"`
8883
8884	// ServerResponse contains the HTTP response code and headers from the
8885	// server.
8886	googleapi.ServerResponse `json:"-"`
8887
8888	// ForceSendFields is a list of field names (e.g. "Directory") to
8889	// unconditionally include in API requests. By default, fields with
8890	// empty values are omitted from API requests. However, any non-pointer,
8891	// non-interface field appearing in ForceSendFields will be sent to the
8892	// server regardless of whether the field is empty or not. This may be
8893	// used to include empty fields in Patch requests.
8894	ForceSendFields []string `json:"-"`
8895
8896	// NullFields is a list of field names (e.g. "Directory") to include in
8897	// API requests with the JSON null value. By default, fields with empty
8898	// values are omitted from API requests. However, any field with an
8899	// empty value appearing in NullFields will be sent to the server as
8900	// null. It is an error if a field in this list has a non-empty value.
8901	// This may be used to include null fields in Patch requests.
8902	NullFields []string `json:"-"`
8903}
8904
8905func (s *MobileApp) MarshalJSON() ([]byte, error) {
8906	type NoMethod MobileApp
8907	raw := NoMethod(*s)
8908	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8909}
8910
8911// MobileAppsListResponse: Mobile app List Response
8912type MobileAppsListResponse struct {
8913	// Kind: Identifies what kind of resource this is. Value: the fixed
8914	// string "dfareporting#mobileAppsListResponse".
8915	Kind string `json:"kind,omitempty"`
8916
8917	// MobileApps: Mobile apps collection.
8918	MobileApps []*MobileApp `json:"mobileApps,omitempty"`
8919
8920	// NextPageToken: Pagination token to be used for the next list
8921	// operation.
8922	NextPageToken string `json:"nextPageToken,omitempty"`
8923
8924	// ServerResponse contains the HTTP response code and headers from the
8925	// server.
8926	googleapi.ServerResponse `json:"-"`
8927
8928	// ForceSendFields is a list of field names (e.g. "Kind") to
8929	// unconditionally include in API requests. By default, fields with
8930	// empty values are omitted from API requests. However, any non-pointer,
8931	// non-interface field appearing in ForceSendFields will be sent to the
8932	// server regardless of whether the field is empty or not. This may be
8933	// used to include empty fields in Patch requests.
8934	ForceSendFields []string `json:"-"`
8935
8936	// NullFields is a list of field names (e.g. "Kind") to include in API
8937	// requests with the JSON null value. By default, fields with empty
8938	// values are omitted from API requests. However, any field with an
8939	// empty value appearing in NullFields will be sent to the server as
8940	// null. It is an error if a field in this list has a non-empty value.
8941	// This may be used to include null fields in Patch requests.
8942	NullFields []string `json:"-"`
8943}
8944
8945func (s *MobileAppsListResponse) MarshalJSON() ([]byte, error) {
8946	type NoMethod MobileAppsListResponse
8947	raw := NoMethod(*s)
8948	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8949}
8950
8951// MobileCarrier: Contains information about a mobile carrier that can
8952// be targeted by ads.
8953type MobileCarrier struct {
8954	// CountryCode: Country code of the country to which this mobile carrier
8955	// belongs.
8956	CountryCode string `json:"countryCode,omitempty"`
8957
8958	// CountryDartId: DART ID of the country to which this mobile carrier
8959	// belongs.
8960	CountryDartId int64 `json:"countryDartId,omitempty,string"`
8961
8962	// Id: ID of this mobile carrier.
8963	Id int64 `json:"id,omitempty,string"`
8964
8965	// Kind: Identifies what kind of resource this is. Value: the fixed
8966	// string "dfareporting#mobileCarrier".
8967	Kind string `json:"kind,omitempty"`
8968
8969	// Name: Name of this mobile carrier.
8970	Name string `json:"name,omitempty"`
8971
8972	// ServerResponse contains the HTTP response code and headers from the
8973	// server.
8974	googleapi.ServerResponse `json:"-"`
8975
8976	// ForceSendFields is a list of field names (e.g. "CountryCode") to
8977	// unconditionally include in API requests. By default, fields with
8978	// empty values are omitted from API requests. However, any non-pointer,
8979	// non-interface field appearing in ForceSendFields will be sent to the
8980	// server regardless of whether the field is empty or not. This may be
8981	// used to include empty fields in Patch requests.
8982	ForceSendFields []string `json:"-"`
8983
8984	// NullFields is a list of field names (e.g. "CountryCode") to include
8985	// in API requests with the JSON null value. By default, fields with
8986	// empty values are omitted from API requests. However, any field with
8987	// an empty value appearing in NullFields will be sent to the server as
8988	// null. It is an error if a field in this list has a non-empty value.
8989	// This may be used to include null fields in Patch requests.
8990	NullFields []string `json:"-"`
8991}
8992
8993func (s *MobileCarrier) MarshalJSON() ([]byte, error) {
8994	type NoMethod MobileCarrier
8995	raw := NoMethod(*s)
8996	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8997}
8998
8999// MobileCarriersListResponse: Mobile Carrier List Response
9000type MobileCarriersListResponse struct {
9001	// Kind: Identifies what kind of resource this is. Value: the fixed
9002	// string "dfareporting#mobileCarriersListResponse".
9003	Kind string `json:"kind,omitempty"`
9004
9005	// MobileCarriers: Mobile carrier collection.
9006	MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
9007
9008	// ServerResponse contains the HTTP response code and headers from the
9009	// server.
9010	googleapi.ServerResponse `json:"-"`
9011
9012	// ForceSendFields is a list of field names (e.g. "Kind") to
9013	// unconditionally include in API requests. By default, fields with
9014	// empty values are omitted from API requests. However, any non-pointer,
9015	// non-interface field appearing in ForceSendFields will be sent to the
9016	// server regardless of whether the field is empty or not. This may be
9017	// used to include empty fields in Patch requests.
9018	ForceSendFields []string `json:"-"`
9019
9020	// NullFields is a list of field names (e.g. "Kind") to include in API
9021	// requests with the JSON null value. By default, fields with empty
9022	// values are omitted from API requests. However, any field with an
9023	// empty value appearing in NullFields will be sent to the server as
9024	// null. It is an error if a field in this list has a non-empty value.
9025	// This may be used to include null fields in Patch requests.
9026	NullFields []string `json:"-"`
9027}
9028
9029func (s *MobileCarriersListResponse) MarshalJSON() ([]byte, error) {
9030	type NoMethod MobileCarriersListResponse
9031	raw := NoMethod(*s)
9032	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9033}
9034
9035// ObjectFilter: Object Filter.
9036type ObjectFilter struct {
9037	// Kind: Identifies what kind of resource this is. Value: the fixed
9038	// string "dfareporting#objectFilter".
9039	Kind string `json:"kind,omitempty"`
9040
9041	// ObjectIds: Applicable when status is ASSIGNED. The user has access to
9042	// objects with these object IDs.
9043	ObjectIds googleapi.Int64s `json:"objectIds,omitempty"`
9044
9045	// Status: Status of the filter. NONE means the user has access to none
9046	// of the objects. ALL means the user has access to all objects.
9047	// ASSIGNED means the user has access to the objects with IDs in the
9048	// objectIds list.
9049	//
9050	// Possible values:
9051	//   "ALL"
9052	//   "ASSIGNED"
9053	//   "NONE"
9054	Status string `json:"status,omitempty"`
9055
9056	// ForceSendFields is a list of field names (e.g. "Kind") to
9057	// unconditionally include in API requests. By default, fields with
9058	// empty values are omitted from API requests. However, any non-pointer,
9059	// non-interface field appearing in ForceSendFields will be sent to the
9060	// server regardless of whether the field is empty or not. This may be
9061	// used to include empty fields in Patch requests.
9062	ForceSendFields []string `json:"-"`
9063
9064	// NullFields is a list of field names (e.g. "Kind") to include in API
9065	// requests with the JSON null value. By default, fields with empty
9066	// values are omitted from API requests. However, any field with an
9067	// empty value appearing in NullFields will be sent to the server as
9068	// null. It is an error if a field in this list has a non-empty value.
9069	// This may be used to include null fields in Patch requests.
9070	NullFields []string `json:"-"`
9071}
9072
9073func (s *ObjectFilter) MarshalJSON() ([]byte, error) {
9074	type NoMethod ObjectFilter
9075	raw := NoMethod(*s)
9076	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9077}
9078
9079// OffsetPosition: Offset Position.
9080type OffsetPosition struct {
9081	// Left: Offset distance from left side of an asset or a window.
9082	Left int64 `json:"left,omitempty"`
9083
9084	// Top: Offset distance from top side of an asset or a window.
9085	Top int64 `json:"top,omitempty"`
9086
9087	// ForceSendFields is a list of field names (e.g. "Left") to
9088	// unconditionally include in API requests. By default, fields with
9089	// empty values are omitted from API requests. However, any non-pointer,
9090	// non-interface field appearing in ForceSendFields will be sent to the
9091	// server regardless of whether the field is empty or not. This may be
9092	// used to include empty fields in Patch requests.
9093	ForceSendFields []string `json:"-"`
9094
9095	// NullFields is a list of field names (e.g. "Left") to include in API
9096	// requests with the JSON null value. By default, fields with empty
9097	// values are omitted from API requests. However, any field with an
9098	// empty value appearing in NullFields will be sent to the server as
9099	// null. It is an error if a field in this list has a non-empty value.
9100	// This may be used to include null fields in Patch requests.
9101	NullFields []string `json:"-"`
9102}
9103
9104func (s *OffsetPosition) MarshalJSON() ([]byte, error) {
9105	type NoMethod OffsetPosition
9106	raw := NoMethod(*s)
9107	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9108}
9109
9110// OmnitureSettings: Omniture Integration Settings.
9111type OmnitureSettings struct {
9112	// OmnitureCostDataEnabled: Whether placement cost data will be sent to
9113	// Omniture. This property can be enabled only if
9114	// omnitureIntegrationEnabled is true.
9115	OmnitureCostDataEnabled bool `json:"omnitureCostDataEnabled,omitempty"`
9116
9117	// OmnitureIntegrationEnabled: Whether Omniture integration is enabled.
9118	// This property can be enabled only when the "Advanced Ad Serving"
9119	// account setting is enabled.
9120	OmnitureIntegrationEnabled bool `json:"omnitureIntegrationEnabled,omitempty"`
9121
9122	// ForceSendFields is a list of field names (e.g.
9123	// "OmnitureCostDataEnabled") to unconditionally include in API
9124	// requests. By default, fields with empty values are omitted from API
9125	// requests. However, any non-pointer, non-interface field appearing in
9126	// ForceSendFields will be sent to the server regardless of whether the
9127	// field is empty or not. This may be used to include empty fields in
9128	// Patch requests.
9129	ForceSendFields []string `json:"-"`
9130
9131	// NullFields is a list of field names (e.g. "OmnitureCostDataEnabled")
9132	// to include in API requests with the JSON null value. By default,
9133	// fields with empty values are omitted from API requests. However, any
9134	// field with an empty value appearing in NullFields will be sent to the
9135	// server as null. It is an error if a field in this list has a
9136	// non-empty value. This may be used to include null fields in Patch
9137	// requests.
9138	NullFields []string `json:"-"`
9139}
9140
9141func (s *OmnitureSettings) MarshalJSON() ([]byte, error) {
9142	type NoMethod OmnitureSettings
9143	raw := NoMethod(*s)
9144	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9145}
9146
9147// OperatingSystem: Contains information about an operating system that
9148// can be targeted by ads.
9149type OperatingSystem struct {
9150	// DartId: DART ID of this operating system. This is the ID used for
9151	// targeting.
9152	DartId int64 `json:"dartId,omitempty,string"`
9153
9154	// Desktop: Whether this operating system is for desktop.
9155	Desktop bool `json:"desktop,omitempty"`
9156
9157	// Kind: Identifies what kind of resource this is. Value: the fixed
9158	// string "dfareporting#operatingSystem".
9159	Kind string `json:"kind,omitempty"`
9160
9161	// Mobile: Whether this operating system is for mobile.
9162	Mobile bool `json:"mobile,omitempty"`
9163
9164	// Name: Name of this operating system.
9165	Name string `json:"name,omitempty"`
9166
9167	// ServerResponse contains the HTTP response code and headers from the
9168	// server.
9169	googleapi.ServerResponse `json:"-"`
9170
9171	// ForceSendFields is a list of field names (e.g. "DartId") to
9172	// unconditionally include in API requests. By default, fields with
9173	// empty values are omitted from API requests. However, any non-pointer,
9174	// non-interface field appearing in ForceSendFields will be sent to the
9175	// server regardless of whether the field is empty or not. This may be
9176	// used to include empty fields in Patch requests.
9177	ForceSendFields []string `json:"-"`
9178
9179	// NullFields is a list of field names (e.g. "DartId") to include in API
9180	// requests with the JSON null value. By default, fields with empty
9181	// values are omitted from API requests. However, any field with an
9182	// empty value appearing in NullFields will be sent to the server as
9183	// null. It is an error if a field in this list has a non-empty value.
9184	// This may be used to include null fields in Patch requests.
9185	NullFields []string `json:"-"`
9186}
9187
9188func (s *OperatingSystem) MarshalJSON() ([]byte, error) {
9189	type NoMethod OperatingSystem
9190	raw := NoMethod(*s)
9191	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9192}
9193
9194// OperatingSystemVersion: Contains information about a particular
9195// version of an operating system that can be targeted by ads.
9196type OperatingSystemVersion struct {
9197	// Id: ID of this operating system version.
9198	Id int64 `json:"id,omitempty,string"`
9199
9200	// Kind: Identifies what kind of resource this is. Value: the fixed
9201	// string "dfareporting#operatingSystemVersion".
9202	Kind string `json:"kind,omitempty"`
9203
9204	// MajorVersion: Major version (leftmost number) of this operating
9205	// system version.
9206	MajorVersion string `json:"majorVersion,omitempty"`
9207
9208	// MinorVersion: Minor version (number after the first dot) of this
9209	// operating system version.
9210	MinorVersion string `json:"minorVersion,omitempty"`
9211
9212	// Name: Name of this operating system version.
9213	Name string `json:"name,omitempty"`
9214
9215	// OperatingSystem: Operating system of this operating system version.
9216	OperatingSystem *OperatingSystem `json:"operatingSystem,omitempty"`
9217
9218	// ServerResponse contains the HTTP response code and headers from the
9219	// server.
9220	googleapi.ServerResponse `json:"-"`
9221
9222	// ForceSendFields is a list of field names (e.g. "Id") to
9223	// unconditionally include in API requests. By default, fields with
9224	// empty values are omitted from API requests. However, any non-pointer,
9225	// non-interface field appearing in ForceSendFields will be sent to the
9226	// server regardless of whether the field is empty or not. This may be
9227	// used to include empty fields in Patch requests.
9228	ForceSendFields []string `json:"-"`
9229
9230	// NullFields is a list of field names (e.g. "Id") to include in API
9231	// requests with the JSON null value. By default, fields with empty
9232	// values are omitted from API requests. However, any field with an
9233	// empty value appearing in NullFields will be sent to the server as
9234	// null. It is an error if a field in this list has a non-empty value.
9235	// This may be used to include null fields in Patch requests.
9236	NullFields []string `json:"-"`
9237}
9238
9239func (s *OperatingSystemVersion) MarshalJSON() ([]byte, error) {
9240	type NoMethod OperatingSystemVersion
9241	raw := NoMethod(*s)
9242	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9243}
9244
9245// OperatingSystemVersionsListResponse: Operating System Version List
9246// Response
9247type OperatingSystemVersionsListResponse struct {
9248	// Kind: Identifies what kind of resource this is. Value: the fixed
9249	// string "dfareporting#operatingSystemVersionsListResponse".
9250	Kind string `json:"kind,omitempty"`
9251
9252	// OperatingSystemVersions: Operating system version collection.
9253	OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
9254
9255	// ServerResponse contains the HTTP response code and headers from the
9256	// server.
9257	googleapi.ServerResponse `json:"-"`
9258
9259	// ForceSendFields is a list of field names (e.g. "Kind") to
9260	// unconditionally include in API requests. By default, fields with
9261	// empty values are omitted from API requests. However, any non-pointer,
9262	// non-interface field appearing in ForceSendFields will be sent to the
9263	// server regardless of whether the field is empty or not. This may be
9264	// used to include empty fields in Patch requests.
9265	ForceSendFields []string `json:"-"`
9266
9267	// NullFields is a list of field names (e.g. "Kind") to include in API
9268	// requests with the JSON null value. By default, fields with empty
9269	// values are omitted from API requests. However, any field with an
9270	// empty value appearing in NullFields will be sent to the server as
9271	// null. It is an error if a field in this list has a non-empty value.
9272	// This may be used to include null fields in Patch requests.
9273	NullFields []string `json:"-"`
9274}
9275
9276func (s *OperatingSystemVersionsListResponse) MarshalJSON() ([]byte, error) {
9277	type NoMethod OperatingSystemVersionsListResponse
9278	raw := NoMethod(*s)
9279	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9280}
9281
9282// OperatingSystemsListResponse: Operating System List Response
9283type OperatingSystemsListResponse struct {
9284	// Kind: Identifies what kind of resource this is. Value: the fixed
9285	// string "dfareporting#operatingSystemsListResponse".
9286	Kind string `json:"kind,omitempty"`
9287
9288	// OperatingSystems: Operating system collection.
9289	OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
9290
9291	// ServerResponse contains the HTTP response code and headers from the
9292	// server.
9293	googleapi.ServerResponse `json:"-"`
9294
9295	// ForceSendFields is a list of field names (e.g. "Kind") to
9296	// unconditionally include in API requests. By default, fields with
9297	// empty values are omitted from API requests. However, any non-pointer,
9298	// non-interface field appearing in ForceSendFields will be sent to the
9299	// server regardless of whether the field is empty or not. This may be
9300	// used to include empty fields in Patch requests.
9301	ForceSendFields []string `json:"-"`
9302
9303	// NullFields is a list of field names (e.g. "Kind") to include in API
9304	// requests with the JSON null value. By default, fields with empty
9305	// values are omitted from API requests. However, any field with an
9306	// empty value appearing in NullFields will be sent to the server as
9307	// null. It is an error if a field in this list has a non-empty value.
9308	// This may be used to include null fields in Patch requests.
9309	NullFields []string `json:"-"`
9310}
9311
9312func (s *OperatingSystemsListResponse) MarshalJSON() ([]byte, error) {
9313	type NoMethod OperatingSystemsListResponse
9314	raw := NoMethod(*s)
9315	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9316}
9317
9318// OptimizationActivity: Creative optimization activity.
9319type OptimizationActivity struct {
9320	// FloodlightActivityId: Floodlight activity ID of this optimization
9321	// activity. This is a required field.
9322	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
9323
9324	// FloodlightActivityIdDimensionValue: Dimension value for the ID of the
9325	// floodlight activity. This is a read-only, auto-generated field.
9326	FloodlightActivityIdDimensionValue *DimensionValue `json:"floodlightActivityIdDimensionValue,omitempty"`
9327
9328	// Weight: Weight associated with this optimization. The weight assigned
9329	// will be understood in proportion to the weights assigned to the other
9330	// optimization activities. Value must be greater than or equal to 1.
9331	Weight int64 `json:"weight,omitempty"`
9332
9333	// ForceSendFields is a list of field names (e.g.
9334	// "FloodlightActivityId") to unconditionally include in API requests.
9335	// By default, fields with empty values are omitted from API requests.
9336	// However, any non-pointer, non-interface field appearing in
9337	// ForceSendFields will be sent to the server regardless of whether the
9338	// field is empty or not. This may be used to include empty fields in
9339	// Patch requests.
9340	ForceSendFields []string `json:"-"`
9341
9342	// NullFields is a list of field names (e.g. "FloodlightActivityId") to
9343	// include in API requests with the JSON null value. By default, fields
9344	// with empty values are omitted from API requests. However, any field
9345	// with an empty value appearing in NullFields will be sent to the
9346	// server as null. It is an error if a field in this list has a
9347	// non-empty value. This may be used to include null fields in Patch
9348	// requests.
9349	NullFields []string `json:"-"`
9350}
9351
9352func (s *OptimizationActivity) MarshalJSON() ([]byte, error) {
9353	type NoMethod OptimizationActivity
9354	raw := NoMethod(*s)
9355	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9356}
9357
9358// Order: Describes properties of a Planning order.
9359type Order struct {
9360	// AccountId: Account ID of this order.
9361	AccountId int64 `json:"accountId,omitempty,string"`
9362
9363	// AdvertiserId: Advertiser ID of this order.
9364	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9365
9366	// ApproverUserProfileIds: IDs for users that have to approve documents
9367	// created for this order.
9368	ApproverUserProfileIds googleapi.Int64s `json:"approverUserProfileIds,omitempty"`
9369
9370	// BuyerInvoiceId: Buyer invoice ID associated with this order.
9371	BuyerInvoiceId string `json:"buyerInvoiceId,omitempty"`
9372
9373	// BuyerOrganizationName: Name of the buyer organization.
9374	BuyerOrganizationName string `json:"buyerOrganizationName,omitempty"`
9375
9376	// Comments: Comments in this order.
9377	Comments string `json:"comments,omitempty"`
9378
9379	// Contacts: Contacts for this order.
9380	Contacts []*OrderContact `json:"contacts,omitempty"`
9381
9382	// Id: ID of this order. This is a read-only, auto-generated field.
9383	Id int64 `json:"id,omitempty,string"`
9384
9385	// Kind: Identifies what kind of resource this is. Value: the fixed
9386	// string "dfareporting#order".
9387	Kind string `json:"kind,omitempty"`
9388
9389	// LastModifiedInfo: Information about the most recent modification of
9390	// this order.
9391	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9392
9393	// Name: Name of this order.
9394	Name string `json:"name,omitempty"`
9395
9396	// Notes: Notes of this order.
9397	Notes string `json:"notes,omitempty"`
9398
9399	// PlanningTermId: ID of the terms and conditions template used in this
9400	// order.
9401	PlanningTermId int64 `json:"planningTermId,omitempty,string"`
9402
9403	// ProjectId: Project ID of this order.
9404	ProjectId int64 `json:"projectId,omitempty,string"`
9405
9406	// SellerOrderId: Seller order ID associated with this order.
9407	SellerOrderId string `json:"sellerOrderId,omitempty"`
9408
9409	// SellerOrganizationName: Name of the seller organization.
9410	SellerOrganizationName string `json:"sellerOrganizationName,omitempty"`
9411
9412	// SiteId: Site IDs this order is associated with.
9413	SiteId googleapi.Int64s `json:"siteId,omitempty"`
9414
9415	// SiteNames: Free-form site names this order is associated with.
9416	SiteNames []string `json:"siteNames,omitempty"`
9417
9418	// SubaccountId: Subaccount ID of this order.
9419	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9420
9421	// TermsAndConditions: Terms and conditions of this order.
9422	TermsAndConditions string `json:"termsAndConditions,omitempty"`
9423
9424	// ServerResponse contains the HTTP response code and headers from the
9425	// server.
9426	googleapi.ServerResponse `json:"-"`
9427
9428	// ForceSendFields is a list of field names (e.g. "AccountId") to
9429	// unconditionally include in API requests. By default, fields with
9430	// empty values are omitted from API requests. However, any non-pointer,
9431	// non-interface field appearing in ForceSendFields will be sent to the
9432	// server regardless of whether the field is empty or not. This may be
9433	// used to include empty fields in Patch requests.
9434	ForceSendFields []string `json:"-"`
9435
9436	// NullFields is a list of field names (e.g. "AccountId") to include in
9437	// API requests with the JSON null value. By default, fields with empty
9438	// values are omitted from API requests. However, any field with an
9439	// empty value appearing in NullFields will be sent to the server as
9440	// null. It is an error if a field in this list has a non-empty value.
9441	// This may be used to include null fields in Patch requests.
9442	NullFields []string `json:"-"`
9443}
9444
9445func (s *Order) MarshalJSON() ([]byte, error) {
9446	type NoMethod Order
9447	raw := NoMethod(*s)
9448	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9449}
9450
9451// OrderContact: Contact of an order.
9452type OrderContact struct {
9453	// ContactInfo: Free-form information about this contact. It could be
9454	// any information related to this contact in addition to type, title,
9455	// name, and signature user profile ID.
9456	ContactInfo string `json:"contactInfo,omitempty"`
9457
9458	// ContactName: Name of this contact.
9459	ContactName string `json:"contactName,omitempty"`
9460
9461	// ContactTitle: Title of this contact.
9462	ContactTitle string `json:"contactTitle,omitempty"`
9463
9464	// ContactType: Type of this contact.
9465	//
9466	// Possible values:
9467	//   "PLANNING_ORDER_CONTACT_BUYER_BILLING_CONTACT"
9468	//   "PLANNING_ORDER_CONTACT_BUYER_CONTACT"
9469	//   "PLANNING_ORDER_CONTACT_SELLER_CONTACT"
9470	ContactType string `json:"contactType,omitempty"`
9471
9472	// SignatureUserProfileId: ID of the user profile containing the
9473	// signature that will be embedded into order documents.
9474	SignatureUserProfileId int64 `json:"signatureUserProfileId,omitempty,string"`
9475
9476	// ForceSendFields is a list of field names (e.g. "ContactInfo") to
9477	// unconditionally include in API requests. By default, fields with
9478	// empty values are omitted from API requests. However, any non-pointer,
9479	// non-interface field appearing in ForceSendFields will be sent to the
9480	// server regardless of whether the field is empty or not. This may be
9481	// used to include empty fields in Patch requests.
9482	ForceSendFields []string `json:"-"`
9483
9484	// NullFields is a list of field names (e.g. "ContactInfo") to include
9485	// in API requests with the JSON null value. By default, fields with
9486	// empty values are omitted from API requests. However, any field with
9487	// an empty value appearing in NullFields will be sent to the server as
9488	// null. It is an error if a field in this list has a non-empty value.
9489	// This may be used to include null fields in Patch requests.
9490	NullFields []string `json:"-"`
9491}
9492
9493func (s *OrderContact) MarshalJSON() ([]byte, error) {
9494	type NoMethod OrderContact
9495	raw := NoMethod(*s)
9496	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9497}
9498
9499// OrderDocument: Contains properties of a Planning order document.
9500type OrderDocument struct {
9501	// AccountId: Account ID of this order document.
9502	AccountId int64 `json:"accountId,omitempty,string"`
9503
9504	// AdvertiserId: Advertiser ID of this order document.
9505	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9506
9507	// AmendedOrderDocumentId: The amended order document ID of this order
9508	// document. An order document can be created by optionally amending
9509	// another order document so that the change history can be preserved.
9510	AmendedOrderDocumentId int64 `json:"amendedOrderDocumentId,omitempty,string"`
9511
9512	// ApprovedByUserProfileIds: IDs of users who have approved this order
9513	// document.
9514	ApprovedByUserProfileIds googleapi.Int64s `json:"approvedByUserProfileIds,omitempty"`
9515
9516	// Cancelled: Whether this order document is cancelled.
9517	Cancelled bool `json:"cancelled,omitempty"`
9518
9519	// CreatedInfo: Information about the creation of this order document.
9520	CreatedInfo *LastModifiedInfo `json:"createdInfo,omitempty"`
9521
9522	// EffectiveDate: Effective date of this order document.
9523	EffectiveDate string `json:"effectiveDate,omitempty"`
9524
9525	// Id: ID of this order document.
9526	Id int64 `json:"id,omitempty,string"`
9527
9528	// Kind: Identifies what kind of resource this is. Value: the fixed
9529	// string "dfareporting#orderDocument".
9530	Kind string `json:"kind,omitempty"`
9531
9532	// LastSentRecipients: List of email addresses that received the last
9533	// sent document.
9534	LastSentRecipients []string `json:"lastSentRecipients,omitempty"`
9535
9536	// LastSentTime: Timestamp of the last email sent with this order
9537	// document.
9538	LastSentTime string `json:"lastSentTime,omitempty"`
9539
9540	// OrderId: ID of the order from which this order document is created.
9541	OrderId int64 `json:"orderId,omitempty,string"`
9542
9543	// ProjectId: Project ID of this order document.
9544	ProjectId int64 `json:"projectId,omitempty,string"`
9545
9546	// Signed: Whether this order document has been signed.
9547	Signed bool `json:"signed,omitempty"`
9548
9549	// SubaccountId: Subaccount ID of this order document.
9550	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9551
9552	// Title: Title of this order document.
9553	Title string `json:"title,omitempty"`
9554
9555	// Type: Type of this order document
9556	//
9557	// Possible values:
9558	//   "PLANNING_ORDER_TYPE_CHANGE_ORDER"
9559	//   "PLANNING_ORDER_TYPE_INSERTION_ORDER"
9560	Type string `json:"type,omitempty"`
9561
9562	// ServerResponse contains the HTTP response code and headers from the
9563	// server.
9564	googleapi.ServerResponse `json:"-"`
9565
9566	// ForceSendFields is a list of field names (e.g. "AccountId") to
9567	// unconditionally include in API requests. By default, fields with
9568	// empty values are omitted from API requests. However, any non-pointer,
9569	// non-interface field appearing in ForceSendFields will be sent to the
9570	// server regardless of whether the field is empty or not. This may be
9571	// used to include empty fields in Patch requests.
9572	ForceSendFields []string `json:"-"`
9573
9574	// NullFields is a list of field names (e.g. "AccountId") to include in
9575	// API requests with the JSON null value. By default, fields with empty
9576	// values are omitted from API requests. However, any field with an
9577	// empty value appearing in NullFields will be sent to the server as
9578	// null. It is an error if a field in this list has a non-empty value.
9579	// This may be used to include null fields in Patch requests.
9580	NullFields []string `json:"-"`
9581}
9582
9583func (s *OrderDocument) MarshalJSON() ([]byte, error) {
9584	type NoMethod OrderDocument
9585	raw := NoMethod(*s)
9586	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9587}
9588
9589// OrderDocumentsListResponse: Order document List Response
9590type OrderDocumentsListResponse struct {
9591	// Kind: Identifies what kind of resource this is. Value: the fixed
9592	// string "dfareporting#orderDocumentsListResponse".
9593	Kind string `json:"kind,omitempty"`
9594
9595	// NextPageToken: Pagination token to be used for the next list
9596	// operation.
9597	NextPageToken string `json:"nextPageToken,omitempty"`
9598
9599	// OrderDocuments: Order document collection
9600	OrderDocuments []*OrderDocument `json:"orderDocuments,omitempty"`
9601
9602	// ServerResponse contains the HTTP response code and headers from the
9603	// server.
9604	googleapi.ServerResponse `json:"-"`
9605
9606	// ForceSendFields is a list of field names (e.g. "Kind") to
9607	// unconditionally include in API requests. By default, fields with
9608	// empty values are omitted from API requests. However, any non-pointer,
9609	// non-interface field appearing in ForceSendFields will be sent to the
9610	// server regardless of whether the field is empty or not. This may be
9611	// used to include empty fields in Patch requests.
9612	ForceSendFields []string `json:"-"`
9613
9614	// NullFields is a list of field names (e.g. "Kind") to include in API
9615	// requests with the JSON null value. By default, fields with empty
9616	// values are omitted from API requests. However, any field with an
9617	// empty value appearing in NullFields will be sent to the server as
9618	// null. It is an error if a field in this list has a non-empty value.
9619	// This may be used to include null fields in Patch requests.
9620	NullFields []string `json:"-"`
9621}
9622
9623func (s *OrderDocumentsListResponse) MarshalJSON() ([]byte, error) {
9624	type NoMethod OrderDocumentsListResponse
9625	raw := NoMethod(*s)
9626	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9627}
9628
9629// OrdersListResponse: Order List Response
9630type OrdersListResponse struct {
9631	// Kind: Identifies what kind of resource this is. Value: the fixed
9632	// string "dfareporting#ordersListResponse".
9633	Kind string `json:"kind,omitempty"`
9634
9635	// NextPageToken: Pagination token to be used for the next list
9636	// operation.
9637	NextPageToken string `json:"nextPageToken,omitempty"`
9638
9639	// Orders: Order collection.
9640	Orders []*Order `json:"orders,omitempty"`
9641
9642	// ServerResponse contains the HTTP response code and headers from the
9643	// server.
9644	googleapi.ServerResponse `json:"-"`
9645
9646	// ForceSendFields is a list of field names (e.g. "Kind") to
9647	// unconditionally include in API requests. By default, fields with
9648	// empty values are omitted from API requests. However, any non-pointer,
9649	// non-interface field appearing in ForceSendFields will be sent to the
9650	// server regardless of whether the field is empty or not. This may be
9651	// used to include empty fields in Patch requests.
9652	ForceSendFields []string `json:"-"`
9653
9654	// NullFields is a list of field names (e.g. "Kind") to include in API
9655	// requests with the JSON null value. By default, fields with empty
9656	// values are omitted from API requests. However, any field with an
9657	// empty value appearing in NullFields will be sent to the server as
9658	// null. It is an error if a field in this list has a non-empty value.
9659	// This may be used to include null fields in Patch requests.
9660	NullFields []string `json:"-"`
9661}
9662
9663func (s *OrdersListResponse) MarshalJSON() ([]byte, error) {
9664	type NoMethod OrdersListResponse
9665	raw := NoMethod(*s)
9666	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9667}
9668
9669// PathToConversionReportCompatibleFields: Represents fields that are
9670// compatible to be selected for a report of type "PATH_TO_CONVERSION".
9671type PathToConversionReportCompatibleFields struct {
9672	// ConversionDimensions: Conversion dimensions which are compatible to
9673	// be selected in the "conversionDimensions" section of the report.
9674	ConversionDimensions []*Dimension `json:"conversionDimensions,omitempty"`
9675
9676	// CustomFloodlightVariables: Custom floodlight variables which are
9677	// compatible to be selected in the "customFloodlightVariables" section
9678	// of the report.
9679	CustomFloodlightVariables []*Dimension `json:"customFloodlightVariables,omitempty"`
9680
9681	// Kind: The kind of resource this is, in this case
9682	// dfareporting#pathToConversionReportCompatibleFields.
9683	Kind string `json:"kind,omitempty"`
9684
9685	// Metrics: Metrics which are compatible to be selected in the
9686	// "metricNames" section of the report.
9687	Metrics []*Metric `json:"metrics,omitempty"`
9688
9689	// PerInteractionDimensions: Per-interaction dimensions which are
9690	// compatible to be selected in the "perInteractionDimensions" section
9691	// of the report.
9692	PerInteractionDimensions []*Dimension `json:"perInteractionDimensions,omitempty"`
9693
9694	// ForceSendFields is a list of field names (e.g.
9695	// "ConversionDimensions") to unconditionally include in API requests.
9696	// By default, fields with empty values are omitted from API requests.
9697	// However, any non-pointer, non-interface field appearing in
9698	// ForceSendFields will be sent to the server regardless of whether the
9699	// field is empty or not. This may be used to include empty fields in
9700	// Patch requests.
9701	ForceSendFields []string `json:"-"`
9702
9703	// NullFields is a list of field names (e.g. "ConversionDimensions") to
9704	// include in API requests with the JSON null value. By default, fields
9705	// with empty values are omitted from API requests. However, any field
9706	// with an empty value appearing in NullFields will be sent to the
9707	// server as null. It is an error if a field in this list has a
9708	// non-empty value. This may be used to include null fields in Patch
9709	// requests.
9710	NullFields []string `json:"-"`
9711}
9712
9713func (s *PathToConversionReportCompatibleFields) MarshalJSON() ([]byte, error) {
9714	type NoMethod PathToConversionReportCompatibleFields
9715	raw := NoMethod(*s)
9716	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9717}
9718
9719// Placement: Contains properties of a placement.
9720type Placement struct {
9721	// AccountId: Account ID of this placement. This field can be left
9722	// blank.
9723	AccountId int64 `json:"accountId,omitempty,string"`
9724
9725	// AdBlockingOptOut: Whether this placement opts out of ad blocking.
9726	// When true, ad blocking is disabled for this placement. When false,
9727	// the campaign and site settings take effect.
9728	AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
9729
9730	// AdditionalSizes: Additional sizes associated with this placement.
9731	// When inserting or updating a placement, only the size ID field is
9732	// used.
9733	AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
9734
9735	// AdvertiserId: Advertiser ID of this placement. This field can be left
9736	// blank.
9737	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9738
9739	// AdvertiserIdDimensionValue: Dimension value for the ID of the
9740	// advertiser. This is a read-only, auto-generated field.
9741	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
9742
9743	// Archived: Whether this placement is archived.
9744	Archived bool `json:"archived,omitempty"`
9745
9746	// CampaignId: Campaign ID of this placement. This field is a required
9747	// field on insertion.
9748	CampaignId int64 `json:"campaignId,omitempty,string"`
9749
9750	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
9751	// This is a read-only, auto-generated field.
9752	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
9753
9754	// Comment: Comments for this placement.
9755	Comment string `json:"comment,omitempty"`
9756
9757	// Compatibility: Placement compatibility. DISPLAY and
9758	// DISPLAY_INTERSTITIAL refer to rendering on desktop, on mobile devices
9759	// or in mobile apps for regular or interstitial ads respectively. APP
9760	// and APP_INTERSTITIAL are no longer allowed for new placement
9761	// insertions. Instead, use DISPLAY or DISPLAY_INTERSTITIAL.
9762	// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
9763	// with the VAST standard. This field is required on insertion.
9764	//
9765	// Possible values:
9766	//   "APP"
9767	//   "APP_INTERSTITIAL"
9768	//   "DISPLAY"
9769	//   "DISPLAY_INTERSTITIAL"
9770	//   "IN_STREAM_AUDIO"
9771	//   "IN_STREAM_VIDEO"
9772	Compatibility string `json:"compatibility,omitempty"`
9773
9774	// ContentCategoryId: ID of the content category assigned to this
9775	// placement.
9776	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
9777
9778	// CreateInfo: Information about the creation of this placement. This is
9779	// a read-only field.
9780	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
9781
9782	// DirectorySiteId: Directory site ID of this placement. On insert, you
9783	// must set either this field or the siteId field to specify the site
9784	// associated with this placement. This is a required field that is
9785	// read-only after insertion.
9786	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
9787
9788	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
9789	// directory site. This is a read-only, auto-generated field.
9790	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
9791
9792	// ExternalId: External ID for this placement.
9793	ExternalId string `json:"externalId,omitempty"`
9794
9795	// Id: ID of this placement. This is a read-only, auto-generated field.
9796	Id int64 `json:"id,omitempty,string"`
9797
9798	// IdDimensionValue: Dimension value for the ID of this placement. This
9799	// is a read-only, auto-generated field.
9800	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
9801
9802	// KeyName: Key name of this placement. This is a read-only,
9803	// auto-generated field.
9804	KeyName string `json:"keyName,omitempty"`
9805
9806	// Kind: Identifies what kind of resource this is. Value: the fixed
9807	// string "dfareporting#placement".
9808	Kind string `json:"kind,omitempty"`
9809
9810	// LastModifiedInfo: Information about the most recent modification of
9811	// this placement. This is a read-only field.
9812	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9813
9814	// LookbackConfiguration: Lookback window settings for this placement.
9815	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
9816
9817	// Name: Name of this placement.This is a required field and must be
9818	// less than 256 characters long.
9819	Name string `json:"name,omitempty"`
9820
9821	// PaymentApproved: Whether payment was approved for this placement.
9822	// This is a read-only field relevant only to publisher-paid placements.
9823	PaymentApproved bool `json:"paymentApproved,omitempty"`
9824
9825	// PaymentSource: Payment source for this placement. This is a required
9826	// field that is read-only after insertion.
9827	//
9828	// Possible values:
9829	//   "PLACEMENT_AGENCY_PAID"
9830	//   "PLACEMENT_PUBLISHER_PAID"
9831	PaymentSource string `json:"paymentSource,omitempty"`
9832
9833	// PlacementGroupId: ID of this placement's group, if applicable.
9834	PlacementGroupId int64 `json:"placementGroupId,omitempty,string"`
9835
9836	// PlacementGroupIdDimensionValue: Dimension value for the ID of the
9837	// placement group. This is a read-only, auto-generated field.
9838	PlacementGroupIdDimensionValue *DimensionValue `json:"placementGroupIdDimensionValue,omitempty"`
9839
9840	// PlacementStrategyId: ID of the placement strategy assigned to this
9841	// placement.
9842	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
9843
9844	// PricingSchedule: Pricing schedule of this placement. This field is
9845	// required on insertion, specifically subfields startDate, endDate and
9846	// pricingType.
9847	PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
9848
9849	// Primary: Whether this placement is the primary placement of a
9850	// roadblock (placement group). You cannot change this field from true
9851	// to false. Setting this field to true will automatically set the
9852	// primary field on the original primary placement of the roadblock to
9853	// false, and it will automatically set the roadblock's
9854	// primaryPlacementId field to the ID of this placement.
9855	Primary bool `json:"primary,omitempty"`
9856
9857	// PublisherUpdateInfo: Information about the last publisher update.
9858	// This is a read-only field.
9859	PublisherUpdateInfo *LastModifiedInfo `json:"publisherUpdateInfo,omitempty"`
9860
9861	// SiteId: Site ID associated with this placement. On insert, you must
9862	// set either this field or the directorySiteId field to specify the
9863	// site associated with this placement. This is a required field that is
9864	// read-only after insertion.
9865	SiteId int64 `json:"siteId,omitempty,string"`
9866
9867	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
9868	// a read-only, auto-generated field.
9869	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
9870
9871	// Size: Size associated with this placement. When inserting or updating
9872	// a placement, only the size ID field is used. This field is required
9873	// on insertion.
9874	Size *Size `json:"size,omitempty"`
9875
9876	// SslRequired: Whether creatives assigned to this placement must be
9877	// SSL-compliant.
9878	SslRequired bool `json:"sslRequired,omitempty"`
9879
9880	// Status: Third-party placement status.
9881	//
9882	// Possible values:
9883	//   "ACKNOWLEDGE_ACCEPTANCE"
9884	//   "ACKNOWLEDGE_REJECTION"
9885	//   "DRAFT"
9886	//   "PAYMENT_ACCEPTED"
9887	//   "PAYMENT_REJECTED"
9888	//   "PENDING_REVIEW"
9889	Status string `json:"status,omitempty"`
9890
9891	// SubaccountId: Subaccount ID of this placement. This field can be left
9892	// blank.
9893	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9894
9895	// TagFormats: Tag formats to generate for this placement. This field is
9896	// required on insertion.
9897	// Acceptable values are:
9898	// - "PLACEMENT_TAG_STANDARD"
9899	// - "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
9900	// - "PLACEMENT_TAG_IFRAME_ILAYER"
9901	// - "PLACEMENT_TAG_INTERNAL_REDIRECT"
9902	// - "PLACEMENT_TAG_JAVASCRIPT"
9903	// - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
9904	// - "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
9905	// - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
9906	// - "PLACEMENT_TAG_CLICK_COMMANDS"
9907	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
9908	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
9909	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
9910	// - "PLACEMENT_TAG_TRACKING"
9911	// - "PLACEMENT_TAG_TRACKING_IFRAME"
9912	// - "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
9913	//
9914	// Possible values:
9915	//   "PLACEMENT_TAG_CLICK_COMMANDS"
9916	//   "PLACEMENT_TAG_IFRAME_ILAYER"
9917	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
9918	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
9919	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
9920	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
9921	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
9922	//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
9923	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
9924	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
9925	//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
9926	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
9927	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
9928	//   "PLACEMENT_TAG_JAVASCRIPT"
9929	//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
9930	//   "PLACEMENT_TAG_STANDARD"
9931	//   "PLACEMENT_TAG_TRACKING"
9932	//   "PLACEMENT_TAG_TRACKING_IFRAME"
9933	//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
9934	TagFormats []string `json:"tagFormats,omitempty"`
9935
9936	// TagSetting: Tag settings for this placement.
9937	TagSetting *TagSetting `json:"tagSetting,omitempty"`
9938
9939	// VideoActiveViewOptOut: Whether Verification and ActiveView are
9940	// disabled for in-stream video creatives for this placement. The same
9941	// setting videoActiveViewOptOut exists on the site level -- the opt out
9942	// occurs if either of these settings are true. These settings are
9943	// distinct from DirectorySites.settings.activeViewOptOut or
9944	// Sites.siteSettings.activeViewOptOut which only apply to display ads.
9945	// However, Accounts.activeViewOptOut opts out both video traffic, as
9946	// well as display ads, from Verification and ActiveView.
9947	VideoActiveViewOptOut bool `json:"videoActiveViewOptOut,omitempty"`
9948
9949	// VideoSettings: A collection of settings which affect video creatives
9950	// served through this placement. Applicable to placements with
9951	// IN_STREAM_VIDEO compatibility.
9952	VideoSettings *VideoSettings `json:"videoSettings,omitempty"`
9953
9954	// VpaidAdapterChoice: VPAID adapter setting for this placement.
9955	// Controls which VPAID format the measurement adapter will use for
9956	// in-stream video creatives assigned to this placement.
9957	//
9958	// Note: Flash is no longer supported. This field now defaults to HTML5
9959	// when the following values are provided: FLASH, BOTH.
9960	//
9961	// Possible values:
9962	//   "BOTH"
9963	//   "DEFAULT"
9964	//   "FLASH"
9965	//   "HTML5"
9966	VpaidAdapterChoice string `json:"vpaidAdapterChoice,omitempty"`
9967
9968	// ServerResponse contains the HTTP response code and headers from the
9969	// server.
9970	googleapi.ServerResponse `json:"-"`
9971
9972	// ForceSendFields is a list of field names (e.g. "AccountId") to
9973	// unconditionally include in API requests. By default, fields with
9974	// empty values are omitted from API requests. However, any non-pointer,
9975	// non-interface field appearing in ForceSendFields will be sent to the
9976	// server regardless of whether the field is empty or not. This may be
9977	// used to include empty fields in Patch requests.
9978	ForceSendFields []string `json:"-"`
9979
9980	// NullFields is a list of field names (e.g. "AccountId") to include in
9981	// API requests with the JSON null value. By default, fields with empty
9982	// values are omitted from API requests. However, any field with an
9983	// empty value appearing in NullFields will be sent to the server as
9984	// null. It is an error if a field in this list has a non-empty value.
9985	// This may be used to include null fields in Patch requests.
9986	NullFields []string `json:"-"`
9987}
9988
9989func (s *Placement) MarshalJSON() ([]byte, error) {
9990	type NoMethod Placement
9991	raw := NoMethod(*s)
9992	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9993}
9994
9995// PlacementAssignment: Placement Assignment.
9996type PlacementAssignment struct {
9997	// Active: Whether this placement assignment is active. When true, the
9998	// placement will be included in the ad's rotation.
9999	Active bool `json:"active,omitempty"`
10000
10001	// PlacementId: ID of the placement to be assigned. This is a required
10002	// field.
10003	PlacementId int64 `json:"placementId,omitempty,string"`
10004
10005	// PlacementIdDimensionValue: Dimension value for the ID of the
10006	// placement. This is a read-only, auto-generated field.
10007	PlacementIdDimensionValue *DimensionValue `json:"placementIdDimensionValue,omitempty"`
10008
10009	// SslRequired: Whether the placement to be assigned requires SSL. This
10010	// is a read-only field that is auto-generated when the ad is inserted
10011	// or updated.
10012	SslRequired bool `json:"sslRequired,omitempty"`
10013
10014	// ForceSendFields is a list of field names (e.g. "Active") to
10015	// unconditionally include in API requests. By default, fields with
10016	// empty values are omitted from API requests. However, any non-pointer,
10017	// non-interface field appearing in ForceSendFields will be sent to the
10018	// server regardless of whether the field is empty or not. This may be
10019	// used to include empty fields in Patch requests.
10020	ForceSendFields []string `json:"-"`
10021
10022	// NullFields is a list of field names (e.g. "Active") to include in API
10023	// requests with the JSON null value. By default, fields with empty
10024	// values are omitted from API requests. However, any field with an
10025	// empty value appearing in NullFields will be sent to the server as
10026	// null. It is an error if a field in this list has a non-empty value.
10027	// This may be used to include null fields in Patch requests.
10028	NullFields []string `json:"-"`
10029}
10030
10031func (s *PlacementAssignment) MarshalJSON() ([]byte, error) {
10032	type NoMethod PlacementAssignment
10033	raw := NoMethod(*s)
10034	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10035}
10036
10037// PlacementGroup: Contains properties of a package or roadblock.
10038type PlacementGroup struct {
10039	// AccountId: Account ID of this placement group. This is a read-only
10040	// field that can be left blank.
10041	AccountId int64 `json:"accountId,omitempty,string"`
10042
10043	// AdvertiserId: Advertiser ID of this placement group. This is a
10044	// required field on insertion.
10045	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10046
10047	// AdvertiserIdDimensionValue: Dimension value for the ID of the
10048	// advertiser. This is a read-only, auto-generated field.
10049	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
10050
10051	// Archived: Whether this placement group is archived.
10052	Archived bool `json:"archived,omitempty"`
10053
10054	// CampaignId: Campaign ID of this placement group. This field is
10055	// required on insertion.
10056	CampaignId int64 `json:"campaignId,omitempty,string"`
10057
10058	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
10059	// This is a read-only, auto-generated field.
10060	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
10061
10062	// ChildPlacementIds: IDs of placements which are assigned to this
10063	// placement group. This is a read-only, auto-generated field.
10064	ChildPlacementIds googleapi.Int64s `json:"childPlacementIds,omitempty"`
10065
10066	// Comment: Comments for this placement group.
10067	Comment string `json:"comment,omitempty"`
10068
10069	// ContentCategoryId: ID of the content category assigned to this
10070	// placement group.
10071	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
10072
10073	// CreateInfo: Information about the creation of this placement group.
10074	// This is a read-only field.
10075	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
10076
10077	// DirectorySiteId: Directory site ID associated with this placement
10078	// group. On insert, you must set either this field or the site_id field
10079	// to specify the site associated with this placement group. This is a
10080	// required field that is read-only after insertion.
10081	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
10082
10083	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
10084	// directory site. This is a read-only, auto-generated field.
10085	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
10086
10087	// ExternalId: External ID for this placement.
10088	ExternalId string `json:"externalId,omitempty"`
10089
10090	// Id: ID of this placement group. This is a read-only, auto-generated
10091	// field.
10092	Id int64 `json:"id,omitempty,string"`
10093
10094	// IdDimensionValue: Dimension value for the ID of this placement group.
10095	// This is a read-only, auto-generated field.
10096	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
10097
10098	// Kind: Identifies what kind of resource this is. Value: the fixed
10099	// string "dfareporting#placementGroup".
10100	Kind string `json:"kind,omitempty"`
10101
10102	// LastModifiedInfo: Information about the most recent modification of
10103	// this placement group. This is a read-only field.
10104	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
10105
10106	// Name: Name of this placement group. This is a required field and must
10107	// be less than 256 characters long.
10108	Name string `json:"name,omitempty"`
10109
10110	// PlacementGroupType: Type of this placement group. A package is a
10111	// simple group of placements that acts as a single pricing point for a
10112	// group of tags. A roadblock is a group of placements that not only
10113	// acts as a single pricing point, but also assumes that all the tags in
10114	// it will be served at the same time. A roadblock requires one of its
10115	// assigned placements to be marked as primary for reporting. This field
10116	// is required on insertion.
10117	//
10118	// Possible values:
10119	//   "PLACEMENT_PACKAGE"
10120	//   "PLACEMENT_ROADBLOCK"
10121	PlacementGroupType string `json:"placementGroupType,omitempty"`
10122
10123	// PlacementStrategyId: ID of the placement strategy assigned to this
10124	// placement group.
10125	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
10126
10127	// PricingSchedule: Pricing schedule of this placement group. This field
10128	// is required on insertion.
10129	PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
10130
10131	// PrimaryPlacementId: ID of the primary placement, used to calculate
10132	// the media cost of a roadblock (placement group). Modifying this field
10133	// will automatically modify the primary field on all affected roadblock
10134	// child placements.
10135	PrimaryPlacementId int64 `json:"primaryPlacementId,omitempty,string"`
10136
10137	// PrimaryPlacementIdDimensionValue: Dimension value for the ID of the
10138	// primary placement. This is a read-only, auto-generated field.
10139	PrimaryPlacementIdDimensionValue *DimensionValue `json:"primaryPlacementIdDimensionValue,omitempty"`
10140
10141	// SiteId: Site ID associated with this placement group. On insert, you
10142	// must set either this field or the directorySiteId field to specify
10143	// the site associated with this placement group. This is a required
10144	// field that is read-only after insertion.
10145	SiteId int64 `json:"siteId,omitempty,string"`
10146
10147	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
10148	// a read-only, auto-generated field.
10149	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
10150
10151	// SubaccountId: Subaccount ID of this placement group. This is a
10152	// read-only field that can be left blank.
10153	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10154
10155	// ServerResponse contains the HTTP response code and headers from the
10156	// server.
10157	googleapi.ServerResponse `json:"-"`
10158
10159	// ForceSendFields is a list of field names (e.g. "AccountId") to
10160	// unconditionally include in API requests. By default, fields with
10161	// empty values are omitted from API requests. However, any non-pointer,
10162	// non-interface field appearing in ForceSendFields will be sent to the
10163	// server regardless of whether the field is empty or not. This may be
10164	// used to include empty fields in Patch requests.
10165	ForceSendFields []string `json:"-"`
10166
10167	// NullFields is a list of field names (e.g. "AccountId") to include in
10168	// API requests with the JSON null value. By default, fields with empty
10169	// values are omitted from API requests. However, any field with an
10170	// empty value appearing in NullFields will be sent to the server as
10171	// null. It is an error if a field in this list has a non-empty value.
10172	// This may be used to include null fields in Patch requests.
10173	NullFields []string `json:"-"`
10174}
10175
10176func (s *PlacementGroup) MarshalJSON() ([]byte, error) {
10177	type NoMethod PlacementGroup
10178	raw := NoMethod(*s)
10179	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10180}
10181
10182// PlacementGroupsListResponse: Placement Group List Response
10183type PlacementGroupsListResponse struct {
10184	// Kind: Identifies what kind of resource this is. Value: the fixed
10185	// string "dfareporting#placementGroupsListResponse".
10186	Kind string `json:"kind,omitempty"`
10187
10188	// NextPageToken: Pagination token to be used for the next list
10189	// operation.
10190	NextPageToken string `json:"nextPageToken,omitempty"`
10191
10192	// PlacementGroups: Placement group collection.
10193	PlacementGroups []*PlacementGroup `json:"placementGroups,omitempty"`
10194
10195	// ServerResponse contains the HTTP response code and headers from the
10196	// server.
10197	googleapi.ServerResponse `json:"-"`
10198
10199	// ForceSendFields is a list of field names (e.g. "Kind") to
10200	// unconditionally include in API requests. By default, fields with
10201	// empty values are omitted from API requests. However, any non-pointer,
10202	// non-interface field appearing in ForceSendFields will be sent to the
10203	// server regardless of whether the field is empty or not. This may be
10204	// used to include empty fields in Patch requests.
10205	ForceSendFields []string `json:"-"`
10206
10207	// NullFields is a list of field names (e.g. "Kind") to include in API
10208	// requests with the JSON null value. By default, fields with empty
10209	// values are omitted from API requests. However, any field with an
10210	// empty value appearing in NullFields will be sent to the server as
10211	// null. It is an error if a field in this list has a non-empty value.
10212	// This may be used to include null fields in Patch requests.
10213	NullFields []string `json:"-"`
10214}
10215
10216func (s *PlacementGroupsListResponse) MarshalJSON() ([]byte, error) {
10217	type NoMethod PlacementGroupsListResponse
10218	raw := NoMethod(*s)
10219	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10220}
10221
10222// PlacementStrategiesListResponse: Placement Strategy List Response
10223type PlacementStrategiesListResponse struct {
10224	// Kind: Identifies what kind of resource this is. Value: the fixed
10225	// string "dfareporting#placementStrategiesListResponse".
10226	Kind string `json:"kind,omitempty"`
10227
10228	// NextPageToken: Pagination token to be used for the next list
10229	// operation.
10230	NextPageToken string `json:"nextPageToken,omitempty"`
10231
10232	// PlacementStrategies: Placement strategy collection.
10233	PlacementStrategies []*PlacementStrategy `json:"placementStrategies,omitempty"`
10234
10235	// ServerResponse contains the HTTP response code and headers from the
10236	// server.
10237	googleapi.ServerResponse `json:"-"`
10238
10239	// ForceSendFields is a list of field names (e.g. "Kind") to
10240	// unconditionally include in API requests. By default, fields with
10241	// empty values are omitted from API requests. However, any non-pointer,
10242	// non-interface field appearing in ForceSendFields will be sent to the
10243	// server regardless of whether the field is empty or not. This may be
10244	// used to include empty fields in Patch requests.
10245	ForceSendFields []string `json:"-"`
10246
10247	// NullFields is a list of field names (e.g. "Kind") to include in API
10248	// requests with the JSON null value. By default, fields with empty
10249	// values are omitted from API requests. However, any field with an
10250	// empty value appearing in NullFields will be sent to the server as
10251	// null. It is an error if a field in this list has a non-empty value.
10252	// This may be used to include null fields in Patch requests.
10253	NullFields []string `json:"-"`
10254}
10255
10256func (s *PlacementStrategiesListResponse) MarshalJSON() ([]byte, error) {
10257	type NoMethod PlacementStrategiesListResponse
10258	raw := NoMethod(*s)
10259	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10260}
10261
10262// PlacementStrategy: Contains properties of a placement strategy.
10263type PlacementStrategy struct {
10264	// AccountId: Account ID of this placement strategy.This is a read-only
10265	// field that can be left blank.
10266	AccountId int64 `json:"accountId,omitempty,string"`
10267
10268	// Id: ID of this placement strategy. This is a read-only,
10269	// auto-generated field.
10270	Id int64 `json:"id,omitempty,string"`
10271
10272	// Kind: Identifies what kind of resource this is. Value: the fixed
10273	// string "dfareporting#placementStrategy".
10274	Kind string `json:"kind,omitempty"`
10275
10276	// Name: Name of this placement strategy. This is a required field. It
10277	// must be less than 256 characters long and unique among placement
10278	// strategies of the same account.
10279	Name string `json:"name,omitempty"`
10280
10281	// ServerResponse contains the HTTP response code and headers from the
10282	// server.
10283	googleapi.ServerResponse `json:"-"`
10284
10285	// ForceSendFields is a list of field names (e.g. "AccountId") to
10286	// unconditionally include in API requests. By default, fields with
10287	// empty values are omitted from API requests. However, any non-pointer,
10288	// non-interface field appearing in ForceSendFields will be sent to the
10289	// server regardless of whether the field is empty or not. This may be
10290	// used to include empty fields in Patch requests.
10291	ForceSendFields []string `json:"-"`
10292
10293	// NullFields is a list of field names (e.g. "AccountId") to include in
10294	// API requests with the JSON null value. By default, fields with empty
10295	// values are omitted from API requests. However, any field with an
10296	// empty value appearing in NullFields will be sent to the server as
10297	// null. It is an error if a field in this list has a non-empty value.
10298	// This may be used to include null fields in Patch requests.
10299	NullFields []string `json:"-"`
10300}
10301
10302func (s *PlacementStrategy) MarshalJSON() ([]byte, error) {
10303	type NoMethod PlacementStrategy
10304	raw := NoMethod(*s)
10305	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10306}
10307
10308// PlacementTag: Placement Tag
10309type PlacementTag struct {
10310	// PlacementId: Placement ID
10311	PlacementId int64 `json:"placementId,omitempty,string"`
10312
10313	// TagDatas: Tags generated for this placement.
10314	TagDatas []*TagData `json:"tagDatas,omitempty"`
10315
10316	// ForceSendFields is a list of field names (e.g. "PlacementId") to
10317	// unconditionally include in API requests. By default, fields with
10318	// empty values are omitted from API requests. However, any non-pointer,
10319	// non-interface field appearing in ForceSendFields will be sent to the
10320	// server regardless of whether the field is empty or not. This may be
10321	// used to include empty fields in Patch requests.
10322	ForceSendFields []string `json:"-"`
10323
10324	// NullFields is a list of field names (e.g. "PlacementId") to include
10325	// in API requests with the JSON null value. By default, fields with
10326	// empty values are omitted from API requests. However, any field with
10327	// an empty value appearing in NullFields will be sent to the server as
10328	// null. It is an error if a field in this list has a non-empty value.
10329	// This may be used to include null fields in Patch requests.
10330	NullFields []string `json:"-"`
10331}
10332
10333func (s *PlacementTag) MarshalJSON() ([]byte, error) {
10334	type NoMethod PlacementTag
10335	raw := NoMethod(*s)
10336	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10337}
10338
10339// PlacementsGenerateTagsResponse: Placement GenerateTags Response
10340type PlacementsGenerateTagsResponse struct {
10341	// Kind: Identifies what kind of resource this is. Value: the fixed
10342	// string "dfareporting#placementsGenerateTagsResponse".
10343	Kind string `json:"kind,omitempty"`
10344
10345	// PlacementTags: Set of generated tags for the specified placements.
10346	PlacementTags []*PlacementTag `json:"placementTags,omitempty"`
10347
10348	// ServerResponse contains the HTTP response code and headers from the
10349	// server.
10350	googleapi.ServerResponse `json:"-"`
10351
10352	// ForceSendFields is a list of field names (e.g. "Kind") to
10353	// unconditionally include in API requests. By default, fields with
10354	// empty values are omitted from API requests. However, any non-pointer,
10355	// non-interface field appearing in ForceSendFields will be sent to the
10356	// server regardless of whether the field is empty or not. This may be
10357	// used to include empty fields in Patch requests.
10358	ForceSendFields []string `json:"-"`
10359
10360	// NullFields is a list of field names (e.g. "Kind") to include in API
10361	// requests with the JSON null value. By default, fields with empty
10362	// values are omitted from API requests. However, any field with an
10363	// empty value appearing in NullFields will be sent to the server as
10364	// null. It is an error if a field in this list has a non-empty value.
10365	// This may be used to include null fields in Patch requests.
10366	NullFields []string `json:"-"`
10367}
10368
10369func (s *PlacementsGenerateTagsResponse) MarshalJSON() ([]byte, error) {
10370	type NoMethod PlacementsGenerateTagsResponse
10371	raw := NoMethod(*s)
10372	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10373}
10374
10375// PlacementsListResponse: Placement List Response
10376type PlacementsListResponse struct {
10377	// Kind: Identifies what kind of resource this is. Value: the fixed
10378	// string "dfareporting#placementsListResponse".
10379	Kind string `json:"kind,omitempty"`
10380
10381	// NextPageToken: Pagination token to be used for the next list
10382	// operation.
10383	NextPageToken string `json:"nextPageToken,omitempty"`
10384
10385	// Placements: Placement collection.
10386	Placements []*Placement `json:"placements,omitempty"`
10387
10388	// ServerResponse contains the HTTP response code and headers from the
10389	// server.
10390	googleapi.ServerResponse `json:"-"`
10391
10392	// ForceSendFields is a list of field names (e.g. "Kind") to
10393	// unconditionally include in API requests. By default, fields with
10394	// empty values are omitted from API requests. However, any non-pointer,
10395	// non-interface field appearing in ForceSendFields will be sent to the
10396	// server regardless of whether the field is empty or not. This may be
10397	// used to include empty fields in Patch requests.
10398	ForceSendFields []string `json:"-"`
10399
10400	// NullFields is a list of field names (e.g. "Kind") to include in API
10401	// requests with the JSON null value. By default, fields with empty
10402	// values are omitted from API requests. However, any field with an
10403	// empty value appearing in NullFields will be sent to the server as
10404	// null. It is an error if a field in this list has a non-empty value.
10405	// This may be used to include null fields in Patch requests.
10406	NullFields []string `json:"-"`
10407}
10408
10409func (s *PlacementsListResponse) MarshalJSON() ([]byte, error) {
10410	type NoMethod PlacementsListResponse
10411	raw := NoMethod(*s)
10412	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10413}
10414
10415// PlatformType: Contains information about a platform type that can be
10416// targeted by ads.
10417type PlatformType struct {
10418	// Id: ID of this platform type.
10419	Id int64 `json:"id,omitempty,string"`
10420
10421	// Kind: Identifies what kind of resource this is. Value: the fixed
10422	// string "dfareporting#platformType".
10423	Kind string `json:"kind,omitempty"`
10424
10425	// Name: Name of this platform type.
10426	Name string `json:"name,omitempty"`
10427
10428	// ServerResponse contains the HTTP response code and headers from the
10429	// server.
10430	googleapi.ServerResponse `json:"-"`
10431
10432	// ForceSendFields is a list of field names (e.g. "Id") to
10433	// unconditionally include in API requests. By default, fields with
10434	// empty values are omitted from API requests. However, any non-pointer,
10435	// non-interface field appearing in ForceSendFields will be sent to the
10436	// server regardless of whether the field is empty or not. This may be
10437	// used to include empty fields in Patch requests.
10438	ForceSendFields []string `json:"-"`
10439
10440	// NullFields is a list of field names (e.g. "Id") to include in API
10441	// requests with the JSON null value. By default, fields with empty
10442	// values are omitted from API requests. However, any field with an
10443	// empty value appearing in NullFields will be sent to the server as
10444	// null. It is an error if a field in this list has a non-empty value.
10445	// This may be used to include null fields in Patch requests.
10446	NullFields []string `json:"-"`
10447}
10448
10449func (s *PlatformType) MarshalJSON() ([]byte, error) {
10450	type NoMethod PlatformType
10451	raw := NoMethod(*s)
10452	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10453}
10454
10455// PlatformTypesListResponse: Platform Type List Response
10456type PlatformTypesListResponse struct {
10457	// Kind: Identifies what kind of resource this is. Value: the fixed
10458	// string "dfareporting#platformTypesListResponse".
10459	Kind string `json:"kind,omitempty"`
10460
10461	// PlatformTypes: Platform type collection.
10462	PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
10463
10464	// ServerResponse contains the HTTP response code and headers from the
10465	// server.
10466	googleapi.ServerResponse `json:"-"`
10467
10468	// ForceSendFields is a list of field names (e.g. "Kind") to
10469	// unconditionally include in API requests. By default, fields with
10470	// empty values are omitted from API requests. However, any non-pointer,
10471	// non-interface field appearing in ForceSendFields will be sent to the
10472	// server regardless of whether the field is empty or not. This may be
10473	// used to include empty fields in Patch requests.
10474	ForceSendFields []string `json:"-"`
10475
10476	// NullFields is a list of field names (e.g. "Kind") to include in API
10477	// requests with the JSON null value. By default, fields with empty
10478	// values are omitted from API requests. However, any field with an
10479	// empty value appearing in NullFields will be sent to the server as
10480	// null. It is an error if a field in this list has a non-empty value.
10481	// This may be used to include null fields in Patch requests.
10482	NullFields []string `json:"-"`
10483}
10484
10485func (s *PlatformTypesListResponse) MarshalJSON() ([]byte, error) {
10486	type NoMethod PlatformTypesListResponse
10487	raw := NoMethod(*s)
10488	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10489}
10490
10491// PopupWindowProperties: Popup Window Properties.
10492type PopupWindowProperties struct {
10493	// Dimension: Popup dimension for a creative. This is a read-only field.
10494	// Applicable to the following creative types: all RICH_MEDIA and all
10495	// VPAID
10496	Dimension *Size `json:"dimension,omitempty"`
10497
10498	// Offset: Upper-left corner coordinates of the popup window. Applicable
10499	// if positionType is COORDINATES.
10500	Offset *OffsetPosition `json:"offset,omitempty"`
10501
10502	// PositionType: Popup window position either centered or at specific
10503	// coordinate.
10504	//
10505	// Possible values:
10506	//   "CENTER"
10507	//   "COORDINATES"
10508	PositionType string `json:"positionType,omitempty"`
10509
10510	// ShowAddressBar: Whether to display the browser address bar.
10511	ShowAddressBar bool `json:"showAddressBar,omitempty"`
10512
10513	// ShowMenuBar: Whether to display the browser menu bar.
10514	ShowMenuBar bool `json:"showMenuBar,omitempty"`
10515
10516	// ShowScrollBar: Whether to display the browser scroll bar.
10517	ShowScrollBar bool `json:"showScrollBar,omitempty"`
10518
10519	// ShowStatusBar: Whether to display the browser status bar.
10520	ShowStatusBar bool `json:"showStatusBar,omitempty"`
10521
10522	// ShowToolBar: Whether to display the browser tool bar.
10523	ShowToolBar bool `json:"showToolBar,omitempty"`
10524
10525	// Title: Title of popup window.
10526	Title string `json:"title,omitempty"`
10527
10528	// ForceSendFields is a list of field names (e.g. "Dimension") to
10529	// unconditionally include in API requests. By default, fields with
10530	// empty values are omitted from API requests. However, any non-pointer,
10531	// non-interface field appearing in ForceSendFields will be sent to the
10532	// server regardless of whether the field is empty or not. This may be
10533	// used to include empty fields in Patch requests.
10534	ForceSendFields []string `json:"-"`
10535
10536	// NullFields is a list of field names (e.g. "Dimension") to include in
10537	// API requests with the JSON null value. By default, fields with empty
10538	// values are omitted from API requests. However, any field with an
10539	// empty value appearing in NullFields will be sent to the server as
10540	// null. It is an error if a field in this list has a non-empty value.
10541	// This may be used to include null fields in Patch requests.
10542	NullFields []string `json:"-"`
10543}
10544
10545func (s *PopupWindowProperties) MarshalJSON() ([]byte, error) {
10546	type NoMethod PopupWindowProperties
10547	raw := NoMethod(*s)
10548	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10549}
10550
10551// PostalCode: Contains information about a postal code that can be
10552// targeted by ads.
10553type PostalCode struct {
10554	// Code: Postal code. This is equivalent to the id field.
10555	Code string `json:"code,omitempty"`
10556
10557	// CountryCode: Country code of the country to which this postal code
10558	// belongs.
10559	CountryCode string `json:"countryCode,omitempty"`
10560
10561	// CountryDartId: DART ID of the country to which this postal code
10562	// belongs.
10563	CountryDartId int64 `json:"countryDartId,omitempty,string"`
10564
10565	// Id: ID of this postal code.
10566	Id string `json:"id,omitempty"`
10567
10568	// Kind: Identifies what kind of resource this is. Value: the fixed
10569	// string "dfareporting#postalCode".
10570	Kind string `json:"kind,omitempty"`
10571
10572	// ServerResponse contains the HTTP response code and headers from the
10573	// server.
10574	googleapi.ServerResponse `json:"-"`
10575
10576	// ForceSendFields is a list of field names (e.g. "Code") to
10577	// unconditionally include in API requests. By default, fields with
10578	// empty values are omitted from API requests. However, any non-pointer,
10579	// non-interface field appearing in ForceSendFields will be sent to the
10580	// server regardless of whether the field is empty or not. This may be
10581	// used to include empty fields in Patch requests.
10582	ForceSendFields []string `json:"-"`
10583
10584	// NullFields is a list of field names (e.g. "Code") to include in API
10585	// requests with the JSON null value. By default, fields with empty
10586	// values are omitted from API requests. However, any field with an
10587	// empty value appearing in NullFields will be sent to the server as
10588	// null. It is an error if a field in this list has a non-empty value.
10589	// This may be used to include null fields in Patch requests.
10590	NullFields []string `json:"-"`
10591}
10592
10593func (s *PostalCode) MarshalJSON() ([]byte, error) {
10594	type NoMethod PostalCode
10595	raw := NoMethod(*s)
10596	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10597}
10598
10599// PostalCodesListResponse: Postal Code List Response
10600type PostalCodesListResponse struct {
10601	// Kind: Identifies what kind of resource this is. Value: the fixed
10602	// string "dfareporting#postalCodesListResponse".
10603	Kind string `json:"kind,omitempty"`
10604
10605	// PostalCodes: Postal code collection.
10606	PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
10607
10608	// ServerResponse contains the HTTP response code and headers from the
10609	// server.
10610	googleapi.ServerResponse `json:"-"`
10611
10612	// ForceSendFields is a list of field names (e.g. "Kind") to
10613	// unconditionally include in API requests. By default, fields with
10614	// empty values are omitted from API requests. However, any non-pointer,
10615	// non-interface field appearing in ForceSendFields will be sent to the
10616	// server regardless of whether the field is empty or not. This may be
10617	// used to include empty fields in Patch requests.
10618	ForceSendFields []string `json:"-"`
10619
10620	// NullFields is a list of field names (e.g. "Kind") to include in API
10621	// requests with the JSON null value. By default, fields with empty
10622	// values are omitted from API requests. However, any field with an
10623	// empty value appearing in NullFields will be sent to the server as
10624	// null. It is an error if a field in this list has a non-empty value.
10625	// This may be used to include null fields in Patch requests.
10626	NullFields []string `json:"-"`
10627}
10628
10629func (s *PostalCodesListResponse) MarshalJSON() ([]byte, error) {
10630	type NoMethod PostalCodesListResponse
10631	raw := NoMethod(*s)
10632	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10633}
10634
10635// Pricing: Pricing Information
10636type Pricing struct {
10637	// CapCostType: Cap cost type of this inventory item.
10638	//
10639	// Possible values:
10640	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_CUMULATIVE"
10641	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_MONTHLY"
10642	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_NONE"
10643	CapCostType string `json:"capCostType,omitempty"`
10644
10645	// EndDate: End date of this inventory item.
10646	EndDate string `json:"endDate,omitempty"`
10647
10648	// Flights: Flights of this inventory item. A flight (a.k.a. pricing
10649	// period) represents the inventory item pricing information for a
10650	// specific period of time.
10651	Flights []*Flight `json:"flights,omitempty"`
10652
10653	// GroupType: Group type of this inventory item if it represents a
10654	// placement group. Is null otherwise. There are two type of placement
10655	// groups: PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE is a simple group of
10656	// inventory items that acts as a single pricing point for a group of
10657	// tags. PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK is a group of inventory
10658	// items that not only acts as a single pricing point, but also assumes
10659	// that all the tags in it will be served at the same time. A roadblock
10660	// requires one of its assigned inventory items to be marked as primary.
10661	//
10662	// Possible values:
10663	//   "PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE"
10664	//   "PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK"
10665	GroupType string `json:"groupType,omitempty"`
10666
10667	// PricingType: Pricing type of this inventory item.
10668	//
10669	// Possible values:
10670	//   "PLANNING_PLACEMENT_PRICING_TYPE_CLICKS"
10671	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPA"
10672	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPC"
10673	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPM"
10674	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPM_ACTIVEVIEW"
10675	//   "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_CLICKS"
10676	//   "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
10677	//   "PLANNING_PLACEMENT_PRICING_TYPE_IMPRESSIONS"
10678	PricingType string `json:"pricingType,omitempty"`
10679
10680	// StartDate: Start date of this inventory item.
10681	StartDate string `json:"startDate,omitempty"`
10682
10683	// ForceSendFields is a list of field names (e.g. "CapCostType") to
10684	// unconditionally include in API requests. By default, fields with
10685	// empty values are omitted from API requests. However, any non-pointer,
10686	// non-interface field appearing in ForceSendFields will be sent to the
10687	// server regardless of whether the field is empty or not. This may be
10688	// used to include empty fields in Patch requests.
10689	ForceSendFields []string `json:"-"`
10690
10691	// NullFields is a list of field names (e.g. "CapCostType") to include
10692	// in API requests with the JSON null value. By default, fields with
10693	// empty values are omitted from API requests. However, any field with
10694	// an empty value appearing in NullFields will be sent to the server as
10695	// null. It is an error if a field in this list has a non-empty value.
10696	// This may be used to include null fields in Patch requests.
10697	NullFields []string `json:"-"`
10698}
10699
10700func (s *Pricing) MarshalJSON() ([]byte, error) {
10701	type NoMethod Pricing
10702	raw := NoMethod(*s)
10703	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10704}
10705
10706// PricingSchedule: Pricing Schedule
10707type PricingSchedule struct {
10708	// CapCostOption: Placement cap cost option.
10709	//
10710	// Possible values:
10711	//   "CAP_COST_CUMULATIVE"
10712	//   "CAP_COST_MONTHLY"
10713	//   "CAP_COST_NONE"
10714	CapCostOption string `json:"capCostOption,omitempty"`
10715
10716	// DisregardOverdelivery: Whether cap costs are ignored by ad serving.
10717	DisregardOverdelivery bool `json:"disregardOverdelivery,omitempty"`
10718
10719	// EndDate: Placement end date. This date must be later than, or the
10720	// same day as, the placement start date, but not later than the
10721	// campaign end date. If, for example, you set 6/25/2015 as both the
10722	// start and end dates, the effective placement date is just that day
10723	// only, 6/25/2015. The hours, minutes, and seconds of the end date
10724	// should not be set, as doing so will result in an error. This field is
10725	// required on insertion.
10726	EndDate string `json:"endDate,omitempty"`
10727
10728	// Flighted: Whether this placement is flighted. If true, pricing
10729	// periods will be computed automatically.
10730	Flighted bool `json:"flighted,omitempty"`
10731
10732	// FloodlightActivityId: Floodlight activity ID associated with this
10733	// placement. This field should be set when placement pricing type is
10734	// set to PRICING_TYPE_CPA.
10735	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
10736
10737	// PricingPeriods: Pricing periods for this placement.
10738	PricingPeriods []*PricingSchedulePricingPeriod `json:"pricingPeriods,omitempty"`
10739
10740	// PricingType: Placement pricing type. This field is required on
10741	// insertion.
10742	//
10743	// Possible values:
10744	//   "PRICING_TYPE_CPA"
10745	//   "PRICING_TYPE_CPC"
10746	//   "PRICING_TYPE_CPM"
10747	//   "PRICING_TYPE_CPM_ACTIVEVIEW"
10748	//   "PRICING_TYPE_FLAT_RATE_CLICKS"
10749	//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
10750	PricingType string `json:"pricingType,omitempty"`
10751
10752	// StartDate: Placement start date. This date must be later than, or the
10753	// same day as, the campaign start date. The hours, minutes, and seconds
10754	// of the start date should not be set, as doing so will result in an
10755	// error. This field is required on insertion.
10756	StartDate string `json:"startDate,omitempty"`
10757
10758	// TestingStartDate: Testing start date of this placement. The hours,
10759	// minutes, and seconds of the start date should not be set, as doing so
10760	// will result in an error.
10761	TestingStartDate string `json:"testingStartDate,omitempty"`
10762
10763	// ForceSendFields is a list of field names (e.g. "CapCostOption") to
10764	// unconditionally include in API requests. By default, fields with
10765	// empty values are omitted from API requests. However, any non-pointer,
10766	// non-interface field appearing in ForceSendFields will be sent to the
10767	// server regardless of whether the field is empty or not. This may be
10768	// used to include empty fields in Patch requests.
10769	ForceSendFields []string `json:"-"`
10770
10771	// NullFields is a list of field names (e.g. "CapCostOption") to include
10772	// in API requests with the JSON null value. By default, fields with
10773	// empty values are omitted from API requests. However, any field with
10774	// an empty value appearing in NullFields will be sent to the server as
10775	// null. It is an error if a field in this list has a non-empty value.
10776	// This may be used to include null fields in Patch requests.
10777	NullFields []string `json:"-"`
10778}
10779
10780func (s *PricingSchedule) MarshalJSON() ([]byte, error) {
10781	type NoMethod PricingSchedule
10782	raw := NoMethod(*s)
10783	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10784}
10785
10786// PricingSchedulePricingPeriod: Pricing Period
10787type PricingSchedulePricingPeriod struct {
10788	// EndDate: Pricing period end date. This date must be later than, or
10789	// the same day as, the pricing period start date, but not later than
10790	// the placement end date. The period end date can be the same date as
10791	// the period start date. If, for example, you set 6/25/2015 as both the
10792	// start and end dates, the effective pricing period date is just that
10793	// day only, 6/25/2015. The hours, minutes, and seconds of the end date
10794	// should not be set, as doing so will result in an error.
10795	EndDate string `json:"endDate,omitempty"`
10796
10797	// PricingComment: Comments for this pricing period.
10798	PricingComment string `json:"pricingComment,omitempty"`
10799
10800	// RateOrCostNanos: Rate or cost of this pricing period in nanos (i.e.,
10801	// multipled by 1000000000). Acceptable values are 0 to
10802	// 1000000000000000000, inclusive.
10803	RateOrCostNanos int64 `json:"rateOrCostNanos,omitempty,string"`
10804
10805	// StartDate: Pricing period start date. This date must be later than,
10806	// or the same day as, the placement start date. The hours, minutes, and
10807	// seconds of the start date should not be set, as doing so will result
10808	// in an error.
10809	StartDate string `json:"startDate,omitempty"`
10810
10811	// Units: Units of this pricing period. Acceptable values are 0 to
10812	// 10000000000, inclusive.
10813	Units int64 `json:"units,omitempty,string"`
10814
10815	// ForceSendFields is a list of field names (e.g. "EndDate") to
10816	// unconditionally include in API requests. By default, fields with
10817	// empty values are omitted from API requests. However, any non-pointer,
10818	// non-interface field appearing in ForceSendFields will be sent to the
10819	// server regardless of whether the field is empty or not. This may be
10820	// used to include empty fields in Patch requests.
10821	ForceSendFields []string `json:"-"`
10822
10823	// NullFields is a list of field names (e.g. "EndDate") to include in
10824	// API requests with the JSON null value. By default, fields with empty
10825	// values are omitted from API requests. However, any field with an
10826	// empty value appearing in NullFields will be sent to the server as
10827	// null. It is an error if a field in this list has a non-empty value.
10828	// This may be used to include null fields in Patch requests.
10829	NullFields []string `json:"-"`
10830}
10831
10832func (s *PricingSchedulePricingPeriod) MarshalJSON() ([]byte, error) {
10833	type NoMethod PricingSchedulePricingPeriod
10834	raw := NoMethod(*s)
10835	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10836}
10837
10838// Project: Contains properties of a Planning project.
10839type Project struct {
10840	// AccountId: Account ID of this project.
10841	AccountId int64 `json:"accountId,omitempty,string"`
10842
10843	// AdvertiserId: Advertiser ID of this project.
10844	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10845
10846	// AudienceAgeGroup: Audience age group of this project.
10847	//
10848	// Possible values:
10849	//   "PLANNING_AUDIENCE_AGE_18_24"
10850	//   "PLANNING_AUDIENCE_AGE_25_34"
10851	//   "PLANNING_AUDIENCE_AGE_35_44"
10852	//   "PLANNING_AUDIENCE_AGE_45_54"
10853	//   "PLANNING_AUDIENCE_AGE_55_64"
10854	//   "PLANNING_AUDIENCE_AGE_65_OR_MORE"
10855	//   "PLANNING_AUDIENCE_AGE_UNKNOWN"
10856	AudienceAgeGroup string `json:"audienceAgeGroup,omitempty"`
10857
10858	// AudienceGender: Audience gender of this project.
10859	//
10860	// Possible values:
10861	//   "PLANNING_AUDIENCE_GENDER_FEMALE"
10862	//   "PLANNING_AUDIENCE_GENDER_MALE"
10863	AudienceGender string `json:"audienceGender,omitempty"`
10864
10865	// Budget: Budget of this project in the currency specified by the
10866	// current account. The value stored in this field represents only the
10867	// non-fractional amount. For example, for USD, the smallest value that
10868	// can be represented by this field is 1 US dollar.
10869	Budget int64 `json:"budget,omitempty,string"`
10870
10871	// ClientBillingCode: Client billing code of this project.
10872	ClientBillingCode string `json:"clientBillingCode,omitempty"`
10873
10874	// ClientName: Name of the project client.
10875	ClientName string `json:"clientName,omitempty"`
10876
10877	// EndDate: End date of the project.
10878	EndDate string `json:"endDate,omitempty"`
10879
10880	// Id: ID of this project. This is a read-only, auto-generated field.
10881	Id int64 `json:"id,omitempty,string"`
10882
10883	// Kind: Identifies what kind of resource this is. Value: the fixed
10884	// string "dfareporting#project".
10885	Kind string `json:"kind,omitempty"`
10886
10887	// LastModifiedInfo: Information about the most recent modification of
10888	// this project.
10889	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
10890
10891	// Name: Name of this project.
10892	Name string `json:"name,omitempty"`
10893
10894	// Overview: Overview of this project.
10895	Overview string `json:"overview,omitempty"`
10896
10897	// StartDate: Start date of the project.
10898	StartDate string `json:"startDate,omitempty"`
10899
10900	// SubaccountId: Subaccount ID of this project.
10901	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10902
10903	// TargetClicks: Number of clicks that the advertiser is targeting.
10904	TargetClicks int64 `json:"targetClicks,omitempty,string"`
10905
10906	// TargetConversions: Number of conversions that the advertiser is
10907	// targeting.
10908	TargetConversions int64 `json:"targetConversions,omitempty,string"`
10909
10910	// TargetCpaNanos: CPA that the advertiser is targeting.
10911	TargetCpaNanos int64 `json:"targetCpaNanos,omitempty,string"`
10912
10913	// TargetCpcNanos: CPC that the advertiser is targeting.
10914	TargetCpcNanos int64 `json:"targetCpcNanos,omitempty,string"`
10915
10916	// TargetCpmActiveViewNanos: vCPM from Active View that the advertiser
10917	// is targeting.
10918	TargetCpmActiveViewNanos int64 `json:"targetCpmActiveViewNanos,omitempty,string"`
10919
10920	// TargetCpmNanos: CPM that the advertiser is targeting.
10921	TargetCpmNanos int64 `json:"targetCpmNanos,omitempty,string"`
10922
10923	// TargetImpressions: Number of impressions that the advertiser is
10924	// targeting.
10925	TargetImpressions int64 `json:"targetImpressions,omitempty,string"`
10926
10927	// ServerResponse contains the HTTP response code and headers from the
10928	// server.
10929	googleapi.ServerResponse `json:"-"`
10930
10931	// ForceSendFields is a list of field names (e.g. "AccountId") to
10932	// unconditionally include in API requests. By default, fields with
10933	// empty values are omitted from API requests. However, any non-pointer,
10934	// non-interface field appearing in ForceSendFields will be sent to the
10935	// server regardless of whether the field is empty or not. This may be
10936	// used to include empty fields in Patch requests.
10937	ForceSendFields []string `json:"-"`
10938
10939	// NullFields is a list of field names (e.g. "AccountId") to include in
10940	// API requests with the JSON null value. By default, fields with empty
10941	// values are omitted from API requests. However, any field with an
10942	// empty value appearing in NullFields will be sent to the server as
10943	// null. It is an error if a field in this list has a non-empty value.
10944	// This may be used to include null fields in Patch requests.
10945	NullFields []string `json:"-"`
10946}
10947
10948func (s *Project) MarshalJSON() ([]byte, error) {
10949	type NoMethod Project
10950	raw := NoMethod(*s)
10951	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10952}
10953
10954// ProjectsListResponse: Project List Response
10955type ProjectsListResponse struct {
10956	// Kind: Identifies what kind of resource this is. Value: the fixed
10957	// string "dfareporting#projectsListResponse".
10958	Kind string `json:"kind,omitempty"`
10959
10960	// NextPageToken: Pagination token to be used for the next list
10961	// operation.
10962	NextPageToken string `json:"nextPageToken,omitempty"`
10963
10964	// Projects: Project collection.
10965	Projects []*Project `json:"projects,omitempty"`
10966
10967	// ServerResponse contains the HTTP response code and headers from the
10968	// server.
10969	googleapi.ServerResponse `json:"-"`
10970
10971	// ForceSendFields is a list of field names (e.g. "Kind") to
10972	// unconditionally include in API requests. By default, fields with
10973	// empty values are omitted from API requests. However, any non-pointer,
10974	// non-interface field appearing in ForceSendFields will be sent to the
10975	// server regardless of whether the field is empty or not. This may be
10976	// used to include empty fields in Patch requests.
10977	ForceSendFields []string `json:"-"`
10978
10979	// NullFields is a list of field names (e.g. "Kind") to include in API
10980	// requests with the JSON null value. By default, fields with empty
10981	// values are omitted from API requests. However, any field with an
10982	// empty value appearing in NullFields will be sent to the server as
10983	// null. It is an error if a field in this list has a non-empty value.
10984	// This may be used to include null fields in Patch requests.
10985	NullFields []string `json:"-"`
10986}
10987
10988func (s *ProjectsListResponse) MarshalJSON() ([]byte, error) {
10989	type NoMethod ProjectsListResponse
10990	raw := NoMethod(*s)
10991	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10992}
10993
10994// ReachReportCompatibleFields: Represents fields that are compatible to
10995// be selected for a report of type "REACH".
10996type ReachReportCompatibleFields struct {
10997	// DimensionFilters: Dimensions which are compatible to be selected in
10998	// the "dimensionFilters" section of the report.
10999	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
11000
11001	// Dimensions: Dimensions which are compatible to be selected in the
11002	// "dimensions" section of the report.
11003	Dimensions []*Dimension `json:"dimensions,omitempty"`
11004
11005	// Kind: The kind of resource this is, in this case
11006	// dfareporting#reachReportCompatibleFields.
11007	Kind string `json:"kind,omitempty"`
11008
11009	// Metrics: Metrics which are compatible to be selected in the
11010	// "metricNames" section of the report.
11011	Metrics []*Metric `json:"metrics,omitempty"`
11012
11013	// PivotedActivityMetrics: Metrics which are compatible to be selected
11014	// as activity metrics to pivot on in the "activities" section of the
11015	// report.
11016	PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
11017
11018	// ReachByFrequencyMetrics: Metrics which are compatible to be selected
11019	// in the "reachByFrequencyMetricNames" section of the report.
11020	ReachByFrequencyMetrics []*Metric `json:"reachByFrequencyMetrics,omitempty"`
11021
11022	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
11023	// unconditionally include in API requests. By default, fields with
11024	// empty values are omitted from API requests. However, any non-pointer,
11025	// non-interface field appearing in ForceSendFields will be sent to the
11026	// server regardless of whether the field is empty or not. This may be
11027	// used to include empty fields in Patch requests.
11028	ForceSendFields []string `json:"-"`
11029
11030	// NullFields is a list of field names (e.g. "DimensionFilters") to
11031	// include in API requests with the JSON null value. By default, fields
11032	// with empty values are omitted from API requests. However, any field
11033	// with an empty value appearing in NullFields will be sent to the
11034	// server as null. It is an error if a field in this list has a
11035	// non-empty value. This may be used to include null fields in Patch
11036	// requests.
11037	NullFields []string `json:"-"`
11038}
11039
11040func (s *ReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
11041	type NoMethod ReachReportCompatibleFields
11042	raw := NoMethod(*s)
11043	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11044}
11045
11046// Recipient: Represents a recipient.
11047type Recipient struct {
11048	// DeliveryType: The delivery type for the recipient.
11049	//
11050	// Possible values:
11051	//   "ATTACHMENT"
11052	//   "LINK"
11053	DeliveryType string `json:"deliveryType,omitempty"`
11054
11055	// Email: The email address of the recipient.
11056	Email string `json:"email,omitempty"`
11057
11058	// Kind: The kind of resource this is, in this case
11059	// dfareporting#recipient.
11060	Kind string `json:"kind,omitempty"`
11061
11062	// ForceSendFields is a list of field names (e.g. "DeliveryType") to
11063	// unconditionally include in API requests. By default, fields with
11064	// empty values are omitted from API requests. However, any non-pointer,
11065	// non-interface field appearing in ForceSendFields will be sent to the
11066	// server regardless of whether the field is empty or not. This may be
11067	// used to include empty fields in Patch requests.
11068	ForceSendFields []string `json:"-"`
11069
11070	// NullFields is a list of field names (e.g. "DeliveryType") to include
11071	// in API requests with the JSON null value. By default, fields with
11072	// empty values are omitted from API requests. However, any field with
11073	// an empty value appearing in NullFields will be sent to the server as
11074	// null. It is an error if a field in this list has a non-empty value.
11075	// This may be used to include null fields in Patch requests.
11076	NullFields []string `json:"-"`
11077}
11078
11079func (s *Recipient) MarshalJSON() ([]byte, error) {
11080	type NoMethod Recipient
11081	raw := NoMethod(*s)
11082	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11083}
11084
11085// Region: Contains information about a region that can be targeted by
11086// ads.
11087type Region struct {
11088	// CountryCode: Country code of the country to which this region
11089	// belongs.
11090	CountryCode string `json:"countryCode,omitempty"`
11091
11092	// CountryDartId: DART ID of the country to which this region belongs.
11093	CountryDartId int64 `json:"countryDartId,omitempty,string"`
11094
11095	// DartId: DART ID of this region.
11096	DartId int64 `json:"dartId,omitempty,string"`
11097
11098	// Kind: Identifies what kind of resource this is. Value: the fixed
11099	// string "dfareporting#region".
11100	Kind string `json:"kind,omitempty"`
11101
11102	// Name: Name of this region.
11103	Name string `json:"name,omitempty"`
11104
11105	// RegionCode: Region code.
11106	RegionCode string `json:"regionCode,omitempty"`
11107
11108	// ForceSendFields is a list of field names (e.g. "CountryCode") to
11109	// unconditionally include in API requests. By default, fields with
11110	// empty values are omitted from API requests. However, any non-pointer,
11111	// non-interface field appearing in ForceSendFields will be sent to the
11112	// server regardless of whether the field is empty or not. This may be
11113	// used to include empty fields in Patch requests.
11114	ForceSendFields []string `json:"-"`
11115
11116	// NullFields is a list of field names (e.g. "CountryCode") to include
11117	// in API requests with the JSON null value. By default, fields with
11118	// empty values are omitted from API requests. However, any field with
11119	// an empty value appearing in NullFields will be sent to the server as
11120	// null. It is an error if a field in this list has a non-empty value.
11121	// This may be used to include null fields in Patch requests.
11122	NullFields []string `json:"-"`
11123}
11124
11125func (s *Region) MarshalJSON() ([]byte, error) {
11126	type NoMethod Region
11127	raw := NoMethod(*s)
11128	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11129}
11130
11131// RegionsListResponse: Region List Response
11132type RegionsListResponse struct {
11133	// Kind: Identifies what kind of resource this is. Value: the fixed
11134	// string "dfareporting#regionsListResponse".
11135	Kind string `json:"kind,omitempty"`
11136
11137	// Regions: Region collection.
11138	Regions []*Region `json:"regions,omitempty"`
11139
11140	// ServerResponse contains the HTTP response code and headers from the
11141	// server.
11142	googleapi.ServerResponse `json:"-"`
11143
11144	// ForceSendFields is a list of field names (e.g. "Kind") to
11145	// unconditionally include in API requests. By default, fields with
11146	// empty values are omitted from API requests. However, any non-pointer,
11147	// non-interface field appearing in ForceSendFields will be sent to the
11148	// server regardless of whether the field is empty or not. This may be
11149	// used to include empty fields in Patch requests.
11150	ForceSendFields []string `json:"-"`
11151
11152	// NullFields is a list of field names (e.g. "Kind") to include in API
11153	// requests with the JSON null value. By default, fields with empty
11154	// values are omitted from API requests. However, any field with an
11155	// empty value appearing in NullFields will be sent to the server as
11156	// null. It is an error if a field in this list has a non-empty value.
11157	// This may be used to include null fields in Patch requests.
11158	NullFields []string `json:"-"`
11159}
11160
11161func (s *RegionsListResponse) MarshalJSON() ([]byte, error) {
11162	type NoMethod RegionsListResponse
11163	raw := NoMethod(*s)
11164	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11165}
11166
11167// RemarketingList: Contains properties of a remarketing list.
11168// Remarketing enables you to create lists of users who have performed
11169// specific actions on a site, then target ads to members of those
11170// lists. This resource can be used to manage remarketing lists that are
11171// owned by your advertisers. To see all remarketing lists that are
11172// visible to your advertisers, including those that are shared to your
11173// advertiser or account, use the TargetableRemarketingLists resource.
11174type RemarketingList struct {
11175	// AccountId: Account ID of this remarketing list. This is a read-only,
11176	// auto-generated field that is only returned in GET requests.
11177	AccountId int64 `json:"accountId,omitempty,string"`
11178
11179	// Active: Whether this remarketing list is active.
11180	Active bool `json:"active,omitempty"`
11181
11182	// AdvertiserId: Dimension value for the advertiser ID that owns this
11183	// remarketing list. This is a required field.
11184	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
11185
11186	// AdvertiserIdDimensionValue: Dimension value for the ID of the
11187	// advertiser. This is a read-only, auto-generated field.
11188	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
11189
11190	// Description: Remarketing list description.
11191	Description string `json:"description,omitempty"`
11192
11193	// Id: Remarketing list ID. This is a read-only, auto-generated field.
11194	Id int64 `json:"id,omitempty,string"`
11195
11196	// Kind: Identifies what kind of resource this is. Value: the fixed
11197	// string "dfareporting#remarketingList".
11198	Kind string `json:"kind,omitempty"`
11199
11200	// LifeSpan: Number of days that a user should remain in the remarketing
11201	// list without an impression. Acceptable values are 1 to 540,
11202	// inclusive.
11203	LifeSpan int64 `json:"lifeSpan,omitempty,string"`
11204
11205	// ListPopulationRule: Rule used to populate the remarketing list with
11206	// users.
11207	ListPopulationRule *ListPopulationRule `json:"listPopulationRule,omitempty"`
11208
11209	// ListSize: Number of users currently in the list. This is a read-only
11210	// field.
11211	ListSize int64 `json:"listSize,omitempty,string"`
11212
11213	// ListSource: Product from which this remarketing list was originated.
11214	//
11215	// Possible values:
11216	//   "REMARKETING_LIST_SOURCE_ADX"
11217	//   "REMARKETING_LIST_SOURCE_DBM"
11218	//   "REMARKETING_LIST_SOURCE_DFA"
11219	//   "REMARKETING_LIST_SOURCE_DFP"
11220	//   "REMARKETING_LIST_SOURCE_DMP"
11221	//   "REMARKETING_LIST_SOURCE_GA"
11222	//   "REMARKETING_LIST_SOURCE_GPLUS"
11223	//   "REMARKETING_LIST_SOURCE_OTHER"
11224	//   "REMARKETING_LIST_SOURCE_PLAY_STORE"
11225	//   "REMARKETING_LIST_SOURCE_XFP"
11226	//   "REMARKETING_LIST_SOURCE_YOUTUBE"
11227	ListSource string `json:"listSource,omitempty"`
11228
11229	// Name: Name of the remarketing list. This is a required field. Must be
11230	// no greater than 128 characters long.
11231	Name string `json:"name,omitempty"`
11232
11233	// SubaccountId: Subaccount ID of this remarketing list. This is a
11234	// read-only, auto-generated field that is only returned in GET
11235	// requests.
11236	SubaccountId int64 `json:"subaccountId,omitempty,string"`
11237
11238	// ServerResponse contains the HTTP response code and headers from the
11239	// server.
11240	googleapi.ServerResponse `json:"-"`
11241
11242	// ForceSendFields is a list of field names (e.g. "AccountId") to
11243	// unconditionally include in API requests. By default, fields with
11244	// empty values are omitted from API requests. However, any non-pointer,
11245	// non-interface field appearing in ForceSendFields will be sent to the
11246	// server regardless of whether the field is empty or not. This may be
11247	// used to include empty fields in Patch requests.
11248	ForceSendFields []string `json:"-"`
11249
11250	// NullFields is a list of field names (e.g. "AccountId") to include in
11251	// API requests with the JSON null value. By default, fields with empty
11252	// values are omitted from API requests. However, any field with an
11253	// empty value appearing in NullFields will be sent to the server as
11254	// null. It is an error if a field in this list has a non-empty value.
11255	// This may be used to include null fields in Patch requests.
11256	NullFields []string `json:"-"`
11257}
11258
11259func (s *RemarketingList) MarshalJSON() ([]byte, error) {
11260	type NoMethod RemarketingList
11261	raw := NoMethod(*s)
11262	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11263}
11264
11265// RemarketingListShare: Contains properties of a remarketing list's
11266// sharing information. Sharing allows other accounts or advertisers to
11267// target to your remarketing lists. This resource can be used to manage
11268// remarketing list sharing to other accounts and advertisers.
11269type RemarketingListShare struct {
11270	// Kind: Identifies what kind of resource this is. Value: the fixed
11271	// string "dfareporting#remarketingListShare".
11272	Kind string `json:"kind,omitempty"`
11273
11274	// RemarketingListId: Remarketing list ID. This is a read-only,
11275	// auto-generated field.
11276	RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
11277
11278	// SharedAccountIds: Accounts that the remarketing list is shared with.
11279	SharedAccountIds googleapi.Int64s `json:"sharedAccountIds,omitempty"`
11280
11281	// SharedAdvertiserIds: Advertisers that the remarketing list is shared
11282	// with.
11283	SharedAdvertiserIds googleapi.Int64s `json:"sharedAdvertiserIds,omitempty"`
11284
11285	// ServerResponse contains the HTTP response code and headers from the
11286	// server.
11287	googleapi.ServerResponse `json:"-"`
11288
11289	// ForceSendFields is a list of field names (e.g. "Kind") to
11290	// unconditionally include in API requests. By default, fields with
11291	// empty values are omitted from API requests. However, any non-pointer,
11292	// non-interface field appearing in ForceSendFields will be sent to the
11293	// server regardless of whether the field is empty or not. This may be
11294	// used to include empty fields in Patch requests.
11295	ForceSendFields []string `json:"-"`
11296
11297	// NullFields is a list of field names (e.g. "Kind") to include in API
11298	// requests with the JSON null value. By default, fields with empty
11299	// values are omitted from API requests. However, any field with an
11300	// empty value appearing in NullFields will be sent to the server as
11301	// null. It is an error if a field in this list has a non-empty value.
11302	// This may be used to include null fields in Patch requests.
11303	NullFields []string `json:"-"`
11304}
11305
11306func (s *RemarketingListShare) MarshalJSON() ([]byte, error) {
11307	type NoMethod RemarketingListShare
11308	raw := NoMethod(*s)
11309	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11310}
11311
11312// RemarketingListsListResponse: Remarketing list response
11313type RemarketingListsListResponse struct {
11314	// Kind: Identifies what kind of resource this is. Value: the fixed
11315	// string "dfareporting#remarketingListsListResponse".
11316	Kind string `json:"kind,omitempty"`
11317
11318	// NextPageToken: Pagination token to be used for the next list
11319	// operation.
11320	NextPageToken string `json:"nextPageToken,omitempty"`
11321
11322	// RemarketingLists: Remarketing list collection.
11323	RemarketingLists []*RemarketingList `json:"remarketingLists,omitempty"`
11324
11325	// ServerResponse contains the HTTP response code and headers from the
11326	// server.
11327	googleapi.ServerResponse `json:"-"`
11328
11329	// ForceSendFields is a list of field names (e.g. "Kind") to
11330	// unconditionally include in API requests. By default, fields with
11331	// empty values are omitted from API requests. However, any non-pointer,
11332	// non-interface field appearing in ForceSendFields will be sent to the
11333	// server regardless of whether the field is empty or not. This may be
11334	// used to include empty fields in Patch requests.
11335	ForceSendFields []string `json:"-"`
11336
11337	// NullFields is a list of field names (e.g. "Kind") to include in API
11338	// requests with the JSON null value. By default, fields with empty
11339	// values are omitted from API requests. However, any field with an
11340	// empty value appearing in NullFields will be sent to the server as
11341	// null. It is an error if a field in this list has a non-empty value.
11342	// This may be used to include null fields in Patch requests.
11343	NullFields []string `json:"-"`
11344}
11345
11346func (s *RemarketingListsListResponse) MarshalJSON() ([]byte, error) {
11347	type NoMethod RemarketingListsListResponse
11348	raw := NoMethod(*s)
11349	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11350}
11351
11352// Report: Represents a Report resource.
11353type Report struct {
11354	// AccountId: The account ID to which this report belongs.
11355	AccountId int64 `json:"accountId,omitempty,string"`
11356
11357	// Criteria: The report criteria for a report of type "STANDARD".
11358	Criteria *ReportCriteria `json:"criteria,omitempty"`
11359
11360	// CrossDimensionReachCriteria: The report criteria for a report of type
11361	// "CROSS_DIMENSION_REACH".
11362	CrossDimensionReachCriteria *ReportCrossDimensionReachCriteria `json:"crossDimensionReachCriteria,omitempty"`
11363
11364	// Delivery: The report's email delivery settings.
11365	Delivery *ReportDelivery `json:"delivery,omitempty"`
11366
11367	// Etag: The eTag of this response for caching purposes.
11368	Etag string `json:"etag,omitempty"`
11369
11370	// FileName: The filename used when generating report files for this
11371	// report.
11372	FileName string `json:"fileName,omitempty"`
11373
11374	// FloodlightCriteria: The report criteria for a report of type
11375	// "FLOODLIGHT".
11376	FloodlightCriteria *ReportFloodlightCriteria `json:"floodlightCriteria,omitempty"`
11377
11378	// Format: The output format of the report. If not specified, default
11379	// format is "CSV". Note that the actual format in the completed report
11380	// file might differ if for instance the report's size exceeds the
11381	// format's capabilities. "CSV" will then be the fallback format.
11382	//
11383	// Possible values:
11384	//   "CSV"
11385	//   "EXCEL"
11386	Format string `json:"format,omitempty"`
11387
11388	// Id: The unique ID identifying this report resource.
11389	Id int64 `json:"id,omitempty,string"`
11390
11391	// Kind: The kind of resource this is, in this case dfareporting#report.
11392	Kind string `json:"kind,omitempty"`
11393
11394	// LastModifiedTime: The timestamp (in milliseconds since epoch) of when
11395	// this report was last modified.
11396	LastModifiedTime uint64 `json:"lastModifiedTime,omitempty,string"`
11397
11398	// Name: The name of the report.
11399	Name string `json:"name,omitempty"`
11400
11401	// OwnerProfileId: The user profile id of the owner of this report.
11402	OwnerProfileId int64 `json:"ownerProfileId,omitempty,string"`
11403
11404	// PathToConversionCriteria: The report criteria for a report of type
11405	// "PATH_TO_CONVERSION".
11406	PathToConversionCriteria *ReportPathToConversionCriteria `json:"pathToConversionCriteria,omitempty"`
11407
11408	// ReachCriteria: The report criteria for a report of type "REACH".
11409	ReachCriteria *ReportReachCriteria `json:"reachCriteria,omitempty"`
11410
11411	// Schedule: The report's schedule. Can only be set if the report's
11412	// 'dateRange' is a relative date range and the relative date range is
11413	// not "TODAY".
11414	Schedule *ReportSchedule `json:"schedule,omitempty"`
11415
11416	// SubAccountId: The subaccount ID to which this report belongs if
11417	// applicable.
11418	SubAccountId int64 `json:"subAccountId,omitempty,string"`
11419
11420	// Type: The type of the report.
11421	//
11422	// Possible values:
11423	//   "CROSS_DIMENSION_REACH"
11424	//   "FLOODLIGHT"
11425	//   "PATH_TO_CONVERSION"
11426	//   "REACH"
11427	//   "STANDARD"
11428	Type string `json:"type,omitempty"`
11429
11430	// ServerResponse contains the HTTP response code and headers from the
11431	// server.
11432	googleapi.ServerResponse `json:"-"`
11433
11434	// ForceSendFields is a list of field names (e.g. "AccountId") to
11435	// unconditionally include in API requests. By default, fields with
11436	// empty values are omitted from API requests. However, any non-pointer,
11437	// non-interface field appearing in ForceSendFields will be sent to the
11438	// server regardless of whether the field is empty or not. This may be
11439	// used to include empty fields in Patch requests.
11440	ForceSendFields []string `json:"-"`
11441
11442	// NullFields is a list of field names (e.g. "AccountId") to include in
11443	// API requests with the JSON null value. By default, fields with empty
11444	// values are omitted from API requests. However, any field with an
11445	// empty value appearing in NullFields will be sent to the server as
11446	// null. It is an error if a field in this list has a non-empty value.
11447	// This may be used to include null fields in Patch requests.
11448	NullFields []string `json:"-"`
11449}
11450
11451func (s *Report) MarshalJSON() ([]byte, error) {
11452	type NoMethod Report
11453	raw := NoMethod(*s)
11454	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11455}
11456
11457// ReportCriteria: The report criteria for a report of type "STANDARD".
11458type ReportCriteria struct {
11459	// Activities: Activity group.
11460	Activities *Activities `json:"activities,omitempty"`
11461
11462	// CustomRichMediaEvents: Custom Rich Media Events group.
11463	CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
11464
11465	// DateRange: The date range for which this report should be run.
11466	DateRange *DateRange `json:"dateRange,omitempty"`
11467
11468	// DimensionFilters: The list of filters on which dimensions are
11469	// filtered.
11470	// Filters for different dimensions are ANDed, filters for the same
11471	// dimension are grouped together and ORed.
11472	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11473
11474	// Dimensions: The list of standard dimensions the report should
11475	// include.
11476	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11477
11478	// MetricNames: The list of names of metrics the report should include.
11479	MetricNames []string `json:"metricNames,omitempty"`
11480
11481	// ForceSendFields is a list of field names (e.g. "Activities") to
11482	// unconditionally include in API requests. By default, fields with
11483	// empty values are omitted from API requests. However, any non-pointer,
11484	// non-interface field appearing in ForceSendFields will be sent to the
11485	// server regardless of whether the field is empty or not. This may be
11486	// used to include empty fields in Patch requests.
11487	ForceSendFields []string `json:"-"`
11488
11489	// NullFields is a list of field names (e.g. "Activities") to include in
11490	// API requests with the JSON null value. By default, fields with empty
11491	// values are omitted from API requests. However, any field with an
11492	// empty value appearing in NullFields will be sent to the server as
11493	// null. It is an error if a field in this list has a non-empty value.
11494	// This may be used to include null fields in Patch requests.
11495	NullFields []string `json:"-"`
11496}
11497
11498func (s *ReportCriteria) MarshalJSON() ([]byte, error) {
11499	type NoMethod ReportCriteria
11500	raw := NoMethod(*s)
11501	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11502}
11503
11504// ReportCrossDimensionReachCriteria: The report criteria for a report
11505// of type "CROSS_DIMENSION_REACH".
11506type ReportCrossDimensionReachCriteria struct {
11507	// Breakdown: The list of dimensions the report should include.
11508	Breakdown []*SortedDimension `json:"breakdown,omitempty"`
11509
11510	// DateRange: The date range this report should be run for.
11511	DateRange *DateRange `json:"dateRange,omitempty"`
11512
11513	// Dimension: The dimension option.
11514	//
11515	// Possible values:
11516	//   "ADVERTISER"
11517	//   "CAMPAIGN"
11518	//   "SITE_BY_ADVERTISER"
11519	//   "SITE_BY_CAMPAIGN"
11520	Dimension string `json:"dimension,omitempty"`
11521
11522	// DimensionFilters: The list of filters on which dimensions are
11523	// filtered.
11524	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11525
11526	// MetricNames: The list of names of metrics the report should include.
11527	MetricNames []string `json:"metricNames,omitempty"`
11528
11529	// OverlapMetricNames: The list of names of overlap metrics the report
11530	// should include.
11531	OverlapMetricNames []string `json:"overlapMetricNames,omitempty"`
11532
11533	// Pivoted: Whether the report is pivoted or not. Defaults to true.
11534	Pivoted bool `json:"pivoted,omitempty"`
11535
11536	// ForceSendFields is a list of field names (e.g. "Breakdown") to
11537	// unconditionally include in API requests. By default, fields with
11538	// empty values are omitted from API requests. However, any non-pointer,
11539	// non-interface field appearing in ForceSendFields will be sent to the
11540	// server regardless of whether the field is empty or not. This may be
11541	// used to include empty fields in Patch requests.
11542	ForceSendFields []string `json:"-"`
11543
11544	// NullFields is a list of field names (e.g. "Breakdown") to include in
11545	// API requests with the JSON null value. By default, fields with empty
11546	// values are omitted from API requests. However, any field with an
11547	// empty value appearing in NullFields will be sent to the server as
11548	// null. It is an error if a field in this list has a non-empty value.
11549	// This may be used to include null fields in Patch requests.
11550	NullFields []string `json:"-"`
11551}
11552
11553func (s *ReportCrossDimensionReachCriteria) MarshalJSON() ([]byte, error) {
11554	type NoMethod ReportCrossDimensionReachCriteria
11555	raw := NoMethod(*s)
11556	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11557}
11558
11559// ReportDelivery: The report's email delivery settings.
11560type ReportDelivery struct {
11561	// EmailOwner: Whether the report should be emailed to the report owner.
11562	EmailOwner bool `json:"emailOwner,omitempty"`
11563
11564	// EmailOwnerDeliveryType: The type of delivery for the owner to
11565	// receive, if enabled.
11566	//
11567	// Possible values:
11568	//   "ATTACHMENT"
11569	//   "LINK"
11570	EmailOwnerDeliveryType string `json:"emailOwnerDeliveryType,omitempty"`
11571
11572	// Message: The message to be sent with each email.
11573	Message string `json:"message,omitempty"`
11574
11575	// Recipients: The list of recipients to which to email the report.
11576	Recipients []*Recipient `json:"recipients,omitempty"`
11577
11578	// ForceSendFields is a list of field names (e.g. "EmailOwner") to
11579	// unconditionally include in API requests. By default, fields with
11580	// empty values are omitted from API requests. However, any non-pointer,
11581	// non-interface field appearing in ForceSendFields will be sent to the
11582	// server regardless of whether the field is empty or not. This may be
11583	// used to include empty fields in Patch requests.
11584	ForceSendFields []string `json:"-"`
11585
11586	// NullFields is a list of field names (e.g. "EmailOwner") to include in
11587	// API requests with the JSON null value. By default, fields with empty
11588	// values are omitted from API requests. However, any field with an
11589	// empty value appearing in NullFields will be sent to the server as
11590	// null. It is an error if a field in this list has a non-empty value.
11591	// This may be used to include null fields in Patch requests.
11592	NullFields []string `json:"-"`
11593}
11594
11595func (s *ReportDelivery) MarshalJSON() ([]byte, error) {
11596	type NoMethod ReportDelivery
11597	raw := NoMethod(*s)
11598	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11599}
11600
11601// ReportFloodlightCriteria: The report criteria for a report of type
11602// "FLOODLIGHT".
11603type ReportFloodlightCriteria struct {
11604	// CustomRichMediaEvents: The list of custom rich media events to
11605	// include.
11606	CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
11607
11608	// DateRange: The date range this report should be run for.
11609	DateRange *DateRange `json:"dateRange,omitempty"`
11610
11611	// DimensionFilters: The list of filters on which dimensions are
11612	// filtered.
11613	// Filters for different dimensions are ANDed, filters for the same
11614	// dimension are grouped together and ORed.
11615	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11616
11617	// Dimensions: The list of dimensions the report should include.
11618	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11619
11620	// FloodlightConfigId: The floodlight ID for which to show data in this
11621	// report. All advertisers associated with that ID will automatically be
11622	// added. The dimension of the value needs to be
11623	// 'dfa:floodlightConfigId'.
11624	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
11625
11626	// MetricNames: The list of names of metrics the report should include.
11627	MetricNames []string `json:"metricNames,omitempty"`
11628
11629	// ReportProperties: The properties of the report.
11630	ReportProperties *ReportFloodlightCriteriaReportProperties `json:"reportProperties,omitempty"`
11631
11632	// ForceSendFields is a list of field names (e.g.
11633	// "CustomRichMediaEvents") to unconditionally include in API requests.
11634	// By default, fields with empty values are omitted from API requests.
11635	// However, any non-pointer, non-interface field appearing in
11636	// ForceSendFields will be sent to the server regardless of whether the
11637	// field is empty or not. This may be used to include empty fields in
11638	// Patch requests.
11639	ForceSendFields []string `json:"-"`
11640
11641	// NullFields is a list of field names (e.g. "CustomRichMediaEvents") to
11642	// include in API requests with the JSON null value. By default, fields
11643	// with empty values are omitted from API requests. However, any field
11644	// with an empty value appearing in NullFields will be sent to the
11645	// server as null. It is an error if a field in this list has a
11646	// non-empty value. This may be used to include null fields in Patch
11647	// requests.
11648	NullFields []string `json:"-"`
11649}
11650
11651func (s *ReportFloodlightCriteria) MarshalJSON() ([]byte, error) {
11652	type NoMethod ReportFloodlightCriteria
11653	raw := NoMethod(*s)
11654	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11655}
11656
11657// ReportFloodlightCriteriaReportProperties: The properties of the
11658// report.
11659type ReportFloodlightCriteriaReportProperties struct {
11660	// IncludeAttributedIPConversions: Include conversions that have no
11661	// cookie, but do have an exposure path.
11662	IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
11663
11664	// IncludeUnattributedCookieConversions: Include conversions of users
11665	// with a DoubleClick cookie but without an exposure. That means the
11666	// user did not click or see an ad from the advertiser within the
11667	// Floodlight group, or that the interaction happened outside the
11668	// lookback window.
11669	IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
11670
11671	// IncludeUnattributedIPConversions: Include conversions that have no
11672	// associated cookies and no exposures. It’s therefore impossible to
11673	// know how the user was exposed to your ads during the lookback window
11674	// prior to a conversion.
11675	IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
11676
11677	// ForceSendFields is a list of field names (e.g.
11678	// "IncludeAttributedIPConversions") to unconditionally include in API
11679	// requests. By default, fields with empty values are omitted from API
11680	// requests. However, any non-pointer, non-interface field appearing in
11681	// ForceSendFields will be sent to the server regardless of whether the
11682	// field is empty or not. This may be used to include empty fields in
11683	// Patch requests.
11684	ForceSendFields []string `json:"-"`
11685
11686	// NullFields is a list of field names (e.g.
11687	// "IncludeAttributedIPConversions") to include in API requests with the
11688	// JSON null value. By default, fields with empty values are omitted
11689	// from API requests. However, any field with an empty value appearing
11690	// in NullFields will be sent to the server as null. It is an error if a
11691	// field in this list has a non-empty value. This may be used to include
11692	// null fields in Patch requests.
11693	NullFields []string `json:"-"`
11694}
11695
11696func (s *ReportFloodlightCriteriaReportProperties) MarshalJSON() ([]byte, error) {
11697	type NoMethod ReportFloodlightCriteriaReportProperties
11698	raw := NoMethod(*s)
11699	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11700}
11701
11702// ReportPathToConversionCriteria: The report criteria for a report of
11703// type "PATH_TO_CONVERSION".
11704type ReportPathToConversionCriteria struct {
11705	// ActivityFilters: The list of 'dfa:activity' values to filter on.
11706	ActivityFilters []*DimensionValue `json:"activityFilters,omitempty"`
11707
11708	// ConversionDimensions: The list of conversion dimensions the report
11709	// should include.
11710	ConversionDimensions []*SortedDimension `json:"conversionDimensions,omitempty"`
11711
11712	// CustomFloodlightVariables: The list of custom floodlight variables
11713	// the report should include.
11714	CustomFloodlightVariables []*SortedDimension `json:"customFloodlightVariables,omitempty"`
11715
11716	// CustomRichMediaEvents: The list of custom rich media events to
11717	// include.
11718	CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
11719
11720	// DateRange: The date range this report should be run for.
11721	DateRange *DateRange `json:"dateRange,omitempty"`
11722
11723	// FloodlightConfigId: The floodlight ID for which to show data in this
11724	// report. All advertisers associated with that ID will automatically be
11725	// added. The dimension of the value needs to be
11726	// 'dfa:floodlightConfigId'.
11727	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
11728
11729	// MetricNames: The list of names of metrics the report should include.
11730	MetricNames []string `json:"metricNames,omitempty"`
11731
11732	// PerInteractionDimensions: The list of per interaction dimensions the
11733	// report should include.
11734	PerInteractionDimensions []*SortedDimension `json:"perInteractionDimensions,omitempty"`
11735
11736	// ReportProperties: The properties of the report.
11737	ReportProperties *ReportPathToConversionCriteriaReportProperties `json:"reportProperties,omitempty"`
11738
11739	// ForceSendFields is a list of field names (e.g. "ActivityFilters") to
11740	// unconditionally include in API requests. By default, fields with
11741	// empty values are omitted from API requests. However, any non-pointer,
11742	// non-interface field appearing in ForceSendFields will be sent to the
11743	// server regardless of whether the field is empty or not. This may be
11744	// used to include empty fields in Patch requests.
11745	ForceSendFields []string `json:"-"`
11746
11747	// NullFields is a list of field names (e.g. "ActivityFilters") to
11748	// include in API requests with the JSON null value. By default, fields
11749	// with empty values are omitted from API requests. However, any field
11750	// with an empty value appearing in NullFields will be sent to the
11751	// server as null. It is an error if a field in this list has a
11752	// non-empty value. This may be used to include null fields in Patch
11753	// requests.
11754	NullFields []string `json:"-"`
11755}
11756
11757func (s *ReportPathToConversionCriteria) MarshalJSON() ([]byte, error) {
11758	type NoMethod ReportPathToConversionCriteria
11759	raw := NoMethod(*s)
11760	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11761}
11762
11763// ReportPathToConversionCriteriaReportProperties: The properties of the
11764// report.
11765type ReportPathToConversionCriteriaReportProperties struct {
11766	// ClicksLookbackWindow: DFA checks to see if a click interaction
11767	// occurred within the specified period of time before a conversion. By
11768	// default the value is pulled from Floodlight or you can manually enter
11769	// a custom value. Valid values: 1-90.
11770	ClicksLookbackWindow int64 `json:"clicksLookbackWindow,omitempty"`
11771
11772	// ImpressionsLookbackWindow: DFA checks to see if an impression
11773	// interaction occurred within the specified period of time before a
11774	// conversion. By default the value is pulled from Floodlight or you can
11775	// manually enter a custom value. Valid values: 1-90.
11776	ImpressionsLookbackWindow int64 `json:"impressionsLookbackWindow,omitempty"`
11777
11778	// IncludeAttributedIPConversions: Deprecated: has no effect.
11779	IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
11780
11781	// IncludeUnattributedCookieConversions: Include conversions of users
11782	// with a DoubleClick cookie but without an exposure. That means the
11783	// user did not click or see an ad from the advertiser within the
11784	// Floodlight group, or that the interaction happened outside the
11785	// lookback window.
11786	IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
11787
11788	// IncludeUnattributedIPConversions: Include conversions that have no
11789	// associated cookies and no exposures. It’s therefore impossible to
11790	// know how the user was exposed to your ads during the lookback window
11791	// prior to a conversion.
11792	IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
11793
11794	// MaximumClickInteractions: The maximum number of click interactions to
11795	// include in the report. Advertisers currently paying for E2C reports
11796	// get up to 200 (100 clicks, 100 impressions). If another advertiser in
11797	// your network is paying for E2C, you can have up to 5 total exposures
11798	// per report.
11799	MaximumClickInteractions int64 `json:"maximumClickInteractions,omitempty"`
11800
11801	// MaximumImpressionInteractions: The maximum number of click
11802	// interactions to include in the report. Advertisers currently paying
11803	// for E2C reports get up to 200 (100 clicks, 100 impressions). If
11804	// another advertiser in your network is paying for E2C, you can have up
11805	// to 5 total exposures per report.
11806	MaximumImpressionInteractions int64 `json:"maximumImpressionInteractions,omitempty"`
11807
11808	// MaximumInteractionGap: The maximum amount of time that can take place
11809	// between interactions (clicks or impressions) by the same user. Valid
11810	// values: 1-90.
11811	MaximumInteractionGap int64 `json:"maximumInteractionGap,omitempty"`
11812
11813	// PivotOnInteractionPath: Enable pivoting on interaction path.
11814	PivotOnInteractionPath bool `json:"pivotOnInteractionPath,omitempty"`
11815
11816	// ForceSendFields is a list of field names (e.g.
11817	// "ClicksLookbackWindow") to unconditionally include in API requests.
11818	// By default, fields with empty values are omitted from API requests.
11819	// However, any non-pointer, non-interface field appearing in
11820	// ForceSendFields will be sent to the server regardless of whether the
11821	// field is empty or not. This may be used to include empty fields in
11822	// Patch requests.
11823	ForceSendFields []string `json:"-"`
11824
11825	// NullFields is a list of field names (e.g. "ClicksLookbackWindow") to
11826	// include in API requests with the JSON null value. By default, fields
11827	// with empty values are omitted from API requests. However, any field
11828	// with an empty value appearing in NullFields will be sent to the
11829	// server as null. It is an error if a field in this list has a
11830	// non-empty value. This may be used to include null fields in Patch
11831	// requests.
11832	NullFields []string `json:"-"`
11833}
11834
11835func (s *ReportPathToConversionCriteriaReportProperties) MarshalJSON() ([]byte, error) {
11836	type NoMethod ReportPathToConversionCriteriaReportProperties
11837	raw := NoMethod(*s)
11838	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11839}
11840
11841// ReportReachCriteria: The report criteria for a report of type
11842// "REACH".
11843type ReportReachCriteria struct {
11844	// Activities: Activity group.
11845	Activities *Activities `json:"activities,omitempty"`
11846
11847	// CustomRichMediaEvents: Custom Rich Media Events group.
11848	CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
11849
11850	// DateRange: The date range this report should be run for.
11851	DateRange *DateRange `json:"dateRange,omitempty"`
11852
11853	// DimensionFilters: The list of filters on which dimensions are
11854	// filtered.
11855	// Filters for different dimensions are ANDed, filters for the same
11856	// dimension are grouped together and ORed.
11857	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11858
11859	// Dimensions: The list of dimensions the report should include.
11860	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11861
11862	// EnableAllDimensionCombinations: Whether to enable all reach dimension
11863	// combinations in the report. Defaults to false. If enabled, the date
11864	// range of the report should be within the last 42 days.
11865	EnableAllDimensionCombinations bool `json:"enableAllDimensionCombinations,omitempty"`
11866
11867	// MetricNames: The list of names of metrics the report should include.
11868	MetricNames []string `json:"metricNames,omitempty"`
11869
11870	// ReachByFrequencyMetricNames: The list of names of  Reach By Frequency
11871	// metrics the report should include.
11872	ReachByFrequencyMetricNames []string `json:"reachByFrequencyMetricNames,omitempty"`
11873
11874	// ForceSendFields is a list of field names (e.g. "Activities") to
11875	// unconditionally include in API requests. By default, fields with
11876	// empty values are omitted from API requests. However, any non-pointer,
11877	// non-interface field appearing in ForceSendFields will be sent to the
11878	// server regardless of whether the field is empty or not. This may be
11879	// used to include empty fields in Patch requests.
11880	ForceSendFields []string `json:"-"`
11881
11882	// NullFields is a list of field names (e.g. "Activities") to include in
11883	// API requests with the JSON null value. By default, fields with empty
11884	// values are omitted from API requests. However, any field with an
11885	// empty value appearing in NullFields will be sent to the server as
11886	// null. It is an error if a field in this list has a non-empty value.
11887	// This may be used to include null fields in Patch requests.
11888	NullFields []string `json:"-"`
11889}
11890
11891func (s *ReportReachCriteria) MarshalJSON() ([]byte, error) {
11892	type NoMethod ReportReachCriteria
11893	raw := NoMethod(*s)
11894	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11895}
11896
11897// ReportSchedule: The report's schedule. Can only be set if the
11898// report's 'dateRange' is a relative date range and the relative date
11899// range is not "TODAY".
11900type ReportSchedule struct {
11901	// Active: Whether the schedule is active or not. Must be set to either
11902	// true or false.
11903	Active bool `json:"active,omitempty"`
11904
11905	// Every: Defines every how many days, weeks or months the report should
11906	// be run. Needs to be set when "repeats" is either "DAILY", "WEEKLY" or
11907	// "MONTHLY".
11908	Every int64 `json:"every,omitempty"`
11909
11910	// ExpirationDate: The expiration date when the scheduled report stops
11911	// running.
11912	ExpirationDate string `json:"expirationDate,omitempty"`
11913
11914	// Repeats: The interval for which the report is repeated. Note:
11915	// - "DAILY" also requires field "every" to be set.
11916	// - "WEEKLY" also requires fields "every" and "repeatsOnWeekDays" to be
11917	// set.
11918	// - "MONTHLY" also requires fields "every" and "runsOnDayOfMonth" to be
11919	// set.
11920	Repeats string `json:"repeats,omitempty"`
11921
11922	// RepeatsOnWeekDays: List of week days "WEEKLY" on which scheduled
11923	// reports should run.
11924	//
11925	// Possible values:
11926	//   "FRIDAY"
11927	//   "MONDAY"
11928	//   "SATURDAY"
11929	//   "SUNDAY"
11930	//   "THURSDAY"
11931	//   "TUESDAY"
11932	//   "WEDNESDAY"
11933	RepeatsOnWeekDays []string `json:"repeatsOnWeekDays,omitempty"`
11934
11935	// RunsOnDayOfMonth: Enum to define for "MONTHLY" scheduled reports
11936	// whether reports should be repeated on the same day of the month as
11937	// "startDate" or the same day of the week of the month.
11938	// Example: If 'startDate' is Monday, April 2nd 2012 (2012-04-02),
11939	// "DAY_OF_MONTH" would run subsequent reports on the 2nd of every
11940	// Month, and "WEEK_OF_MONTH" would run subsequent reports on the first
11941	// Monday of the month.
11942	//
11943	// Possible values:
11944	//   "DAY_OF_MONTH"
11945	//   "WEEK_OF_MONTH"
11946	RunsOnDayOfMonth string `json:"runsOnDayOfMonth,omitempty"`
11947
11948	// StartDate: Start date of date range for which scheduled reports
11949	// should be run.
11950	StartDate string `json:"startDate,omitempty"`
11951
11952	// ForceSendFields is a list of field names (e.g. "Active") to
11953	// unconditionally include in API requests. By default, fields with
11954	// empty values are omitted from API requests. However, any non-pointer,
11955	// non-interface field appearing in ForceSendFields will be sent to the
11956	// server regardless of whether the field is empty or not. This may be
11957	// used to include empty fields in Patch requests.
11958	ForceSendFields []string `json:"-"`
11959
11960	// NullFields is a list of field names (e.g. "Active") to include in API
11961	// requests with the JSON null value. By default, fields with empty
11962	// values are omitted from API requests. However, any field with an
11963	// empty value appearing in NullFields will be sent to the server as
11964	// null. It is an error if a field in this list has a non-empty value.
11965	// This may be used to include null fields in Patch requests.
11966	NullFields []string `json:"-"`
11967}
11968
11969func (s *ReportSchedule) MarshalJSON() ([]byte, error) {
11970	type NoMethod ReportSchedule
11971	raw := NoMethod(*s)
11972	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11973}
11974
11975// ReportCompatibleFields: Represents fields that are compatible to be
11976// selected for a report of type "STANDARD".
11977type ReportCompatibleFields struct {
11978	// DimensionFilters: Dimensions which are compatible to be selected in
11979	// the "dimensionFilters" section of the report.
11980	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
11981
11982	// Dimensions: Dimensions which are compatible to be selected in the
11983	// "dimensions" section of the report.
11984	Dimensions []*Dimension `json:"dimensions,omitempty"`
11985
11986	// Kind: The kind of resource this is, in this case
11987	// dfareporting#reportCompatibleFields.
11988	Kind string `json:"kind,omitempty"`
11989
11990	// Metrics: Metrics which are compatible to be selected in the
11991	// "metricNames" section of the report.
11992	Metrics []*Metric `json:"metrics,omitempty"`
11993
11994	// PivotedActivityMetrics: Metrics which are compatible to be selected
11995	// as activity metrics to pivot on in the "activities" section of the
11996	// report.
11997	PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
11998
11999	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
12000	// unconditionally include in API requests. By default, fields with
12001	// empty values are omitted from API requests. However, any non-pointer,
12002	// non-interface field appearing in ForceSendFields will be sent to the
12003	// server regardless of whether the field is empty or not. This may be
12004	// used to include empty fields in Patch requests.
12005	ForceSendFields []string `json:"-"`
12006
12007	// NullFields is a list of field names (e.g. "DimensionFilters") to
12008	// include in API requests with the JSON null value. By default, fields
12009	// with empty values are omitted from API requests. However, any field
12010	// with an empty value appearing in NullFields will be sent to the
12011	// server as null. It is an error if a field in this list has a
12012	// non-empty value. This may be used to include null fields in Patch
12013	// requests.
12014	NullFields []string `json:"-"`
12015}
12016
12017func (s *ReportCompatibleFields) MarshalJSON() ([]byte, error) {
12018	type NoMethod ReportCompatibleFields
12019	raw := NoMethod(*s)
12020	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12021}
12022
12023// ReportList: Represents the list of reports.
12024type ReportList struct {
12025	// Etag: The eTag of this response for caching purposes.
12026	Etag string `json:"etag,omitempty"`
12027
12028	// Items: The reports returned in this response.
12029	Items []*Report `json:"items,omitempty"`
12030
12031	// Kind: The kind of list this is, in this case dfareporting#reportList.
12032	Kind string `json:"kind,omitempty"`
12033
12034	// NextPageToken: Continuation token used to page through reports. To
12035	// retrieve the next page of results, set the next request's "pageToken"
12036	// to the value of this field. The page token is only valid for a
12037	// limited amount of time and should not be persisted.
12038	NextPageToken string `json:"nextPageToken,omitempty"`
12039
12040	// ServerResponse contains the HTTP response code and headers from the
12041	// server.
12042	googleapi.ServerResponse `json:"-"`
12043
12044	// ForceSendFields is a list of field names (e.g. "Etag") to
12045	// unconditionally include in API requests. By default, fields with
12046	// empty values are omitted from API requests. However, any non-pointer,
12047	// non-interface field appearing in ForceSendFields will be sent to the
12048	// server regardless of whether the field is empty or not. This may be
12049	// used to include empty fields in Patch requests.
12050	ForceSendFields []string `json:"-"`
12051
12052	// NullFields is a list of field names (e.g. "Etag") to include in API
12053	// requests with the JSON null value. By default, fields with empty
12054	// values are omitted from API requests. However, any field with an
12055	// empty value appearing in NullFields will be sent to the server as
12056	// null. It is an error if a field in this list has a non-empty value.
12057	// This may be used to include null fields in Patch requests.
12058	NullFields []string `json:"-"`
12059}
12060
12061func (s *ReportList) MarshalJSON() ([]byte, error) {
12062	type NoMethod ReportList
12063	raw := NoMethod(*s)
12064	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12065}
12066
12067// ReportsConfiguration: Reporting Configuration
12068type ReportsConfiguration struct {
12069	// ExposureToConversionEnabled: Whether the exposure to conversion
12070	// report is enabled. This report shows detailed pathway information on
12071	// up to 10 of the most recent ad exposures seen by a user before
12072	// converting.
12073	ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
12074
12075	// LookbackConfiguration: Default lookback windows for new advertisers
12076	// in this account.
12077	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
12078
12079	// ReportGenerationTimeZoneId: Report generation time zone ID of this
12080	// account. This is a required field that can only be changed by a
12081	// superuser.
12082	// Acceptable values are:
12083	//
12084	// - "1" for "America/New_York"
12085	// - "2" for "Europe/London"
12086	// - "3" for "Europe/Paris"
12087	// - "4" for "Africa/Johannesburg"
12088	// - "5" for "Asia/Jerusalem"
12089	// - "6" for "Asia/Shanghai"
12090	// - "7" for "Asia/Hong_Kong"
12091	// - "8" for "Asia/Tokyo"
12092	// - "9" for "Australia/Sydney"
12093	// - "10" for "Asia/Dubai"
12094	// - "11" for "America/Los_Angeles"
12095	// - "12" for "Pacific/Auckland"
12096	// - "13" for "America/Sao_Paulo"
12097	// - "16" for "America/Asuncion"
12098	// - "17" for "America/Chicago"
12099	// - "18" for "America/Denver"
12100	// - "19" for "America/St_Johns"
12101	// - "20" for "Asia/Dhaka"
12102	// - "21" for "Asia/Jakarta"
12103	// - "22" for "Asia/Kabul"
12104	// - "23" for "Asia/Karachi"
12105	// - "24" for "Asia/Calcutta"
12106	// - "25" for "Asia/Pyongyang"
12107	// - "26" for "Asia/Rangoon"
12108	// - "27" for "Atlantic/Cape_Verde"
12109	// - "28" for "Atlantic/South_Georgia"
12110	// - "29" for "Australia/Adelaide"
12111	// - "30" for "Australia/Lord_Howe"
12112	// - "31" for "Europe/Moscow"
12113	// - "32" for "Pacific/Kiritimati"
12114	// - "35" for "Pacific/Norfolk"
12115	// - "36" for "Pacific/Tongatapu"
12116	ReportGenerationTimeZoneId int64 `json:"reportGenerationTimeZoneId,omitempty,string"`
12117
12118	// ForceSendFields is a list of field names (e.g.
12119	// "ExposureToConversionEnabled") to unconditionally include in API
12120	// requests. By default, fields with empty values are omitted from API
12121	// requests. However, any non-pointer, non-interface field appearing in
12122	// ForceSendFields will be sent to the server regardless of whether the
12123	// field is empty or not. This may be used to include empty fields in
12124	// Patch requests.
12125	ForceSendFields []string `json:"-"`
12126
12127	// NullFields is a list of field names (e.g.
12128	// "ExposureToConversionEnabled") to include in API requests with the
12129	// JSON null value. By default, fields with empty values are omitted
12130	// from API requests. However, any field with an empty value appearing
12131	// in NullFields will be sent to the server as null. It is an error if a
12132	// field in this list has a non-empty value. This may be used to include
12133	// null fields in Patch requests.
12134	NullFields []string `json:"-"`
12135}
12136
12137func (s *ReportsConfiguration) MarshalJSON() ([]byte, error) {
12138	type NoMethod ReportsConfiguration
12139	raw := NoMethod(*s)
12140	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12141}
12142
12143// RichMediaExitOverride: Rich Media Exit Override.
12144type RichMediaExitOverride struct {
12145	// ClickThroughUrl: Click-through URL of this rich media exit override.
12146	// Applicable if the enabled field is set to true.
12147	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
12148
12149	// Enabled: Whether to use the clickThroughUrl. If false, the
12150	// creative-level exit will be used.
12151	Enabled bool `json:"enabled,omitempty"`
12152
12153	// ExitId: ID for the override to refer to a specific exit in the
12154	// creative.
12155	ExitId int64 `json:"exitId,omitempty,string"`
12156
12157	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
12158	// unconditionally include in API requests. By default, fields with
12159	// empty values are omitted from API requests. However, any non-pointer,
12160	// non-interface field appearing in ForceSendFields will be sent to the
12161	// server regardless of whether the field is empty or not. This may be
12162	// used to include empty fields in Patch requests.
12163	ForceSendFields []string `json:"-"`
12164
12165	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
12166	// include in API requests with the JSON null value. By default, fields
12167	// with empty values are omitted from API requests. However, any field
12168	// with an empty value appearing in NullFields will be sent to the
12169	// server as null. It is an error if a field in this list has a
12170	// non-empty value. This may be used to include null fields in Patch
12171	// requests.
12172	NullFields []string `json:"-"`
12173}
12174
12175func (s *RichMediaExitOverride) MarshalJSON() ([]byte, error) {
12176	type NoMethod RichMediaExitOverride
12177	raw := NoMethod(*s)
12178	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12179}
12180
12181// Rule: A rule associates an asset with a targeting template for
12182// asset-level targeting. Applicable to INSTREAM_VIDEO creatives.
12183type Rule struct {
12184	// AssetId: A creativeAssets[].id. This should refer to one of the
12185	// parent assets in this creative. This is a required field.
12186	AssetId int64 `json:"assetId,omitempty,string"`
12187
12188	// Name: A user-friendly name for this rule. This is a required field.
12189	Name string `json:"name,omitempty"`
12190
12191	// TargetingTemplateId: A targeting template ID. The targeting from the
12192	// targeting template will be used to determine whether this asset
12193	// should be served. This is a required field.
12194	TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
12195
12196	// ForceSendFields is a list of field names (e.g. "AssetId") to
12197	// unconditionally include in API requests. By default, fields with
12198	// empty values are omitted from API requests. However, any non-pointer,
12199	// non-interface field appearing in ForceSendFields will be sent to the
12200	// server regardless of whether the field is empty or not. This may be
12201	// used to include empty fields in Patch requests.
12202	ForceSendFields []string `json:"-"`
12203
12204	// NullFields is a list of field names (e.g. "AssetId") to include in
12205	// API requests with the JSON null value. By default, fields with empty
12206	// values are omitted from API requests. However, any field with an
12207	// empty value appearing in NullFields will be sent to the server as
12208	// null. It is an error if a field in this list has a non-empty value.
12209	// This may be used to include null fields in Patch requests.
12210	NullFields []string `json:"-"`
12211}
12212
12213func (s *Rule) MarshalJSON() ([]byte, error) {
12214	type NoMethod Rule
12215	raw := NoMethod(*s)
12216	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12217}
12218
12219// Site: Contains properties of a site.
12220type Site struct {
12221	// AccountId: Account ID of this site. This is a read-only field that
12222	// can be left blank.
12223	AccountId int64 `json:"accountId,omitempty,string"`
12224
12225	// Approved: Whether this site is approved.
12226	Approved bool `json:"approved,omitempty"`
12227
12228	// DirectorySiteId: Directory site associated with this site. This is a
12229	// required field that is read-only after insertion.
12230	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
12231
12232	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
12233	// directory site. This is a read-only, auto-generated field.
12234	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
12235
12236	// Id: ID of this site. This is a read-only, auto-generated field.
12237	Id int64 `json:"id,omitempty,string"`
12238
12239	// IdDimensionValue: Dimension value for the ID of this site. This is a
12240	// read-only, auto-generated field.
12241	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
12242
12243	// KeyName: Key name of this site. This is a read-only, auto-generated
12244	// field.
12245	KeyName string `json:"keyName,omitempty"`
12246
12247	// Kind: Identifies what kind of resource this is. Value: the fixed
12248	// string "dfareporting#site".
12249	Kind string `json:"kind,omitempty"`
12250
12251	// Name: Name of this site.This is a required field. Must be less than
12252	// 128 characters long. If this site is under a subaccount, the name
12253	// must be unique among sites of the same subaccount. Otherwise, this
12254	// site is a top-level site, and the name must be unique among top-level
12255	// sites of the same account.
12256	Name string `json:"name,omitempty"`
12257
12258	// SiteContacts: Site contacts.
12259	SiteContacts []*SiteContact `json:"siteContacts,omitempty"`
12260
12261	// SiteSettings: Site-wide settings.
12262	SiteSettings *SiteSettings `json:"siteSettings,omitempty"`
12263
12264	// SubaccountId: Subaccount ID of this site. This is a read-only field
12265	// that can be left blank.
12266	SubaccountId int64 `json:"subaccountId,omitempty,string"`
12267
12268	// VideoSettings: Default video settings for new placements created
12269	// under this site. This value will be used to populate the
12270	// placements.videoSettings field, when no value is specified for the
12271	// new placement.
12272	VideoSettings *SiteVideoSettings `json:"videoSettings,omitempty"`
12273
12274	// ServerResponse contains the HTTP response code and headers from the
12275	// server.
12276	googleapi.ServerResponse `json:"-"`
12277
12278	// ForceSendFields is a list of field names (e.g. "AccountId") to
12279	// unconditionally include in API requests. By default, fields with
12280	// empty values are omitted from API requests. However, any non-pointer,
12281	// non-interface field appearing in ForceSendFields will be sent to the
12282	// server regardless of whether the field is empty or not. This may be
12283	// used to include empty fields in Patch requests.
12284	ForceSendFields []string `json:"-"`
12285
12286	// NullFields is a list of field names (e.g. "AccountId") to include in
12287	// API requests with the JSON null value. By default, fields with empty
12288	// values are omitted from API requests. However, any field with an
12289	// empty value appearing in NullFields will be sent to the server as
12290	// null. It is an error if a field in this list has a non-empty value.
12291	// This may be used to include null fields in Patch requests.
12292	NullFields []string `json:"-"`
12293}
12294
12295func (s *Site) MarshalJSON() ([]byte, error) {
12296	type NoMethod Site
12297	raw := NoMethod(*s)
12298	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12299}
12300
12301// SiteCompanionSetting: Companion Settings
12302type SiteCompanionSetting struct {
12303	// CompanionsDisabled: Whether companions are disabled for this site
12304	// template.
12305	CompanionsDisabled bool `json:"companionsDisabled,omitempty"`
12306
12307	// EnabledSizes: Whitelist of companion sizes to be served via this site
12308	// template. Set this list to null or empty to serve all companion
12309	// sizes.
12310	EnabledSizes []*Size `json:"enabledSizes,omitempty"`
12311
12312	// ImageOnly: Whether to serve only static images as companions.
12313	ImageOnly bool `json:"imageOnly,omitempty"`
12314
12315	// Kind: Identifies what kind of resource this is. Value: the fixed
12316	// string "dfareporting#siteCompanionSetting".
12317	Kind string `json:"kind,omitempty"`
12318
12319	// ForceSendFields is a list of field names (e.g. "CompanionsDisabled")
12320	// to unconditionally include in API requests. By default, fields with
12321	// empty values are omitted from API requests. However, any non-pointer,
12322	// non-interface field appearing in ForceSendFields will be sent to the
12323	// server regardless of whether the field is empty or not. This may be
12324	// used to include empty fields in Patch requests.
12325	ForceSendFields []string `json:"-"`
12326
12327	// NullFields is a list of field names (e.g. "CompanionsDisabled") to
12328	// include in API requests with the JSON null value. By default, fields
12329	// with empty values are omitted from API requests. However, any field
12330	// with an empty value appearing in NullFields will be sent to the
12331	// server as null. It is an error if a field in this list has a
12332	// non-empty value. This may be used to include null fields in Patch
12333	// requests.
12334	NullFields []string `json:"-"`
12335}
12336
12337func (s *SiteCompanionSetting) MarshalJSON() ([]byte, error) {
12338	type NoMethod SiteCompanionSetting
12339	raw := NoMethod(*s)
12340	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12341}
12342
12343// SiteContact: Site Contact
12344type SiteContact struct {
12345	// Address: Address of this site contact.
12346	Address string `json:"address,omitempty"`
12347
12348	// ContactType: Site contact type.
12349	//
12350	// Possible values:
12351	//   "SALES_PERSON"
12352	//   "TRAFFICKER"
12353	ContactType string `json:"contactType,omitempty"`
12354
12355	// Email: Email address of this site contact. This is a required field.
12356	Email string `json:"email,omitempty"`
12357
12358	// FirstName: First name of this site contact.
12359	FirstName string `json:"firstName,omitempty"`
12360
12361	// Id: ID of this site contact. This is a read-only, auto-generated
12362	// field.
12363	Id int64 `json:"id,omitempty,string"`
12364
12365	// LastName: Last name of this site contact.
12366	LastName string `json:"lastName,omitempty"`
12367
12368	// Phone: Primary phone number of this site contact.
12369	Phone string `json:"phone,omitempty"`
12370
12371	// Title: Title or designation of this site contact.
12372	Title string `json:"title,omitempty"`
12373
12374	// ForceSendFields is a list of field names (e.g. "Address") to
12375	// unconditionally include in API requests. By default, fields with
12376	// empty values are omitted from API requests. However, any non-pointer,
12377	// non-interface field appearing in ForceSendFields will be sent to the
12378	// server regardless of whether the field is empty or not. This may be
12379	// used to include empty fields in Patch requests.
12380	ForceSendFields []string `json:"-"`
12381
12382	// NullFields is a list of field names (e.g. "Address") to include in
12383	// API requests with the JSON null value. By default, fields with empty
12384	// values are omitted from API requests. However, any field with an
12385	// empty value appearing in NullFields will be sent to the server as
12386	// null. It is an error if a field in this list has a non-empty value.
12387	// This may be used to include null fields in Patch requests.
12388	NullFields []string `json:"-"`
12389}
12390
12391func (s *SiteContact) MarshalJSON() ([]byte, error) {
12392	type NoMethod SiteContact
12393	raw := NoMethod(*s)
12394	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12395}
12396
12397// SiteSettings: Site Settings
12398type SiteSettings struct {
12399	// ActiveViewOptOut: Whether active view creatives are disabled for this
12400	// site.
12401	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
12402
12403	// AdBlockingOptOut: Whether this site opts out of ad blocking. When
12404	// true, ad blocking is disabled for all placements under the site,
12405	// regardless of the individual placement settings. When false, the
12406	// campaign and placement settings take effect.
12407	AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
12408
12409	// DisableNewCookie: Whether new cookies are disabled for this site.
12410	DisableNewCookie bool `json:"disableNewCookie,omitempty"`
12411
12412	// TagSetting: Configuration settings for dynamic and image floodlight
12413	// tags.
12414	TagSetting *TagSetting `json:"tagSetting,omitempty"`
12415
12416	// VideoActiveViewOptOutTemplate: Whether Verification and ActiveView
12417	// for in-stream video creatives are disabled by default for new
12418	// placements created under this site. This value will be used to
12419	// populate the placement.videoActiveViewOptOut field, when no value is
12420	// specified for the new placement.
12421	VideoActiveViewOptOutTemplate bool `json:"videoActiveViewOptOutTemplate,omitempty"`
12422
12423	// VpaidAdapterChoiceTemplate: Default VPAID adapter setting for new
12424	// placements created under this site. This value will be used to
12425	// populate the placements.vpaidAdapterChoice field, when no value is
12426	// specified for the new placement. Controls which VPAID format the
12427	// measurement adapter will use for in-stream video creatives assigned
12428	// to the placement. The publisher's specifications will typically
12429	// determine this setting. For VPAID creatives, the adapter format will
12430	// match the VPAID format (HTML5 VPAID creatives use the HTML5
12431	// adapter).
12432	//
12433	// Note: Flash is no longer supported. This field now defaults to HTML5
12434	// when the following values are provided: FLASH, BOTH.
12435	//
12436	// Possible values:
12437	//   "BOTH"
12438	//   "DEFAULT"
12439	//   "FLASH"
12440	//   "HTML5"
12441	VpaidAdapterChoiceTemplate string `json:"vpaidAdapterChoiceTemplate,omitempty"`
12442
12443	// ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to
12444	// unconditionally include in API requests. By default, fields with
12445	// empty values are omitted from API requests. However, any non-pointer,
12446	// non-interface field appearing in ForceSendFields will be sent to the
12447	// server regardless of whether the field is empty or not. This may be
12448	// used to include empty fields in Patch requests.
12449	ForceSendFields []string `json:"-"`
12450
12451	// NullFields is a list of field names (e.g. "ActiveViewOptOut") to
12452	// include in API requests with the JSON null value. By default, fields
12453	// with empty values are omitted from API requests. However, any field
12454	// with an empty value appearing in NullFields will be sent to the
12455	// server as null. It is an error if a field in this list has a
12456	// non-empty value. This may be used to include null fields in Patch
12457	// requests.
12458	NullFields []string `json:"-"`
12459}
12460
12461func (s *SiteSettings) MarshalJSON() ([]byte, error) {
12462	type NoMethod SiteSettings
12463	raw := NoMethod(*s)
12464	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12465}
12466
12467// SiteSkippableSetting: Skippable Settings
12468type SiteSkippableSetting struct {
12469	// Kind: Identifies what kind of resource this is. Value: the fixed
12470	// string "dfareporting#siteSkippableSetting".
12471	Kind string `json:"kind,omitempty"`
12472
12473	// ProgressOffset: Amount of time to play videos served to this site
12474	// template before counting a view. Applicable when skippable is true.
12475	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
12476
12477	// SkipOffset: Amount of time to play videos served to this site before
12478	// the skip button should appear. Applicable when skippable is true.
12479	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
12480
12481	// Skippable: Whether the user can skip creatives served to this site.
12482	// This will act as default for new placements created under this site.
12483	Skippable bool `json:"skippable,omitempty"`
12484
12485	// ForceSendFields is a list of field names (e.g. "Kind") to
12486	// unconditionally include in API requests. By default, fields with
12487	// empty values are omitted from API requests. However, any non-pointer,
12488	// non-interface field appearing in ForceSendFields will be sent to the
12489	// server regardless of whether the field is empty or not. This may be
12490	// used to include empty fields in Patch requests.
12491	ForceSendFields []string `json:"-"`
12492
12493	// NullFields is a list of field names (e.g. "Kind") to include in API
12494	// requests with the JSON null value. By default, fields with empty
12495	// values are omitted from API requests. However, any field with an
12496	// empty value appearing in NullFields will be sent to the server as
12497	// null. It is an error if a field in this list has a non-empty value.
12498	// This may be used to include null fields in Patch requests.
12499	NullFields []string `json:"-"`
12500}
12501
12502func (s *SiteSkippableSetting) MarshalJSON() ([]byte, error) {
12503	type NoMethod SiteSkippableSetting
12504	raw := NoMethod(*s)
12505	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12506}
12507
12508// SiteTranscodeSetting: Transcode Settings
12509type SiteTranscodeSetting struct {
12510	// EnabledVideoFormats: Whitelist of video formats to be served to this
12511	// site template. Set this list to null or empty to serve all video
12512	// formats.
12513	EnabledVideoFormats []int64 `json:"enabledVideoFormats,omitempty"`
12514
12515	// Kind: Identifies what kind of resource this is. Value: the fixed
12516	// string "dfareporting#siteTranscodeSetting".
12517	Kind string `json:"kind,omitempty"`
12518
12519	// ForceSendFields is a list of field names (e.g. "EnabledVideoFormats")
12520	// to unconditionally include in API requests. By default, fields with
12521	// empty values are omitted from API requests. However, any non-pointer,
12522	// non-interface field appearing in ForceSendFields will be sent to the
12523	// server regardless of whether the field is empty or not. This may be
12524	// used to include empty fields in Patch requests.
12525	ForceSendFields []string `json:"-"`
12526
12527	// NullFields is a list of field names (e.g. "EnabledVideoFormats") to
12528	// include in API requests with the JSON null value. By default, fields
12529	// with empty values are omitted from API requests. However, any field
12530	// with an empty value appearing in NullFields will be sent to the
12531	// server as null. It is an error if a field in this list has a
12532	// non-empty value. This may be used to include null fields in Patch
12533	// requests.
12534	NullFields []string `json:"-"`
12535}
12536
12537func (s *SiteTranscodeSetting) MarshalJSON() ([]byte, error) {
12538	type NoMethod SiteTranscodeSetting
12539	raw := NoMethod(*s)
12540	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12541}
12542
12543// SiteVideoSettings: Video Settings
12544type SiteVideoSettings struct {
12545	// CompanionSettings: Settings for the companion creatives of video
12546	// creatives served to this site.
12547	CompanionSettings *SiteCompanionSetting `json:"companionSettings,omitempty"`
12548
12549	// Kind: Identifies what kind of resource this is. Value: the fixed
12550	// string "dfareporting#siteVideoSettings".
12551	Kind string `json:"kind,omitempty"`
12552
12553	// Orientation: Orientation of a site template used for video. This will
12554	// act as default for new placements created under this site.
12555	//
12556	// Possible values:
12557	//   "ANY"
12558	//   "LANDSCAPE"
12559	//   "PORTRAIT"
12560	Orientation string `json:"orientation,omitempty"`
12561
12562	// SkippableSettings: Settings for the skippability of video creatives
12563	// served to this site. This will act as default for new placements
12564	// created under this site.
12565	SkippableSettings *SiteSkippableSetting `json:"skippableSettings,omitempty"`
12566
12567	// TranscodeSettings: Settings for the transcodes of video creatives
12568	// served to this site. This will act as default for new placements
12569	// created under this site.
12570	TranscodeSettings *SiteTranscodeSetting `json:"transcodeSettings,omitempty"`
12571
12572	// ForceSendFields is a list of field names (e.g. "CompanionSettings")
12573	// to 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. "CompanionSettings") to
12581	// include in API requests with the JSON null value. By default, fields
12582	// with empty values are omitted from API requests. However, any field
12583	// with an empty value appearing in NullFields will be sent to the
12584	// server as null. It is an error if a field in this list has a
12585	// non-empty value. This may be used to include null fields in Patch
12586	// requests.
12587	NullFields []string `json:"-"`
12588}
12589
12590func (s *SiteVideoSettings) MarshalJSON() ([]byte, error) {
12591	type NoMethod SiteVideoSettings
12592	raw := NoMethod(*s)
12593	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12594}
12595
12596// SitesListResponse: Site List Response
12597type SitesListResponse struct {
12598	// Kind: Identifies what kind of resource this is. Value: the fixed
12599	// string "dfareporting#sitesListResponse".
12600	Kind string `json:"kind,omitempty"`
12601
12602	// NextPageToken: Pagination token to be used for the next list
12603	// operation.
12604	NextPageToken string `json:"nextPageToken,omitempty"`
12605
12606	// Sites: Site collection.
12607	Sites []*Site `json:"sites,omitempty"`
12608
12609	// ServerResponse contains the HTTP response code and headers from the
12610	// server.
12611	googleapi.ServerResponse `json:"-"`
12612
12613	// ForceSendFields is a list of field names (e.g. "Kind") to
12614	// unconditionally include in API requests. By default, fields with
12615	// empty values are omitted from API requests. However, any non-pointer,
12616	// non-interface field appearing in ForceSendFields will be sent to the
12617	// server regardless of whether the field is empty or not. This may be
12618	// used to include empty fields in Patch requests.
12619	ForceSendFields []string `json:"-"`
12620
12621	// NullFields is a list of field names (e.g. "Kind") to include in API
12622	// requests with the JSON null value. By default, fields with empty
12623	// values are omitted from API requests. However, any field with an
12624	// empty value appearing in NullFields will be sent to the server as
12625	// null. It is an error if a field in this list has a non-empty value.
12626	// This may be used to include null fields in Patch requests.
12627	NullFields []string `json:"-"`
12628}
12629
12630func (s *SitesListResponse) MarshalJSON() ([]byte, error) {
12631	type NoMethod SitesListResponse
12632	raw := NoMethod(*s)
12633	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12634}
12635
12636// Size: Represents the dimensions of ads, placements, creatives, or
12637// creative assets.
12638type Size struct {
12639	// Height: Height of this size. Acceptable values are 0 to 32767,
12640	// inclusive.
12641	Height int64 `json:"height,omitempty"`
12642
12643	// Iab: IAB standard size. This is a read-only, auto-generated field.
12644	Iab bool `json:"iab,omitempty"`
12645
12646	// Id: ID of this size. This is a read-only, auto-generated field.
12647	Id int64 `json:"id,omitempty,string"`
12648
12649	// Kind: Identifies what kind of resource this is. Value: the fixed
12650	// string "dfareporting#size".
12651	Kind string `json:"kind,omitempty"`
12652
12653	// Width: Width of this size. Acceptable values are 0 to 32767,
12654	// inclusive.
12655	Width int64 `json:"width,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. "Height") 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. "Height") 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 *Size) MarshalJSON() ([]byte, error) {
12679	type NoMethod Size
12680	raw := NoMethod(*s)
12681	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12682}
12683
12684// SizesListResponse: Size List Response
12685type SizesListResponse struct {
12686	// Kind: Identifies what kind of resource this is. Value: the fixed
12687	// string "dfareporting#sizesListResponse".
12688	Kind string `json:"kind,omitempty"`
12689
12690	// Sizes: Size collection.
12691	Sizes []*Size `json:"sizes,omitempty"`
12692
12693	// ServerResponse contains the HTTP response code and headers from the
12694	// server.
12695	googleapi.ServerResponse `json:"-"`
12696
12697	// ForceSendFields is a list of field names (e.g. "Kind") to
12698	// unconditionally include in API requests. By default, fields with
12699	// empty values are omitted from API requests. However, any non-pointer,
12700	// non-interface field appearing in ForceSendFields will be sent to the
12701	// server regardless of whether the field is empty or not. This may be
12702	// used to include empty fields in Patch requests.
12703	ForceSendFields []string `json:"-"`
12704
12705	// NullFields is a list of field names (e.g. "Kind") to include in API
12706	// requests with the JSON null value. By default, fields with empty
12707	// values are omitted from API requests. However, any field with an
12708	// empty value appearing in NullFields will be sent to the server as
12709	// null. It is an error if a field in this list has a non-empty value.
12710	// This may be used to include null fields in Patch requests.
12711	NullFields []string `json:"-"`
12712}
12713
12714func (s *SizesListResponse) MarshalJSON() ([]byte, error) {
12715	type NoMethod SizesListResponse
12716	raw := NoMethod(*s)
12717	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12718}
12719
12720// SkippableSetting: Skippable Settings
12721type SkippableSetting struct {
12722	// Kind: Identifies what kind of resource this is. Value: the fixed
12723	// string "dfareporting#skippableSetting".
12724	Kind string `json:"kind,omitempty"`
12725
12726	// ProgressOffset: Amount of time to play videos served to this
12727	// placement before counting a view. Applicable when skippable is true.
12728	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
12729
12730	// SkipOffset: Amount of time to play videos served to this placement
12731	// before the skip button should appear. Applicable when skippable is
12732	// true.
12733	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
12734
12735	// Skippable: Whether the user can skip creatives served to this
12736	// placement.
12737	Skippable bool `json:"skippable,omitempty"`
12738
12739	// ForceSendFields is a list of field names (e.g. "Kind") to
12740	// unconditionally include in API requests. By default, fields with
12741	// empty values are omitted from API requests. However, any non-pointer,
12742	// non-interface field appearing in ForceSendFields will be sent to the
12743	// server regardless of whether the field is empty or not. This may be
12744	// used to include empty fields in Patch requests.
12745	ForceSendFields []string `json:"-"`
12746
12747	// NullFields is a list of field names (e.g. "Kind") to include in API
12748	// requests with the JSON null value. By default, fields with empty
12749	// values are omitted from API requests. However, any field with an
12750	// empty value appearing in NullFields will be sent to the server as
12751	// null. It is an error if a field in this list has a non-empty value.
12752	// This may be used to include null fields in Patch requests.
12753	NullFields []string `json:"-"`
12754}
12755
12756func (s *SkippableSetting) MarshalJSON() ([]byte, error) {
12757	type NoMethod SkippableSetting
12758	raw := NoMethod(*s)
12759	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12760}
12761
12762// SortedDimension: Represents a sorted dimension.
12763type SortedDimension struct {
12764	// Kind: The kind of resource this is, in this case
12765	// dfareporting#sortedDimension.
12766	Kind string `json:"kind,omitempty"`
12767
12768	// Name: The name of the dimension.
12769	Name string `json:"name,omitempty"`
12770
12771	// SortOrder: An optional sort order for the dimension column.
12772	//
12773	// Possible values:
12774	//   "ASCENDING"
12775	//   "DESCENDING"
12776	SortOrder string `json:"sortOrder,omitempty"`
12777
12778	// ForceSendFields is a list of field names (e.g. "Kind") to
12779	// unconditionally include in API requests. By default, fields with
12780	// empty values are omitted from API requests. However, any non-pointer,
12781	// non-interface field appearing in ForceSendFields will be sent to the
12782	// server regardless of whether the field is empty or not. This may be
12783	// used to include empty fields in Patch requests.
12784	ForceSendFields []string `json:"-"`
12785
12786	// NullFields is a list of field names (e.g. "Kind") to include in API
12787	// requests with the JSON null value. By default, fields with empty
12788	// values are omitted from API requests. However, any field with an
12789	// empty value appearing in NullFields will be sent to the server as
12790	// null. It is an error if a field in this list has a non-empty value.
12791	// This may be used to include null fields in Patch requests.
12792	NullFields []string `json:"-"`
12793}
12794
12795func (s *SortedDimension) MarshalJSON() ([]byte, error) {
12796	type NoMethod SortedDimension
12797	raw := NoMethod(*s)
12798	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12799}
12800
12801// Subaccount: Contains properties of a Campaign Manager subaccount.
12802type Subaccount struct {
12803	// AccountId: ID of the account that contains this subaccount. This is a
12804	// read-only field that can be left blank.
12805	AccountId int64 `json:"accountId,omitempty,string"`
12806
12807	// AvailablePermissionIds: IDs of the available user role permissions
12808	// for this subaccount.
12809	AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
12810
12811	// Id: ID of this subaccount. This is a read-only, auto-generated field.
12812	Id int64 `json:"id,omitempty,string"`
12813
12814	// Kind: Identifies what kind of resource this is. Value: the fixed
12815	// string "dfareporting#subaccount".
12816	Kind string `json:"kind,omitempty"`
12817
12818	// Name: Name of this subaccount. This is a required field. Must be less
12819	// than 128 characters long and be unique among subaccounts of the same
12820	// account.
12821	Name string `json:"name,omitempty"`
12822
12823	// ServerResponse contains the HTTP response code and headers from the
12824	// server.
12825	googleapi.ServerResponse `json:"-"`
12826
12827	// ForceSendFields is a list of field names (e.g. "AccountId") to
12828	// unconditionally include in API requests. By default, fields with
12829	// empty values are omitted from API requests. However, any non-pointer,
12830	// non-interface field appearing in ForceSendFields will be sent to the
12831	// server regardless of whether the field is empty or not. This may be
12832	// used to include empty fields in Patch requests.
12833	ForceSendFields []string `json:"-"`
12834
12835	// NullFields is a list of field names (e.g. "AccountId") to include in
12836	// API requests with the JSON null value. By default, fields with empty
12837	// values are omitted from API requests. However, any field with an
12838	// empty value appearing in NullFields will be sent to the server as
12839	// null. It is an error if a field in this list has a non-empty value.
12840	// This may be used to include null fields in Patch requests.
12841	NullFields []string `json:"-"`
12842}
12843
12844func (s *Subaccount) MarshalJSON() ([]byte, error) {
12845	type NoMethod Subaccount
12846	raw := NoMethod(*s)
12847	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12848}
12849
12850// SubaccountsListResponse: Subaccount List Response
12851type SubaccountsListResponse struct {
12852	// Kind: Identifies what kind of resource this is. Value: the fixed
12853	// string "dfareporting#subaccountsListResponse".
12854	Kind string `json:"kind,omitempty"`
12855
12856	// NextPageToken: Pagination token to be used for the next list
12857	// operation.
12858	NextPageToken string `json:"nextPageToken,omitempty"`
12859
12860	// Subaccounts: Subaccount collection.
12861	Subaccounts []*Subaccount `json:"subaccounts,omitempty"`
12862
12863	// ServerResponse contains the HTTP response code and headers from the
12864	// server.
12865	googleapi.ServerResponse `json:"-"`
12866
12867	// ForceSendFields is a list of field names (e.g. "Kind") to
12868	// unconditionally include in API requests. By default, fields with
12869	// empty values are omitted from API requests. However, any non-pointer,
12870	// non-interface field appearing in ForceSendFields will be sent to the
12871	// server regardless of whether the field is empty or not. This may be
12872	// used to include empty fields in Patch requests.
12873	ForceSendFields []string `json:"-"`
12874
12875	// NullFields is a list of field names (e.g. "Kind") to include in API
12876	// requests with the JSON null value. By default, fields with empty
12877	// values are omitted from API requests. However, any field with an
12878	// empty value appearing in NullFields will be sent to the server as
12879	// null. It is an error if a field in this list has a non-empty value.
12880	// This may be used to include null fields in Patch requests.
12881	NullFields []string `json:"-"`
12882}
12883
12884func (s *SubaccountsListResponse) MarshalJSON() ([]byte, error) {
12885	type NoMethod SubaccountsListResponse
12886	raw := NoMethod(*s)
12887	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12888}
12889
12890// TagData: Placement Tag Data
12891type TagData struct {
12892	// AdId: Ad associated with this placement tag. Applicable only when
12893	// format is PLACEMENT_TAG_TRACKING.
12894	AdId int64 `json:"adId,omitempty,string"`
12895
12896	// ClickTag: Tag string to record a click.
12897	ClickTag string `json:"clickTag,omitempty"`
12898
12899	// CreativeId: Creative associated with this placement tag. Applicable
12900	// only when format is PLACEMENT_TAG_TRACKING.
12901	CreativeId int64 `json:"creativeId,omitempty,string"`
12902
12903	// Format: TagData tag format of this tag.
12904	//
12905	// Possible values:
12906	//   "PLACEMENT_TAG_CLICK_COMMANDS"
12907	//   "PLACEMENT_TAG_IFRAME_ILAYER"
12908	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
12909	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
12910	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
12911	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
12912	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
12913	//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
12914	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
12915	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
12916	//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
12917	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
12918	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
12919	//   "PLACEMENT_TAG_JAVASCRIPT"
12920	//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
12921	//   "PLACEMENT_TAG_STANDARD"
12922	//   "PLACEMENT_TAG_TRACKING"
12923	//   "PLACEMENT_TAG_TRACKING_IFRAME"
12924	//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
12925	Format string `json:"format,omitempty"`
12926
12927	// ImpressionTag: Tag string for serving an ad.
12928	ImpressionTag string `json:"impressionTag,omitempty"`
12929
12930	// ForceSendFields is a list of field names (e.g. "AdId") to
12931	// unconditionally include in API requests. By default, fields with
12932	// empty values are omitted from API requests. However, any non-pointer,
12933	// non-interface field appearing in ForceSendFields will be sent to the
12934	// server regardless of whether the field is empty or not. This may be
12935	// used to include empty fields in Patch requests.
12936	ForceSendFields []string `json:"-"`
12937
12938	// NullFields is a list of field names (e.g. "AdId") to include in API
12939	// requests with the JSON null value. By default, fields with empty
12940	// values are omitted from API requests. However, any field with an
12941	// empty value appearing in NullFields will be sent to the server as
12942	// null. It is an error if a field in this list has a non-empty value.
12943	// This may be used to include null fields in Patch requests.
12944	NullFields []string `json:"-"`
12945}
12946
12947func (s *TagData) MarshalJSON() ([]byte, error) {
12948	type NoMethod TagData
12949	raw := NoMethod(*s)
12950	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12951}
12952
12953// TagSetting: Tag Settings
12954type TagSetting struct {
12955	// AdditionalKeyValues: Additional key-values to be included in tags.
12956	// Each key-value pair must be of the form key=value, and pairs must be
12957	// separated by a semicolon (;). Keys and values must not contain
12958	// commas. For example, id=2;color=red is a valid value for this field.
12959	AdditionalKeyValues string `json:"additionalKeyValues,omitempty"`
12960
12961	// IncludeClickThroughUrls: Whether static landing page URLs should be
12962	// included in the tags. This setting applies only to placements.
12963	IncludeClickThroughUrls bool `json:"includeClickThroughUrls,omitempty"`
12964
12965	// IncludeClickTracking: Whether click-tracking string should be
12966	// included in the tags.
12967	IncludeClickTracking bool `json:"includeClickTracking,omitempty"`
12968
12969	// KeywordOption: Option specifying how keywords are embedded in ad
12970	// tags. This setting can be used to specify whether keyword
12971	// placeholders are inserted in placement tags for this site. Publishers
12972	// can then add keywords to those placeholders.
12973	//
12974	// Possible values:
12975	//   "GENERATE_SEPARATE_TAG_FOR_EACH_KEYWORD"
12976	//   "IGNORE"
12977	//   "PLACEHOLDER_WITH_LIST_OF_KEYWORDS"
12978	KeywordOption string `json:"keywordOption,omitempty"`
12979
12980	// ForceSendFields is a list of field names (e.g. "AdditionalKeyValues")
12981	// to unconditionally include in API requests. By default, fields with
12982	// empty values are omitted from API requests. However, any non-pointer,
12983	// non-interface field appearing in ForceSendFields will be sent to the
12984	// server regardless of whether the field is empty or not. This may be
12985	// used to include empty fields in Patch requests.
12986	ForceSendFields []string `json:"-"`
12987
12988	// NullFields is a list of field names (e.g. "AdditionalKeyValues") to
12989	// include in API requests with the JSON null value. By default, fields
12990	// with empty values are omitted from API requests. However, any field
12991	// with an empty value appearing in NullFields will be sent to the
12992	// server as null. It is an error if a field in this list has a
12993	// non-empty value. This may be used to include null fields in Patch
12994	// requests.
12995	NullFields []string `json:"-"`
12996}
12997
12998func (s *TagSetting) MarshalJSON() ([]byte, error) {
12999	type NoMethod TagSetting
13000	raw := NoMethod(*s)
13001	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13002}
13003
13004// TagSettings: Dynamic and Image Tag Settings.
13005type TagSettings struct {
13006	// DynamicTagEnabled: Whether dynamic floodlight tags are enabled.
13007	DynamicTagEnabled bool `json:"dynamicTagEnabled,omitempty"`
13008
13009	// ImageTagEnabled: Whether image tags are enabled.
13010	ImageTagEnabled bool `json:"imageTagEnabled,omitempty"`
13011
13012	// ForceSendFields is a list of field names (e.g. "DynamicTagEnabled")
13013	// to unconditionally include in API requests. By default, fields with
13014	// empty values are omitted from API requests. However, any non-pointer,
13015	// non-interface field appearing in ForceSendFields will be sent to the
13016	// server regardless of whether the field is empty or not. This may be
13017	// used to include empty fields in Patch requests.
13018	ForceSendFields []string `json:"-"`
13019
13020	// NullFields is a list of field names (e.g. "DynamicTagEnabled") to
13021	// include in API requests with the JSON null value. By default, fields
13022	// with empty values are omitted from API requests. However, any field
13023	// with an empty value appearing in NullFields will be sent to the
13024	// server as null. It is an error if a field in this list has a
13025	// non-empty value. This may be used to include null fields in Patch
13026	// requests.
13027	NullFields []string `json:"-"`
13028}
13029
13030func (s *TagSettings) MarshalJSON() ([]byte, error) {
13031	type NoMethod TagSettings
13032	raw := NoMethod(*s)
13033	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13034}
13035
13036// TargetWindow: Target Window.
13037type TargetWindow struct {
13038	// CustomHtml: User-entered value.
13039	CustomHtml string `json:"customHtml,omitempty"`
13040
13041	// TargetWindowOption: Type of browser window for which the backup image
13042	// of the flash creative can be displayed.
13043	//
13044	// Possible values:
13045	//   "CURRENT_WINDOW"
13046	//   "CUSTOM"
13047	//   "NEW_WINDOW"
13048	TargetWindowOption string `json:"targetWindowOption,omitempty"`
13049
13050	// ForceSendFields is a list of field names (e.g. "CustomHtml") to
13051	// unconditionally include in API requests. By default, fields with
13052	// empty values are omitted from API requests. However, any non-pointer,
13053	// non-interface field appearing in ForceSendFields will be sent to the
13054	// server regardless of whether the field is empty or not. This may be
13055	// used to include empty fields in Patch requests.
13056	ForceSendFields []string `json:"-"`
13057
13058	// NullFields is a list of field names (e.g. "CustomHtml") to include in
13059	// API requests with the JSON null value. By default, fields with empty
13060	// values are omitted from API requests. However, any field with an
13061	// empty value appearing in NullFields will be sent to the server as
13062	// null. It is an error if a field in this list has a non-empty value.
13063	// This may be used to include null fields in Patch requests.
13064	NullFields []string `json:"-"`
13065}
13066
13067func (s *TargetWindow) MarshalJSON() ([]byte, error) {
13068	type NoMethod TargetWindow
13069	raw := NoMethod(*s)
13070	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13071}
13072
13073// TargetableRemarketingList: Contains properties of a targetable
13074// remarketing list. Remarketing enables you to create lists of users
13075// who have performed specific actions on a site, then target ads to
13076// members of those lists. This resource is a read-only view of a
13077// remarketing list to be used to faciliate targeting ads to specific
13078// lists. Remarketing lists that are owned by your advertisers and those
13079// that are shared to your advertisers or account are accessible via
13080// this resource. To manage remarketing lists that are owned by your
13081// advertisers, use the RemarketingLists resource.
13082type TargetableRemarketingList struct {
13083	// AccountId: Account ID of this remarketing list. This is a read-only,
13084	// auto-generated field that is only returned in GET requests.
13085	AccountId int64 `json:"accountId,omitempty,string"`
13086
13087	// Active: Whether this targetable remarketing list is active.
13088	Active bool `json:"active,omitempty"`
13089
13090	// AdvertiserId: Dimension value for the advertiser ID that owns this
13091	// targetable remarketing list.
13092	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
13093
13094	// AdvertiserIdDimensionValue: Dimension value for the ID of the
13095	// advertiser.
13096	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
13097
13098	// Description: Targetable remarketing list description.
13099	Description string `json:"description,omitempty"`
13100
13101	// Id: Targetable remarketing list ID.
13102	Id int64 `json:"id,omitempty,string"`
13103
13104	// Kind: Identifies what kind of resource this is. Value: the fixed
13105	// string "dfareporting#targetableRemarketingList".
13106	Kind string `json:"kind,omitempty"`
13107
13108	// LifeSpan: Number of days that a user should remain in the targetable
13109	// remarketing list without an impression.
13110	LifeSpan int64 `json:"lifeSpan,omitempty,string"`
13111
13112	// ListSize: Number of users currently in the list. This is a read-only
13113	// field.
13114	ListSize int64 `json:"listSize,omitempty,string"`
13115
13116	// ListSource: Product from which this targetable remarketing list was
13117	// originated.
13118	//
13119	// Possible values:
13120	//   "REMARKETING_LIST_SOURCE_ADX"
13121	//   "REMARKETING_LIST_SOURCE_DBM"
13122	//   "REMARKETING_LIST_SOURCE_DFA"
13123	//   "REMARKETING_LIST_SOURCE_DFP"
13124	//   "REMARKETING_LIST_SOURCE_DMP"
13125	//   "REMARKETING_LIST_SOURCE_GA"
13126	//   "REMARKETING_LIST_SOURCE_GPLUS"
13127	//   "REMARKETING_LIST_SOURCE_OTHER"
13128	//   "REMARKETING_LIST_SOURCE_PLAY_STORE"
13129	//   "REMARKETING_LIST_SOURCE_XFP"
13130	//   "REMARKETING_LIST_SOURCE_YOUTUBE"
13131	ListSource string `json:"listSource,omitempty"`
13132
13133	// Name: Name of the targetable remarketing list. Is no greater than 128
13134	// characters long.
13135	Name string `json:"name,omitempty"`
13136
13137	// SubaccountId: Subaccount ID of this remarketing list. This is a
13138	// read-only, auto-generated field that is only returned in GET
13139	// requests.
13140	SubaccountId int64 `json:"subaccountId,omitempty,string"`
13141
13142	// ServerResponse contains the HTTP response code and headers from the
13143	// server.
13144	googleapi.ServerResponse `json:"-"`
13145
13146	// ForceSendFields is a list of field names (e.g. "AccountId") to
13147	// unconditionally include in API requests. By default, fields with
13148	// empty values are omitted from API requests. However, any non-pointer,
13149	// non-interface field appearing in ForceSendFields will be sent to the
13150	// server regardless of whether the field is empty or not. This may be
13151	// used to include empty fields in Patch requests.
13152	ForceSendFields []string `json:"-"`
13153
13154	// NullFields is a list of field names (e.g. "AccountId") to include in
13155	// API requests with the JSON null value. By default, fields with empty
13156	// values are omitted from API requests. However, any field with an
13157	// empty value appearing in NullFields will be sent to the server as
13158	// null. It is an error if a field in this list has a non-empty value.
13159	// This may be used to include null fields in Patch requests.
13160	NullFields []string `json:"-"`
13161}
13162
13163func (s *TargetableRemarketingList) MarshalJSON() ([]byte, error) {
13164	type NoMethod TargetableRemarketingList
13165	raw := NoMethod(*s)
13166	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13167}
13168
13169// TargetableRemarketingListsListResponse: Targetable remarketing list
13170// response
13171type TargetableRemarketingListsListResponse struct {
13172	// Kind: Identifies what kind of resource this is. Value: the fixed
13173	// string "dfareporting#targetableRemarketingListsListResponse".
13174	Kind string `json:"kind,omitempty"`
13175
13176	// NextPageToken: Pagination token to be used for the next list
13177	// operation.
13178	NextPageToken string `json:"nextPageToken,omitempty"`
13179
13180	// TargetableRemarketingLists: Targetable remarketing list collection.
13181	TargetableRemarketingLists []*TargetableRemarketingList `json:"targetableRemarketingLists,omitempty"`
13182
13183	// ServerResponse contains the HTTP response code and headers from the
13184	// server.
13185	googleapi.ServerResponse `json:"-"`
13186
13187	// ForceSendFields is a list of field names (e.g. "Kind") to
13188	// unconditionally include in API requests. By default, fields with
13189	// empty values are omitted from API requests. However, any non-pointer,
13190	// non-interface field appearing in ForceSendFields will be sent to the
13191	// server regardless of whether the field is empty or not. This may be
13192	// used to include empty fields in Patch requests.
13193	ForceSendFields []string `json:"-"`
13194
13195	// NullFields is a list of field names (e.g. "Kind") to include in API
13196	// requests with the JSON null value. By default, fields with empty
13197	// values are omitted from API requests. However, any field with an
13198	// empty value appearing in NullFields will be sent to the server as
13199	// null. It is an error if a field in this list has a non-empty value.
13200	// This may be used to include null fields in Patch requests.
13201	NullFields []string `json:"-"`
13202}
13203
13204func (s *TargetableRemarketingListsListResponse) MarshalJSON() ([]byte, error) {
13205	type NoMethod TargetableRemarketingListsListResponse
13206	raw := NoMethod(*s)
13207	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13208}
13209
13210// TargetingTemplate: Contains properties of a targeting template. A
13211// targeting template encapsulates targeting information which can be
13212// reused across multiple ads.
13213type TargetingTemplate struct {
13214	// AccountId: Account ID of this targeting template. This field, if left
13215	// unset, will be auto-generated on insert and is read-only after
13216	// insert.
13217	AccountId int64 `json:"accountId,omitempty,string"`
13218
13219	// AdvertiserId: Advertiser ID of this targeting template. This is a
13220	// required field on insert and is read-only after insert.
13221	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
13222
13223	// AdvertiserIdDimensionValue: Dimension value for the ID of the
13224	// advertiser. This is a read-only, auto-generated field.
13225	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
13226
13227	// DayPartTargeting: Time and day targeting criteria.
13228	DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
13229
13230	// GeoTargeting: Geographical targeting criteria.
13231	GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
13232
13233	// Id: ID of this targeting template. This is a read-only,
13234	// auto-generated field.
13235	Id int64 `json:"id,omitempty,string"`
13236
13237	// KeyValueTargetingExpression: Key-value targeting criteria.
13238	KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
13239
13240	// Kind: Identifies what kind of resource this is. Value: the fixed
13241	// string "dfareporting#targetingTemplate".
13242	Kind string `json:"kind,omitempty"`
13243
13244	// LanguageTargeting: Language targeting criteria.
13245	LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
13246
13247	// ListTargetingExpression: Remarketing list targeting criteria.
13248	ListTargetingExpression *ListTargetingExpression `json:"listTargetingExpression,omitempty"`
13249
13250	// Name: Name of this targeting template. This field is required. It
13251	// must be less than 256 characters long and unique within an
13252	// advertiser.
13253	Name string `json:"name,omitempty"`
13254
13255	// SubaccountId: Subaccount ID of this targeting template. This field,
13256	// if left unset, will be auto-generated on insert and is read-only
13257	// after insert.
13258	SubaccountId int64 `json:"subaccountId,omitempty,string"`
13259
13260	// TechnologyTargeting: Technology platform targeting criteria.
13261	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
13262
13263	// ServerResponse contains the HTTP response code and headers from the
13264	// server.
13265	googleapi.ServerResponse `json:"-"`
13266
13267	// ForceSendFields is a list of field names (e.g. "AccountId") to
13268	// unconditionally include in API requests. By default, fields with
13269	// empty values are omitted from API requests. However, any non-pointer,
13270	// non-interface field appearing in ForceSendFields will be sent to the
13271	// server regardless of whether the field is empty or not. This may be
13272	// used to include empty fields in Patch requests.
13273	ForceSendFields []string `json:"-"`
13274
13275	// NullFields is a list of field names (e.g. "AccountId") to include in
13276	// API requests with the JSON null value. By default, fields with empty
13277	// values are omitted from API requests. However, any field with an
13278	// empty value appearing in NullFields will be sent to the server as
13279	// null. It is an error if a field in this list has a non-empty value.
13280	// This may be used to include null fields in Patch requests.
13281	NullFields []string `json:"-"`
13282}
13283
13284func (s *TargetingTemplate) MarshalJSON() ([]byte, error) {
13285	type NoMethod TargetingTemplate
13286	raw := NoMethod(*s)
13287	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13288}
13289
13290// TargetingTemplatesListResponse: Targeting Template List Response
13291type TargetingTemplatesListResponse struct {
13292	// Kind: Identifies what kind of resource this is. Value: the fixed
13293	// string "dfareporting#targetingTemplatesListResponse".
13294	Kind string `json:"kind,omitempty"`
13295
13296	// NextPageToken: Pagination token to be used for the next list
13297	// operation.
13298	NextPageToken string `json:"nextPageToken,omitempty"`
13299
13300	// TargetingTemplates: Targeting template collection.
13301	TargetingTemplates []*TargetingTemplate `json:"targetingTemplates,omitempty"`
13302
13303	// ServerResponse contains the HTTP response code and headers from the
13304	// server.
13305	googleapi.ServerResponse `json:"-"`
13306
13307	// ForceSendFields is a list of field names (e.g. "Kind") to
13308	// unconditionally include in API requests. By default, fields with
13309	// empty values are omitted from API requests. However, any non-pointer,
13310	// non-interface field appearing in ForceSendFields will be sent to the
13311	// server regardless of whether the field is empty or not. This may be
13312	// used to include empty fields in Patch requests.
13313	ForceSendFields []string `json:"-"`
13314
13315	// NullFields is a list of field names (e.g. "Kind") to include in API
13316	// requests with the JSON null value. By default, fields with empty
13317	// values are omitted from API requests. However, any field with an
13318	// empty value appearing in NullFields will be sent to the server as
13319	// null. It is an error if a field in this list has a non-empty value.
13320	// This may be used to include null fields in Patch requests.
13321	NullFields []string `json:"-"`
13322}
13323
13324func (s *TargetingTemplatesListResponse) MarshalJSON() ([]byte, error) {
13325	type NoMethod TargetingTemplatesListResponse
13326	raw := NoMethod(*s)
13327	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13328}
13329
13330// TechnologyTargeting: Technology Targeting.
13331type TechnologyTargeting struct {
13332	// Browsers: Browsers that this ad targets. For each browser either set
13333	// browserVersionId or dartId along with the version numbers. If both
13334	// are specified, only browserVersionId will be used. The other fields
13335	// are populated automatically when the ad is inserted or updated.
13336	Browsers []*Browser `json:"browsers,omitempty"`
13337
13338	// ConnectionTypes: Connection types that this ad targets. For each
13339	// connection type only id is required. The other fields are populated
13340	// automatically when the ad is inserted or updated.
13341	ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
13342
13343	// MobileCarriers: Mobile carriers that this ad targets. For each mobile
13344	// carrier only id is required, and the other fields are populated
13345	// automatically when the ad is inserted or updated. If targeting a
13346	// mobile carrier, do not set targeting for any zip codes.
13347	MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
13348
13349	// OperatingSystemVersions: Operating system versions that this ad
13350	// targets. To target all versions, use operatingSystems. For each
13351	// operating system version, only id is required. The other fields are
13352	// populated automatically when the ad is inserted or updated. If
13353	// targeting an operating system version, do not set targeting for the
13354	// corresponding operating system in operatingSystems.
13355	OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
13356
13357	// OperatingSystems: Operating systems that this ad targets. To target
13358	// specific versions, use operatingSystemVersions. For each operating
13359	// system only dartId is required. The other fields are populated
13360	// automatically when the ad is inserted or updated. If targeting an
13361	// operating system, do not set targeting for operating system versions
13362	// for the same operating system.
13363	OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
13364
13365	// PlatformTypes: Platform types that this ad targets. For example,
13366	// desktop, mobile, or tablet. For each platform type, only id is
13367	// required, and the other fields are populated automatically when the
13368	// ad is inserted or updated.
13369	PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
13370
13371	// ForceSendFields is a list of field names (e.g. "Browsers") to
13372	// unconditionally include in API requests. By default, fields with
13373	// empty values are omitted from API requests. However, any non-pointer,
13374	// non-interface field appearing in ForceSendFields will be sent to the
13375	// server regardless of whether the field is empty or not. This may be
13376	// used to include empty fields in Patch requests.
13377	ForceSendFields []string `json:"-"`
13378
13379	// NullFields is a list of field names (e.g. "Browsers") to include in
13380	// API requests with the JSON null value. By default, fields with empty
13381	// values are omitted from API requests. However, any field with an
13382	// empty value appearing in NullFields will be sent to the server as
13383	// null. It is an error if a field in this list has a non-empty value.
13384	// This may be used to include null fields in Patch requests.
13385	NullFields []string `json:"-"`
13386}
13387
13388func (s *TechnologyTargeting) MarshalJSON() ([]byte, error) {
13389	type NoMethod TechnologyTargeting
13390	raw := NoMethod(*s)
13391	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13392}
13393
13394// ThirdPartyAuthenticationToken: Third Party Authentication Token
13395type ThirdPartyAuthenticationToken struct {
13396	// Name: Name of the third-party authentication token.
13397	Name string `json:"name,omitempty"`
13398
13399	// Value: Value of the third-party authentication token. This is a
13400	// read-only, auto-generated field.
13401	Value string `json:"value,omitempty"`
13402
13403	// ForceSendFields is a list of field names (e.g. "Name") to
13404	// unconditionally include in API requests. By default, fields with
13405	// empty values are omitted from API requests. However, any non-pointer,
13406	// non-interface field appearing in ForceSendFields will be sent to the
13407	// server regardless of whether the field is empty or not. This may be
13408	// used to include empty fields in Patch requests.
13409	ForceSendFields []string `json:"-"`
13410
13411	// NullFields is a list of field names (e.g. "Name") to include in API
13412	// requests with the JSON null value. By default, fields with empty
13413	// values are omitted from API requests. However, any field with an
13414	// empty value appearing in NullFields will be sent to the server as
13415	// null. It is an error if a field in this list has a non-empty value.
13416	// This may be used to include null fields in Patch requests.
13417	NullFields []string `json:"-"`
13418}
13419
13420func (s *ThirdPartyAuthenticationToken) MarshalJSON() ([]byte, error) {
13421	type NoMethod ThirdPartyAuthenticationToken
13422	raw := NoMethod(*s)
13423	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13424}
13425
13426// ThirdPartyTrackingUrl: Third-party Tracking URL.
13427type ThirdPartyTrackingUrl struct {
13428	// ThirdPartyUrlType: Third-party URL type for in-stream video and
13429	// in-stream audio creatives.
13430	//
13431	// Possible values:
13432	//   "CLICK_TRACKING"
13433	//   "IMPRESSION"
13434	//   "RICH_MEDIA_BACKUP_IMPRESSION"
13435	//   "RICH_MEDIA_IMPRESSION"
13436	//   "RICH_MEDIA_RM_IMPRESSION"
13437	//   "SURVEY"
13438	//   "VIDEO_COMPLETE"
13439	//   "VIDEO_CUSTOM"
13440	//   "VIDEO_FIRST_QUARTILE"
13441	//   "VIDEO_FULLSCREEN"
13442	//   "VIDEO_MIDPOINT"
13443	//   "VIDEO_MUTE"
13444	//   "VIDEO_PAUSE"
13445	//   "VIDEO_PROGRESS"
13446	//   "VIDEO_REWIND"
13447	//   "VIDEO_SKIP"
13448	//   "VIDEO_START"
13449	//   "VIDEO_STOP"
13450	//   "VIDEO_THIRD_QUARTILE"
13451	ThirdPartyUrlType string `json:"thirdPartyUrlType,omitempty"`
13452
13453	// Url: URL for the specified third-party URL type.
13454	Url string `json:"url,omitempty"`
13455
13456	// ForceSendFields is a list of field names (e.g. "ThirdPartyUrlType")
13457	// to unconditionally include in API requests. By default, fields with
13458	// empty values are omitted from API requests. However, any non-pointer,
13459	// non-interface field appearing in ForceSendFields will be sent to the
13460	// server regardless of whether the field is empty or not. This may be
13461	// used to include empty fields in Patch requests.
13462	ForceSendFields []string `json:"-"`
13463
13464	// NullFields is a list of field names (e.g. "ThirdPartyUrlType") to
13465	// include in API requests with the JSON null value. By default, fields
13466	// with empty values are omitted from API requests. However, any field
13467	// with an empty value appearing in NullFields will be sent to the
13468	// server as null. It is an error if a field in this list has a
13469	// non-empty value. This may be used to include null fields in Patch
13470	// requests.
13471	NullFields []string `json:"-"`
13472}
13473
13474func (s *ThirdPartyTrackingUrl) MarshalJSON() ([]byte, error) {
13475	type NoMethod ThirdPartyTrackingUrl
13476	raw := NoMethod(*s)
13477	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13478}
13479
13480// TranscodeSetting: Transcode Settings
13481type TranscodeSetting struct {
13482	// EnabledVideoFormats: Whitelist of video formats to be served to this
13483	// placement. Set this list to null or empty to serve all video formats.
13484	EnabledVideoFormats []int64 `json:"enabledVideoFormats,omitempty"`
13485
13486	// Kind: Identifies what kind of resource this is. Value: the fixed
13487	// string "dfareporting#transcodeSetting".
13488	Kind string `json:"kind,omitempty"`
13489
13490	// ForceSendFields is a list of field names (e.g. "EnabledVideoFormats")
13491	// to unconditionally include in API requests. By default, fields with
13492	// empty values are omitted from API requests. However, any non-pointer,
13493	// non-interface field appearing in ForceSendFields will be sent to the
13494	// server regardless of whether the field is empty or not. This may be
13495	// used to include empty fields in Patch requests.
13496	ForceSendFields []string `json:"-"`
13497
13498	// NullFields is a list of field names (e.g. "EnabledVideoFormats") to
13499	// include in API requests with the JSON null value. By default, fields
13500	// with empty values are omitted from API requests. However, any field
13501	// with an empty value appearing in NullFields will be sent to the
13502	// server as null. It is an error if a field in this list has a
13503	// non-empty value. This may be used to include null fields in Patch
13504	// requests.
13505	NullFields []string `json:"-"`
13506}
13507
13508func (s *TranscodeSetting) MarshalJSON() ([]byte, error) {
13509	type NoMethod TranscodeSetting
13510	raw := NoMethod(*s)
13511	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13512}
13513
13514// UniversalAdId: A Universal Ad ID as per the VAST 4.0 spec. Applicable
13515// to the following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and
13516// VPAID.
13517type UniversalAdId struct {
13518	// Registry: Registry used for the Ad ID value.
13519	//
13520	// Possible values:
13521	//   "AD_ID.ORG"
13522	//   "CLEARCAST"
13523	//   "DCM"
13524	//   "OTHER"
13525	Registry string `json:"registry,omitempty"`
13526
13527	// Value: ID value for this creative. Only alphanumeric characters and
13528	// the following symbols are valid: "_/\-". Maximum length is 64
13529	// characters. Read only when registry is DCM.
13530	Value string `json:"value,omitempty"`
13531
13532	// ForceSendFields is a list of field names (e.g. "Registry") to
13533	// unconditionally include in API requests. By default, fields with
13534	// empty values are omitted from API requests. However, any non-pointer,
13535	// non-interface field appearing in ForceSendFields will be sent to the
13536	// server regardless of whether the field is empty or not. This may be
13537	// used to include empty fields in Patch requests.
13538	ForceSendFields []string `json:"-"`
13539
13540	// NullFields is a list of field names (e.g. "Registry") to include in
13541	// API requests with the JSON null value. By default, fields with empty
13542	// values are omitted from API requests. However, any field with an
13543	// empty value appearing in NullFields will be sent to the server as
13544	// null. It is an error if a field in this list has a non-empty value.
13545	// This may be used to include null fields in Patch requests.
13546	NullFields []string `json:"-"`
13547}
13548
13549func (s *UniversalAdId) MarshalJSON() ([]byte, error) {
13550	type NoMethod UniversalAdId
13551	raw := NoMethod(*s)
13552	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13553}
13554
13555// UserDefinedVariableConfiguration: User Defined Variable
13556// configuration.
13557type UserDefinedVariableConfiguration struct {
13558	// DataType: Data type for the variable. This is a required field.
13559	//
13560	// Possible values:
13561	//   "NUMBER"
13562	//   "STRING"
13563	DataType string `json:"dataType,omitempty"`
13564
13565	// ReportName: User-friendly name for the variable which will appear in
13566	// reports. This is a required field, must be less than 64 characters
13567	// long, and cannot contain the following characters: ""<>".
13568	ReportName string `json:"reportName,omitempty"`
13569
13570	// VariableType: Variable name in the tag. This is a required field.
13571	//
13572	// Possible values:
13573	//   "U1"
13574	//   "U10"
13575	//   "U100"
13576	//   "U11"
13577	//   "U12"
13578	//   "U13"
13579	//   "U14"
13580	//   "U15"
13581	//   "U16"
13582	//   "U17"
13583	//   "U18"
13584	//   "U19"
13585	//   "U2"
13586	//   "U20"
13587	//   "U21"
13588	//   "U22"
13589	//   "U23"
13590	//   "U24"
13591	//   "U25"
13592	//   "U26"
13593	//   "U27"
13594	//   "U28"
13595	//   "U29"
13596	//   "U3"
13597	//   "U30"
13598	//   "U31"
13599	//   "U32"
13600	//   "U33"
13601	//   "U34"
13602	//   "U35"
13603	//   "U36"
13604	//   "U37"
13605	//   "U38"
13606	//   "U39"
13607	//   "U4"
13608	//   "U40"
13609	//   "U41"
13610	//   "U42"
13611	//   "U43"
13612	//   "U44"
13613	//   "U45"
13614	//   "U46"
13615	//   "U47"
13616	//   "U48"
13617	//   "U49"
13618	//   "U5"
13619	//   "U50"
13620	//   "U51"
13621	//   "U52"
13622	//   "U53"
13623	//   "U54"
13624	//   "U55"
13625	//   "U56"
13626	//   "U57"
13627	//   "U58"
13628	//   "U59"
13629	//   "U6"
13630	//   "U60"
13631	//   "U61"
13632	//   "U62"
13633	//   "U63"
13634	//   "U64"
13635	//   "U65"
13636	//   "U66"
13637	//   "U67"
13638	//   "U68"
13639	//   "U69"
13640	//   "U7"
13641	//   "U70"
13642	//   "U71"
13643	//   "U72"
13644	//   "U73"
13645	//   "U74"
13646	//   "U75"
13647	//   "U76"
13648	//   "U77"
13649	//   "U78"
13650	//   "U79"
13651	//   "U8"
13652	//   "U80"
13653	//   "U81"
13654	//   "U82"
13655	//   "U83"
13656	//   "U84"
13657	//   "U85"
13658	//   "U86"
13659	//   "U87"
13660	//   "U88"
13661	//   "U89"
13662	//   "U9"
13663	//   "U90"
13664	//   "U91"
13665	//   "U92"
13666	//   "U93"
13667	//   "U94"
13668	//   "U95"
13669	//   "U96"
13670	//   "U97"
13671	//   "U98"
13672	//   "U99"
13673	VariableType string `json:"variableType,omitempty"`
13674
13675	// ForceSendFields is a list of field names (e.g. "DataType") to
13676	// unconditionally include in API requests. By default, fields with
13677	// empty values are omitted from API requests. However, any non-pointer,
13678	// non-interface field appearing in ForceSendFields will be sent to the
13679	// server regardless of whether the field is empty or not. This may be
13680	// used to include empty fields in Patch requests.
13681	ForceSendFields []string `json:"-"`
13682
13683	// NullFields is a list of field names (e.g. "DataType") to include in
13684	// API requests with the JSON null value. By default, fields with empty
13685	// values are omitted from API requests. However, any field with an
13686	// empty value appearing in NullFields will be sent to the server as
13687	// null. It is an error if a field in this list has a non-empty value.
13688	// This may be used to include null fields in Patch requests.
13689	NullFields []string `json:"-"`
13690}
13691
13692func (s *UserDefinedVariableConfiguration) MarshalJSON() ([]byte, error) {
13693	type NoMethod UserDefinedVariableConfiguration
13694	raw := NoMethod(*s)
13695	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13696}
13697
13698// UserProfile: Represents a UserProfile resource.
13699type UserProfile struct {
13700	// AccountId: The account ID to which this profile belongs.
13701	AccountId int64 `json:"accountId,omitempty,string"`
13702
13703	// AccountName: The account name this profile belongs to.
13704	AccountName string `json:"accountName,omitempty"`
13705
13706	// Etag: The eTag of this response for caching purposes.
13707	Etag string `json:"etag,omitempty"`
13708
13709	// Kind: The kind of resource this is, in this case
13710	// dfareporting#userProfile.
13711	Kind string `json:"kind,omitempty"`
13712
13713	// ProfileId: The unique ID of the user profile.
13714	ProfileId int64 `json:"profileId,omitempty,string"`
13715
13716	// SubAccountId: The sub account ID this profile belongs to if
13717	// applicable.
13718	SubAccountId int64 `json:"subAccountId,omitempty,string"`
13719
13720	// SubAccountName: The sub account name this profile belongs to if
13721	// applicable.
13722	SubAccountName string `json:"subAccountName,omitempty"`
13723
13724	// UserName: The user name.
13725	UserName string `json:"userName,omitempty"`
13726
13727	// ServerResponse contains the HTTP response code and headers from the
13728	// server.
13729	googleapi.ServerResponse `json:"-"`
13730
13731	// ForceSendFields is a list of field names (e.g. "AccountId") to
13732	// unconditionally include in API requests. By default, fields with
13733	// empty values are omitted from API requests. However, any non-pointer,
13734	// non-interface field appearing in ForceSendFields will be sent to the
13735	// server regardless of whether the field is empty or not. This may be
13736	// used to include empty fields in Patch requests.
13737	ForceSendFields []string `json:"-"`
13738
13739	// NullFields is a list of field names (e.g. "AccountId") to include in
13740	// API requests with the JSON null value. By default, fields with empty
13741	// values are omitted from API requests. However, any field with an
13742	// empty value appearing in NullFields will be sent to the server as
13743	// null. It is an error if a field in this list has a non-empty value.
13744	// This may be used to include null fields in Patch requests.
13745	NullFields []string `json:"-"`
13746}
13747
13748func (s *UserProfile) MarshalJSON() ([]byte, error) {
13749	type NoMethod UserProfile
13750	raw := NoMethod(*s)
13751	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13752}
13753
13754// UserProfileList: Represents the list of user profiles.
13755type UserProfileList struct {
13756	// Etag: The eTag of this response for caching purposes.
13757	Etag string `json:"etag,omitempty"`
13758
13759	// Items: The user profiles returned in this response.
13760	Items []*UserProfile `json:"items,omitempty"`
13761
13762	// Kind: The kind of list this is, in this case
13763	// dfareporting#userProfileList.
13764	Kind string `json:"kind,omitempty"`
13765
13766	// ServerResponse contains the HTTP response code and headers from the
13767	// server.
13768	googleapi.ServerResponse `json:"-"`
13769
13770	// ForceSendFields is a list of field names (e.g. "Etag") to
13771	// unconditionally include in API requests. By default, fields with
13772	// empty values are omitted from API requests. However, any non-pointer,
13773	// non-interface field appearing in ForceSendFields will be sent to the
13774	// server regardless of whether the field is empty or not. This may be
13775	// used to include empty fields in Patch requests.
13776	ForceSendFields []string `json:"-"`
13777
13778	// NullFields is a list of field names (e.g. "Etag") to include in API
13779	// requests with the JSON null value. By default, fields with empty
13780	// values are omitted from API requests. However, any field with an
13781	// empty value appearing in NullFields will be sent to the server as
13782	// null. It is an error if a field in this list has a non-empty value.
13783	// This may be used to include null fields in Patch requests.
13784	NullFields []string `json:"-"`
13785}
13786
13787func (s *UserProfileList) MarshalJSON() ([]byte, error) {
13788	type NoMethod UserProfileList
13789	raw := NoMethod(*s)
13790	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13791}
13792
13793// UserRole: Contains properties of auser role, which is used to manage
13794// user access.
13795type UserRole struct {
13796	// AccountId: Account ID of this user role. This is a read-only field
13797	// that can be left blank.
13798	AccountId int64 `json:"accountId,omitempty,string"`
13799
13800	// DefaultUserRole: Whether this is a default user role. Default user
13801	// roles are created by the system for the account/subaccount and cannot
13802	// be modified or deleted. Each default user role comes with a basic set
13803	// of preassigned permissions.
13804	DefaultUserRole bool `json:"defaultUserRole,omitempty"`
13805
13806	// Id: ID of this user role. This is a read-only, auto-generated field.
13807	Id int64 `json:"id,omitempty,string"`
13808
13809	// Kind: Identifies what kind of resource this is. Value: the fixed
13810	// string "dfareporting#userRole".
13811	Kind string `json:"kind,omitempty"`
13812
13813	// Name: Name of this user role. This is a required field. Must be less
13814	// than 256 characters long. If this user role is under a subaccount,
13815	// the name must be unique among sites of the same subaccount.
13816	// Otherwise, this user role is a top-level user role, and the name must
13817	// be unique among top-level user roles of the same account.
13818	Name string `json:"name,omitempty"`
13819
13820	// ParentUserRoleId: ID of the user role that this user role is based on
13821	// or copied from. This is a required field.
13822	ParentUserRoleId int64 `json:"parentUserRoleId,omitempty,string"`
13823
13824	// Permissions: List of permissions associated with this user role.
13825	Permissions []*UserRolePermission `json:"permissions,omitempty"`
13826
13827	// SubaccountId: Subaccount ID of this user role. This is a read-only
13828	// field that can be left blank.
13829	SubaccountId int64 `json:"subaccountId,omitempty,string"`
13830
13831	// ServerResponse contains the HTTP response code and headers from the
13832	// server.
13833	googleapi.ServerResponse `json:"-"`
13834
13835	// ForceSendFields is a list of field names (e.g. "AccountId") to
13836	// unconditionally include in API requests. By default, fields with
13837	// empty values are omitted from API requests. However, any non-pointer,
13838	// non-interface field appearing in ForceSendFields will be sent to the
13839	// server regardless of whether the field is empty or not. This may be
13840	// used to include empty fields in Patch requests.
13841	ForceSendFields []string `json:"-"`
13842
13843	// NullFields is a list of field names (e.g. "AccountId") to include in
13844	// API requests with the JSON null value. By default, fields with empty
13845	// values are omitted from API requests. However, any field with an
13846	// empty value appearing in NullFields will be sent to the server as
13847	// null. It is an error if a field in this list has a non-empty value.
13848	// This may be used to include null fields in Patch requests.
13849	NullFields []string `json:"-"`
13850}
13851
13852func (s *UserRole) MarshalJSON() ([]byte, error) {
13853	type NoMethod UserRole
13854	raw := NoMethod(*s)
13855	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13856}
13857
13858// UserRolePermission: Contains properties of a user role permission.
13859type UserRolePermission struct {
13860	// Availability: Levels of availability for a user role permission.
13861	//
13862	// Possible values:
13863	//   "ACCOUNT_ALWAYS"
13864	//   "ACCOUNT_BY_DEFAULT"
13865	//   "NOT_AVAILABLE_BY_DEFAULT"
13866	//   "SUBACCOUNT_AND_ACCOUNT_ALWAYS"
13867	//   "SUBACCOUNT_AND_ACCOUNT_BY_DEFAULT"
13868	Availability string `json:"availability,omitempty"`
13869
13870	// Id: ID of this user role permission.
13871	Id int64 `json:"id,omitempty,string"`
13872
13873	// Kind: Identifies what kind of resource this is. Value: the fixed
13874	// string "dfareporting#userRolePermission".
13875	Kind string `json:"kind,omitempty"`
13876
13877	// Name: Name of this user role permission.
13878	Name string `json:"name,omitempty"`
13879
13880	// PermissionGroupId: ID of the permission group that this user role
13881	// permission belongs to.
13882	PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
13883
13884	// ServerResponse contains the HTTP response code and headers from the
13885	// server.
13886	googleapi.ServerResponse `json:"-"`
13887
13888	// ForceSendFields is a list of field names (e.g. "Availability") to
13889	// unconditionally include in API requests. By default, fields with
13890	// empty values are omitted from API requests. However, any non-pointer,
13891	// non-interface field appearing in ForceSendFields will be sent to the
13892	// server regardless of whether the field is empty or not. This may be
13893	// used to include empty fields in Patch requests.
13894	ForceSendFields []string `json:"-"`
13895
13896	// NullFields is a list of field names (e.g. "Availability") to include
13897	// in API requests with the JSON null value. By default, fields with
13898	// empty values are omitted from API requests. However, any field with
13899	// an empty value appearing in NullFields will be sent to the server as
13900	// null. It is an error if a field in this list has a non-empty value.
13901	// This may be used to include null fields in Patch requests.
13902	NullFields []string `json:"-"`
13903}
13904
13905func (s *UserRolePermission) MarshalJSON() ([]byte, error) {
13906	type NoMethod UserRolePermission
13907	raw := NoMethod(*s)
13908	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13909}
13910
13911// UserRolePermissionGroup: Represents a grouping of related user role
13912// permissions.
13913type UserRolePermissionGroup struct {
13914	// Id: ID of this user role permission.
13915	Id int64 `json:"id,omitempty,string"`
13916
13917	// Kind: Identifies what kind of resource this is. Value: the fixed
13918	// string "dfareporting#userRolePermissionGroup".
13919	Kind string `json:"kind,omitempty"`
13920
13921	// Name: Name of this user role permission group.
13922	Name string `json:"name,omitempty"`
13923
13924	// ServerResponse contains the HTTP response code and headers from the
13925	// server.
13926	googleapi.ServerResponse `json:"-"`
13927
13928	// ForceSendFields is a list of field names (e.g. "Id") to
13929	// unconditionally include in API requests. By default, fields with
13930	// empty values are omitted from API requests. However, any non-pointer,
13931	// non-interface field appearing in ForceSendFields will be sent to the
13932	// server regardless of whether the field is empty or not. This may be
13933	// used to include empty fields in Patch requests.
13934	ForceSendFields []string `json:"-"`
13935
13936	// NullFields is a list of field names (e.g. "Id") to include in API
13937	// requests with the JSON null value. By default, fields with empty
13938	// values are omitted from API requests. However, any field with an
13939	// empty value appearing in NullFields will be sent to the server as
13940	// null. It is an error if a field in this list has a non-empty value.
13941	// This may be used to include null fields in Patch requests.
13942	NullFields []string `json:"-"`
13943}
13944
13945func (s *UserRolePermissionGroup) MarshalJSON() ([]byte, error) {
13946	type NoMethod UserRolePermissionGroup
13947	raw := NoMethod(*s)
13948	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13949}
13950
13951// UserRolePermissionGroupsListResponse: User Role Permission Group List
13952// Response
13953type UserRolePermissionGroupsListResponse struct {
13954	// Kind: Identifies what kind of resource this is. Value: the fixed
13955	// string "dfareporting#userRolePermissionGroupsListResponse".
13956	Kind string `json:"kind,omitempty"`
13957
13958	// UserRolePermissionGroups: User role permission group collection.
13959	UserRolePermissionGroups []*UserRolePermissionGroup `json:"userRolePermissionGroups,omitempty"`
13960
13961	// ServerResponse contains the HTTP response code and headers from the
13962	// server.
13963	googleapi.ServerResponse `json:"-"`
13964
13965	// ForceSendFields is a list of field names (e.g. "Kind") to
13966	// unconditionally include in API requests. By default, fields with
13967	// empty values are omitted from API requests. However, any non-pointer,
13968	// non-interface field appearing in ForceSendFields will be sent to the
13969	// server regardless of whether the field is empty or not. This may be
13970	// used to include empty fields in Patch requests.
13971	ForceSendFields []string `json:"-"`
13972
13973	// NullFields is a list of field names (e.g. "Kind") to include in API
13974	// requests with the JSON null value. By default, fields with empty
13975	// values are omitted from API requests. However, any field with an
13976	// empty value appearing in NullFields will be sent to the server as
13977	// null. It is an error if a field in this list has a non-empty value.
13978	// This may be used to include null fields in Patch requests.
13979	NullFields []string `json:"-"`
13980}
13981
13982func (s *UserRolePermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
13983	type NoMethod UserRolePermissionGroupsListResponse
13984	raw := NoMethod(*s)
13985	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13986}
13987
13988// UserRolePermissionsListResponse: User Role Permission List Response
13989type UserRolePermissionsListResponse struct {
13990	// Kind: Identifies what kind of resource this is. Value: the fixed
13991	// string "dfareporting#userRolePermissionsListResponse".
13992	Kind string `json:"kind,omitempty"`
13993
13994	// UserRolePermissions: User role permission collection.
13995	UserRolePermissions []*UserRolePermission `json:"userRolePermissions,omitempty"`
13996
13997	// ServerResponse contains the HTTP response code and headers from the
13998	// server.
13999	googleapi.ServerResponse `json:"-"`
14000
14001	// ForceSendFields is a list of field names (e.g. "Kind") to
14002	// unconditionally include in API requests. By default, fields with
14003	// empty values are omitted from API requests. However, any non-pointer,
14004	// non-interface field appearing in ForceSendFields will be sent to the
14005	// server regardless of whether the field is empty or not. This may be
14006	// used to include empty fields in Patch requests.
14007	ForceSendFields []string `json:"-"`
14008
14009	// NullFields is a list of field names (e.g. "Kind") to include in API
14010	// requests with the JSON null value. By default, fields with empty
14011	// values are omitted from API requests. However, any field with an
14012	// empty value appearing in NullFields will be sent to the server as
14013	// null. It is an error if a field in this list has a non-empty value.
14014	// This may be used to include null fields in Patch requests.
14015	NullFields []string `json:"-"`
14016}
14017
14018func (s *UserRolePermissionsListResponse) MarshalJSON() ([]byte, error) {
14019	type NoMethod UserRolePermissionsListResponse
14020	raw := NoMethod(*s)
14021	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14022}
14023
14024// UserRolesListResponse: User Role List Response
14025type UserRolesListResponse struct {
14026	// Kind: Identifies what kind of resource this is. Value: the fixed
14027	// string "dfareporting#userRolesListResponse".
14028	Kind string `json:"kind,omitempty"`
14029
14030	// NextPageToken: Pagination token to be used for the next list
14031	// operation.
14032	NextPageToken string `json:"nextPageToken,omitempty"`
14033
14034	// UserRoles: User role collection.
14035	UserRoles []*UserRole `json:"userRoles,omitempty"`
14036
14037	// ServerResponse contains the HTTP response code and headers from the
14038	// server.
14039	googleapi.ServerResponse `json:"-"`
14040
14041	// ForceSendFields is a list of field names (e.g. "Kind") to
14042	// unconditionally include in API requests. By default, fields with
14043	// empty values are omitted from API requests. However, any non-pointer,
14044	// non-interface field appearing in ForceSendFields will be sent to the
14045	// server regardless of whether the field is empty or not. This may be
14046	// used to include empty fields in Patch requests.
14047	ForceSendFields []string `json:"-"`
14048
14049	// NullFields is a list of field names (e.g. "Kind") to include in API
14050	// requests with the JSON null value. By default, fields with empty
14051	// values are omitted from API requests. However, any field with an
14052	// empty value appearing in NullFields will be sent to the server as
14053	// null. It is an error if a field in this list has a non-empty value.
14054	// This may be used to include null fields in Patch requests.
14055	NullFields []string `json:"-"`
14056}
14057
14058func (s *UserRolesListResponse) MarshalJSON() ([]byte, error) {
14059	type NoMethod UserRolesListResponse
14060	raw := NoMethod(*s)
14061	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14062}
14063
14064// VideoFormat: Contains information about supported video formats.
14065type VideoFormat struct {
14066	// FileType: File type of the video format.
14067	//
14068	// Possible values:
14069	//   "FLV"
14070	//   "M3U8"
14071	//   "MP4"
14072	//   "THREEGPP"
14073	//   "WEBM"
14074	FileType string `json:"fileType,omitempty"`
14075
14076	// Id: ID of the video format.
14077	Id int64 `json:"id,omitempty"`
14078
14079	// Kind: Identifies what kind of resource this is. Value: the fixed
14080	// string "dfareporting#videoFormat".
14081	Kind string `json:"kind,omitempty"`
14082
14083	// Resolution: The resolution of this video format.
14084	Resolution *Size `json:"resolution,omitempty"`
14085
14086	// TargetBitRate: The target bit rate of this video format.
14087	TargetBitRate int64 `json:"targetBitRate,omitempty"`
14088
14089	// ServerResponse contains the HTTP response code and headers from the
14090	// server.
14091	googleapi.ServerResponse `json:"-"`
14092
14093	// ForceSendFields is a list of field names (e.g. "FileType") to
14094	// unconditionally include in API requests. By default, fields with
14095	// empty values are omitted from API requests. However, any non-pointer,
14096	// non-interface field appearing in ForceSendFields will be sent to the
14097	// server regardless of whether the field is empty or not. This may be
14098	// used to include empty fields in Patch requests.
14099	ForceSendFields []string `json:"-"`
14100
14101	// NullFields is a list of field names (e.g. "FileType") to include in
14102	// API requests with the JSON null value. By default, fields with empty
14103	// values are omitted from API requests. However, any field with an
14104	// empty value appearing in NullFields will be sent to the server as
14105	// null. It is an error if a field in this list has a non-empty value.
14106	// This may be used to include null fields in Patch requests.
14107	NullFields []string `json:"-"`
14108}
14109
14110func (s *VideoFormat) MarshalJSON() ([]byte, error) {
14111	type NoMethod VideoFormat
14112	raw := NoMethod(*s)
14113	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14114}
14115
14116// VideoFormatsListResponse: Video Format List Response
14117type VideoFormatsListResponse struct {
14118	// Kind: Identifies what kind of resource this is. Value: the fixed
14119	// string "dfareporting#videoFormatsListResponse".
14120	Kind string `json:"kind,omitempty"`
14121
14122	// VideoFormats: Video format collection.
14123	VideoFormats []*VideoFormat `json:"videoFormats,omitempty"`
14124
14125	// ServerResponse contains the HTTP response code and headers from the
14126	// server.
14127	googleapi.ServerResponse `json:"-"`
14128
14129	// ForceSendFields is a list of field names (e.g. "Kind") to
14130	// unconditionally include in API requests. By default, fields with
14131	// empty values are omitted from API requests. However, any non-pointer,
14132	// non-interface field appearing in ForceSendFields will be sent to the
14133	// server regardless of whether the field is empty or not. This may be
14134	// used to include empty fields in Patch requests.
14135	ForceSendFields []string `json:"-"`
14136
14137	// NullFields is a list of field names (e.g. "Kind") to include in API
14138	// requests with the JSON null value. By default, fields with empty
14139	// values are omitted from API requests. However, any field with an
14140	// empty value appearing in NullFields will be sent to the server as
14141	// null. It is an error if a field in this list has a non-empty value.
14142	// This may be used to include null fields in Patch requests.
14143	NullFields []string `json:"-"`
14144}
14145
14146func (s *VideoFormatsListResponse) MarshalJSON() ([]byte, error) {
14147	type NoMethod VideoFormatsListResponse
14148	raw := NoMethod(*s)
14149	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14150}
14151
14152// VideoOffset: Video Offset
14153type VideoOffset struct {
14154	// OffsetPercentage: Duration, as a percentage of video duration. Do not
14155	// set when offsetSeconds is set. Acceptable values are 0 to 100,
14156	// inclusive.
14157	OffsetPercentage int64 `json:"offsetPercentage,omitempty"`
14158
14159	// OffsetSeconds: Duration, in seconds. Do not set when offsetPercentage
14160	// is set. Acceptable values are 0 to 86399, inclusive.
14161	OffsetSeconds int64 `json:"offsetSeconds,omitempty"`
14162
14163	// ForceSendFields is a list of field names (e.g. "OffsetPercentage") to
14164	// unconditionally include in API requests. By default, fields with
14165	// empty values are omitted from API requests. However, any non-pointer,
14166	// non-interface field appearing in ForceSendFields will be sent to the
14167	// server regardless of whether the field is empty or not. This may be
14168	// used to include empty fields in Patch requests.
14169	ForceSendFields []string `json:"-"`
14170
14171	// NullFields is a list of field names (e.g. "OffsetPercentage") to
14172	// include in API requests with the JSON null value. By default, fields
14173	// with empty values are omitted from API requests. However, any field
14174	// with an empty value appearing in NullFields will be sent to the
14175	// server as null. It is an error if a field in this list has a
14176	// non-empty value. This may be used to include null fields in Patch
14177	// requests.
14178	NullFields []string `json:"-"`
14179}
14180
14181func (s *VideoOffset) MarshalJSON() ([]byte, error) {
14182	type NoMethod VideoOffset
14183	raw := NoMethod(*s)
14184	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14185}
14186
14187// VideoSettings: Video Settings
14188type VideoSettings struct {
14189	// CompanionSettings: Settings for the companion creatives of video
14190	// creatives served to this placement.
14191	CompanionSettings *CompanionSetting `json:"companionSettings,omitempty"`
14192
14193	// Kind: Identifies what kind of resource this is. Value: the fixed
14194	// string "dfareporting#videoSettings".
14195	Kind string `json:"kind,omitempty"`
14196
14197	// Orientation: Orientation of a video placement. If this value is set,
14198	// placement will return assets matching the specified orientation.
14199	//
14200	// Possible values:
14201	//   "ANY"
14202	//   "LANDSCAPE"
14203	//   "PORTRAIT"
14204	Orientation string `json:"orientation,omitempty"`
14205
14206	// SkippableSettings: Settings for the skippability of video creatives
14207	// served to this placement. If this object is provided, the
14208	// creative-level skippable settings will be overridden.
14209	SkippableSettings *SkippableSetting `json:"skippableSettings,omitempty"`
14210
14211	// TranscodeSettings: Settings for the transcodes of video creatives
14212	// served to this placement. If this object is provided, the
14213	// creative-level transcode settings will be overridden.
14214	TranscodeSettings *TranscodeSetting `json:"transcodeSettings,omitempty"`
14215
14216	// ForceSendFields is a list of field names (e.g. "CompanionSettings")
14217	// to unconditionally include in API requests. By default, fields with
14218	// empty values are omitted from API requests. However, any non-pointer,
14219	// non-interface field appearing in ForceSendFields will be sent to the
14220	// server regardless of whether the field is empty or not. This may be
14221	// used to include empty fields in Patch requests.
14222	ForceSendFields []string `json:"-"`
14223
14224	// NullFields is a list of field names (e.g. "CompanionSettings") to
14225	// include in API requests with the JSON null value. By default, fields
14226	// with empty values are omitted from API requests. However, any field
14227	// with an empty value appearing in NullFields will be sent to the
14228	// server as null. It is an error if a field in this list has a
14229	// non-empty value. This may be used to include null fields in Patch
14230	// requests.
14231	NullFields []string `json:"-"`
14232}
14233
14234func (s *VideoSettings) MarshalJSON() ([]byte, error) {
14235	type NoMethod VideoSettings
14236	raw := NoMethod(*s)
14237	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14238}
14239
14240// method id "dfareporting.accountActiveAdSummaries.get":
14241
14242type AccountActiveAdSummariesGetCall struct {
14243	s                *Service
14244	profileId        int64
14245	summaryAccountId int64
14246	urlParams_       gensupport.URLParams
14247	ifNoneMatch_     string
14248	ctx_             context.Context
14249	header_          http.Header
14250}
14251
14252// Get: Gets the account's active ad summary by account ID.
14253func (r *AccountActiveAdSummariesService) Get(profileId int64, summaryAccountId int64) *AccountActiveAdSummariesGetCall {
14254	c := &AccountActiveAdSummariesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14255	c.profileId = profileId
14256	c.summaryAccountId = summaryAccountId
14257	return c
14258}
14259
14260// Fields allows partial responses to be retrieved. See
14261// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14262// for more information.
14263func (c *AccountActiveAdSummariesGetCall) Fields(s ...googleapi.Field) *AccountActiveAdSummariesGetCall {
14264	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14265	return c
14266}
14267
14268// IfNoneMatch sets the optional parameter which makes the operation
14269// fail if the object's ETag matches the given value. This is useful for
14270// getting updates only after the object has changed since the last
14271// request. Use googleapi.IsNotModified to check whether the response
14272// error from Do is the result of In-None-Match.
14273func (c *AccountActiveAdSummariesGetCall) IfNoneMatch(entityTag string) *AccountActiveAdSummariesGetCall {
14274	c.ifNoneMatch_ = entityTag
14275	return c
14276}
14277
14278// Context sets the context to be used in this call's Do method. Any
14279// pending HTTP request will be aborted if the provided context is
14280// canceled.
14281func (c *AccountActiveAdSummariesGetCall) Context(ctx context.Context) *AccountActiveAdSummariesGetCall {
14282	c.ctx_ = ctx
14283	return c
14284}
14285
14286// Header returns an http.Header that can be modified by the caller to
14287// add HTTP headers to the request.
14288func (c *AccountActiveAdSummariesGetCall) Header() http.Header {
14289	if c.header_ == nil {
14290		c.header_ = make(http.Header)
14291	}
14292	return c.header_
14293}
14294
14295func (c *AccountActiveAdSummariesGetCall) doRequest(alt string) (*http.Response, error) {
14296	reqHeaders := make(http.Header)
14297	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14298	for k, v := range c.header_ {
14299		reqHeaders[k] = v
14300	}
14301	reqHeaders.Set("User-Agent", c.s.userAgent())
14302	if c.ifNoneMatch_ != "" {
14303		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14304	}
14305	var body io.Reader = nil
14306	c.urlParams_.Set("alt", alt)
14307	c.urlParams_.Set("prettyPrint", "false")
14308	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}")
14309	urls += "?" + c.urlParams_.Encode()
14310	req, err := http.NewRequest("GET", urls, body)
14311	if err != nil {
14312		return nil, err
14313	}
14314	req.Header = reqHeaders
14315	googleapi.Expand(req.URL, map[string]string{
14316		"profileId":        strconv.FormatInt(c.profileId, 10),
14317		"summaryAccountId": strconv.FormatInt(c.summaryAccountId, 10),
14318	})
14319	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14320}
14321
14322// Do executes the "dfareporting.accountActiveAdSummaries.get" call.
14323// Exactly one of *AccountActiveAdSummary or error will be non-nil. Any
14324// non-2xx status code is an error. Response headers are in either
14325// *AccountActiveAdSummary.ServerResponse.Header or (if a response was
14326// returned at all) in error.(*googleapi.Error).Header. Use
14327// googleapi.IsNotModified to check whether the returned error was
14328// because http.StatusNotModified was returned.
14329func (c *AccountActiveAdSummariesGetCall) Do(opts ...googleapi.CallOption) (*AccountActiveAdSummary, error) {
14330	gensupport.SetOptions(c.urlParams_, opts...)
14331	res, err := c.doRequest("json")
14332	if res != nil && res.StatusCode == http.StatusNotModified {
14333		if res.Body != nil {
14334			res.Body.Close()
14335		}
14336		return nil, &googleapi.Error{
14337			Code:   res.StatusCode,
14338			Header: res.Header,
14339		}
14340	}
14341	if err != nil {
14342		return nil, err
14343	}
14344	defer googleapi.CloseBody(res)
14345	if err := googleapi.CheckResponse(res); err != nil {
14346		return nil, err
14347	}
14348	ret := &AccountActiveAdSummary{
14349		ServerResponse: googleapi.ServerResponse{
14350			Header:         res.Header,
14351			HTTPStatusCode: res.StatusCode,
14352		},
14353	}
14354	target := &ret
14355	if err := gensupport.DecodeResponse(target, res); err != nil {
14356		return nil, err
14357	}
14358	return ret, nil
14359	// {
14360	//   "description": "Gets the account's active ad summary by account ID.",
14361	//   "httpMethod": "GET",
14362	//   "id": "dfareporting.accountActiveAdSummaries.get",
14363	//   "parameterOrder": [
14364	//     "profileId",
14365	//     "summaryAccountId"
14366	//   ],
14367	//   "parameters": {
14368	//     "profileId": {
14369	//       "description": "User profile ID associated with this request.",
14370	//       "format": "int64",
14371	//       "location": "path",
14372	//       "required": true,
14373	//       "type": "string"
14374	//     },
14375	//     "summaryAccountId": {
14376	//       "description": "Account ID.",
14377	//       "format": "int64",
14378	//       "location": "path",
14379	//       "required": true,
14380	//       "type": "string"
14381	//     }
14382	//   },
14383	//   "path": "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}",
14384	//   "response": {
14385	//     "$ref": "AccountActiveAdSummary"
14386	//   },
14387	//   "scopes": [
14388	//     "https://www.googleapis.com/auth/dfatrafficking"
14389	//   ]
14390	// }
14391
14392}
14393
14394// method id "dfareporting.accountPermissionGroups.get":
14395
14396type AccountPermissionGroupsGetCall struct {
14397	s            *Service
14398	profileId    int64
14399	id           int64
14400	urlParams_   gensupport.URLParams
14401	ifNoneMatch_ string
14402	ctx_         context.Context
14403	header_      http.Header
14404}
14405
14406// Get: Gets one account permission group by ID.
14407func (r *AccountPermissionGroupsService) Get(profileId int64, id int64) *AccountPermissionGroupsGetCall {
14408	c := &AccountPermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14409	c.profileId = profileId
14410	c.id = id
14411	return c
14412}
14413
14414// Fields allows partial responses to be retrieved. See
14415// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14416// for more information.
14417func (c *AccountPermissionGroupsGetCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsGetCall {
14418	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14419	return c
14420}
14421
14422// IfNoneMatch sets the optional parameter which makes the operation
14423// fail if the object's ETag matches the given value. This is useful for
14424// getting updates only after the object has changed since the last
14425// request. Use googleapi.IsNotModified to check whether the response
14426// error from Do is the result of In-None-Match.
14427func (c *AccountPermissionGroupsGetCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsGetCall {
14428	c.ifNoneMatch_ = entityTag
14429	return c
14430}
14431
14432// Context sets the context to be used in this call's Do method. Any
14433// pending HTTP request will be aborted if the provided context is
14434// canceled.
14435func (c *AccountPermissionGroupsGetCall) Context(ctx context.Context) *AccountPermissionGroupsGetCall {
14436	c.ctx_ = ctx
14437	return c
14438}
14439
14440// Header returns an http.Header that can be modified by the caller to
14441// add HTTP headers to the request.
14442func (c *AccountPermissionGroupsGetCall) Header() http.Header {
14443	if c.header_ == nil {
14444		c.header_ = make(http.Header)
14445	}
14446	return c.header_
14447}
14448
14449func (c *AccountPermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
14450	reqHeaders := make(http.Header)
14451	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14452	for k, v := range c.header_ {
14453		reqHeaders[k] = v
14454	}
14455	reqHeaders.Set("User-Agent", c.s.userAgent())
14456	if c.ifNoneMatch_ != "" {
14457		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14458	}
14459	var body io.Reader = nil
14460	c.urlParams_.Set("alt", alt)
14461	c.urlParams_.Set("prettyPrint", "false")
14462	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups/{id}")
14463	urls += "?" + c.urlParams_.Encode()
14464	req, err := http.NewRequest("GET", urls, body)
14465	if err != nil {
14466		return nil, err
14467	}
14468	req.Header = reqHeaders
14469	googleapi.Expand(req.URL, map[string]string{
14470		"profileId": strconv.FormatInt(c.profileId, 10),
14471		"id":        strconv.FormatInt(c.id, 10),
14472	})
14473	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14474}
14475
14476// Do executes the "dfareporting.accountPermissionGroups.get" call.
14477// Exactly one of *AccountPermissionGroup or error will be non-nil. Any
14478// non-2xx status code is an error. Response headers are in either
14479// *AccountPermissionGroup.ServerResponse.Header or (if a response was
14480// returned at all) in error.(*googleapi.Error).Header. Use
14481// googleapi.IsNotModified to check whether the returned error was
14482// because http.StatusNotModified was returned.
14483func (c *AccountPermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroup, error) {
14484	gensupport.SetOptions(c.urlParams_, opts...)
14485	res, err := c.doRequest("json")
14486	if res != nil && res.StatusCode == http.StatusNotModified {
14487		if res.Body != nil {
14488			res.Body.Close()
14489		}
14490		return nil, &googleapi.Error{
14491			Code:   res.StatusCode,
14492			Header: res.Header,
14493		}
14494	}
14495	if err != nil {
14496		return nil, err
14497	}
14498	defer googleapi.CloseBody(res)
14499	if err := googleapi.CheckResponse(res); err != nil {
14500		return nil, err
14501	}
14502	ret := &AccountPermissionGroup{
14503		ServerResponse: googleapi.ServerResponse{
14504			Header:         res.Header,
14505			HTTPStatusCode: res.StatusCode,
14506		},
14507	}
14508	target := &ret
14509	if err := gensupport.DecodeResponse(target, res); err != nil {
14510		return nil, err
14511	}
14512	return ret, nil
14513	// {
14514	//   "description": "Gets one account permission group by ID.",
14515	//   "httpMethod": "GET",
14516	//   "id": "dfareporting.accountPermissionGroups.get",
14517	//   "parameterOrder": [
14518	//     "profileId",
14519	//     "id"
14520	//   ],
14521	//   "parameters": {
14522	//     "id": {
14523	//       "description": "Account permission group ID.",
14524	//       "format": "int64",
14525	//       "location": "path",
14526	//       "required": true,
14527	//       "type": "string"
14528	//     },
14529	//     "profileId": {
14530	//       "description": "User profile ID associated with this request.",
14531	//       "format": "int64",
14532	//       "location": "path",
14533	//       "required": true,
14534	//       "type": "string"
14535	//     }
14536	//   },
14537	//   "path": "userprofiles/{profileId}/accountPermissionGroups/{id}",
14538	//   "response": {
14539	//     "$ref": "AccountPermissionGroup"
14540	//   },
14541	//   "scopes": [
14542	//     "https://www.googleapis.com/auth/dfatrafficking"
14543	//   ]
14544	// }
14545
14546}
14547
14548// method id "dfareporting.accountPermissionGroups.list":
14549
14550type AccountPermissionGroupsListCall struct {
14551	s            *Service
14552	profileId    int64
14553	urlParams_   gensupport.URLParams
14554	ifNoneMatch_ string
14555	ctx_         context.Context
14556	header_      http.Header
14557}
14558
14559// List: Retrieves the list of account permission groups.
14560func (r *AccountPermissionGroupsService) List(profileId int64) *AccountPermissionGroupsListCall {
14561	c := &AccountPermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14562	c.profileId = profileId
14563	return c
14564}
14565
14566// Fields allows partial responses to be retrieved. See
14567// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14568// for more information.
14569func (c *AccountPermissionGroupsListCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsListCall {
14570	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14571	return c
14572}
14573
14574// IfNoneMatch sets the optional parameter which makes the operation
14575// fail if the object's ETag matches the given value. This is useful for
14576// getting updates only after the object has changed since the last
14577// request. Use googleapi.IsNotModified to check whether the response
14578// error from Do is the result of In-None-Match.
14579func (c *AccountPermissionGroupsListCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsListCall {
14580	c.ifNoneMatch_ = entityTag
14581	return c
14582}
14583
14584// Context sets the context to be used in this call's Do method. Any
14585// pending HTTP request will be aborted if the provided context is
14586// canceled.
14587func (c *AccountPermissionGroupsListCall) Context(ctx context.Context) *AccountPermissionGroupsListCall {
14588	c.ctx_ = ctx
14589	return c
14590}
14591
14592// Header returns an http.Header that can be modified by the caller to
14593// add HTTP headers to the request.
14594func (c *AccountPermissionGroupsListCall) Header() http.Header {
14595	if c.header_ == nil {
14596		c.header_ = make(http.Header)
14597	}
14598	return c.header_
14599}
14600
14601func (c *AccountPermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
14602	reqHeaders := make(http.Header)
14603	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14604	for k, v := range c.header_ {
14605		reqHeaders[k] = v
14606	}
14607	reqHeaders.Set("User-Agent", c.s.userAgent())
14608	if c.ifNoneMatch_ != "" {
14609		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14610	}
14611	var body io.Reader = nil
14612	c.urlParams_.Set("alt", alt)
14613	c.urlParams_.Set("prettyPrint", "false")
14614	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups")
14615	urls += "?" + c.urlParams_.Encode()
14616	req, err := http.NewRequest("GET", urls, body)
14617	if err != nil {
14618		return nil, err
14619	}
14620	req.Header = reqHeaders
14621	googleapi.Expand(req.URL, map[string]string{
14622		"profileId": strconv.FormatInt(c.profileId, 10),
14623	})
14624	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14625}
14626
14627// Do executes the "dfareporting.accountPermissionGroups.list" call.
14628// Exactly one of *AccountPermissionGroupsListResponse or error will be
14629// non-nil. Any non-2xx status code is an error. Response headers are in
14630// either *AccountPermissionGroupsListResponse.ServerResponse.Header or
14631// (if a response was returned at all) in
14632// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14633// whether the returned error was because http.StatusNotModified was
14634// returned.
14635func (c *AccountPermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroupsListResponse, error) {
14636	gensupport.SetOptions(c.urlParams_, opts...)
14637	res, err := c.doRequest("json")
14638	if res != nil && res.StatusCode == http.StatusNotModified {
14639		if res.Body != nil {
14640			res.Body.Close()
14641		}
14642		return nil, &googleapi.Error{
14643			Code:   res.StatusCode,
14644			Header: res.Header,
14645		}
14646	}
14647	if err != nil {
14648		return nil, err
14649	}
14650	defer googleapi.CloseBody(res)
14651	if err := googleapi.CheckResponse(res); err != nil {
14652		return nil, err
14653	}
14654	ret := &AccountPermissionGroupsListResponse{
14655		ServerResponse: googleapi.ServerResponse{
14656			Header:         res.Header,
14657			HTTPStatusCode: res.StatusCode,
14658		},
14659	}
14660	target := &ret
14661	if err := gensupport.DecodeResponse(target, res); err != nil {
14662		return nil, err
14663	}
14664	return ret, nil
14665	// {
14666	//   "description": "Retrieves the list of account permission groups.",
14667	//   "httpMethod": "GET",
14668	//   "id": "dfareporting.accountPermissionGroups.list",
14669	//   "parameterOrder": [
14670	//     "profileId"
14671	//   ],
14672	//   "parameters": {
14673	//     "profileId": {
14674	//       "description": "User profile ID associated with this request.",
14675	//       "format": "int64",
14676	//       "location": "path",
14677	//       "required": true,
14678	//       "type": "string"
14679	//     }
14680	//   },
14681	//   "path": "userprofiles/{profileId}/accountPermissionGroups",
14682	//   "response": {
14683	//     "$ref": "AccountPermissionGroupsListResponse"
14684	//   },
14685	//   "scopes": [
14686	//     "https://www.googleapis.com/auth/dfatrafficking"
14687	//   ]
14688	// }
14689
14690}
14691
14692// method id "dfareporting.accountPermissions.get":
14693
14694type AccountPermissionsGetCall struct {
14695	s            *Service
14696	profileId    int64
14697	id           int64
14698	urlParams_   gensupport.URLParams
14699	ifNoneMatch_ string
14700	ctx_         context.Context
14701	header_      http.Header
14702}
14703
14704// Get: Gets one account permission by ID.
14705func (r *AccountPermissionsService) Get(profileId int64, id int64) *AccountPermissionsGetCall {
14706	c := &AccountPermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14707	c.profileId = profileId
14708	c.id = id
14709	return c
14710}
14711
14712// Fields allows partial responses to be retrieved. See
14713// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14714// for more information.
14715func (c *AccountPermissionsGetCall) Fields(s ...googleapi.Field) *AccountPermissionsGetCall {
14716	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14717	return c
14718}
14719
14720// IfNoneMatch sets the optional parameter which makes the operation
14721// fail if the object's ETag matches the given value. This is useful for
14722// getting updates only after the object has changed since the last
14723// request. Use googleapi.IsNotModified to check whether the response
14724// error from Do is the result of In-None-Match.
14725func (c *AccountPermissionsGetCall) IfNoneMatch(entityTag string) *AccountPermissionsGetCall {
14726	c.ifNoneMatch_ = entityTag
14727	return c
14728}
14729
14730// Context sets the context to be used in this call's Do method. Any
14731// pending HTTP request will be aborted if the provided context is
14732// canceled.
14733func (c *AccountPermissionsGetCall) Context(ctx context.Context) *AccountPermissionsGetCall {
14734	c.ctx_ = ctx
14735	return c
14736}
14737
14738// Header returns an http.Header that can be modified by the caller to
14739// add HTTP headers to the request.
14740func (c *AccountPermissionsGetCall) Header() http.Header {
14741	if c.header_ == nil {
14742		c.header_ = make(http.Header)
14743	}
14744	return c.header_
14745}
14746
14747func (c *AccountPermissionsGetCall) doRequest(alt string) (*http.Response, error) {
14748	reqHeaders := make(http.Header)
14749	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14750	for k, v := range c.header_ {
14751		reqHeaders[k] = v
14752	}
14753	reqHeaders.Set("User-Agent", c.s.userAgent())
14754	if c.ifNoneMatch_ != "" {
14755		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14756	}
14757	var body io.Reader = nil
14758	c.urlParams_.Set("alt", alt)
14759	c.urlParams_.Set("prettyPrint", "false")
14760	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions/{id}")
14761	urls += "?" + c.urlParams_.Encode()
14762	req, err := http.NewRequest("GET", urls, body)
14763	if err != nil {
14764		return nil, err
14765	}
14766	req.Header = reqHeaders
14767	googleapi.Expand(req.URL, map[string]string{
14768		"profileId": strconv.FormatInt(c.profileId, 10),
14769		"id":        strconv.FormatInt(c.id, 10),
14770	})
14771	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14772}
14773
14774// Do executes the "dfareporting.accountPermissions.get" call.
14775// Exactly one of *AccountPermission or error will be non-nil. Any
14776// non-2xx status code is an error. Response headers are in either
14777// *AccountPermission.ServerResponse.Header or (if a response was
14778// returned at all) in error.(*googleapi.Error).Header. Use
14779// googleapi.IsNotModified to check whether the returned error was
14780// because http.StatusNotModified was returned.
14781func (c *AccountPermissionsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermission, error) {
14782	gensupport.SetOptions(c.urlParams_, opts...)
14783	res, err := c.doRequest("json")
14784	if res != nil && res.StatusCode == http.StatusNotModified {
14785		if res.Body != nil {
14786			res.Body.Close()
14787		}
14788		return nil, &googleapi.Error{
14789			Code:   res.StatusCode,
14790			Header: res.Header,
14791		}
14792	}
14793	if err != nil {
14794		return nil, err
14795	}
14796	defer googleapi.CloseBody(res)
14797	if err := googleapi.CheckResponse(res); err != nil {
14798		return nil, err
14799	}
14800	ret := &AccountPermission{
14801		ServerResponse: googleapi.ServerResponse{
14802			Header:         res.Header,
14803			HTTPStatusCode: res.StatusCode,
14804		},
14805	}
14806	target := &ret
14807	if err := gensupport.DecodeResponse(target, res); err != nil {
14808		return nil, err
14809	}
14810	return ret, nil
14811	// {
14812	//   "description": "Gets one account permission by ID.",
14813	//   "httpMethod": "GET",
14814	//   "id": "dfareporting.accountPermissions.get",
14815	//   "parameterOrder": [
14816	//     "profileId",
14817	//     "id"
14818	//   ],
14819	//   "parameters": {
14820	//     "id": {
14821	//       "description": "Account permission ID.",
14822	//       "format": "int64",
14823	//       "location": "path",
14824	//       "required": true,
14825	//       "type": "string"
14826	//     },
14827	//     "profileId": {
14828	//       "description": "User profile ID associated with this request.",
14829	//       "format": "int64",
14830	//       "location": "path",
14831	//       "required": true,
14832	//       "type": "string"
14833	//     }
14834	//   },
14835	//   "path": "userprofiles/{profileId}/accountPermissions/{id}",
14836	//   "response": {
14837	//     "$ref": "AccountPermission"
14838	//   },
14839	//   "scopes": [
14840	//     "https://www.googleapis.com/auth/dfatrafficking"
14841	//   ]
14842	// }
14843
14844}
14845
14846// method id "dfareporting.accountPermissions.list":
14847
14848type AccountPermissionsListCall struct {
14849	s            *Service
14850	profileId    int64
14851	urlParams_   gensupport.URLParams
14852	ifNoneMatch_ string
14853	ctx_         context.Context
14854	header_      http.Header
14855}
14856
14857// List: Retrieves the list of account permissions.
14858func (r *AccountPermissionsService) List(profileId int64) *AccountPermissionsListCall {
14859	c := &AccountPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14860	c.profileId = profileId
14861	return c
14862}
14863
14864// Fields allows partial responses to be retrieved. See
14865// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14866// for more information.
14867func (c *AccountPermissionsListCall) Fields(s ...googleapi.Field) *AccountPermissionsListCall {
14868	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14869	return c
14870}
14871
14872// IfNoneMatch sets the optional parameter which makes the operation
14873// fail if the object's ETag matches the given value. This is useful for
14874// getting updates only after the object has changed since the last
14875// request. Use googleapi.IsNotModified to check whether the response
14876// error from Do is the result of In-None-Match.
14877func (c *AccountPermissionsListCall) IfNoneMatch(entityTag string) *AccountPermissionsListCall {
14878	c.ifNoneMatch_ = entityTag
14879	return c
14880}
14881
14882// Context sets the context to be used in this call's Do method. Any
14883// pending HTTP request will be aborted if the provided context is
14884// canceled.
14885func (c *AccountPermissionsListCall) Context(ctx context.Context) *AccountPermissionsListCall {
14886	c.ctx_ = ctx
14887	return c
14888}
14889
14890// Header returns an http.Header that can be modified by the caller to
14891// add HTTP headers to the request.
14892func (c *AccountPermissionsListCall) Header() http.Header {
14893	if c.header_ == nil {
14894		c.header_ = make(http.Header)
14895	}
14896	return c.header_
14897}
14898
14899func (c *AccountPermissionsListCall) doRequest(alt string) (*http.Response, error) {
14900	reqHeaders := make(http.Header)
14901	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
14902	for k, v := range c.header_ {
14903		reqHeaders[k] = v
14904	}
14905	reqHeaders.Set("User-Agent", c.s.userAgent())
14906	if c.ifNoneMatch_ != "" {
14907		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14908	}
14909	var body io.Reader = nil
14910	c.urlParams_.Set("alt", alt)
14911	c.urlParams_.Set("prettyPrint", "false")
14912	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions")
14913	urls += "?" + c.urlParams_.Encode()
14914	req, err := http.NewRequest("GET", urls, body)
14915	if err != nil {
14916		return nil, err
14917	}
14918	req.Header = reqHeaders
14919	googleapi.Expand(req.URL, map[string]string{
14920		"profileId": strconv.FormatInt(c.profileId, 10),
14921	})
14922	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14923}
14924
14925// Do executes the "dfareporting.accountPermissions.list" call.
14926// Exactly one of *AccountPermissionsListResponse or error will be
14927// non-nil. Any non-2xx status code is an error. Response headers are in
14928// either *AccountPermissionsListResponse.ServerResponse.Header or (if a
14929// response was returned at all) in error.(*googleapi.Error).Header. Use
14930// googleapi.IsNotModified to check whether the returned error was
14931// because http.StatusNotModified was returned.
14932func (c *AccountPermissionsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionsListResponse, error) {
14933	gensupport.SetOptions(c.urlParams_, opts...)
14934	res, err := c.doRequest("json")
14935	if res != nil && res.StatusCode == http.StatusNotModified {
14936		if res.Body != nil {
14937			res.Body.Close()
14938		}
14939		return nil, &googleapi.Error{
14940			Code:   res.StatusCode,
14941			Header: res.Header,
14942		}
14943	}
14944	if err != nil {
14945		return nil, err
14946	}
14947	defer googleapi.CloseBody(res)
14948	if err := googleapi.CheckResponse(res); err != nil {
14949		return nil, err
14950	}
14951	ret := &AccountPermissionsListResponse{
14952		ServerResponse: googleapi.ServerResponse{
14953			Header:         res.Header,
14954			HTTPStatusCode: res.StatusCode,
14955		},
14956	}
14957	target := &ret
14958	if err := gensupport.DecodeResponse(target, res); err != nil {
14959		return nil, err
14960	}
14961	return ret, nil
14962	// {
14963	//   "description": "Retrieves the list of account permissions.",
14964	//   "httpMethod": "GET",
14965	//   "id": "dfareporting.accountPermissions.list",
14966	//   "parameterOrder": [
14967	//     "profileId"
14968	//   ],
14969	//   "parameters": {
14970	//     "profileId": {
14971	//       "description": "User profile ID associated with this request.",
14972	//       "format": "int64",
14973	//       "location": "path",
14974	//       "required": true,
14975	//       "type": "string"
14976	//     }
14977	//   },
14978	//   "path": "userprofiles/{profileId}/accountPermissions",
14979	//   "response": {
14980	//     "$ref": "AccountPermissionsListResponse"
14981	//   },
14982	//   "scopes": [
14983	//     "https://www.googleapis.com/auth/dfatrafficking"
14984	//   ]
14985	// }
14986
14987}
14988
14989// method id "dfareporting.accountUserProfiles.get":
14990
14991type AccountUserProfilesGetCall struct {
14992	s            *Service
14993	profileId    int64
14994	id           int64
14995	urlParams_   gensupport.URLParams
14996	ifNoneMatch_ string
14997	ctx_         context.Context
14998	header_      http.Header
14999}
15000
15001// Get: Gets one account user profile by ID.
15002func (r *AccountUserProfilesService) Get(profileId int64, id int64) *AccountUserProfilesGetCall {
15003	c := &AccountUserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15004	c.profileId = profileId
15005	c.id = id
15006	return c
15007}
15008
15009// Fields allows partial responses to be retrieved. See
15010// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15011// for more information.
15012func (c *AccountUserProfilesGetCall) Fields(s ...googleapi.Field) *AccountUserProfilesGetCall {
15013	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15014	return c
15015}
15016
15017// IfNoneMatch sets the optional parameter which makes the operation
15018// fail if the object's ETag matches the given value. This is useful for
15019// getting updates only after the object has changed since the last
15020// request. Use googleapi.IsNotModified to check whether the response
15021// error from Do is the result of In-None-Match.
15022func (c *AccountUserProfilesGetCall) IfNoneMatch(entityTag string) *AccountUserProfilesGetCall {
15023	c.ifNoneMatch_ = entityTag
15024	return c
15025}
15026
15027// Context sets the context to be used in this call's Do method. Any
15028// pending HTTP request will be aborted if the provided context is
15029// canceled.
15030func (c *AccountUserProfilesGetCall) Context(ctx context.Context) *AccountUserProfilesGetCall {
15031	c.ctx_ = ctx
15032	return c
15033}
15034
15035// Header returns an http.Header that can be modified by the caller to
15036// add HTTP headers to the request.
15037func (c *AccountUserProfilesGetCall) Header() http.Header {
15038	if c.header_ == nil {
15039		c.header_ = make(http.Header)
15040	}
15041	return c.header_
15042}
15043
15044func (c *AccountUserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
15045	reqHeaders := make(http.Header)
15046	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15047	for k, v := range c.header_ {
15048		reqHeaders[k] = v
15049	}
15050	reqHeaders.Set("User-Agent", c.s.userAgent())
15051	if c.ifNoneMatch_ != "" {
15052		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15053	}
15054	var body io.Reader = nil
15055	c.urlParams_.Set("alt", alt)
15056	c.urlParams_.Set("prettyPrint", "false")
15057	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles/{id}")
15058	urls += "?" + c.urlParams_.Encode()
15059	req, err := http.NewRequest("GET", urls, body)
15060	if err != nil {
15061		return nil, err
15062	}
15063	req.Header = reqHeaders
15064	googleapi.Expand(req.URL, map[string]string{
15065		"profileId": strconv.FormatInt(c.profileId, 10),
15066		"id":        strconv.FormatInt(c.id, 10),
15067	})
15068	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15069}
15070
15071// Do executes the "dfareporting.accountUserProfiles.get" call.
15072// Exactly one of *AccountUserProfile or error will be non-nil. Any
15073// non-2xx status code is an error. Response headers are in either
15074// *AccountUserProfile.ServerResponse.Header or (if a response was
15075// returned at all) in error.(*googleapi.Error).Header. Use
15076// googleapi.IsNotModified to check whether the returned error was
15077// because http.StatusNotModified was returned.
15078func (c *AccountUserProfilesGetCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15079	gensupport.SetOptions(c.urlParams_, opts...)
15080	res, err := c.doRequest("json")
15081	if res != nil && res.StatusCode == http.StatusNotModified {
15082		if res.Body != nil {
15083			res.Body.Close()
15084		}
15085		return nil, &googleapi.Error{
15086			Code:   res.StatusCode,
15087			Header: res.Header,
15088		}
15089	}
15090	if err != nil {
15091		return nil, err
15092	}
15093	defer googleapi.CloseBody(res)
15094	if err := googleapi.CheckResponse(res); err != nil {
15095		return nil, err
15096	}
15097	ret := &AccountUserProfile{
15098		ServerResponse: googleapi.ServerResponse{
15099			Header:         res.Header,
15100			HTTPStatusCode: res.StatusCode,
15101		},
15102	}
15103	target := &ret
15104	if err := gensupport.DecodeResponse(target, res); err != nil {
15105		return nil, err
15106	}
15107	return ret, nil
15108	// {
15109	//   "description": "Gets one account user profile by ID.",
15110	//   "httpMethod": "GET",
15111	//   "id": "dfareporting.accountUserProfiles.get",
15112	//   "parameterOrder": [
15113	//     "profileId",
15114	//     "id"
15115	//   ],
15116	//   "parameters": {
15117	//     "id": {
15118	//       "description": "User profile ID.",
15119	//       "format": "int64",
15120	//       "location": "path",
15121	//       "required": true,
15122	//       "type": "string"
15123	//     },
15124	//     "profileId": {
15125	//       "description": "User profile ID associated with this request.",
15126	//       "format": "int64",
15127	//       "location": "path",
15128	//       "required": true,
15129	//       "type": "string"
15130	//     }
15131	//   },
15132	//   "path": "userprofiles/{profileId}/accountUserProfiles/{id}",
15133	//   "response": {
15134	//     "$ref": "AccountUserProfile"
15135	//   },
15136	//   "scopes": [
15137	//     "https://www.googleapis.com/auth/dfatrafficking"
15138	//   ]
15139	// }
15140
15141}
15142
15143// method id "dfareporting.accountUserProfiles.insert":
15144
15145type AccountUserProfilesInsertCall struct {
15146	s                  *Service
15147	profileId          int64
15148	accountuserprofile *AccountUserProfile
15149	urlParams_         gensupport.URLParams
15150	ctx_               context.Context
15151	header_            http.Header
15152}
15153
15154// Insert: Inserts a new account user profile.
15155func (r *AccountUserProfilesService) Insert(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesInsertCall {
15156	c := &AccountUserProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15157	c.profileId = profileId
15158	c.accountuserprofile = accountuserprofile
15159	return c
15160}
15161
15162// Fields allows partial responses to be retrieved. See
15163// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15164// for more information.
15165func (c *AccountUserProfilesInsertCall) Fields(s ...googleapi.Field) *AccountUserProfilesInsertCall {
15166	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15167	return c
15168}
15169
15170// Context sets the context to be used in this call's Do method. Any
15171// pending HTTP request will be aborted if the provided context is
15172// canceled.
15173func (c *AccountUserProfilesInsertCall) Context(ctx context.Context) *AccountUserProfilesInsertCall {
15174	c.ctx_ = ctx
15175	return c
15176}
15177
15178// Header returns an http.Header that can be modified by the caller to
15179// add HTTP headers to the request.
15180func (c *AccountUserProfilesInsertCall) Header() http.Header {
15181	if c.header_ == nil {
15182		c.header_ = make(http.Header)
15183	}
15184	return c.header_
15185}
15186
15187func (c *AccountUserProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
15188	reqHeaders := make(http.Header)
15189	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15190	for k, v := range c.header_ {
15191		reqHeaders[k] = v
15192	}
15193	reqHeaders.Set("User-Agent", c.s.userAgent())
15194	var body io.Reader = nil
15195	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15196	if err != nil {
15197		return nil, err
15198	}
15199	reqHeaders.Set("Content-Type", "application/json")
15200	c.urlParams_.Set("alt", alt)
15201	c.urlParams_.Set("prettyPrint", "false")
15202	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15203	urls += "?" + c.urlParams_.Encode()
15204	req, err := http.NewRequest("POST", urls, body)
15205	if err != nil {
15206		return nil, err
15207	}
15208	req.Header = reqHeaders
15209	googleapi.Expand(req.URL, map[string]string{
15210		"profileId": strconv.FormatInt(c.profileId, 10),
15211	})
15212	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15213}
15214
15215// Do executes the "dfareporting.accountUserProfiles.insert" call.
15216// Exactly one of *AccountUserProfile or error will be non-nil. Any
15217// non-2xx status code is an error. Response headers are in either
15218// *AccountUserProfile.ServerResponse.Header or (if a response was
15219// returned at all) in error.(*googleapi.Error).Header. Use
15220// googleapi.IsNotModified to check whether the returned error was
15221// because http.StatusNotModified was returned.
15222func (c *AccountUserProfilesInsertCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15223	gensupport.SetOptions(c.urlParams_, opts...)
15224	res, err := c.doRequest("json")
15225	if res != nil && res.StatusCode == http.StatusNotModified {
15226		if res.Body != nil {
15227			res.Body.Close()
15228		}
15229		return nil, &googleapi.Error{
15230			Code:   res.StatusCode,
15231			Header: res.Header,
15232		}
15233	}
15234	if err != nil {
15235		return nil, err
15236	}
15237	defer googleapi.CloseBody(res)
15238	if err := googleapi.CheckResponse(res); err != nil {
15239		return nil, err
15240	}
15241	ret := &AccountUserProfile{
15242		ServerResponse: googleapi.ServerResponse{
15243			Header:         res.Header,
15244			HTTPStatusCode: res.StatusCode,
15245		},
15246	}
15247	target := &ret
15248	if err := gensupport.DecodeResponse(target, res); err != nil {
15249		return nil, err
15250	}
15251	return ret, nil
15252	// {
15253	//   "description": "Inserts a new account user profile.",
15254	//   "httpMethod": "POST",
15255	//   "id": "dfareporting.accountUserProfiles.insert",
15256	//   "parameterOrder": [
15257	//     "profileId"
15258	//   ],
15259	//   "parameters": {
15260	//     "profileId": {
15261	//       "description": "User profile ID associated with this request.",
15262	//       "format": "int64",
15263	//       "location": "path",
15264	//       "required": true,
15265	//       "type": "string"
15266	//     }
15267	//   },
15268	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15269	//   "request": {
15270	//     "$ref": "AccountUserProfile"
15271	//   },
15272	//   "response": {
15273	//     "$ref": "AccountUserProfile"
15274	//   },
15275	//   "scopes": [
15276	//     "https://www.googleapis.com/auth/dfatrafficking"
15277	//   ]
15278	// }
15279
15280}
15281
15282// method id "dfareporting.accountUserProfiles.list":
15283
15284type AccountUserProfilesListCall struct {
15285	s            *Service
15286	profileId    int64
15287	urlParams_   gensupport.URLParams
15288	ifNoneMatch_ string
15289	ctx_         context.Context
15290	header_      http.Header
15291}
15292
15293// List: Retrieves a list of account user profiles, possibly filtered.
15294// This method supports paging.
15295func (r *AccountUserProfilesService) List(profileId int64) *AccountUserProfilesListCall {
15296	c := &AccountUserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15297	c.profileId = profileId
15298	return c
15299}
15300
15301// Active sets the optional parameter "active": Select only active user
15302// profiles.
15303func (c *AccountUserProfilesListCall) Active(active bool) *AccountUserProfilesListCall {
15304	c.urlParams_.Set("active", fmt.Sprint(active))
15305	return c
15306}
15307
15308// Ids sets the optional parameter "ids": Select only user profiles with
15309// these IDs.
15310func (c *AccountUserProfilesListCall) Ids(ids ...int64) *AccountUserProfilesListCall {
15311	var ids_ []string
15312	for _, v := range ids {
15313		ids_ = append(ids_, fmt.Sprint(v))
15314	}
15315	c.urlParams_.SetMulti("ids", ids_)
15316	return c
15317}
15318
15319// MaxResults sets the optional parameter "maxResults": Maximum number
15320// of results to return.
15321func (c *AccountUserProfilesListCall) MaxResults(maxResults int64) *AccountUserProfilesListCall {
15322	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15323	return c
15324}
15325
15326// PageToken sets the optional parameter "pageToken": Value of the
15327// nextPageToken from the previous result page.
15328func (c *AccountUserProfilesListCall) PageToken(pageToken string) *AccountUserProfilesListCall {
15329	c.urlParams_.Set("pageToken", pageToken)
15330	return c
15331}
15332
15333// SearchString sets the optional parameter "searchString": Allows
15334// searching for objects by name, ID or email. Wildcards (*) are
15335// allowed. For example, "user profile*2015" will return objects with
15336// names like "user profile June 2015", "user profile April 2015", or
15337// simply "user profile 2015". Most of the searches also add wildcards
15338// implicitly at the start and the end of the search string. For
15339// example, a search string of "user profile" will match objects with
15340// name "my user profile", "user profile 2015", or simply "user
15341// profile".
15342func (c *AccountUserProfilesListCall) SearchString(searchString string) *AccountUserProfilesListCall {
15343	c.urlParams_.Set("searchString", searchString)
15344	return c
15345}
15346
15347// SortField sets the optional parameter "sortField": Field by which to
15348// sort the list.
15349//
15350// Possible values:
15351//   "ID" (default)
15352//   "NAME"
15353func (c *AccountUserProfilesListCall) SortField(sortField string) *AccountUserProfilesListCall {
15354	c.urlParams_.Set("sortField", sortField)
15355	return c
15356}
15357
15358// SortOrder sets the optional parameter "sortOrder": Order of sorted
15359// results.
15360//
15361// Possible values:
15362//   "ASCENDING" (default)
15363//   "DESCENDING"
15364func (c *AccountUserProfilesListCall) SortOrder(sortOrder string) *AccountUserProfilesListCall {
15365	c.urlParams_.Set("sortOrder", sortOrder)
15366	return c
15367}
15368
15369// SubaccountId sets the optional parameter "subaccountId": Select only
15370// user profiles with the specified subaccount ID.
15371func (c *AccountUserProfilesListCall) SubaccountId(subaccountId int64) *AccountUserProfilesListCall {
15372	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
15373	return c
15374}
15375
15376// UserRoleId sets the optional parameter "userRoleId": Select only user
15377// profiles with the specified user role ID.
15378func (c *AccountUserProfilesListCall) UserRoleId(userRoleId int64) *AccountUserProfilesListCall {
15379	c.urlParams_.Set("userRoleId", fmt.Sprint(userRoleId))
15380	return c
15381}
15382
15383// Fields allows partial responses to be retrieved. See
15384// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15385// for more information.
15386func (c *AccountUserProfilesListCall) Fields(s ...googleapi.Field) *AccountUserProfilesListCall {
15387	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15388	return c
15389}
15390
15391// IfNoneMatch sets the optional parameter which makes the operation
15392// fail if the object's ETag matches the given value. This is useful for
15393// getting updates only after the object has changed since the last
15394// request. Use googleapi.IsNotModified to check whether the response
15395// error from Do is the result of In-None-Match.
15396func (c *AccountUserProfilesListCall) IfNoneMatch(entityTag string) *AccountUserProfilesListCall {
15397	c.ifNoneMatch_ = entityTag
15398	return c
15399}
15400
15401// Context sets the context to be used in this call's Do method. Any
15402// pending HTTP request will be aborted if the provided context is
15403// canceled.
15404func (c *AccountUserProfilesListCall) Context(ctx context.Context) *AccountUserProfilesListCall {
15405	c.ctx_ = ctx
15406	return c
15407}
15408
15409// Header returns an http.Header that can be modified by the caller to
15410// add HTTP headers to the request.
15411func (c *AccountUserProfilesListCall) Header() http.Header {
15412	if c.header_ == nil {
15413		c.header_ = make(http.Header)
15414	}
15415	return c.header_
15416}
15417
15418func (c *AccountUserProfilesListCall) doRequest(alt string) (*http.Response, error) {
15419	reqHeaders := make(http.Header)
15420	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15421	for k, v := range c.header_ {
15422		reqHeaders[k] = v
15423	}
15424	reqHeaders.Set("User-Agent", c.s.userAgent())
15425	if c.ifNoneMatch_ != "" {
15426		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15427	}
15428	var body io.Reader = nil
15429	c.urlParams_.Set("alt", alt)
15430	c.urlParams_.Set("prettyPrint", "false")
15431	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15432	urls += "?" + c.urlParams_.Encode()
15433	req, err := http.NewRequest("GET", urls, body)
15434	if err != nil {
15435		return nil, err
15436	}
15437	req.Header = reqHeaders
15438	googleapi.Expand(req.URL, map[string]string{
15439		"profileId": strconv.FormatInt(c.profileId, 10),
15440	})
15441	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15442}
15443
15444// Do executes the "dfareporting.accountUserProfiles.list" call.
15445// Exactly one of *AccountUserProfilesListResponse or error will be
15446// non-nil. Any non-2xx status code is an error. Response headers are in
15447// either *AccountUserProfilesListResponse.ServerResponse.Header or (if
15448// a response was returned at all) in error.(*googleapi.Error).Header.
15449// Use googleapi.IsNotModified to check whether the returned error was
15450// because http.StatusNotModified was returned.
15451func (c *AccountUserProfilesListCall) Do(opts ...googleapi.CallOption) (*AccountUserProfilesListResponse, error) {
15452	gensupport.SetOptions(c.urlParams_, opts...)
15453	res, err := c.doRequest("json")
15454	if res != nil && res.StatusCode == http.StatusNotModified {
15455		if res.Body != nil {
15456			res.Body.Close()
15457		}
15458		return nil, &googleapi.Error{
15459			Code:   res.StatusCode,
15460			Header: res.Header,
15461		}
15462	}
15463	if err != nil {
15464		return nil, err
15465	}
15466	defer googleapi.CloseBody(res)
15467	if err := googleapi.CheckResponse(res); err != nil {
15468		return nil, err
15469	}
15470	ret := &AccountUserProfilesListResponse{
15471		ServerResponse: googleapi.ServerResponse{
15472			Header:         res.Header,
15473			HTTPStatusCode: res.StatusCode,
15474		},
15475	}
15476	target := &ret
15477	if err := gensupport.DecodeResponse(target, res); err != nil {
15478		return nil, err
15479	}
15480	return ret, nil
15481	// {
15482	//   "description": "Retrieves a list of account user profiles, possibly filtered. This method supports paging.",
15483	//   "httpMethod": "GET",
15484	//   "id": "dfareporting.accountUserProfiles.list",
15485	//   "parameterOrder": [
15486	//     "profileId"
15487	//   ],
15488	//   "parameters": {
15489	//     "active": {
15490	//       "description": "Select only active user profiles.",
15491	//       "location": "query",
15492	//       "type": "boolean"
15493	//     },
15494	//     "ids": {
15495	//       "description": "Select only user profiles with these IDs.",
15496	//       "format": "int64",
15497	//       "location": "query",
15498	//       "repeated": true,
15499	//       "type": "string"
15500	//     },
15501	//     "maxResults": {
15502	//       "default": "1000",
15503	//       "description": "Maximum number of results to return.",
15504	//       "format": "int32",
15505	//       "location": "query",
15506	//       "maximum": "1000",
15507	//       "minimum": "0",
15508	//       "type": "integer"
15509	//     },
15510	//     "pageToken": {
15511	//       "description": "Value of the nextPageToken from the previous result page.",
15512	//       "location": "query",
15513	//       "type": "string"
15514	//     },
15515	//     "profileId": {
15516	//       "description": "User profile ID associated with this request.",
15517	//       "format": "int64",
15518	//       "location": "path",
15519	//       "required": true,
15520	//       "type": "string"
15521	//     },
15522	//     "searchString": {
15523	//       "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\".",
15524	//       "location": "query",
15525	//       "type": "string"
15526	//     },
15527	//     "sortField": {
15528	//       "default": "ID",
15529	//       "description": "Field by which to sort the list.",
15530	//       "enum": [
15531	//         "ID",
15532	//         "NAME"
15533	//       ],
15534	//       "enumDescriptions": [
15535	//         "",
15536	//         ""
15537	//       ],
15538	//       "location": "query",
15539	//       "type": "string"
15540	//     },
15541	//     "sortOrder": {
15542	//       "default": "ASCENDING",
15543	//       "description": "Order of sorted results.",
15544	//       "enum": [
15545	//         "ASCENDING",
15546	//         "DESCENDING"
15547	//       ],
15548	//       "enumDescriptions": [
15549	//         "",
15550	//         ""
15551	//       ],
15552	//       "location": "query",
15553	//       "type": "string"
15554	//     },
15555	//     "subaccountId": {
15556	//       "description": "Select only user profiles with the specified subaccount ID.",
15557	//       "format": "int64",
15558	//       "location": "query",
15559	//       "type": "string"
15560	//     },
15561	//     "userRoleId": {
15562	//       "description": "Select only user profiles with the specified user role ID.",
15563	//       "format": "int64",
15564	//       "location": "query",
15565	//       "type": "string"
15566	//     }
15567	//   },
15568	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15569	//   "response": {
15570	//     "$ref": "AccountUserProfilesListResponse"
15571	//   },
15572	//   "scopes": [
15573	//     "https://www.googleapis.com/auth/dfatrafficking"
15574	//   ]
15575	// }
15576
15577}
15578
15579// Pages invokes f for each page of results.
15580// A non-nil error returned from f will halt the iteration.
15581// The provided context supersedes any context provided to the Context method.
15582func (c *AccountUserProfilesListCall) Pages(ctx context.Context, f func(*AccountUserProfilesListResponse) error) error {
15583	c.ctx_ = ctx
15584	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15585	for {
15586		x, err := c.Do()
15587		if err != nil {
15588			return err
15589		}
15590		if err := f(x); err != nil {
15591			return err
15592		}
15593		if x.NextPageToken == "" {
15594			return nil
15595		}
15596		c.PageToken(x.NextPageToken)
15597	}
15598}
15599
15600// method id "dfareporting.accountUserProfiles.patch":
15601
15602type AccountUserProfilesPatchCall struct {
15603	s                  *Service
15604	profileId          int64
15605	accountuserprofile *AccountUserProfile
15606	urlParams_         gensupport.URLParams
15607	ctx_               context.Context
15608	header_            http.Header
15609}
15610
15611// Patch: Updates an existing account user profile. This method supports
15612// patch semantics.
15613func (r *AccountUserProfilesService) Patch(profileId int64, id int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesPatchCall {
15614	c := &AccountUserProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15615	c.profileId = profileId
15616	c.urlParams_.Set("id", fmt.Sprint(id))
15617	c.accountuserprofile = accountuserprofile
15618	return c
15619}
15620
15621// Fields allows partial responses to be retrieved. See
15622// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15623// for more information.
15624func (c *AccountUserProfilesPatchCall) Fields(s ...googleapi.Field) *AccountUserProfilesPatchCall {
15625	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15626	return c
15627}
15628
15629// Context sets the context to be used in this call's Do method. Any
15630// pending HTTP request will be aborted if the provided context is
15631// canceled.
15632func (c *AccountUserProfilesPatchCall) Context(ctx context.Context) *AccountUserProfilesPatchCall {
15633	c.ctx_ = ctx
15634	return c
15635}
15636
15637// Header returns an http.Header that can be modified by the caller to
15638// add HTTP headers to the request.
15639func (c *AccountUserProfilesPatchCall) Header() http.Header {
15640	if c.header_ == nil {
15641		c.header_ = make(http.Header)
15642	}
15643	return c.header_
15644}
15645
15646func (c *AccountUserProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
15647	reqHeaders := make(http.Header)
15648	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15649	for k, v := range c.header_ {
15650		reqHeaders[k] = v
15651	}
15652	reqHeaders.Set("User-Agent", c.s.userAgent())
15653	var body io.Reader = nil
15654	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15655	if err != nil {
15656		return nil, err
15657	}
15658	reqHeaders.Set("Content-Type", "application/json")
15659	c.urlParams_.Set("alt", alt)
15660	c.urlParams_.Set("prettyPrint", "false")
15661	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15662	urls += "?" + c.urlParams_.Encode()
15663	req, err := http.NewRequest("PATCH", urls, body)
15664	if err != nil {
15665		return nil, err
15666	}
15667	req.Header = reqHeaders
15668	googleapi.Expand(req.URL, map[string]string{
15669		"profileId": strconv.FormatInt(c.profileId, 10),
15670	})
15671	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15672}
15673
15674// Do executes the "dfareporting.accountUserProfiles.patch" call.
15675// Exactly one of *AccountUserProfile or error will be non-nil. Any
15676// non-2xx status code is an error. Response headers are in either
15677// *AccountUserProfile.ServerResponse.Header or (if a response was
15678// returned at all) in error.(*googleapi.Error).Header. Use
15679// googleapi.IsNotModified to check whether the returned error was
15680// because http.StatusNotModified was returned.
15681func (c *AccountUserProfilesPatchCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15682	gensupport.SetOptions(c.urlParams_, opts...)
15683	res, err := c.doRequest("json")
15684	if res != nil && res.StatusCode == http.StatusNotModified {
15685		if res.Body != nil {
15686			res.Body.Close()
15687		}
15688		return nil, &googleapi.Error{
15689			Code:   res.StatusCode,
15690			Header: res.Header,
15691		}
15692	}
15693	if err != nil {
15694		return nil, err
15695	}
15696	defer googleapi.CloseBody(res)
15697	if err := googleapi.CheckResponse(res); err != nil {
15698		return nil, err
15699	}
15700	ret := &AccountUserProfile{
15701		ServerResponse: googleapi.ServerResponse{
15702			Header:         res.Header,
15703			HTTPStatusCode: res.StatusCode,
15704		},
15705	}
15706	target := &ret
15707	if err := gensupport.DecodeResponse(target, res); err != nil {
15708		return nil, err
15709	}
15710	return ret, nil
15711	// {
15712	//   "description": "Updates an existing account user profile. This method supports patch semantics.",
15713	//   "httpMethod": "PATCH",
15714	//   "id": "dfareporting.accountUserProfiles.patch",
15715	//   "parameterOrder": [
15716	//     "profileId",
15717	//     "id"
15718	//   ],
15719	//   "parameters": {
15720	//     "id": {
15721	//       "description": "User profile ID.",
15722	//       "format": "int64",
15723	//       "location": "query",
15724	//       "required": true,
15725	//       "type": "string"
15726	//     },
15727	//     "profileId": {
15728	//       "description": "User profile ID associated with this request.",
15729	//       "format": "int64",
15730	//       "location": "path",
15731	//       "required": true,
15732	//       "type": "string"
15733	//     }
15734	//   },
15735	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15736	//   "request": {
15737	//     "$ref": "AccountUserProfile"
15738	//   },
15739	//   "response": {
15740	//     "$ref": "AccountUserProfile"
15741	//   },
15742	//   "scopes": [
15743	//     "https://www.googleapis.com/auth/dfatrafficking"
15744	//   ]
15745	// }
15746
15747}
15748
15749// method id "dfareporting.accountUserProfiles.update":
15750
15751type AccountUserProfilesUpdateCall struct {
15752	s                  *Service
15753	profileId          int64
15754	accountuserprofile *AccountUserProfile
15755	urlParams_         gensupport.URLParams
15756	ctx_               context.Context
15757	header_            http.Header
15758}
15759
15760// Update: Updates an existing account user profile.
15761func (r *AccountUserProfilesService) Update(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesUpdateCall {
15762	c := &AccountUserProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15763	c.profileId = profileId
15764	c.accountuserprofile = accountuserprofile
15765	return c
15766}
15767
15768// Fields allows partial responses to be retrieved. See
15769// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15770// for more information.
15771func (c *AccountUserProfilesUpdateCall) Fields(s ...googleapi.Field) *AccountUserProfilesUpdateCall {
15772	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15773	return c
15774}
15775
15776// Context sets the context to be used in this call's Do method. Any
15777// pending HTTP request will be aborted if the provided context is
15778// canceled.
15779func (c *AccountUserProfilesUpdateCall) Context(ctx context.Context) *AccountUserProfilesUpdateCall {
15780	c.ctx_ = ctx
15781	return c
15782}
15783
15784// Header returns an http.Header that can be modified by the caller to
15785// add HTTP headers to the request.
15786func (c *AccountUserProfilesUpdateCall) Header() http.Header {
15787	if c.header_ == nil {
15788		c.header_ = make(http.Header)
15789	}
15790	return c.header_
15791}
15792
15793func (c *AccountUserProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
15794	reqHeaders := make(http.Header)
15795	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15796	for k, v := range c.header_ {
15797		reqHeaders[k] = v
15798	}
15799	reqHeaders.Set("User-Agent", c.s.userAgent())
15800	var body io.Reader = nil
15801	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15802	if err != nil {
15803		return nil, err
15804	}
15805	reqHeaders.Set("Content-Type", "application/json")
15806	c.urlParams_.Set("alt", alt)
15807	c.urlParams_.Set("prettyPrint", "false")
15808	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15809	urls += "?" + c.urlParams_.Encode()
15810	req, err := http.NewRequest("PUT", urls, body)
15811	if err != nil {
15812		return nil, err
15813	}
15814	req.Header = reqHeaders
15815	googleapi.Expand(req.URL, map[string]string{
15816		"profileId": strconv.FormatInt(c.profileId, 10),
15817	})
15818	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15819}
15820
15821// Do executes the "dfareporting.accountUserProfiles.update" call.
15822// Exactly one of *AccountUserProfile or error will be non-nil. Any
15823// non-2xx status code is an error. Response headers are in either
15824// *AccountUserProfile.ServerResponse.Header or (if a response was
15825// returned at all) in error.(*googleapi.Error).Header. Use
15826// googleapi.IsNotModified to check whether the returned error was
15827// because http.StatusNotModified was returned.
15828func (c *AccountUserProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15829	gensupport.SetOptions(c.urlParams_, opts...)
15830	res, err := c.doRequest("json")
15831	if res != nil && res.StatusCode == http.StatusNotModified {
15832		if res.Body != nil {
15833			res.Body.Close()
15834		}
15835		return nil, &googleapi.Error{
15836			Code:   res.StatusCode,
15837			Header: res.Header,
15838		}
15839	}
15840	if err != nil {
15841		return nil, err
15842	}
15843	defer googleapi.CloseBody(res)
15844	if err := googleapi.CheckResponse(res); err != nil {
15845		return nil, err
15846	}
15847	ret := &AccountUserProfile{
15848		ServerResponse: googleapi.ServerResponse{
15849			Header:         res.Header,
15850			HTTPStatusCode: res.StatusCode,
15851		},
15852	}
15853	target := &ret
15854	if err := gensupport.DecodeResponse(target, res); err != nil {
15855		return nil, err
15856	}
15857	return ret, nil
15858	// {
15859	//   "description": "Updates an existing account user profile.",
15860	//   "httpMethod": "PUT",
15861	//   "id": "dfareporting.accountUserProfiles.update",
15862	//   "parameterOrder": [
15863	//     "profileId"
15864	//   ],
15865	//   "parameters": {
15866	//     "profileId": {
15867	//       "description": "User profile ID associated with this request.",
15868	//       "format": "int64",
15869	//       "location": "path",
15870	//       "required": true,
15871	//       "type": "string"
15872	//     }
15873	//   },
15874	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15875	//   "request": {
15876	//     "$ref": "AccountUserProfile"
15877	//   },
15878	//   "response": {
15879	//     "$ref": "AccountUserProfile"
15880	//   },
15881	//   "scopes": [
15882	//     "https://www.googleapis.com/auth/dfatrafficking"
15883	//   ]
15884	// }
15885
15886}
15887
15888// method id "dfareporting.accounts.get":
15889
15890type AccountsGetCall struct {
15891	s            *Service
15892	profileId    int64
15893	id           int64
15894	urlParams_   gensupport.URLParams
15895	ifNoneMatch_ string
15896	ctx_         context.Context
15897	header_      http.Header
15898}
15899
15900// Get: Gets one account by ID.
15901func (r *AccountsService) Get(profileId int64, id int64) *AccountsGetCall {
15902	c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15903	c.profileId = profileId
15904	c.id = id
15905	return c
15906}
15907
15908// Fields allows partial responses to be retrieved. See
15909// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15910// for more information.
15911func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
15912	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15913	return c
15914}
15915
15916// IfNoneMatch sets the optional parameter which makes the operation
15917// fail if the object's ETag matches the given value. This is useful for
15918// getting updates only after the object has changed since the last
15919// request. Use googleapi.IsNotModified to check whether the response
15920// error from Do is the result of In-None-Match.
15921func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
15922	c.ifNoneMatch_ = entityTag
15923	return c
15924}
15925
15926// Context sets the context to be used in this call's Do method. Any
15927// pending HTTP request will be aborted if the provided context is
15928// canceled.
15929func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
15930	c.ctx_ = ctx
15931	return c
15932}
15933
15934// Header returns an http.Header that can be modified by the caller to
15935// add HTTP headers to the request.
15936func (c *AccountsGetCall) Header() http.Header {
15937	if c.header_ == nil {
15938		c.header_ = make(http.Header)
15939	}
15940	return c.header_
15941}
15942
15943func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
15944	reqHeaders := make(http.Header)
15945	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
15946	for k, v := range c.header_ {
15947		reqHeaders[k] = v
15948	}
15949	reqHeaders.Set("User-Agent", c.s.userAgent())
15950	if c.ifNoneMatch_ != "" {
15951		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15952	}
15953	var body io.Reader = nil
15954	c.urlParams_.Set("alt", alt)
15955	c.urlParams_.Set("prettyPrint", "false")
15956	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts/{id}")
15957	urls += "?" + c.urlParams_.Encode()
15958	req, err := http.NewRequest("GET", urls, body)
15959	if err != nil {
15960		return nil, err
15961	}
15962	req.Header = reqHeaders
15963	googleapi.Expand(req.URL, map[string]string{
15964		"profileId": strconv.FormatInt(c.profileId, 10),
15965		"id":        strconv.FormatInt(c.id, 10),
15966	})
15967	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15968}
15969
15970// Do executes the "dfareporting.accounts.get" call.
15971// Exactly one of *Account or error will be non-nil. Any non-2xx status
15972// code is an error. Response headers are in either
15973// *Account.ServerResponse.Header or (if a response was returned at all)
15974// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
15975// check whether the returned error was because http.StatusNotModified
15976// was returned.
15977func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) {
15978	gensupport.SetOptions(c.urlParams_, opts...)
15979	res, err := c.doRequest("json")
15980	if res != nil && res.StatusCode == http.StatusNotModified {
15981		if res.Body != nil {
15982			res.Body.Close()
15983		}
15984		return nil, &googleapi.Error{
15985			Code:   res.StatusCode,
15986			Header: res.Header,
15987		}
15988	}
15989	if err != nil {
15990		return nil, err
15991	}
15992	defer googleapi.CloseBody(res)
15993	if err := googleapi.CheckResponse(res); err != nil {
15994		return nil, err
15995	}
15996	ret := &Account{
15997		ServerResponse: googleapi.ServerResponse{
15998			Header:         res.Header,
15999			HTTPStatusCode: res.StatusCode,
16000		},
16001	}
16002	target := &ret
16003	if err := gensupport.DecodeResponse(target, res); err != nil {
16004		return nil, err
16005	}
16006	return ret, nil
16007	// {
16008	//   "description": "Gets one account by ID.",
16009	//   "httpMethod": "GET",
16010	//   "id": "dfareporting.accounts.get",
16011	//   "parameterOrder": [
16012	//     "profileId",
16013	//     "id"
16014	//   ],
16015	//   "parameters": {
16016	//     "id": {
16017	//       "description": "Account ID.",
16018	//       "format": "int64",
16019	//       "location": "path",
16020	//       "required": true,
16021	//       "type": "string"
16022	//     },
16023	//     "profileId": {
16024	//       "description": "User profile ID associated with this request.",
16025	//       "format": "int64",
16026	//       "location": "path",
16027	//       "required": true,
16028	//       "type": "string"
16029	//     }
16030	//   },
16031	//   "path": "userprofiles/{profileId}/accounts/{id}",
16032	//   "response": {
16033	//     "$ref": "Account"
16034	//   },
16035	//   "scopes": [
16036	//     "https://www.googleapis.com/auth/dfatrafficking"
16037	//   ]
16038	// }
16039
16040}
16041
16042// method id "dfareporting.accounts.list":
16043
16044type AccountsListCall struct {
16045	s            *Service
16046	profileId    int64
16047	urlParams_   gensupport.URLParams
16048	ifNoneMatch_ string
16049	ctx_         context.Context
16050	header_      http.Header
16051}
16052
16053// List: Retrieves the list of accounts, possibly filtered. This method
16054// supports paging.
16055func (r *AccountsService) List(profileId int64) *AccountsListCall {
16056	c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16057	c.profileId = profileId
16058	return c
16059}
16060
16061// Active sets the optional parameter "active": Select only active
16062// accounts. Don't set this field to select both active and non-active
16063// accounts.
16064func (c *AccountsListCall) Active(active bool) *AccountsListCall {
16065	c.urlParams_.Set("active", fmt.Sprint(active))
16066	return c
16067}
16068
16069// Ids sets the optional parameter "ids": Select only accounts with
16070// these IDs.
16071func (c *AccountsListCall) Ids(ids ...int64) *AccountsListCall {
16072	var ids_ []string
16073	for _, v := range ids {
16074		ids_ = append(ids_, fmt.Sprint(v))
16075	}
16076	c.urlParams_.SetMulti("ids", ids_)
16077	return c
16078}
16079
16080// MaxResults sets the optional parameter "maxResults": Maximum number
16081// of results to return.
16082func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall {
16083	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16084	return c
16085}
16086
16087// PageToken sets the optional parameter "pageToken": Value of the
16088// nextPageToken from the previous result page.
16089func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
16090	c.urlParams_.Set("pageToken", pageToken)
16091	return c
16092}
16093
16094// SearchString sets the optional parameter "searchString": Allows
16095// searching for objects by name or ID. Wildcards (*) are allowed. For
16096// example, "account*2015" will return objects with names like "account
16097// June 2015", "account April 2015", or simply "account 2015". Most of
16098// the searches also add wildcards implicitly at the start and the end
16099// of the search string. For example, a search string of "account" will
16100// match objects with name "my account", "account 2015", or simply
16101// "account".
16102func (c *AccountsListCall) SearchString(searchString string) *AccountsListCall {
16103	c.urlParams_.Set("searchString", searchString)
16104	return c
16105}
16106
16107// SortField sets the optional parameter "sortField": Field by which to
16108// sort the list.
16109//
16110// Possible values:
16111//   "ID" (default)
16112//   "NAME"
16113func (c *AccountsListCall) SortField(sortField string) *AccountsListCall {
16114	c.urlParams_.Set("sortField", sortField)
16115	return c
16116}
16117
16118// SortOrder sets the optional parameter "sortOrder": Order of sorted
16119// results.
16120//
16121// Possible values:
16122//   "ASCENDING" (default)
16123//   "DESCENDING"
16124func (c *AccountsListCall) SortOrder(sortOrder string) *AccountsListCall {
16125	c.urlParams_.Set("sortOrder", sortOrder)
16126	return c
16127}
16128
16129// Fields allows partial responses to be retrieved. See
16130// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16131// for more information.
16132func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
16133	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16134	return c
16135}
16136
16137// IfNoneMatch sets the optional parameter which makes the operation
16138// fail if the object's ETag matches the given value. This is useful for
16139// getting updates only after the object has changed since the last
16140// request. Use googleapi.IsNotModified to check whether the response
16141// error from Do is the result of In-None-Match.
16142func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
16143	c.ifNoneMatch_ = entityTag
16144	return c
16145}
16146
16147// Context sets the context to be used in this call's Do method. Any
16148// pending HTTP request will be aborted if the provided context is
16149// canceled.
16150func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
16151	c.ctx_ = ctx
16152	return c
16153}
16154
16155// Header returns an http.Header that can be modified by the caller to
16156// add HTTP headers to the request.
16157func (c *AccountsListCall) Header() http.Header {
16158	if c.header_ == nil {
16159		c.header_ = make(http.Header)
16160	}
16161	return c.header_
16162}
16163
16164func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
16165	reqHeaders := make(http.Header)
16166	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16167	for k, v := range c.header_ {
16168		reqHeaders[k] = v
16169	}
16170	reqHeaders.Set("User-Agent", c.s.userAgent())
16171	if c.ifNoneMatch_ != "" {
16172		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16173	}
16174	var body io.Reader = nil
16175	c.urlParams_.Set("alt", alt)
16176	c.urlParams_.Set("prettyPrint", "false")
16177	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16178	urls += "?" + c.urlParams_.Encode()
16179	req, err := http.NewRequest("GET", urls, body)
16180	if err != nil {
16181		return nil, err
16182	}
16183	req.Header = reqHeaders
16184	googleapi.Expand(req.URL, map[string]string{
16185		"profileId": strconv.FormatInt(c.profileId, 10),
16186	})
16187	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16188}
16189
16190// Do executes the "dfareporting.accounts.list" call.
16191// Exactly one of *AccountsListResponse or error will be non-nil. Any
16192// non-2xx status code is an error. Response headers are in either
16193// *AccountsListResponse.ServerResponse.Header or (if a response was
16194// returned at all) in error.(*googleapi.Error).Header. Use
16195// googleapi.IsNotModified to check whether the returned error was
16196// because http.StatusNotModified was returned.
16197func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) {
16198	gensupport.SetOptions(c.urlParams_, opts...)
16199	res, err := c.doRequest("json")
16200	if res != nil && res.StatusCode == http.StatusNotModified {
16201		if res.Body != nil {
16202			res.Body.Close()
16203		}
16204		return nil, &googleapi.Error{
16205			Code:   res.StatusCode,
16206			Header: res.Header,
16207		}
16208	}
16209	if err != nil {
16210		return nil, err
16211	}
16212	defer googleapi.CloseBody(res)
16213	if err := googleapi.CheckResponse(res); err != nil {
16214		return nil, err
16215	}
16216	ret := &AccountsListResponse{
16217		ServerResponse: googleapi.ServerResponse{
16218			Header:         res.Header,
16219			HTTPStatusCode: res.StatusCode,
16220		},
16221	}
16222	target := &ret
16223	if err := gensupport.DecodeResponse(target, res); err != nil {
16224		return nil, err
16225	}
16226	return ret, nil
16227	// {
16228	//   "description": "Retrieves the list of accounts, possibly filtered. This method supports paging.",
16229	//   "httpMethod": "GET",
16230	//   "id": "dfareporting.accounts.list",
16231	//   "parameterOrder": [
16232	//     "profileId"
16233	//   ],
16234	//   "parameters": {
16235	//     "active": {
16236	//       "description": "Select only active accounts. Don't set this field to select both active and non-active accounts.",
16237	//       "location": "query",
16238	//       "type": "boolean"
16239	//     },
16240	//     "ids": {
16241	//       "description": "Select only accounts with these IDs.",
16242	//       "format": "int64",
16243	//       "location": "query",
16244	//       "repeated": true,
16245	//       "type": "string"
16246	//     },
16247	//     "maxResults": {
16248	//       "default": "1000",
16249	//       "description": "Maximum number of results to return.",
16250	//       "format": "int32",
16251	//       "location": "query",
16252	//       "maximum": "1000",
16253	//       "minimum": "0",
16254	//       "type": "integer"
16255	//     },
16256	//     "pageToken": {
16257	//       "description": "Value of the nextPageToken from the previous result page.",
16258	//       "location": "query",
16259	//       "type": "string"
16260	//     },
16261	//     "profileId": {
16262	//       "description": "User profile ID associated with this request.",
16263	//       "format": "int64",
16264	//       "location": "path",
16265	//       "required": true,
16266	//       "type": "string"
16267	//     },
16268	//     "searchString": {
16269	//       "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\".",
16270	//       "location": "query",
16271	//       "type": "string"
16272	//     },
16273	//     "sortField": {
16274	//       "default": "ID",
16275	//       "description": "Field by which to sort the list.",
16276	//       "enum": [
16277	//         "ID",
16278	//         "NAME"
16279	//       ],
16280	//       "enumDescriptions": [
16281	//         "",
16282	//         ""
16283	//       ],
16284	//       "location": "query",
16285	//       "type": "string"
16286	//     },
16287	//     "sortOrder": {
16288	//       "default": "ASCENDING",
16289	//       "description": "Order of sorted results.",
16290	//       "enum": [
16291	//         "ASCENDING",
16292	//         "DESCENDING"
16293	//       ],
16294	//       "enumDescriptions": [
16295	//         "",
16296	//         ""
16297	//       ],
16298	//       "location": "query",
16299	//       "type": "string"
16300	//     }
16301	//   },
16302	//   "path": "userprofiles/{profileId}/accounts",
16303	//   "response": {
16304	//     "$ref": "AccountsListResponse"
16305	//   },
16306	//   "scopes": [
16307	//     "https://www.googleapis.com/auth/dfatrafficking"
16308	//   ]
16309	// }
16310
16311}
16312
16313// Pages invokes f for each page of results.
16314// A non-nil error returned from f will halt the iteration.
16315// The provided context supersedes any context provided to the Context method.
16316func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error {
16317	c.ctx_ = ctx
16318	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16319	for {
16320		x, err := c.Do()
16321		if err != nil {
16322			return err
16323		}
16324		if err := f(x); err != nil {
16325			return err
16326		}
16327		if x.NextPageToken == "" {
16328			return nil
16329		}
16330		c.PageToken(x.NextPageToken)
16331	}
16332}
16333
16334// method id "dfareporting.accounts.patch":
16335
16336type AccountsPatchCall struct {
16337	s          *Service
16338	profileId  int64
16339	account    *Account
16340	urlParams_ gensupport.URLParams
16341	ctx_       context.Context
16342	header_    http.Header
16343}
16344
16345// Patch: Updates an existing account. This method supports patch
16346// semantics.
16347func (r *AccountsService) Patch(profileId int64, id int64, account *Account) *AccountsPatchCall {
16348	c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16349	c.profileId = profileId
16350	c.urlParams_.Set("id", fmt.Sprint(id))
16351	c.account = account
16352	return c
16353}
16354
16355// Fields allows partial responses to be retrieved. See
16356// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16357// for more information.
16358func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall {
16359	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16360	return c
16361}
16362
16363// Context sets the context to be used in this call's Do method. Any
16364// pending HTTP request will be aborted if the provided context is
16365// canceled.
16366func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
16367	c.ctx_ = ctx
16368	return c
16369}
16370
16371// Header returns an http.Header that can be modified by the caller to
16372// add HTTP headers to the request.
16373func (c *AccountsPatchCall) Header() http.Header {
16374	if c.header_ == nil {
16375		c.header_ = make(http.Header)
16376	}
16377	return c.header_
16378}
16379
16380func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
16381	reqHeaders := make(http.Header)
16382	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16383	for k, v := range c.header_ {
16384		reqHeaders[k] = v
16385	}
16386	reqHeaders.Set("User-Agent", c.s.userAgent())
16387	var body io.Reader = nil
16388	body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
16389	if err != nil {
16390		return nil, err
16391	}
16392	reqHeaders.Set("Content-Type", "application/json")
16393	c.urlParams_.Set("alt", alt)
16394	c.urlParams_.Set("prettyPrint", "false")
16395	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16396	urls += "?" + c.urlParams_.Encode()
16397	req, err := http.NewRequest("PATCH", urls, body)
16398	if err != nil {
16399		return nil, err
16400	}
16401	req.Header = reqHeaders
16402	googleapi.Expand(req.URL, map[string]string{
16403		"profileId": strconv.FormatInt(c.profileId, 10),
16404	})
16405	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16406}
16407
16408// Do executes the "dfareporting.accounts.patch" call.
16409// Exactly one of *Account or error will be non-nil. Any non-2xx status
16410// code is an error. Response headers are in either
16411// *Account.ServerResponse.Header or (if a response was returned at all)
16412// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16413// check whether the returned error was because http.StatusNotModified
16414// was returned.
16415func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error) {
16416	gensupport.SetOptions(c.urlParams_, opts...)
16417	res, err := c.doRequest("json")
16418	if res != nil && res.StatusCode == http.StatusNotModified {
16419		if res.Body != nil {
16420			res.Body.Close()
16421		}
16422		return nil, &googleapi.Error{
16423			Code:   res.StatusCode,
16424			Header: res.Header,
16425		}
16426	}
16427	if err != nil {
16428		return nil, err
16429	}
16430	defer googleapi.CloseBody(res)
16431	if err := googleapi.CheckResponse(res); err != nil {
16432		return nil, err
16433	}
16434	ret := &Account{
16435		ServerResponse: googleapi.ServerResponse{
16436			Header:         res.Header,
16437			HTTPStatusCode: res.StatusCode,
16438		},
16439	}
16440	target := &ret
16441	if err := gensupport.DecodeResponse(target, res); err != nil {
16442		return nil, err
16443	}
16444	return ret, nil
16445	// {
16446	//   "description": "Updates an existing account. This method supports patch semantics.",
16447	//   "httpMethod": "PATCH",
16448	//   "id": "dfareporting.accounts.patch",
16449	//   "parameterOrder": [
16450	//     "profileId",
16451	//     "id"
16452	//   ],
16453	//   "parameters": {
16454	//     "id": {
16455	//       "description": "Account ID.",
16456	//       "format": "int64",
16457	//       "location": "query",
16458	//       "required": true,
16459	//       "type": "string"
16460	//     },
16461	//     "profileId": {
16462	//       "description": "User profile ID associated with this request.",
16463	//       "format": "int64",
16464	//       "location": "path",
16465	//       "required": true,
16466	//       "type": "string"
16467	//     }
16468	//   },
16469	//   "path": "userprofiles/{profileId}/accounts",
16470	//   "request": {
16471	//     "$ref": "Account"
16472	//   },
16473	//   "response": {
16474	//     "$ref": "Account"
16475	//   },
16476	//   "scopes": [
16477	//     "https://www.googleapis.com/auth/dfatrafficking"
16478	//   ]
16479	// }
16480
16481}
16482
16483// method id "dfareporting.accounts.update":
16484
16485type AccountsUpdateCall struct {
16486	s          *Service
16487	profileId  int64
16488	account    *Account
16489	urlParams_ gensupport.URLParams
16490	ctx_       context.Context
16491	header_    http.Header
16492}
16493
16494// Update: Updates an existing account.
16495func (r *AccountsService) Update(profileId int64, account *Account) *AccountsUpdateCall {
16496	c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16497	c.profileId = profileId
16498	c.account = account
16499	return c
16500}
16501
16502// Fields allows partial responses to be retrieved. See
16503// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16504// for more information.
16505func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall {
16506	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16507	return c
16508}
16509
16510// Context sets the context to be used in this call's Do method. Any
16511// pending HTTP request will be aborted if the provided context is
16512// canceled.
16513func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
16514	c.ctx_ = ctx
16515	return c
16516}
16517
16518// Header returns an http.Header that can be modified by the caller to
16519// add HTTP headers to the request.
16520func (c *AccountsUpdateCall) Header() http.Header {
16521	if c.header_ == nil {
16522		c.header_ = make(http.Header)
16523	}
16524	return c.header_
16525}
16526
16527func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
16528	reqHeaders := make(http.Header)
16529	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16530	for k, v := range c.header_ {
16531		reqHeaders[k] = v
16532	}
16533	reqHeaders.Set("User-Agent", c.s.userAgent())
16534	var body io.Reader = nil
16535	body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
16536	if err != nil {
16537		return nil, err
16538	}
16539	reqHeaders.Set("Content-Type", "application/json")
16540	c.urlParams_.Set("alt", alt)
16541	c.urlParams_.Set("prettyPrint", "false")
16542	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16543	urls += "?" + c.urlParams_.Encode()
16544	req, err := http.NewRequest("PUT", urls, body)
16545	if err != nil {
16546		return nil, err
16547	}
16548	req.Header = reqHeaders
16549	googleapi.Expand(req.URL, map[string]string{
16550		"profileId": strconv.FormatInt(c.profileId, 10),
16551	})
16552	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16553}
16554
16555// Do executes the "dfareporting.accounts.update" call.
16556// Exactly one of *Account or error will be non-nil. Any non-2xx status
16557// code is an error. Response headers are in either
16558// *Account.ServerResponse.Header or (if a response was returned at all)
16559// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16560// check whether the returned error was because http.StatusNotModified
16561// was returned.
16562func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) {
16563	gensupport.SetOptions(c.urlParams_, opts...)
16564	res, err := c.doRequest("json")
16565	if res != nil && res.StatusCode == http.StatusNotModified {
16566		if res.Body != nil {
16567			res.Body.Close()
16568		}
16569		return nil, &googleapi.Error{
16570			Code:   res.StatusCode,
16571			Header: res.Header,
16572		}
16573	}
16574	if err != nil {
16575		return nil, err
16576	}
16577	defer googleapi.CloseBody(res)
16578	if err := googleapi.CheckResponse(res); err != nil {
16579		return nil, err
16580	}
16581	ret := &Account{
16582		ServerResponse: googleapi.ServerResponse{
16583			Header:         res.Header,
16584			HTTPStatusCode: res.StatusCode,
16585		},
16586	}
16587	target := &ret
16588	if err := gensupport.DecodeResponse(target, res); err != nil {
16589		return nil, err
16590	}
16591	return ret, nil
16592	// {
16593	//   "description": "Updates an existing account.",
16594	//   "httpMethod": "PUT",
16595	//   "id": "dfareporting.accounts.update",
16596	//   "parameterOrder": [
16597	//     "profileId"
16598	//   ],
16599	//   "parameters": {
16600	//     "profileId": {
16601	//       "description": "User profile ID associated with this request.",
16602	//       "format": "int64",
16603	//       "location": "path",
16604	//       "required": true,
16605	//       "type": "string"
16606	//     }
16607	//   },
16608	//   "path": "userprofiles/{profileId}/accounts",
16609	//   "request": {
16610	//     "$ref": "Account"
16611	//   },
16612	//   "response": {
16613	//     "$ref": "Account"
16614	//   },
16615	//   "scopes": [
16616	//     "https://www.googleapis.com/auth/dfatrafficking"
16617	//   ]
16618	// }
16619
16620}
16621
16622// method id "dfareporting.ads.get":
16623
16624type AdsGetCall struct {
16625	s            *Service
16626	profileId    int64
16627	id           int64
16628	urlParams_   gensupport.URLParams
16629	ifNoneMatch_ string
16630	ctx_         context.Context
16631	header_      http.Header
16632}
16633
16634// Get: Gets one ad by ID.
16635func (r *AdsService) Get(profileId int64, id int64) *AdsGetCall {
16636	c := &AdsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16637	c.profileId = profileId
16638	c.id = id
16639	return c
16640}
16641
16642// Fields allows partial responses to be retrieved. See
16643// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16644// for more information.
16645func (c *AdsGetCall) Fields(s ...googleapi.Field) *AdsGetCall {
16646	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16647	return c
16648}
16649
16650// IfNoneMatch sets the optional parameter which makes the operation
16651// fail if the object's ETag matches the given value. This is useful for
16652// getting updates only after the object has changed since the last
16653// request. Use googleapi.IsNotModified to check whether the response
16654// error from Do is the result of In-None-Match.
16655func (c *AdsGetCall) IfNoneMatch(entityTag string) *AdsGetCall {
16656	c.ifNoneMatch_ = entityTag
16657	return c
16658}
16659
16660// Context sets the context to be used in this call's Do method. Any
16661// pending HTTP request will be aborted if the provided context is
16662// canceled.
16663func (c *AdsGetCall) Context(ctx context.Context) *AdsGetCall {
16664	c.ctx_ = ctx
16665	return c
16666}
16667
16668// Header returns an http.Header that can be modified by the caller to
16669// add HTTP headers to the request.
16670func (c *AdsGetCall) Header() http.Header {
16671	if c.header_ == nil {
16672		c.header_ = make(http.Header)
16673	}
16674	return c.header_
16675}
16676
16677func (c *AdsGetCall) doRequest(alt string) (*http.Response, error) {
16678	reqHeaders := make(http.Header)
16679	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16680	for k, v := range c.header_ {
16681		reqHeaders[k] = v
16682	}
16683	reqHeaders.Set("User-Agent", c.s.userAgent())
16684	if c.ifNoneMatch_ != "" {
16685		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16686	}
16687	var body io.Reader = nil
16688	c.urlParams_.Set("alt", alt)
16689	c.urlParams_.Set("prettyPrint", "false")
16690	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads/{id}")
16691	urls += "?" + c.urlParams_.Encode()
16692	req, err := http.NewRequest("GET", urls, body)
16693	if err != nil {
16694		return nil, err
16695	}
16696	req.Header = reqHeaders
16697	googleapi.Expand(req.URL, map[string]string{
16698		"profileId": strconv.FormatInt(c.profileId, 10),
16699		"id":        strconv.FormatInt(c.id, 10),
16700	})
16701	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16702}
16703
16704// Do executes the "dfareporting.ads.get" call.
16705// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
16706// is an error. Response headers are in either *Ad.ServerResponse.Header
16707// or (if a response was returned at all) in
16708// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16709// whether the returned error was because http.StatusNotModified was
16710// returned.
16711func (c *AdsGetCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
16712	gensupport.SetOptions(c.urlParams_, opts...)
16713	res, err := c.doRequest("json")
16714	if res != nil && res.StatusCode == http.StatusNotModified {
16715		if res.Body != nil {
16716			res.Body.Close()
16717		}
16718		return nil, &googleapi.Error{
16719			Code:   res.StatusCode,
16720			Header: res.Header,
16721		}
16722	}
16723	if err != nil {
16724		return nil, err
16725	}
16726	defer googleapi.CloseBody(res)
16727	if err := googleapi.CheckResponse(res); err != nil {
16728		return nil, err
16729	}
16730	ret := &Ad{
16731		ServerResponse: googleapi.ServerResponse{
16732			Header:         res.Header,
16733			HTTPStatusCode: res.StatusCode,
16734		},
16735	}
16736	target := &ret
16737	if err := gensupport.DecodeResponse(target, res); err != nil {
16738		return nil, err
16739	}
16740	return ret, nil
16741	// {
16742	//   "description": "Gets one ad by ID.",
16743	//   "httpMethod": "GET",
16744	//   "id": "dfareporting.ads.get",
16745	//   "parameterOrder": [
16746	//     "profileId",
16747	//     "id"
16748	//   ],
16749	//   "parameters": {
16750	//     "id": {
16751	//       "description": "Ad ID.",
16752	//       "format": "int64",
16753	//       "location": "path",
16754	//       "required": true,
16755	//       "type": "string"
16756	//     },
16757	//     "profileId": {
16758	//       "description": "User profile ID associated with this request.",
16759	//       "format": "int64",
16760	//       "location": "path",
16761	//       "required": true,
16762	//       "type": "string"
16763	//     }
16764	//   },
16765	//   "path": "userprofiles/{profileId}/ads/{id}",
16766	//   "response": {
16767	//     "$ref": "Ad"
16768	//   },
16769	//   "scopes": [
16770	//     "https://www.googleapis.com/auth/dfatrafficking"
16771	//   ]
16772	// }
16773
16774}
16775
16776// method id "dfareporting.ads.insert":
16777
16778type AdsInsertCall struct {
16779	s          *Service
16780	profileId  int64
16781	ad         *Ad
16782	urlParams_ gensupport.URLParams
16783	ctx_       context.Context
16784	header_    http.Header
16785}
16786
16787// Insert: Inserts a new ad.
16788func (r *AdsService) Insert(profileId int64, ad *Ad) *AdsInsertCall {
16789	c := &AdsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16790	c.profileId = profileId
16791	c.ad = ad
16792	return c
16793}
16794
16795// Fields allows partial responses to be retrieved. See
16796// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16797// for more information.
16798func (c *AdsInsertCall) Fields(s ...googleapi.Field) *AdsInsertCall {
16799	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16800	return c
16801}
16802
16803// Context sets the context to be used in this call's Do method. Any
16804// pending HTTP request will be aborted if the provided context is
16805// canceled.
16806func (c *AdsInsertCall) Context(ctx context.Context) *AdsInsertCall {
16807	c.ctx_ = ctx
16808	return c
16809}
16810
16811// Header returns an http.Header that can be modified by the caller to
16812// add HTTP headers to the request.
16813func (c *AdsInsertCall) Header() http.Header {
16814	if c.header_ == nil {
16815		c.header_ = make(http.Header)
16816	}
16817	return c.header_
16818}
16819
16820func (c *AdsInsertCall) doRequest(alt string) (*http.Response, error) {
16821	reqHeaders := make(http.Header)
16822	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
16823	for k, v := range c.header_ {
16824		reqHeaders[k] = v
16825	}
16826	reqHeaders.Set("User-Agent", c.s.userAgent())
16827	var body io.Reader = nil
16828	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
16829	if err != nil {
16830		return nil, err
16831	}
16832	reqHeaders.Set("Content-Type", "application/json")
16833	c.urlParams_.Set("alt", alt)
16834	c.urlParams_.Set("prettyPrint", "false")
16835	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
16836	urls += "?" + c.urlParams_.Encode()
16837	req, err := http.NewRequest("POST", urls, body)
16838	if err != nil {
16839		return nil, err
16840	}
16841	req.Header = reqHeaders
16842	googleapi.Expand(req.URL, map[string]string{
16843		"profileId": strconv.FormatInt(c.profileId, 10),
16844	})
16845	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16846}
16847
16848// Do executes the "dfareporting.ads.insert" call.
16849// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
16850// is an error. Response headers are in either *Ad.ServerResponse.Header
16851// or (if a response was returned at all) in
16852// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16853// whether the returned error was because http.StatusNotModified was
16854// returned.
16855func (c *AdsInsertCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
16856	gensupport.SetOptions(c.urlParams_, opts...)
16857	res, err := c.doRequest("json")
16858	if res != nil && res.StatusCode == http.StatusNotModified {
16859		if res.Body != nil {
16860			res.Body.Close()
16861		}
16862		return nil, &googleapi.Error{
16863			Code:   res.StatusCode,
16864			Header: res.Header,
16865		}
16866	}
16867	if err != nil {
16868		return nil, err
16869	}
16870	defer googleapi.CloseBody(res)
16871	if err := googleapi.CheckResponse(res); err != nil {
16872		return nil, err
16873	}
16874	ret := &Ad{
16875		ServerResponse: googleapi.ServerResponse{
16876			Header:         res.Header,
16877			HTTPStatusCode: res.StatusCode,
16878		},
16879	}
16880	target := &ret
16881	if err := gensupport.DecodeResponse(target, res); err != nil {
16882		return nil, err
16883	}
16884	return ret, nil
16885	// {
16886	//   "description": "Inserts a new ad.",
16887	//   "httpMethod": "POST",
16888	//   "id": "dfareporting.ads.insert",
16889	//   "parameterOrder": [
16890	//     "profileId"
16891	//   ],
16892	//   "parameters": {
16893	//     "profileId": {
16894	//       "description": "User profile ID associated with this request.",
16895	//       "format": "int64",
16896	//       "location": "path",
16897	//       "required": true,
16898	//       "type": "string"
16899	//     }
16900	//   },
16901	//   "path": "userprofiles/{profileId}/ads",
16902	//   "request": {
16903	//     "$ref": "Ad"
16904	//   },
16905	//   "response": {
16906	//     "$ref": "Ad"
16907	//   },
16908	//   "scopes": [
16909	//     "https://www.googleapis.com/auth/dfatrafficking"
16910	//   ]
16911	// }
16912
16913}
16914
16915// method id "dfareporting.ads.list":
16916
16917type AdsListCall struct {
16918	s            *Service
16919	profileId    int64
16920	urlParams_   gensupport.URLParams
16921	ifNoneMatch_ string
16922	ctx_         context.Context
16923	header_      http.Header
16924}
16925
16926// List: Retrieves a list of ads, possibly filtered. This method
16927// supports paging.
16928func (r *AdsService) List(profileId int64) *AdsListCall {
16929	c := &AdsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16930	c.profileId = profileId
16931	return c
16932}
16933
16934// Active sets the optional parameter "active": Select only active ads.
16935func (c *AdsListCall) Active(active bool) *AdsListCall {
16936	c.urlParams_.Set("active", fmt.Sprint(active))
16937	return c
16938}
16939
16940// AdvertiserId sets the optional parameter "advertiserId": Select only
16941// ads with this advertiser ID.
16942func (c *AdsListCall) AdvertiserId(advertiserId int64) *AdsListCall {
16943	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
16944	return c
16945}
16946
16947// Archived sets the optional parameter "archived": Select only archived
16948// ads.
16949func (c *AdsListCall) Archived(archived bool) *AdsListCall {
16950	c.urlParams_.Set("archived", fmt.Sprint(archived))
16951	return c
16952}
16953
16954// AudienceSegmentIds sets the optional parameter "audienceSegmentIds":
16955// Select only ads with these audience segment IDs.
16956func (c *AdsListCall) AudienceSegmentIds(audienceSegmentIds ...int64) *AdsListCall {
16957	var audienceSegmentIds_ []string
16958	for _, v := range audienceSegmentIds {
16959		audienceSegmentIds_ = append(audienceSegmentIds_, fmt.Sprint(v))
16960	}
16961	c.urlParams_.SetMulti("audienceSegmentIds", audienceSegmentIds_)
16962	return c
16963}
16964
16965// CampaignIds sets the optional parameter "campaignIds": Select only
16966// ads with these campaign IDs.
16967func (c *AdsListCall) CampaignIds(campaignIds ...int64) *AdsListCall {
16968	var campaignIds_ []string
16969	for _, v := range campaignIds {
16970		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
16971	}
16972	c.urlParams_.SetMulti("campaignIds", campaignIds_)
16973	return c
16974}
16975
16976// Compatibility sets the optional parameter "compatibility": Select
16977// default ads with the specified compatibility. Applicable when type is
16978// AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to
16979// rendering either on desktop or on mobile devices for regular or
16980// interstitial ads, respectively. APP and APP_INTERSTITIAL are for
16981// rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an
16982// in-stream video ads developed with the VAST standard.
16983//
16984// Possible values:
16985//   "APP"
16986//   "APP_INTERSTITIAL"
16987//   "DISPLAY"
16988//   "DISPLAY_INTERSTITIAL"
16989//   "IN_STREAM_AUDIO"
16990//   "IN_STREAM_VIDEO"
16991func (c *AdsListCall) Compatibility(compatibility string) *AdsListCall {
16992	c.urlParams_.Set("compatibility", compatibility)
16993	return c
16994}
16995
16996// CreativeIds sets the optional parameter "creativeIds": Select only
16997// ads with these creative IDs assigned.
16998func (c *AdsListCall) CreativeIds(creativeIds ...int64) *AdsListCall {
16999	var creativeIds_ []string
17000	for _, v := range creativeIds {
17001		creativeIds_ = append(creativeIds_, fmt.Sprint(v))
17002	}
17003	c.urlParams_.SetMulti("creativeIds", creativeIds_)
17004	return c
17005}
17006
17007// CreativeOptimizationConfigurationIds sets the optional parameter
17008// "creativeOptimizationConfigurationIds": Select only ads with these
17009// creative optimization configuration IDs.
17010func (c *AdsListCall) CreativeOptimizationConfigurationIds(creativeOptimizationConfigurationIds ...int64) *AdsListCall {
17011	var creativeOptimizationConfigurationIds_ []string
17012	for _, v := range creativeOptimizationConfigurationIds {
17013		creativeOptimizationConfigurationIds_ = append(creativeOptimizationConfigurationIds_, fmt.Sprint(v))
17014	}
17015	c.urlParams_.SetMulti("creativeOptimizationConfigurationIds", creativeOptimizationConfigurationIds_)
17016	return c
17017}
17018
17019// DynamicClickTracker sets the optional parameter
17020// "dynamicClickTracker": Select only dynamic click trackers. Applicable
17021// when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click
17022// trackers. If false, select static click trackers. Leave unset to
17023// select both.
17024func (c *AdsListCall) DynamicClickTracker(dynamicClickTracker bool) *AdsListCall {
17025	c.urlParams_.Set("dynamicClickTracker", fmt.Sprint(dynamicClickTracker))
17026	return c
17027}
17028
17029// Ids sets the optional parameter "ids": Select only ads with these
17030// IDs.
17031func (c *AdsListCall) Ids(ids ...int64) *AdsListCall {
17032	var ids_ []string
17033	for _, v := range ids {
17034		ids_ = append(ids_, fmt.Sprint(v))
17035	}
17036	c.urlParams_.SetMulti("ids", ids_)
17037	return c
17038}
17039
17040// LandingPageIds sets the optional parameter "landingPageIds": Select
17041// only ads with these landing page IDs.
17042func (c *AdsListCall) LandingPageIds(landingPageIds ...int64) *AdsListCall {
17043	var landingPageIds_ []string
17044	for _, v := range landingPageIds {
17045		landingPageIds_ = append(landingPageIds_, fmt.Sprint(v))
17046	}
17047	c.urlParams_.SetMulti("landingPageIds", landingPageIds_)
17048	return c
17049}
17050
17051// MaxResults sets the optional parameter "maxResults": Maximum number
17052// of results to return.
17053func (c *AdsListCall) MaxResults(maxResults int64) *AdsListCall {
17054	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17055	return c
17056}
17057
17058// OverriddenEventTagId sets the optional parameter
17059// "overriddenEventTagId": Select only ads with this event tag override
17060// ID.
17061func (c *AdsListCall) OverriddenEventTagId(overriddenEventTagId int64) *AdsListCall {
17062	c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
17063	return c
17064}
17065
17066// PageToken sets the optional parameter "pageToken": Value of the
17067// nextPageToken from the previous result page.
17068func (c *AdsListCall) PageToken(pageToken string) *AdsListCall {
17069	c.urlParams_.Set("pageToken", pageToken)
17070	return c
17071}
17072
17073// PlacementIds sets the optional parameter "placementIds": Select only
17074// ads with these placement IDs assigned.
17075func (c *AdsListCall) PlacementIds(placementIds ...int64) *AdsListCall {
17076	var placementIds_ []string
17077	for _, v := range placementIds {
17078		placementIds_ = append(placementIds_, fmt.Sprint(v))
17079	}
17080	c.urlParams_.SetMulti("placementIds", placementIds_)
17081	return c
17082}
17083
17084// RemarketingListIds sets the optional parameter "remarketingListIds":
17085// Select only ads whose list targeting expression use these remarketing
17086// list IDs.
17087func (c *AdsListCall) RemarketingListIds(remarketingListIds ...int64) *AdsListCall {
17088	var remarketingListIds_ []string
17089	for _, v := range remarketingListIds {
17090		remarketingListIds_ = append(remarketingListIds_, fmt.Sprint(v))
17091	}
17092	c.urlParams_.SetMulti("remarketingListIds", remarketingListIds_)
17093	return c
17094}
17095
17096// SearchString sets the optional parameter "searchString": Allows
17097// searching for objects by name or ID. Wildcards (*) are allowed. For
17098// example, "ad*2015" will return objects with names like "ad June
17099// 2015", "ad April 2015", or simply "ad 2015". Most of the searches
17100// also add wildcards implicitly at the start and the end of the search
17101// string. For example, a search string of "ad" will match objects with
17102// name "my ad", "ad 2015", or simply "ad".
17103func (c *AdsListCall) SearchString(searchString string) *AdsListCall {
17104	c.urlParams_.Set("searchString", searchString)
17105	return c
17106}
17107
17108// SizeIds sets the optional parameter "sizeIds": Select only ads with
17109// these size IDs.
17110func (c *AdsListCall) SizeIds(sizeIds ...int64) *AdsListCall {
17111	var sizeIds_ []string
17112	for _, v := range sizeIds {
17113		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
17114	}
17115	c.urlParams_.SetMulti("sizeIds", sizeIds_)
17116	return c
17117}
17118
17119// SortField sets the optional parameter "sortField": Field by which to
17120// sort the list.
17121//
17122// Possible values:
17123//   "ID" (default)
17124//   "NAME"
17125func (c *AdsListCall) SortField(sortField string) *AdsListCall {
17126	c.urlParams_.Set("sortField", sortField)
17127	return c
17128}
17129
17130// SortOrder sets the optional parameter "sortOrder": Order of sorted
17131// results.
17132//
17133// Possible values:
17134//   "ASCENDING" (default)
17135//   "DESCENDING"
17136func (c *AdsListCall) SortOrder(sortOrder string) *AdsListCall {
17137	c.urlParams_.Set("sortOrder", sortOrder)
17138	return c
17139}
17140
17141// SslCompliant sets the optional parameter "sslCompliant": Select only
17142// ads that are SSL-compliant.
17143func (c *AdsListCall) SslCompliant(sslCompliant bool) *AdsListCall {
17144	c.urlParams_.Set("sslCompliant", fmt.Sprint(sslCompliant))
17145	return c
17146}
17147
17148// SslRequired sets the optional parameter "sslRequired": Select only
17149// ads that require SSL.
17150func (c *AdsListCall) SslRequired(sslRequired bool) *AdsListCall {
17151	c.urlParams_.Set("sslRequired", fmt.Sprint(sslRequired))
17152	return c
17153}
17154
17155// Type sets the optional parameter "type": Select only ads with these
17156// types.
17157//
17158// Possible values:
17159//   "AD_SERVING_CLICK_TRACKER"
17160//   "AD_SERVING_DEFAULT_AD"
17161//   "AD_SERVING_STANDARD_AD"
17162//   "AD_SERVING_TRACKING"
17163func (c *AdsListCall) Type(type_ ...string) *AdsListCall {
17164	c.urlParams_.SetMulti("type", append([]string{}, type_...))
17165	return c
17166}
17167
17168// Fields allows partial responses to be retrieved. See
17169// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17170// for more information.
17171func (c *AdsListCall) Fields(s ...googleapi.Field) *AdsListCall {
17172	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17173	return c
17174}
17175
17176// IfNoneMatch sets the optional parameter which makes the operation
17177// fail if the object's ETag matches the given value. This is useful for
17178// getting updates only after the object has changed since the last
17179// request. Use googleapi.IsNotModified to check whether the response
17180// error from Do is the result of In-None-Match.
17181func (c *AdsListCall) IfNoneMatch(entityTag string) *AdsListCall {
17182	c.ifNoneMatch_ = entityTag
17183	return c
17184}
17185
17186// Context sets the context to be used in this call's Do method. Any
17187// pending HTTP request will be aborted if the provided context is
17188// canceled.
17189func (c *AdsListCall) Context(ctx context.Context) *AdsListCall {
17190	c.ctx_ = ctx
17191	return c
17192}
17193
17194// Header returns an http.Header that can be modified by the caller to
17195// add HTTP headers to the request.
17196func (c *AdsListCall) Header() http.Header {
17197	if c.header_ == nil {
17198		c.header_ = make(http.Header)
17199	}
17200	return c.header_
17201}
17202
17203func (c *AdsListCall) doRequest(alt string) (*http.Response, error) {
17204	reqHeaders := make(http.Header)
17205	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17206	for k, v := range c.header_ {
17207		reqHeaders[k] = v
17208	}
17209	reqHeaders.Set("User-Agent", c.s.userAgent())
17210	if c.ifNoneMatch_ != "" {
17211		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17212	}
17213	var body io.Reader = nil
17214	c.urlParams_.Set("alt", alt)
17215	c.urlParams_.Set("prettyPrint", "false")
17216	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17217	urls += "?" + c.urlParams_.Encode()
17218	req, err := http.NewRequest("GET", urls, body)
17219	if err != nil {
17220		return nil, err
17221	}
17222	req.Header = reqHeaders
17223	googleapi.Expand(req.URL, map[string]string{
17224		"profileId": strconv.FormatInt(c.profileId, 10),
17225	})
17226	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17227}
17228
17229// Do executes the "dfareporting.ads.list" call.
17230// Exactly one of *AdsListResponse or error will be non-nil. Any non-2xx
17231// status code is an error. Response headers are in either
17232// *AdsListResponse.ServerResponse.Header or (if a response was returned
17233// at all) in error.(*googleapi.Error).Header. Use
17234// googleapi.IsNotModified to check whether the returned error was
17235// because http.StatusNotModified was returned.
17236func (c *AdsListCall) Do(opts ...googleapi.CallOption) (*AdsListResponse, error) {
17237	gensupport.SetOptions(c.urlParams_, opts...)
17238	res, err := c.doRequest("json")
17239	if res != nil && res.StatusCode == http.StatusNotModified {
17240		if res.Body != nil {
17241			res.Body.Close()
17242		}
17243		return nil, &googleapi.Error{
17244			Code:   res.StatusCode,
17245			Header: res.Header,
17246		}
17247	}
17248	if err != nil {
17249		return nil, err
17250	}
17251	defer googleapi.CloseBody(res)
17252	if err := googleapi.CheckResponse(res); err != nil {
17253		return nil, err
17254	}
17255	ret := &AdsListResponse{
17256		ServerResponse: googleapi.ServerResponse{
17257			Header:         res.Header,
17258			HTTPStatusCode: res.StatusCode,
17259		},
17260	}
17261	target := &ret
17262	if err := gensupport.DecodeResponse(target, res); err != nil {
17263		return nil, err
17264	}
17265	return ret, nil
17266	// {
17267	//   "description": "Retrieves a list of ads, possibly filtered. This method supports paging.",
17268	//   "httpMethod": "GET",
17269	//   "id": "dfareporting.ads.list",
17270	//   "parameterOrder": [
17271	//     "profileId"
17272	//   ],
17273	//   "parameters": {
17274	//     "active": {
17275	//       "description": "Select only active ads.",
17276	//       "location": "query",
17277	//       "type": "boolean"
17278	//     },
17279	//     "advertiserId": {
17280	//       "description": "Select only ads with this advertiser ID.",
17281	//       "format": "int64",
17282	//       "location": "query",
17283	//       "type": "string"
17284	//     },
17285	//     "archived": {
17286	//       "description": "Select only archived ads.",
17287	//       "location": "query",
17288	//       "type": "boolean"
17289	//     },
17290	//     "audienceSegmentIds": {
17291	//       "description": "Select only ads with these audience segment IDs.",
17292	//       "format": "int64",
17293	//       "location": "query",
17294	//       "repeated": true,
17295	//       "type": "string"
17296	//     },
17297	//     "campaignIds": {
17298	//       "description": "Select only ads with these campaign IDs.",
17299	//       "format": "int64",
17300	//       "location": "query",
17301	//       "repeated": true,
17302	//       "type": "string"
17303	//     },
17304	//     "compatibility": {
17305	//       "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.",
17306	//       "enum": [
17307	//         "APP",
17308	//         "APP_INTERSTITIAL",
17309	//         "DISPLAY",
17310	//         "DISPLAY_INTERSTITIAL",
17311	//         "IN_STREAM_AUDIO",
17312	//         "IN_STREAM_VIDEO"
17313	//       ],
17314	//       "enumDescriptions": [
17315	//         "",
17316	//         "",
17317	//         "",
17318	//         "",
17319	//         "",
17320	//         ""
17321	//       ],
17322	//       "location": "query",
17323	//       "type": "string"
17324	//     },
17325	//     "creativeIds": {
17326	//       "description": "Select only ads with these creative IDs assigned.",
17327	//       "format": "int64",
17328	//       "location": "query",
17329	//       "repeated": true,
17330	//       "type": "string"
17331	//     },
17332	//     "creativeOptimizationConfigurationIds": {
17333	//       "description": "Select only ads with these creative optimization configuration IDs.",
17334	//       "format": "int64",
17335	//       "location": "query",
17336	//       "repeated": true,
17337	//       "type": "string"
17338	//     },
17339	//     "dynamicClickTracker": {
17340	//       "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.",
17341	//       "location": "query",
17342	//       "type": "boolean"
17343	//     },
17344	//     "ids": {
17345	//       "description": "Select only ads with these IDs.",
17346	//       "format": "int64",
17347	//       "location": "query",
17348	//       "repeated": true,
17349	//       "type": "string"
17350	//     },
17351	//     "landingPageIds": {
17352	//       "description": "Select only ads with these landing page IDs.",
17353	//       "format": "int64",
17354	//       "location": "query",
17355	//       "repeated": true,
17356	//       "type": "string"
17357	//     },
17358	//     "maxResults": {
17359	//       "default": "1000",
17360	//       "description": "Maximum number of results to return.",
17361	//       "format": "int32",
17362	//       "location": "query",
17363	//       "maximum": "1000",
17364	//       "minimum": "0",
17365	//       "type": "integer"
17366	//     },
17367	//     "overriddenEventTagId": {
17368	//       "description": "Select only ads with this event tag override ID.",
17369	//       "format": "int64",
17370	//       "location": "query",
17371	//       "type": "string"
17372	//     },
17373	//     "pageToken": {
17374	//       "description": "Value of the nextPageToken from the previous result page.",
17375	//       "location": "query",
17376	//       "type": "string"
17377	//     },
17378	//     "placementIds": {
17379	//       "description": "Select only ads with these placement IDs assigned.",
17380	//       "format": "int64",
17381	//       "location": "query",
17382	//       "repeated": true,
17383	//       "type": "string"
17384	//     },
17385	//     "profileId": {
17386	//       "description": "User profile ID associated with this request.",
17387	//       "format": "int64",
17388	//       "location": "path",
17389	//       "required": true,
17390	//       "type": "string"
17391	//     },
17392	//     "remarketingListIds": {
17393	//       "description": "Select only ads whose list targeting expression use these remarketing list IDs.",
17394	//       "format": "int64",
17395	//       "location": "query",
17396	//       "repeated": true,
17397	//       "type": "string"
17398	//     },
17399	//     "searchString": {
17400	//       "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\".",
17401	//       "location": "query",
17402	//       "type": "string"
17403	//     },
17404	//     "sizeIds": {
17405	//       "description": "Select only ads with these size IDs.",
17406	//       "format": "int64",
17407	//       "location": "query",
17408	//       "repeated": true,
17409	//       "type": "string"
17410	//     },
17411	//     "sortField": {
17412	//       "default": "ID",
17413	//       "description": "Field by which to sort the list.",
17414	//       "enum": [
17415	//         "ID",
17416	//         "NAME"
17417	//       ],
17418	//       "enumDescriptions": [
17419	//         "",
17420	//         ""
17421	//       ],
17422	//       "location": "query",
17423	//       "type": "string"
17424	//     },
17425	//     "sortOrder": {
17426	//       "default": "ASCENDING",
17427	//       "description": "Order of sorted results.",
17428	//       "enum": [
17429	//         "ASCENDING",
17430	//         "DESCENDING"
17431	//       ],
17432	//       "enumDescriptions": [
17433	//         "",
17434	//         ""
17435	//       ],
17436	//       "location": "query",
17437	//       "type": "string"
17438	//     },
17439	//     "sslCompliant": {
17440	//       "description": "Select only ads that are SSL-compliant.",
17441	//       "location": "query",
17442	//       "type": "boolean"
17443	//     },
17444	//     "sslRequired": {
17445	//       "description": "Select only ads that require SSL.",
17446	//       "location": "query",
17447	//       "type": "boolean"
17448	//     },
17449	//     "type": {
17450	//       "description": "Select only ads with these types.",
17451	//       "enum": [
17452	//         "AD_SERVING_CLICK_TRACKER",
17453	//         "AD_SERVING_DEFAULT_AD",
17454	//         "AD_SERVING_STANDARD_AD",
17455	//         "AD_SERVING_TRACKING"
17456	//       ],
17457	//       "enumDescriptions": [
17458	//         "",
17459	//         "",
17460	//         "",
17461	//         ""
17462	//       ],
17463	//       "location": "query",
17464	//       "repeated": true,
17465	//       "type": "string"
17466	//     }
17467	//   },
17468	//   "path": "userprofiles/{profileId}/ads",
17469	//   "response": {
17470	//     "$ref": "AdsListResponse"
17471	//   },
17472	//   "scopes": [
17473	//     "https://www.googleapis.com/auth/dfatrafficking"
17474	//   ]
17475	// }
17476
17477}
17478
17479// Pages invokes f for each page of results.
17480// A non-nil error returned from f will halt the iteration.
17481// The provided context supersedes any context provided to the Context method.
17482func (c *AdsListCall) Pages(ctx context.Context, f func(*AdsListResponse) error) error {
17483	c.ctx_ = ctx
17484	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17485	for {
17486		x, err := c.Do()
17487		if err != nil {
17488			return err
17489		}
17490		if err := f(x); err != nil {
17491			return err
17492		}
17493		if x.NextPageToken == "" {
17494			return nil
17495		}
17496		c.PageToken(x.NextPageToken)
17497	}
17498}
17499
17500// method id "dfareporting.ads.patch":
17501
17502type AdsPatchCall struct {
17503	s          *Service
17504	profileId  int64
17505	ad         *Ad
17506	urlParams_ gensupport.URLParams
17507	ctx_       context.Context
17508	header_    http.Header
17509}
17510
17511// Patch: Updates an existing ad. This method supports patch semantics.
17512func (r *AdsService) Patch(profileId int64, id int64, ad *Ad) *AdsPatchCall {
17513	c := &AdsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17514	c.profileId = profileId
17515	c.urlParams_.Set("id", fmt.Sprint(id))
17516	c.ad = ad
17517	return c
17518}
17519
17520// Fields allows partial responses to be retrieved. See
17521// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17522// for more information.
17523func (c *AdsPatchCall) Fields(s ...googleapi.Field) *AdsPatchCall {
17524	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17525	return c
17526}
17527
17528// Context sets the context to be used in this call's Do method. Any
17529// pending HTTP request will be aborted if the provided context is
17530// canceled.
17531func (c *AdsPatchCall) Context(ctx context.Context) *AdsPatchCall {
17532	c.ctx_ = ctx
17533	return c
17534}
17535
17536// Header returns an http.Header that can be modified by the caller to
17537// add HTTP headers to the request.
17538func (c *AdsPatchCall) Header() http.Header {
17539	if c.header_ == nil {
17540		c.header_ = make(http.Header)
17541	}
17542	return c.header_
17543}
17544
17545func (c *AdsPatchCall) doRequest(alt string) (*http.Response, error) {
17546	reqHeaders := make(http.Header)
17547	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17548	for k, v := range c.header_ {
17549		reqHeaders[k] = v
17550	}
17551	reqHeaders.Set("User-Agent", c.s.userAgent())
17552	var body io.Reader = nil
17553	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17554	if err != nil {
17555		return nil, err
17556	}
17557	reqHeaders.Set("Content-Type", "application/json")
17558	c.urlParams_.Set("alt", alt)
17559	c.urlParams_.Set("prettyPrint", "false")
17560	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17561	urls += "?" + c.urlParams_.Encode()
17562	req, err := http.NewRequest("PATCH", urls, body)
17563	if err != nil {
17564		return nil, err
17565	}
17566	req.Header = reqHeaders
17567	googleapi.Expand(req.URL, map[string]string{
17568		"profileId": strconv.FormatInt(c.profileId, 10),
17569	})
17570	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17571}
17572
17573// Do executes the "dfareporting.ads.patch" call.
17574// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
17575// is an error. Response headers are in either *Ad.ServerResponse.Header
17576// or (if a response was returned at all) in
17577// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17578// whether the returned error was because http.StatusNotModified was
17579// returned.
17580func (c *AdsPatchCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17581	gensupport.SetOptions(c.urlParams_, opts...)
17582	res, err := c.doRequest("json")
17583	if res != nil && res.StatusCode == http.StatusNotModified {
17584		if res.Body != nil {
17585			res.Body.Close()
17586		}
17587		return nil, &googleapi.Error{
17588			Code:   res.StatusCode,
17589			Header: res.Header,
17590		}
17591	}
17592	if err != nil {
17593		return nil, err
17594	}
17595	defer googleapi.CloseBody(res)
17596	if err := googleapi.CheckResponse(res); err != nil {
17597		return nil, err
17598	}
17599	ret := &Ad{
17600		ServerResponse: googleapi.ServerResponse{
17601			Header:         res.Header,
17602			HTTPStatusCode: res.StatusCode,
17603		},
17604	}
17605	target := &ret
17606	if err := gensupport.DecodeResponse(target, res); err != nil {
17607		return nil, err
17608	}
17609	return ret, nil
17610	// {
17611	//   "description": "Updates an existing ad. This method supports patch semantics.",
17612	//   "httpMethod": "PATCH",
17613	//   "id": "dfareporting.ads.patch",
17614	//   "parameterOrder": [
17615	//     "profileId",
17616	//     "id"
17617	//   ],
17618	//   "parameters": {
17619	//     "id": {
17620	//       "description": "Ad ID.",
17621	//       "format": "int64",
17622	//       "location": "query",
17623	//       "required": true,
17624	//       "type": "string"
17625	//     },
17626	//     "profileId": {
17627	//       "description": "User profile ID associated with this request.",
17628	//       "format": "int64",
17629	//       "location": "path",
17630	//       "required": true,
17631	//       "type": "string"
17632	//     }
17633	//   },
17634	//   "path": "userprofiles/{profileId}/ads",
17635	//   "request": {
17636	//     "$ref": "Ad"
17637	//   },
17638	//   "response": {
17639	//     "$ref": "Ad"
17640	//   },
17641	//   "scopes": [
17642	//     "https://www.googleapis.com/auth/dfatrafficking"
17643	//   ]
17644	// }
17645
17646}
17647
17648// method id "dfareporting.ads.update":
17649
17650type AdsUpdateCall struct {
17651	s          *Service
17652	profileId  int64
17653	ad         *Ad
17654	urlParams_ gensupport.URLParams
17655	ctx_       context.Context
17656	header_    http.Header
17657}
17658
17659// Update: Updates an existing ad.
17660func (r *AdsService) Update(profileId int64, ad *Ad) *AdsUpdateCall {
17661	c := &AdsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17662	c.profileId = profileId
17663	c.ad = ad
17664	return c
17665}
17666
17667// Fields allows partial responses to be retrieved. See
17668// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17669// for more information.
17670func (c *AdsUpdateCall) Fields(s ...googleapi.Field) *AdsUpdateCall {
17671	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17672	return c
17673}
17674
17675// Context sets the context to be used in this call's Do method. Any
17676// pending HTTP request will be aborted if the provided context is
17677// canceled.
17678func (c *AdsUpdateCall) Context(ctx context.Context) *AdsUpdateCall {
17679	c.ctx_ = ctx
17680	return c
17681}
17682
17683// Header returns an http.Header that can be modified by the caller to
17684// add HTTP headers to the request.
17685func (c *AdsUpdateCall) Header() http.Header {
17686	if c.header_ == nil {
17687		c.header_ = make(http.Header)
17688	}
17689	return c.header_
17690}
17691
17692func (c *AdsUpdateCall) doRequest(alt string) (*http.Response, error) {
17693	reqHeaders := make(http.Header)
17694	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17695	for k, v := range c.header_ {
17696		reqHeaders[k] = v
17697	}
17698	reqHeaders.Set("User-Agent", c.s.userAgent())
17699	var body io.Reader = nil
17700	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17701	if err != nil {
17702		return nil, err
17703	}
17704	reqHeaders.Set("Content-Type", "application/json")
17705	c.urlParams_.Set("alt", alt)
17706	c.urlParams_.Set("prettyPrint", "false")
17707	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17708	urls += "?" + c.urlParams_.Encode()
17709	req, err := http.NewRequest("PUT", urls, body)
17710	if err != nil {
17711		return nil, err
17712	}
17713	req.Header = reqHeaders
17714	googleapi.Expand(req.URL, map[string]string{
17715		"profileId": strconv.FormatInt(c.profileId, 10),
17716	})
17717	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17718}
17719
17720// Do executes the "dfareporting.ads.update" call.
17721// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
17722// is an error. Response headers are in either *Ad.ServerResponse.Header
17723// or (if a response was returned at all) in
17724// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17725// whether the returned error was because http.StatusNotModified was
17726// returned.
17727func (c *AdsUpdateCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17728	gensupport.SetOptions(c.urlParams_, opts...)
17729	res, err := c.doRequest("json")
17730	if res != nil && res.StatusCode == http.StatusNotModified {
17731		if res.Body != nil {
17732			res.Body.Close()
17733		}
17734		return nil, &googleapi.Error{
17735			Code:   res.StatusCode,
17736			Header: res.Header,
17737		}
17738	}
17739	if err != nil {
17740		return nil, err
17741	}
17742	defer googleapi.CloseBody(res)
17743	if err := googleapi.CheckResponse(res); err != nil {
17744		return nil, err
17745	}
17746	ret := &Ad{
17747		ServerResponse: googleapi.ServerResponse{
17748			Header:         res.Header,
17749			HTTPStatusCode: res.StatusCode,
17750		},
17751	}
17752	target := &ret
17753	if err := gensupport.DecodeResponse(target, res); err != nil {
17754		return nil, err
17755	}
17756	return ret, nil
17757	// {
17758	//   "description": "Updates an existing ad.",
17759	//   "httpMethod": "PUT",
17760	//   "id": "dfareporting.ads.update",
17761	//   "parameterOrder": [
17762	//     "profileId"
17763	//   ],
17764	//   "parameters": {
17765	//     "profileId": {
17766	//       "description": "User profile ID associated with this request.",
17767	//       "format": "int64",
17768	//       "location": "path",
17769	//       "required": true,
17770	//       "type": "string"
17771	//     }
17772	//   },
17773	//   "path": "userprofiles/{profileId}/ads",
17774	//   "request": {
17775	//     "$ref": "Ad"
17776	//   },
17777	//   "response": {
17778	//     "$ref": "Ad"
17779	//   },
17780	//   "scopes": [
17781	//     "https://www.googleapis.com/auth/dfatrafficking"
17782	//   ]
17783	// }
17784
17785}
17786
17787// method id "dfareporting.advertiserGroups.delete":
17788
17789type AdvertiserGroupsDeleteCall struct {
17790	s          *Service
17791	profileId  int64
17792	id         int64
17793	urlParams_ gensupport.URLParams
17794	ctx_       context.Context
17795	header_    http.Header
17796}
17797
17798// Delete: Deletes an existing advertiser group.
17799func (r *AdvertiserGroupsService) Delete(profileId int64, id int64) *AdvertiserGroupsDeleteCall {
17800	c := &AdvertiserGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17801	c.profileId = profileId
17802	c.id = id
17803	return c
17804}
17805
17806// Fields allows partial responses to be retrieved. See
17807// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17808// for more information.
17809func (c *AdvertiserGroupsDeleteCall) Fields(s ...googleapi.Field) *AdvertiserGroupsDeleteCall {
17810	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17811	return c
17812}
17813
17814// Context sets the context to be used in this call's Do method. Any
17815// pending HTTP request will be aborted if the provided context is
17816// canceled.
17817func (c *AdvertiserGroupsDeleteCall) Context(ctx context.Context) *AdvertiserGroupsDeleteCall {
17818	c.ctx_ = ctx
17819	return c
17820}
17821
17822// Header returns an http.Header that can be modified by the caller to
17823// add HTTP headers to the request.
17824func (c *AdvertiserGroupsDeleteCall) Header() http.Header {
17825	if c.header_ == nil {
17826		c.header_ = make(http.Header)
17827	}
17828	return c.header_
17829}
17830
17831func (c *AdvertiserGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
17832	reqHeaders := make(http.Header)
17833	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17834	for k, v := range c.header_ {
17835		reqHeaders[k] = v
17836	}
17837	reqHeaders.Set("User-Agent", c.s.userAgent())
17838	var body io.Reader = nil
17839	c.urlParams_.Set("alt", alt)
17840	c.urlParams_.Set("prettyPrint", "false")
17841	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
17842	urls += "?" + c.urlParams_.Encode()
17843	req, err := http.NewRequest("DELETE", urls, body)
17844	if err != nil {
17845		return nil, err
17846	}
17847	req.Header = reqHeaders
17848	googleapi.Expand(req.URL, map[string]string{
17849		"profileId": strconv.FormatInt(c.profileId, 10),
17850		"id":        strconv.FormatInt(c.id, 10),
17851	})
17852	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17853}
17854
17855// Do executes the "dfareporting.advertiserGroups.delete" call.
17856func (c *AdvertiserGroupsDeleteCall) Do(opts ...googleapi.CallOption) error {
17857	gensupport.SetOptions(c.urlParams_, opts...)
17858	res, err := c.doRequest("json")
17859	if err != nil {
17860		return err
17861	}
17862	defer googleapi.CloseBody(res)
17863	if err := googleapi.CheckResponse(res); err != nil {
17864		return err
17865	}
17866	return nil
17867	// {
17868	//   "description": "Deletes an existing advertiser group.",
17869	//   "httpMethod": "DELETE",
17870	//   "id": "dfareporting.advertiserGroups.delete",
17871	//   "parameterOrder": [
17872	//     "profileId",
17873	//     "id"
17874	//   ],
17875	//   "parameters": {
17876	//     "id": {
17877	//       "description": "Advertiser group ID.",
17878	//       "format": "int64",
17879	//       "location": "path",
17880	//       "required": true,
17881	//       "type": "string"
17882	//     },
17883	//     "profileId": {
17884	//       "description": "User profile ID associated with this request.",
17885	//       "format": "int64",
17886	//       "location": "path",
17887	//       "required": true,
17888	//       "type": "string"
17889	//     }
17890	//   },
17891	//   "path": "userprofiles/{profileId}/advertiserGroups/{id}",
17892	//   "scopes": [
17893	//     "https://www.googleapis.com/auth/dfatrafficking"
17894	//   ]
17895	// }
17896
17897}
17898
17899// method id "dfareporting.advertiserGroups.get":
17900
17901type AdvertiserGroupsGetCall struct {
17902	s            *Service
17903	profileId    int64
17904	id           int64
17905	urlParams_   gensupport.URLParams
17906	ifNoneMatch_ string
17907	ctx_         context.Context
17908	header_      http.Header
17909}
17910
17911// Get: Gets one advertiser group by ID.
17912func (r *AdvertiserGroupsService) Get(profileId int64, id int64) *AdvertiserGroupsGetCall {
17913	c := &AdvertiserGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17914	c.profileId = profileId
17915	c.id = id
17916	return c
17917}
17918
17919// Fields allows partial responses to be retrieved. See
17920// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17921// for more information.
17922func (c *AdvertiserGroupsGetCall) Fields(s ...googleapi.Field) *AdvertiserGroupsGetCall {
17923	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17924	return c
17925}
17926
17927// IfNoneMatch sets the optional parameter which makes the operation
17928// fail if the object's ETag matches the given value. This is useful for
17929// getting updates only after the object has changed since the last
17930// request. Use googleapi.IsNotModified to check whether the response
17931// error from Do is the result of In-None-Match.
17932func (c *AdvertiserGroupsGetCall) IfNoneMatch(entityTag string) *AdvertiserGroupsGetCall {
17933	c.ifNoneMatch_ = entityTag
17934	return c
17935}
17936
17937// Context sets the context to be used in this call's Do method. Any
17938// pending HTTP request will be aborted if the provided context is
17939// canceled.
17940func (c *AdvertiserGroupsGetCall) Context(ctx context.Context) *AdvertiserGroupsGetCall {
17941	c.ctx_ = ctx
17942	return c
17943}
17944
17945// Header returns an http.Header that can be modified by the caller to
17946// add HTTP headers to the request.
17947func (c *AdvertiserGroupsGetCall) Header() http.Header {
17948	if c.header_ == nil {
17949		c.header_ = make(http.Header)
17950	}
17951	return c.header_
17952}
17953
17954func (c *AdvertiserGroupsGetCall) doRequest(alt string) (*http.Response, error) {
17955	reqHeaders := make(http.Header)
17956	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
17957	for k, v := range c.header_ {
17958		reqHeaders[k] = v
17959	}
17960	reqHeaders.Set("User-Agent", c.s.userAgent())
17961	if c.ifNoneMatch_ != "" {
17962		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17963	}
17964	var body io.Reader = nil
17965	c.urlParams_.Set("alt", alt)
17966	c.urlParams_.Set("prettyPrint", "false")
17967	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
17968	urls += "?" + c.urlParams_.Encode()
17969	req, err := http.NewRequest("GET", urls, body)
17970	if err != nil {
17971		return nil, err
17972	}
17973	req.Header = reqHeaders
17974	googleapi.Expand(req.URL, map[string]string{
17975		"profileId": strconv.FormatInt(c.profileId, 10),
17976		"id":        strconv.FormatInt(c.id, 10),
17977	})
17978	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17979}
17980
17981// Do executes the "dfareporting.advertiserGroups.get" call.
17982// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
17983// status code is an error. Response headers are in either
17984// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
17985// at all) in error.(*googleapi.Error).Header. Use
17986// googleapi.IsNotModified to check whether the returned error was
17987// because http.StatusNotModified was returned.
17988func (c *AdvertiserGroupsGetCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
17989	gensupport.SetOptions(c.urlParams_, opts...)
17990	res, err := c.doRequest("json")
17991	if res != nil && res.StatusCode == http.StatusNotModified {
17992		if res.Body != nil {
17993			res.Body.Close()
17994		}
17995		return nil, &googleapi.Error{
17996			Code:   res.StatusCode,
17997			Header: res.Header,
17998		}
17999	}
18000	if err != nil {
18001		return nil, err
18002	}
18003	defer googleapi.CloseBody(res)
18004	if err := googleapi.CheckResponse(res); err != nil {
18005		return nil, err
18006	}
18007	ret := &AdvertiserGroup{
18008		ServerResponse: googleapi.ServerResponse{
18009			Header:         res.Header,
18010			HTTPStatusCode: res.StatusCode,
18011		},
18012	}
18013	target := &ret
18014	if err := gensupport.DecodeResponse(target, res); err != nil {
18015		return nil, err
18016	}
18017	return ret, nil
18018	// {
18019	//   "description": "Gets one advertiser group by ID.",
18020	//   "httpMethod": "GET",
18021	//   "id": "dfareporting.advertiserGroups.get",
18022	//   "parameterOrder": [
18023	//     "profileId",
18024	//     "id"
18025	//   ],
18026	//   "parameters": {
18027	//     "id": {
18028	//       "description": "Advertiser group ID.",
18029	//       "format": "int64",
18030	//       "location": "path",
18031	//       "required": true,
18032	//       "type": "string"
18033	//     },
18034	//     "profileId": {
18035	//       "description": "User profile ID associated with this request.",
18036	//       "format": "int64",
18037	//       "location": "path",
18038	//       "required": true,
18039	//       "type": "string"
18040	//     }
18041	//   },
18042	//   "path": "userprofiles/{profileId}/advertiserGroups/{id}",
18043	//   "response": {
18044	//     "$ref": "AdvertiserGroup"
18045	//   },
18046	//   "scopes": [
18047	//     "https://www.googleapis.com/auth/dfatrafficking"
18048	//   ]
18049	// }
18050
18051}
18052
18053// method id "dfareporting.advertiserGroups.insert":
18054
18055type AdvertiserGroupsInsertCall struct {
18056	s               *Service
18057	profileId       int64
18058	advertisergroup *AdvertiserGroup
18059	urlParams_      gensupport.URLParams
18060	ctx_            context.Context
18061	header_         http.Header
18062}
18063
18064// Insert: Inserts a new advertiser group.
18065func (r *AdvertiserGroupsService) Insert(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsInsertCall {
18066	c := &AdvertiserGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18067	c.profileId = profileId
18068	c.advertisergroup = advertisergroup
18069	return c
18070}
18071
18072// Fields allows partial responses to be retrieved. See
18073// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18074// for more information.
18075func (c *AdvertiserGroupsInsertCall) Fields(s ...googleapi.Field) *AdvertiserGroupsInsertCall {
18076	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18077	return c
18078}
18079
18080// Context sets the context to be used in this call's Do method. Any
18081// pending HTTP request will be aborted if the provided context is
18082// canceled.
18083func (c *AdvertiserGroupsInsertCall) Context(ctx context.Context) *AdvertiserGroupsInsertCall {
18084	c.ctx_ = ctx
18085	return c
18086}
18087
18088// Header returns an http.Header that can be modified by the caller to
18089// add HTTP headers to the request.
18090func (c *AdvertiserGroupsInsertCall) Header() http.Header {
18091	if c.header_ == nil {
18092		c.header_ = make(http.Header)
18093	}
18094	return c.header_
18095}
18096
18097func (c *AdvertiserGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
18098	reqHeaders := make(http.Header)
18099	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18100	for k, v := range c.header_ {
18101		reqHeaders[k] = v
18102	}
18103	reqHeaders.Set("User-Agent", c.s.userAgent())
18104	var body io.Reader = nil
18105	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18106	if err != nil {
18107		return nil, err
18108	}
18109	reqHeaders.Set("Content-Type", "application/json")
18110	c.urlParams_.Set("alt", alt)
18111	c.urlParams_.Set("prettyPrint", "false")
18112	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18113	urls += "?" + c.urlParams_.Encode()
18114	req, err := http.NewRequest("POST", urls, body)
18115	if err != nil {
18116		return nil, err
18117	}
18118	req.Header = reqHeaders
18119	googleapi.Expand(req.URL, map[string]string{
18120		"profileId": strconv.FormatInt(c.profileId, 10),
18121	})
18122	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18123}
18124
18125// Do executes the "dfareporting.advertiserGroups.insert" call.
18126// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18127// status code is an error. Response headers are in either
18128// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18129// at all) in error.(*googleapi.Error).Header. Use
18130// googleapi.IsNotModified to check whether the returned error was
18131// because http.StatusNotModified was returned.
18132func (c *AdvertiserGroupsInsertCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18133	gensupport.SetOptions(c.urlParams_, opts...)
18134	res, err := c.doRequest("json")
18135	if res != nil && res.StatusCode == http.StatusNotModified {
18136		if res.Body != nil {
18137			res.Body.Close()
18138		}
18139		return nil, &googleapi.Error{
18140			Code:   res.StatusCode,
18141			Header: res.Header,
18142		}
18143	}
18144	if err != nil {
18145		return nil, err
18146	}
18147	defer googleapi.CloseBody(res)
18148	if err := googleapi.CheckResponse(res); err != nil {
18149		return nil, err
18150	}
18151	ret := &AdvertiserGroup{
18152		ServerResponse: googleapi.ServerResponse{
18153			Header:         res.Header,
18154			HTTPStatusCode: res.StatusCode,
18155		},
18156	}
18157	target := &ret
18158	if err := gensupport.DecodeResponse(target, res); err != nil {
18159		return nil, err
18160	}
18161	return ret, nil
18162	// {
18163	//   "description": "Inserts a new advertiser group.",
18164	//   "httpMethod": "POST",
18165	//   "id": "dfareporting.advertiserGroups.insert",
18166	//   "parameterOrder": [
18167	//     "profileId"
18168	//   ],
18169	//   "parameters": {
18170	//     "profileId": {
18171	//       "description": "User profile ID associated with this request.",
18172	//       "format": "int64",
18173	//       "location": "path",
18174	//       "required": true,
18175	//       "type": "string"
18176	//     }
18177	//   },
18178	//   "path": "userprofiles/{profileId}/advertiserGroups",
18179	//   "request": {
18180	//     "$ref": "AdvertiserGroup"
18181	//   },
18182	//   "response": {
18183	//     "$ref": "AdvertiserGroup"
18184	//   },
18185	//   "scopes": [
18186	//     "https://www.googleapis.com/auth/dfatrafficking"
18187	//   ]
18188	// }
18189
18190}
18191
18192// method id "dfareporting.advertiserGroups.list":
18193
18194type AdvertiserGroupsListCall struct {
18195	s            *Service
18196	profileId    int64
18197	urlParams_   gensupport.URLParams
18198	ifNoneMatch_ string
18199	ctx_         context.Context
18200	header_      http.Header
18201}
18202
18203// List: Retrieves a list of advertiser groups, possibly filtered. This
18204// method supports paging.
18205func (r *AdvertiserGroupsService) List(profileId int64) *AdvertiserGroupsListCall {
18206	c := &AdvertiserGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18207	c.profileId = profileId
18208	return c
18209}
18210
18211// Ids sets the optional parameter "ids": Select only advertiser groups
18212// with these IDs.
18213func (c *AdvertiserGroupsListCall) Ids(ids ...int64) *AdvertiserGroupsListCall {
18214	var ids_ []string
18215	for _, v := range ids {
18216		ids_ = append(ids_, fmt.Sprint(v))
18217	}
18218	c.urlParams_.SetMulti("ids", ids_)
18219	return c
18220}
18221
18222// MaxResults sets the optional parameter "maxResults": Maximum number
18223// of results to return.
18224func (c *AdvertiserGroupsListCall) MaxResults(maxResults int64) *AdvertiserGroupsListCall {
18225	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18226	return c
18227}
18228
18229// PageToken sets the optional parameter "pageToken": Value of the
18230// nextPageToken from the previous result page.
18231func (c *AdvertiserGroupsListCall) PageToken(pageToken string) *AdvertiserGroupsListCall {
18232	c.urlParams_.Set("pageToken", pageToken)
18233	return c
18234}
18235
18236// SearchString sets the optional parameter "searchString": Allows
18237// searching for objects by name or ID. Wildcards (*) are allowed. For
18238// example, "advertiser*2015" will return objects with names like
18239// "advertiser group June 2015", "advertiser group April 2015", or
18240// simply "advertiser group 2015". Most of the searches also add
18241// wildcards implicitly at the start and the end of the search string.
18242// For example, a search string of "advertisergroup" will match objects
18243// with name "my advertisergroup", "advertisergroup 2015", or simply
18244// "advertisergroup".
18245func (c *AdvertiserGroupsListCall) SearchString(searchString string) *AdvertiserGroupsListCall {
18246	c.urlParams_.Set("searchString", searchString)
18247	return c
18248}
18249
18250// SortField sets the optional parameter "sortField": Field by which to
18251// sort the list.
18252//
18253// Possible values:
18254//   "ID" (default)
18255//   "NAME"
18256func (c *AdvertiserGroupsListCall) SortField(sortField string) *AdvertiserGroupsListCall {
18257	c.urlParams_.Set("sortField", sortField)
18258	return c
18259}
18260
18261// SortOrder sets the optional parameter "sortOrder": Order of sorted
18262// results.
18263//
18264// Possible values:
18265//   "ASCENDING" (default)
18266//   "DESCENDING"
18267func (c *AdvertiserGroupsListCall) SortOrder(sortOrder string) *AdvertiserGroupsListCall {
18268	c.urlParams_.Set("sortOrder", sortOrder)
18269	return c
18270}
18271
18272// Fields allows partial responses to be retrieved. See
18273// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18274// for more information.
18275func (c *AdvertiserGroupsListCall) Fields(s ...googleapi.Field) *AdvertiserGroupsListCall {
18276	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18277	return c
18278}
18279
18280// IfNoneMatch sets the optional parameter which makes the operation
18281// fail if the object's ETag matches the given value. This is useful for
18282// getting updates only after the object has changed since the last
18283// request. Use googleapi.IsNotModified to check whether the response
18284// error from Do is the result of In-None-Match.
18285func (c *AdvertiserGroupsListCall) IfNoneMatch(entityTag string) *AdvertiserGroupsListCall {
18286	c.ifNoneMatch_ = entityTag
18287	return c
18288}
18289
18290// Context sets the context to be used in this call's Do method. Any
18291// pending HTTP request will be aborted if the provided context is
18292// canceled.
18293func (c *AdvertiserGroupsListCall) Context(ctx context.Context) *AdvertiserGroupsListCall {
18294	c.ctx_ = ctx
18295	return c
18296}
18297
18298// Header returns an http.Header that can be modified by the caller to
18299// add HTTP headers to the request.
18300func (c *AdvertiserGroupsListCall) Header() http.Header {
18301	if c.header_ == nil {
18302		c.header_ = make(http.Header)
18303	}
18304	return c.header_
18305}
18306
18307func (c *AdvertiserGroupsListCall) doRequest(alt string) (*http.Response, error) {
18308	reqHeaders := make(http.Header)
18309	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18310	for k, v := range c.header_ {
18311		reqHeaders[k] = v
18312	}
18313	reqHeaders.Set("User-Agent", c.s.userAgent())
18314	if c.ifNoneMatch_ != "" {
18315		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18316	}
18317	var body io.Reader = nil
18318	c.urlParams_.Set("alt", alt)
18319	c.urlParams_.Set("prettyPrint", "false")
18320	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18321	urls += "?" + c.urlParams_.Encode()
18322	req, err := http.NewRequest("GET", urls, body)
18323	if err != nil {
18324		return nil, err
18325	}
18326	req.Header = reqHeaders
18327	googleapi.Expand(req.URL, map[string]string{
18328		"profileId": strconv.FormatInt(c.profileId, 10),
18329	})
18330	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18331}
18332
18333// Do executes the "dfareporting.advertiserGroups.list" call.
18334// Exactly one of *AdvertiserGroupsListResponse or error will be
18335// non-nil. Any non-2xx status code is an error. Response headers are in
18336// either *AdvertiserGroupsListResponse.ServerResponse.Header or (if a
18337// response was returned at all) in error.(*googleapi.Error).Header. Use
18338// googleapi.IsNotModified to check whether the returned error was
18339// because http.StatusNotModified was returned.
18340func (c *AdvertiserGroupsListCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroupsListResponse, error) {
18341	gensupport.SetOptions(c.urlParams_, opts...)
18342	res, err := c.doRequest("json")
18343	if res != nil && res.StatusCode == http.StatusNotModified {
18344		if res.Body != nil {
18345			res.Body.Close()
18346		}
18347		return nil, &googleapi.Error{
18348			Code:   res.StatusCode,
18349			Header: res.Header,
18350		}
18351	}
18352	if err != nil {
18353		return nil, err
18354	}
18355	defer googleapi.CloseBody(res)
18356	if err := googleapi.CheckResponse(res); err != nil {
18357		return nil, err
18358	}
18359	ret := &AdvertiserGroupsListResponse{
18360		ServerResponse: googleapi.ServerResponse{
18361			Header:         res.Header,
18362			HTTPStatusCode: res.StatusCode,
18363		},
18364	}
18365	target := &ret
18366	if err := gensupport.DecodeResponse(target, res); err != nil {
18367		return nil, err
18368	}
18369	return ret, nil
18370	// {
18371	//   "description": "Retrieves a list of advertiser groups, possibly filtered. This method supports paging.",
18372	//   "httpMethod": "GET",
18373	//   "id": "dfareporting.advertiserGroups.list",
18374	//   "parameterOrder": [
18375	//     "profileId"
18376	//   ],
18377	//   "parameters": {
18378	//     "ids": {
18379	//       "description": "Select only advertiser groups with these IDs.",
18380	//       "format": "int64",
18381	//       "location": "query",
18382	//       "repeated": true,
18383	//       "type": "string"
18384	//     },
18385	//     "maxResults": {
18386	//       "default": "1000",
18387	//       "description": "Maximum number of results to return.",
18388	//       "format": "int32",
18389	//       "location": "query",
18390	//       "maximum": "1000",
18391	//       "minimum": "0",
18392	//       "type": "integer"
18393	//     },
18394	//     "pageToken": {
18395	//       "description": "Value of the nextPageToken from the previous result page.",
18396	//       "location": "query",
18397	//       "type": "string"
18398	//     },
18399	//     "profileId": {
18400	//       "description": "User profile ID associated with this request.",
18401	//       "format": "int64",
18402	//       "location": "path",
18403	//       "required": true,
18404	//       "type": "string"
18405	//     },
18406	//     "searchString": {
18407	//       "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\".",
18408	//       "location": "query",
18409	//       "type": "string"
18410	//     },
18411	//     "sortField": {
18412	//       "default": "ID",
18413	//       "description": "Field by which to sort the list.",
18414	//       "enum": [
18415	//         "ID",
18416	//         "NAME"
18417	//       ],
18418	//       "enumDescriptions": [
18419	//         "",
18420	//         ""
18421	//       ],
18422	//       "location": "query",
18423	//       "type": "string"
18424	//     },
18425	//     "sortOrder": {
18426	//       "default": "ASCENDING",
18427	//       "description": "Order of sorted results.",
18428	//       "enum": [
18429	//         "ASCENDING",
18430	//         "DESCENDING"
18431	//       ],
18432	//       "enumDescriptions": [
18433	//         "",
18434	//         ""
18435	//       ],
18436	//       "location": "query",
18437	//       "type": "string"
18438	//     }
18439	//   },
18440	//   "path": "userprofiles/{profileId}/advertiserGroups",
18441	//   "response": {
18442	//     "$ref": "AdvertiserGroupsListResponse"
18443	//   },
18444	//   "scopes": [
18445	//     "https://www.googleapis.com/auth/dfatrafficking"
18446	//   ]
18447	// }
18448
18449}
18450
18451// Pages invokes f for each page of results.
18452// A non-nil error returned from f will halt the iteration.
18453// The provided context supersedes any context provided to the Context method.
18454func (c *AdvertiserGroupsListCall) Pages(ctx context.Context, f func(*AdvertiserGroupsListResponse) error) error {
18455	c.ctx_ = ctx
18456	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18457	for {
18458		x, err := c.Do()
18459		if err != nil {
18460			return err
18461		}
18462		if err := f(x); err != nil {
18463			return err
18464		}
18465		if x.NextPageToken == "" {
18466			return nil
18467		}
18468		c.PageToken(x.NextPageToken)
18469	}
18470}
18471
18472// method id "dfareporting.advertiserGroups.patch":
18473
18474type AdvertiserGroupsPatchCall struct {
18475	s               *Service
18476	profileId       int64
18477	advertisergroup *AdvertiserGroup
18478	urlParams_      gensupport.URLParams
18479	ctx_            context.Context
18480	header_         http.Header
18481}
18482
18483// Patch: Updates an existing advertiser group. This method supports
18484// patch semantics.
18485func (r *AdvertiserGroupsService) Patch(profileId int64, id int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsPatchCall {
18486	c := &AdvertiserGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18487	c.profileId = profileId
18488	c.urlParams_.Set("id", fmt.Sprint(id))
18489	c.advertisergroup = advertisergroup
18490	return c
18491}
18492
18493// Fields allows partial responses to be retrieved. See
18494// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18495// for more information.
18496func (c *AdvertiserGroupsPatchCall) Fields(s ...googleapi.Field) *AdvertiserGroupsPatchCall {
18497	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18498	return c
18499}
18500
18501// Context sets the context to be used in this call's Do method. Any
18502// pending HTTP request will be aborted if the provided context is
18503// canceled.
18504func (c *AdvertiserGroupsPatchCall) Context(ctx context.Context) *AdvertiserGroupsPatchCall {
18505	c.ctx_ = ctx
18506	return c
18507}
18508
18509// Header returns an http.Header that can be modified by the caller to
18510// add HTTP headers to the request.
18511func (c *AdvertiserGroupsPatchCall) Header() http.Header {
18512	if c.header_ == nil {
18513		c.header_ = make(http.Header)
18514	}
18515	return c.header_
18516}
18517
18518func (c *AdvertiserGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
18519	reqHeaders := make(http.Header)
18520	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18521	for k, v := range c.header_ {
18522		reqHeaders[k] = v
18523	}
18524	reqHeaders.Set("User-Agent", c.s.userAgent())
18525	var body io.Reader = nil
18526	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18527	if err != nil {
18528		return nil, err
18529	}
18530	reqHeaders.Set("Content-Type", "application/json")
18531	c.urlParams_.Set("alt", alt)
18532	c.urlParams_.Set("prettyPrint", "false")
18533	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18534	urls += "?" + c.urlParams_.Encode()
18535	req, err := http.NewRequest("PATCH", urls, body)
18536	if err != nil {
18537		return nil, err
18538	}
18539	req.Header = reqHeaders
18540	googleapi.Expand(req.URL, map[string]string{
18541		"profileId": strconv.FormatInt(c.profileId, 10),
18542	})
18543	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18544}
18545
18546// Do executes the "dfareporting.advertiserGroups.patch" call.
18547// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18548// status code is an error. Response headers are in either
18549// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18550// at all) in error.(*googleapi.Error).Header. Use
18551// googleapi.IsNotModified to check whether the returned error was
18552// because http.StatusNotModified was returned.
18553func (c *AdvertiserGroupsPatchCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18554	gensupport.SetOptions(c.urlParams_, opts...)
18555	res, err := c.doRequest("json")
18556	if res != nil && res.StatusCode == http.StatusNotModified {
18557		if res.Body != nil {
18558			res.Body.Close()
18559		}
18560		return nil, &googleapi.Error{
18561			Code:   res.StatusCode,
18562			Header: res.Header,
18563		}
18564	}
18565	if err != nil {
18566		return nil, err
18567	}
18568	defer googleapi.CloseBody(res)
18569	if err := googleapi.CheckResponse(res); err != nil {
18570		return nil, err
18571	}
18572	ret := &AdvertiserGroup{
18573		ServerResponse: googleapi.ServerResponse{
18574			Header:         res.Header,
18575			HTTPStatusCode: res.StatusCode,
18576		},
18577	}
18578	target := &ret
18579	if err := gensupport.DecodeResponse(target, res); err != nil {
18580		return nil, err
18581	}
18582	return ret, nil
18583	// {
18584	//   "description": "Updates an existing advertiser group. This method supports patch semantics.",
18585	//   "httpMethod": "PATCH",
18586	//   "id": "dfareporting.advertiserGroups.patch",
18587	//   "parameterOrder": [
18588	//     "profileId",
18589	//     "id"
18590	//   ],
18591	//   "parameters": {
18592	//     "id": {
18593	//       "description": "Advertiser group ID.",
18594	//       "format": "int64",
18595	//       "location": "query",
18596	//       "required": true,
18597	//       "type": "string"
18598	//     },
18599	//     "profileId": {
18600	//       "description": "User profile ID associated with this request.",
18601	//       "format": "int64",
18602	//       "location": "path",
18603	//       "required": true,
18604	//       "type": "string"
18605	//     }
18606	//   },
18607	//   "path": "userprofiles/{profileId}/advertiserGroups",
18608	//   "request": {
18609	//     "$ref": "AdvertiserGroup"
18610	//   },
18611	//   "response": {
18612	//     "$ref": "AdvertiserGroup"
18613	//   },
18614	//   "scopes": [
18615	//     "https://www.googleapis.com/auth/dfatrafficking"
18616	//   ]
18617	// }
18618
18619}
18620
18621// method id "dfareporting.advertiserGroups.update":
18622
18623type AdvertiserGroupsUpdateCall struct {
18624	s               *Service
18625	profileId       int64
18626	advertisergroup *AdvertiserGroup
18627	urlParams_      gensupport.URLParams
18628	ctx_            context.Context
18629	header_         http.Header
18630}
18631
18632// Update: Updates an existing advertiser group.
18633func (r *AdvertiserGroupsService) Update(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsUpdateCall {
18634	c := &AdvertiserGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18635	c.profileId = profileId
18636	c.advertisergroup = advertisergroup
18637	return c
18638}
18639
18640// Fields allows partial responses to be retrieved. See
18641// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18642// for more information.
18643func (c *AdvertiserGroupsUpdateCall) Fields(s ...googleapi.Field) *AdvertiserGroupsUpdateCall {
18644	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18645	return c
18646}
18647
18648// Context sets the context to be used in this call's Do method. Any
18649// pending HTTP request will be aborted if the provided context is
18650// canceled.
18651func (c *AdvertiserGroupsUpdateCall) Context(ctx context.Context) *AdvertiserGroupsUpdateCall {
18652	c.ctx_ = ctx
18653	return c
18654}
18655
18656// Header returns an http.Header that can be modified by the caller to
18657// add HTTP headers to the request.
18658func (c *AdvertiserGroupsUpdateCall) Header() http.Header {
18659	if c.header_ == nil {
18660		c.header_ = make(http.Header)
18661	}
18662	return c.header_
18663}
18664
18665func (c *AdvertiserGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
18666	reqHeaders := make(http.Header)
18667	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18668	for k, v := range c.header_ {
18669		reqHeaders[k] = v
18670	}
18671	reqHeaders.Set("User-Agent", c.s.userAgent())
18672	var body io.Reader = nil
18673	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18674	if err != nil {
18675		return nil, err
18676	}
18677	reqHeaders.Set("Content-Type", "application/json")
18678	c.urlParams_.Set("alt", alt)
18679	c.urlParams_.Set("prettyPrint", "false")
18680	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18681	urls += "?" + c.urlParams_.Encode()
18682	req, err := http.NewRequest("PUT", urls, body)
18683	if err != nil {
18684		return nil, err
18685	}
18686	req.Header = reqHeaders
18687	googleapi.Expand(req.URL, map[string]string{
18688		"profileId": strconv.FormatInt(c.profileId, 10),
18689	})
18690	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18691}
18692
18693// Do executes the "dfareporting.advertiserGroups.update" call.
18694// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18695// status code is an error. Response headers are in either
18696// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18697// at all) in error.(*googleapi.Error).Header. Use
18698// googleapi.IsNotModified to check whether the returned error was
18699// because http.StatusNotModified was returned.
18700func (c *AdvertiserGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18701	gensupport.SetOptions(c.urlParams_, opts...)
18702	res, err := c.doRequest("json")
18703	if res != nil && res.StatusCode == http.StatusNotModified {
18704		if res.Body != nil {
18705			res.Body.Close()
18706		}
18707		return nil, &googleapi.Error{
18708			Code:   res.StatusCode,
18709			Header: res.Header,
18710		}
18711	}
18712	if err != nil {
18713		return nil, err
18714	}
18715	defer googleapi.CloseBody(res)
18716	if err := googleapi.CheckResponse(res); err != nil {
18717		return nil, err
18718	}
18719	ret := &AdvertiserGroup{
18720		ServerResponse: googleapi.ServerResponse{
18721			Header:         res.Header,
18722			HTTPStatusCode: res.StatusCode,
18723		},
18724	}
18725	target := &ret
18726	if err := gensupport.DecodeResponse(target, res); err != nil {
18727		return nil, err
18728	}
18729	return ret, nil
18730	// {
18731	//   "description": "Updates an existing advertiser group.",
18732	//   "httpMethod": "PUT",
18733	//   "id": "dfareporting.advertiserGroups.update",
18734	//   "parameterOrder": [
18735	//     "profileId"
18736	//   ],
18737	//   "parameters": {
18738	//     "profileId": {
18739	//       "description": "User profile ID associated with this request.",
18740	//       "format": "int64",
18741	//       "location": "path",
18742	//       "required": true,
18743	//       "type": "string"
18744	//     }
18745	//   },
18746	//   "path": "userprofiles/{profileId}/advertiserGroups",
18747	//   "request": {
18748	//     "$ref": "AdvertiserGroup"
18749	//   },
18750	//   "response": {
18751	//     "$ref": "AdvertiserGroup"
18752	//   },
18753	//   "scopes": [
18754	//     "https://www.googleapis.com/auth/dfatrafficking"
18755	//   ]
18756	// }
18757
18758}
18759
18760// method id "dfareporting.advertiserLandingPages.get":
18761
18762type AdvertiserLandingPagesGetCall struct {
18763	s            *Service
18764	profileId    int64
18765	id           int64
18766	urlParams_   gensupport.URLParams
18767	ifNoneMatch_ string
18768	ctx_         context.Context
18769	header_      http.Header
18770}
18771
18772// Get: Gets one landing page by ID.
18773func (r *AdvertiserLandingPagesService) Get(profileId int64, id int64) *AdvertiserLandingPagesGetCall {
18774	c := &AdvertiserLandingPagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18775	c.profileId = profileId
18776	c.id = id
18777	return c
18778}
18779
18780// Fields allows partial responses to be retrieved. See
18781// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18782// for more information.
18783func (c *AdvertiserLandingPagesGetCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesGetCall {
18784	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18785	return c
18786}
18787
18788// IfNoneMatch sets the optional parameter which makes the operation
18789// fail if the object's ETag matches the given value. This is useful for
18790// getting updates only after the object has changed since the last
18791// request. Use googleapi.IsNotModified to check whether the response
18792// error from Do is the result of In-None-Match.
18793func (c *AdvertiserLandingPagesGetCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesGetCall {
18794	c.ifNoneMatch_ = entityTag
18795	return c
18796}
18797
18798// Context sets the context to be used in this call's Do method. Any
18799// pending HTTP request will be aborted if the provided context is
18800// canceled.
18801func (c *AdvertiserLandingPagesGetCall) Context(ctx context.Context) *AdvertiserLandingPagesGetCall {
18802	c.ctx_ = ctx
18803	return c
18804}
18805
18806// Header returns an http.Header that can be modified by the caller to
18807// add HTTP headers to the request.
18808func (c *AdvertiserLandingPagesGetCall) Header() http.Header {
18809	if c.header_ == nil {
18810		c.header_ = make(http.Header)
18811	}
18812	return c.header_
18813}
18814
18815func (c *AdvertiserLandingPagesGetCall) doRequest(alt string) (*http.Response, error) {
18816	reqHeaders := make(http.Header)
18817	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18818	for k, v := range c.header_ {
18819		reqHeaders[k] = v
18820	}
18821	reqHeaders.Set("User-Agent", c.s.userAgent())
18822	if c.ifNoneMatch_ != "" {
18823		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18824	}
18825	var body io.Reader = nil
18826	c.urlParams_.Set("alt", alt)
18827	c.urlParams_.Set("prettyPrint", "false")
18828	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages/{id}")
18829	urls += "?" + c.urlParams_.Encode()
18830	req, err := http.NewRequest("GET", urls, body)
18831	if err != nil {
18832		return nil, err
18833	}
18834	req.Header = reqHeaders
18835	googleapi.Expand(req.URL, map[string]string{
18836		"profileId": strconv.FormatInt(c.profileId, 10),
18837		"id":        strconv.FormatInt(c.id, 10),
18838	})
18839	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18840}
18841
18842// Do executes the "dfareporting.advertiserLandingPages.get" call.
18843// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
18844// status code is an error. Response headers are in either
18845// *LandingPage.ServerResponse.Header or (if a response was returned at
18846// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18847// to check whether the returned error was because
18848// http.StatusNotModified was returned.
18849func (c *AdvertiserLandingPagesGetCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
18850	gensupport.SetOptions(c.urlParams_, opts...)
18851	res, err := c.doRequest("json")
18852	if res != nil && res.StatusCode == http.StatusNotModified {
18853		if res.Body != nil {
18854			res.Body.Close()
18855		}
18856		return nil, &googleapi.Error{
18857			Code:   res.StatusCode,
18858			Header: res.Header,
18859		}
18860	}
18861	if err != nil {
18862		return nil, err
18863	}
18864	defer googleapi.CloseBody(res)
18865	if err := googleapi.CheckResponse(res); err != nil {
18866		return nil, err
18867	}
18868	ret := &LandingPage{
18869		ServerResponse: googleapi.ServerResponse{
18870			Header:         res.Header,
18871			HTTPStatusCode: res.StatusCode,
18872		},
18873	}
18874	target := &ret
18875	if err := gensupport.DecodeResponse(target, res); err != nil {
18876		return nil, err
18877	}
18878	return ret, nil
18879	// {
18880	//   "description": "Gets one landing page by ID.",
18881	//   "httpMethod": "GET",
18882	//   "id": "dfareporting.advertiserLandingPages.get",
18883	//   "parameterOrder": [
18884	//     "profileId",
18885	//     "id"
18886	//   ],
18887	//   "parameters": {
18888	//     "id": {
18889	//       "description": "Landing page ID.",
18890	//       "format": "int64",
18891	//       "location": "path",
18892	//       "required": true,
18893	//       "type": "string"
18894	//     },
18895	//     "profileId": {
18896	//       "description": "User profile ID associated with this request.",
18897	//       "format": "int64",
18898	//       "location": "path",
18899	//       "required": true,
18900	//       "type": "string"
18901	//     }
18902	//   },
18903	//   "path": "userprofiles/{profileId}/advertiserLandingPages/{id}",
18904	//   "response": {
18905	//     "$ref": "LandingPage"
18906	//   },
18907	//   "scopes": [
18908	//     "https://www.googleapis.com/auth/dfatrafficking"
18909	//   ]
18910	// }
18911
18912}
18913
18914// method id "dfareporting.advertiserLandingPages.insert":
18915
18916type AdvertiserLandingPagesInsertCall struct {
18917	s           *Service
18918	profileId   int64
18919	landingpage *LandingPage
18920	urlParams_  gensupport.URLParams
18921	ctx_        context.Context
18922	header_     http.Header
18923}
18924
18925// Insert: Inserts a new landing page.
18926func (r *AdvertiserLandingPagesService) Insert(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesInsertCall {
18927	c := &AdvertiserLandingPagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18928	c.profileId = profileId
18929	c.landingpage = landingpage
18930	return c
18931}
18932
18933// Fields allows partial responses to be retrieved. See
18934// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18935// for more information.
18936func (c *AdvertiserLandingPagesInsertCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesInsertCall {
18937	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18938	return c
18939}
18940
18941// Context sets the context to be used in this call's Do method. Any
18942// pending HTTP request will be aborted if the provided context is
18943// canceled.
18944func (c *AdvertiserLandingPagesInsertCall) Context(ctx context.Context) *AdvertiserLandingPagesInsertCall {
18945	c.ctx_ = ctx
18946	return c
18947}
18948
18949// Header returns an http.Header that can be modified by the caller to
18950// add HTTP headers to the request.
18951func (c *AdvertiserLandingPagesInsertCall) Header() http.Header {
18952	if c.header_ == nil {
18953		c.header_ = make(http.Header)
18954	}
18955	return c.header_
18956}
18957
18958func (c *AdvertiserLandingPagesInsertCall) doRequest(alt string) (*http.Response, error) {
18959	reqHeaders := make(http.Header)
18960	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
18961	for k, v := range c.header_ {
18962		reqHeaders[k] = v
18963	}
18964	reqHeaders.Set("User-Agent", c.s.userAgent())
18965	var body io.Reader = nil
18966	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
18967	if err != nil {
18968		return nil, err
18969	}
18970	reqHeaders.Set("Content-Type", "application/json")
18971	c.urlParams_.Set("alt", alt)
18972	c.urlParams_.Set("prettyPrint", "false")
18973	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
18974	urls += "?" + c.urlParams_.Encode()
18975	req, err := http.NewRequest("POST", urls, body)
18976	if err != nil {
18977		return nil, err
18978	}
18979	req.Header = reqHeaders
18980	googleapi.Expand(req.URL, map[string]string{
18981		"profileId": strconv.FormatInt(c.profileId, 10),
18982	})
18983	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18984}
18985
18986// Do executes the "dfareporting.advertiserLandingPages.insert" call.
18987// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
18988// status code is an error. Response headers are in either
18989// *LandingPage.ServerResponse.Header or (if a response was returned at
18990// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18991// to check whether the returned error was because
18992// http.StatusNotModified was returned.
18993func (c *AdvertiserLandingPagesInsertCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
18994	gensupport.SetOptions(c.urlParams_, opts...)
18995	res, err := c.doRequest("json")
18996	if res != nil && res.StatusCode == http.StatusNotModified {
18997		if res.Body != nil {
18998			res.Body.Close()
18999		}
19000		return nil, &googleapi.Error{
19001			Code:   res.StatusCode,
19002			Header: res.Header,
19003		}
19004	}
19005	if err != nil {
19006		return nil, err
19007	}
19008	defer googleapi.CloseBody(res)
19009	if err := googleapi.CheckResponse(res); err != nil {
19010		return nil, err
19011	}
19012	ret := &LandingPage{
19013		ServerResponse: googleapi.ServerResponse{
19014			Header:         res.Header,
19015			HTTPStatusCode: res.StatusCode,
19016		},
19017	}
19018	target := &ret
19019	if err := gensupport.DecodeResponse(target, res); err != nil {
19020		return nil, err
19021	}
19022	return ret, nil
19023	// {
19024	//   "description": "Inserts a new landing page.",
19025	//   "httpMethod": "POST",
19026	//   "id": "dfareporting.advertiserLandingPages.insert",
19027	//   "parameterOrder": [
19028	//     "profileId"
19029	//   ],
19030	//   "parameters": {
19031	//     "profileId": {
19032	//       "description": "User profile ID associated with this request.",
19033	//       "format": "int64",
19034	//       "location": "path",
19035	//       "required": true,
19036	//       "type": "string"
19037	//     }
19038	//   },
19039	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19040	//   "request": {
19041	//     "$ref": "LandingPage"
19042	//   },
19043	//   "response": {
19044	//     "$ref": "LandingPage"
19045	//   },
19046	//   "scopes": [
19047	//     "https://www.googleapis.com/auth/dfatrafficking"
19048	//   ]
19049	// }
19050
19051}
19052
19053// method id "dfareporting.advertiserLandingPages.list":
19054
19055type AdvertiserLandingPagesListCall struct {
19056	s            *Service
19057	profileId    int64
19058	urlParams_   gensupport.URLParams
19059	ifNoneMatch_ string
19060	ctx_         context.Context
19061	header_      http.Header
19062}
19063
19064// List: Retrieves a list of landing pages.
19065func (r *AdvertiserLandingPagesService) List(profileId int64) *AdvertiserLandingPagesListCall {
19066	c := &AdvertiserLandingPagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19067	c.profileId = profileId
19068	return c
19069}
19070
19071// AdvertiserIds sets the optional parameter "advertiserIds": Select
19072// only landing pages that belong to these advertisers.
19073func (c *AdvertiserLandingPagesListCall) AdvertiserIds(advertiserIds ...int64) *AdvertiserLandingPagesListCall {
19074	var advertiserIds_ []string
19075	for _, v := range advertiserIds {
19076		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
19077	}
19078	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
19079	return c
19080}
19081
19082// Archived sets the optional parameter "archived": Select only archived
19083// landing pages. Don't set this field to select both archived and
19084// non-archived landing pages.
19085func (c *AdvertiserLandingPagesListCall) Archived(archived bool) *AdvertiserLandingPagesListCall {
19086	c.urlParams_.Set("archived", fmt.Sprint(archived))
19087	return c
19088}
19089
19090// CampaignIds sets the optional parameter "campaignIds": Select only
19091// landing pages that are associated with these campaigns.
19092func (c *AdvertiserLandingPagesListCall) CampaignIds(campaignIds ...int64) *AdvertiserLandingPagesListCall {
19093	var campaignIds_ []string
19094	for _, v := range campaignIds {
19095		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
19096	}
19097	c.urlParams_.SetMulti("campaignIds", campaignIds_)
19098	return c
19099}
19100
19101// Ids sets the optional parameter "ids": Select only landing pages with
19102// these IDs.
19103func (c *AdvertiserLandingPagesListCall) Ids(ids ...int64) *AdvertiserLandingPagesListCall {
19104	var ids_ []string
19105	for _, v := range ids {
19106		ids_ = append(ids_, fmt.Sprint(v))
19107	}
19108	c.urlParams_.SetMulti("ids", ids_)
19109	return c
19110}
19111
19112// MaxResults sets the optional parameter "maxResults": Maximum number
19113// of results to return.
19114func (c *AdvertiserLandingPagesListCall) MaxResults(maxResults int64) *AdvertiserLandingPagesListCall {
19115	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19116	return c
19117}
19118
19119// PageToken sets the optional parameter "pageToken": Value of the
19120// nextPageToken from the previous result page.
19121func (c *AdvertiserLandingPagesListCall) PageToken(pageToken string) *AdvertiserLandingPagesListCall {
19122	c.urlParams_.Set("pageToken", pageToken)
19123	return c
19124}
19125
19126// SearchString sets the optional parameter "searchString": Allows
19127// searching for landing pages by name or ID. Wildcards (*) are allowed.
19128// For example, "landingpage*2017" will return landing pages with names
19129// like "landingpage July 2017", "landingpage March 2017", or simply
19130// "landingpage 2017". Most of the searches also add wildcards
19131// implicitly at the start and the end of the search string. For
19132// example, a search string of "landingpage" will match campaigns with
19133// name "my landingpage", "landingpage 2015", or simply "landingpage".
19134func (c *AdvertiserLandingPagesListCall) SearchString(searchString string) *AdvertiserLandingPagesListCall {
19135	c.urlParams_.Set("searchString", searchString)
19136	return c
19137}
19138
19139// SortField sets the optional parameter "sortField": Field by which to
19140// sort the list.
19141//
19142// Possible values:
19143//   "ID" (default)
19144//   "NAME"
19145func (c *AdvertiserLandingPagesListCall) SortField(sortField string) *AdvertiserLandingPagesListCall {
19146	c.urlParams_.Set("sortField", sortField)
19147	return c
19148}
19149
19150// SortOrder sets the optional parameter "sortOrder": Order of sorted
19151// results.
19152//
19153// Possible values:
19154//   "ASCENDING" (default)
19155//   "DESCENDING"
19156func (c *AdvertiserLandingPagesListCall) SortOrder(sortOrder string) *AdvertiserLandingPagesListCall {
19157	c.urlParams_.Set("sortOrder", sortOrder)
19158	return c
19159}
19160
19161// SubaccountId sets the optional parameter "subaccountId": Select only
19162// landing pages that belong to this subaccount.
19163func (c *AdvertiserLandingPagesListCall) SubaccountId(subaccountId int64) *AdvertiserLandingPagesListCall {
19164	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
19165	return c
19166}
19167
19168// Fields allows partial responses to be retrieved. See
19169// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19170// for more information.
19171func (c *AdvertiserLandingPagesListCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesListCall {
19172	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19173	return c
19174}
19175
19176// IfNoneMatch sets the optional parameter which makes the operation
19177// fail if the object's ETag matches the given value. This is useful for
19178// getting updates only after the object has changed since the last
19179// request. Use googleapi.IsNotModified to check whether the response
19180// error from Do is the result of In-None-Match.
19181func (c *AdvertiserLandingPagesListCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesListCall {
19182	c.ifNoneMatch_ = entityTag
19183	return c
19184}
19185
19186// Context sets the context to be used in this call's Do method. Any
19187// pending HTTP request will be aborted if the provided context is
19188// canceled.
19189func (c *AdvertiserLandingPagesListCall) Context(ctx context.Context) *AdvertiserLandingPagesListCall {
19190	c.ctx_ = ctx
19191	return c
19192}
19193
19194// Header returns an http.Header that can be modified by the caller to
19195// add HTTP headers to the request.
19196func (c *AdvertiserLandingPagesListCall) Header() http.Header {
19197	if c.header_ == nil {
19198		c.header_ = make(http.Header)
19199	}
19200	return c.header_
19201}
19202
19203func (c *AdvertiserLandingPagesListCall) doRequest(alt string) (*http.Response, error) {
19204	reqHeaders := make(http.Header)
19205	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19206	for k, v := range c.header_ {
19207		reqHeaders[k] = v
19208	}
19209	reqHeaders.Set("User-Agent", c.s.userAgent())
19210	if c.ifNoneMatch_ != "" {
19211		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19212	}
19213	var body io.Reader = nil
19214	c.urlParams_.Set("alt", alt)
19215	c.urlParams_.Set("prettyPrint", "false")
19216	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19217	urls += "?" + c.urlParams_.Encode()
19218	req, err := http.NewRequest("GET", urls, body)
19219	if err != nil {
19220		return nil, err
19221	}
19222	req.Header = reqHeaders
19223	googleapi.Expand(req.URL, map[string]string{
19224		"profileId": strconv.FormatInt(c.profileId, 10),
19225	})
19226	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19227}
19228
19229// Do executes the "dfareporting.advertiserLandingPages.list" call.
19230// Exactly one of *AdvertiserLandingPagesListResponse or error will be
19231// non-nil. Any non-2xx status code is an error. Response headers are in
19232// either *AdvertiserLandingPagesListResponse.ServerResponse.Header or
19233// (if a response was returned at all) in
19234// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19235// whether the returned error was because http.StatusNotModified was
19236// returned.
19237func (c *AdvertiserLandingPagesListCall) Do(opts ...googleapi.CallOption) (*AdvertiserLandingPagesListResponse, error) {
19238	gensupport.SetOptions(c.urlParams_, opts...)
19239	res, err := c.doRequest("json")
19240	if res != nil && res.StatusCode == http.StatusNotModified {
19241		if res.Body != nil {
19242			res.Body.Close()
19243		}
19244		return nil, &googleapi.Error{
19245			Code:   res.StatusCode,
19246			Header: res.Header,
19247		}
19248	}
19249	if err != nil {
19250		return nil, err
19251	}
19252	defer googleapi.CloseBody(res)
19253	if err := googleapi.CheckResponse(res); err != nil {
19254		return nil, err
19255	}
19256	ret := &AdvertiserLandingPagesListResponse{
19257		ServerResponse: googleapi.ServerResponse{
19258			Header:         res.Header,
19259			HTTPStatusCode: res.StatusCode,
19260		},
19261	}
19262	target := &ret
19263	if err := gensupport.DecodeResponse(target, res); err != nil {
19264		return nil, err
19265	}
19266	return ret, nil
19267	// {
19268	//   "description": "Retrieves a list of landing pages.",
19269	//   "httpMethod": "GET",
19270	//   "id": "dfareporting.advertiserLandingPages.list",
19271	//   "parameterOrder": [
19272	//     "profileId"
19273	//   ],
19274	//   "parameters": {
19275	//     "advertiserIds": {
19276	//       "description": "Select only landing pages that belong to these advertisers.",
19277	//       "format": "int64",
19278	//       "location": "query",
19279	//       "repeated": true,
19280	//       "type": "string"
19281	//     },
19282	//     "archived": {
19283	//       "description": "Select only archived landing pages. Don't set this field to select both archived and non-archived landing pages.",
19284	//       "location": "query",
19285	//       "type": "boolean"
19286	//     },
19287	//     "campaignIds": {
19288	//       "description": "Select only landing pages that are associated with these campaigns.",
19289	//       "format": "int64",
19290	//       "location": "query",
19291	//       "repeated": true,
19292	//       "type": "string"
19293	//     },
19294	//     "ids": {
19295	//       "description": "Select only landing pages with these IDs.",
19296	//       "format": "int64",
19297	//       "location": "query",
19298	//       "repeated": true,
19299	//       "type": "string"
19300	//     },
19301	//     "maxResults": {
19302	//       "default": "1000",
19303	//       "description": "Maximum number of results to return.",
19304	//       "format": "int32",
19305	//       "location": "query",
19306	//       "maximum": "1000",
19307	//       "minimum": "0",
19308	//       "type": "integer"
19309	//     },
19310	//     "pageToken": {
19311	//       "description": "Value of the nextPageToken from the previous result page.",
19312	//       "location": "query",
19313	//       "type": "string"
19314	//     },
19315	//     "profileId": {
19316	//       "description": "User profile ID associated with this request.",
19317	//       "format": "int64",
19318	//       "location": "path",
19319	//       "required": true,
19320	//       "type": "string"
19321	//     },
19322	//     "searchString": {
19323	//       "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\".",
19324	//       "location": "query",
19325	//       "type": "string"
19326	//     },
19327	//     "sortField": {
19328	//       "default": "ID",
19329	//       "description": "Field by which to sort the list.",
19330	//       "enum": [
19331	//         "ID",
19332	//         "NAME"
19333	//       ],
19334	//       "enumDescriptions": [
19335	//         "",
19336	//         ""
19337	//       ],
19338	//       "location": "query",
19339	//       "type": "string"
19340	//     },
19341	//     "sortOrder": {
19342	//       "default": "ASCENDING",
19343	//       "description": "Order of sorted results.",
19344	//       "enum": [
19345	//         "ASCENDING",
19346	//         "DESCENDING"
19347	//       ],
19348	//       "enumDescriptions": [
19349	//         "",
19350	//         ""
19351	//       ],
19352	//       "location": "query",
19353	//       "type": "string"
19354	//     },
19355	//     "subaccountId": {
19356	//       "description": "Select only landing pages that belong to this subaccount.",
19357	//       "format": "int64",
19358	//       "location": "query",
19359	//       "type": "string"
19360	//     }
19361	//   },
19362	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19363	//   "response": {
19364	//     "$ref": "AdvertiserLandingPagesListResponse"
19365	//   },
19366	//   "scopes": [
19367	//     "https://www.googleapis.com/auth/dfatrafficking"
19368	//   ]
19369	// }
19370
19371}
19372
19373// Pages invokes f for each page of results.
19374// A non-nil error returned from f will halt the iteration.
19375// The provided context supersedes any context provided to the Context method.
19376func (c *AdvertiserLandingPagesListCall) Pages(ctx context.Context, f func(*AdvertiserLandingPagesListResponse) error) error {
19377	c.ctx_ = ctx
19378	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19379	for {
19380		x, err := c.Do()
19381		if err != nil {
19382			return err
19383		}
19384		if err := f(x); err != nil {
19385			return err
19386		}
19387		if x.NextPageToken == "" {
19388			return nil
19389		}
19390		c.PageToken(x.NextPageToken)
19391	}
19392}
19393
19394// method id "dfareporting.advertiserLandingPages.patch":
19395
19396type AdvertiserLandingPagesPatchCall struct {
19397	s           *Service
19398	profileId   int64
19399	landingpage *LandingPage
19400	urlParams_  gensupport.URLParams
19401	ctx_        context.Context
19402	header_     http.Header
19403}
19404
19405// Patch: Updates an existing landing page. This method supports patch
19406// semantics.
19407func (r *AdvertiserLandingPagesService) Patch(profileId int64, id int64, landingpage *LandingPage) *AdvertiserLandingPagesPatchCall {
19408	c := &AdvertiserLandingPagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19409	c.profileId = profileId
19410	c.urlParams_.Set("id", fmt.Sprint(id))
19411	c.landingpage = landingpage
19412	return c
19413}
19414
19415// Fields allows partial responses to be retrieved. See
19416// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19417// for more information.
19418func (c *AdvertiserLandingPagesPatchCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesPatchCall {
19419	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19420	return c
19421}
19422
19423// Context sets the context to be used in this call's Do method. Any
19424// pending HTTP request will be aborted if the provided context is
19425// canceled.
19426func (c *AdvertiserLandingPagesPatchCall) Context(ctx context.Context) *AdvertiserLandingPagesPatchCall {
19427	c.ctx_ = ctx
19428	return c
19429}
19430
19431// Header returns an http.Header that can be modified by the caller to
19432// add HTTP headers to the request.
19433func (c *AdvertiserLandingPagesPatchCall) Header() http.Header {
19434	if c.header_ == nil {
19435		c.header_ = make(http.Header)
19436	}
19437	return c.header_
19438}
19439
19440func (c *AdvertiserLandingPagesPatchCall) doRequest(alt string) (*http.Response, error) {
19441	reqHeaders := make(http.Header)
19442	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19443	for k, v := range c.header_ {
19444		reqHeaders[k] = v
19445	}
19446	reqHeaders.Set("User-Agent", c.s.userAgent())
19447	var body io.Reader = nil
19448	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
19449	if err != nil {
19450		return nil, err
19451	}
19452	reqHeaders.Set("Content-Type", "application/json")
19453	c.urlParams_.Set("alt", alt)
19454	c.urlParams_.Set("prettyPrint", "false")
19455	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19456	urls += "?" + c.urlParams_.Encode()
19457	req, err := http.NewRequest("PATCH", urls, body)
19458	if err != nil {
19459		return nil, err
19460	}
19461	req.Header = reqHeaders
19462	googleapi.Expand(req.URL, map[string]string{
19463		"profileId": strconv.FormatInt(c.profileId, 10),
19464	})
19465	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19466}
19467
19468// Do executes the "dfareporting.advertiserLandingPages.patch" call.
19469// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
19470// status code is an error. Response headers are in either
19471// *LandingPage.ServerResponse.Header or (if a response was returned at
19472// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19473// to check whether the returned error was because
19474// http.StatusNotModified was returned.
19475func (c *AdvertiserLandingPagesPatchCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
19476	gensupport.SetOptions(c.urlParams_, opts...)
19477	res, err := c.doRequest("json")
19478	if res != nil && res.StatusCode == http.StatusNotModified {
19479		if res.Body != nil {
19480			res.Body.Close()
19481		}
19482		return nil, &googleapi.Error{
19483			Code:   res.StatusCode,
19484			Header: res.Header,
19485		}
19486	}
19487	if err != nil {
19488		return nil, err
19489	}
19490	defer googleapi.CloseBody(res)
19491	if err := googleapi.CheckResponse(res); err != nil {
19492		return nil, err
19493	}
19494	ret := &LandingPage{
19495		ServerResponse: googleapi.ServerResponse{
19496			Header:         res.Header,
19497			HTTPStatusCode: res.StatusCode,
19498		},
19499	}
19500	target := &ret
19501	if err := gensupport.DecodeResponse(target, res); err != nil {
19502		return nil, err
19503	}
19504	return ret, nil
19505	// {
19506	//   "description": "Updates an existing landing page. This method supports patch semantics.",
19507	//   "httpMethod": "PATCH",
19508	//   "id": "dfareporting.advertiserLandingPages.patch",
19509	//   "parameterOrder": [
19510	//     "profileId",
19511	//     "id"
19512	//   ],
19513	//   "parameters": {
19514	//     "id": {
19515	//       "description": "Landing page ID.",
19516	//       "format": "int64",
19517	//       "location": "query",
19518	//       "required": true,
19519	//       "type": "string"
19520	//     },
19521	//     "profileId": {
19522	//       "description": "User profile ID associated with this request.",
19523	//       "format": "int64",
19524	//       "location": "path",
19525	//       "required": true,
19526	//       "type": "string"
19527	//     }
19528	//   },
19529	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19530	//   "request": {
19531	//     "$ref": "LandingPage"
19532	//   },
19533	//   "response": {
19534	//     "$ref": "LandingPage"
19535	//   },
19536	//   "scopes": [
19537	//     "https://www.googleapis.com/auth/dfatrafficking"
19538	//   ]
19539	// }
19540
19541}
19542
19543// method id "dfareporting.advertiserLandingPages.update":
19544
19545type AdvertiserLandingPagesUpdateCall struct {
19546	s           *Service
19547	profileId   int64
19548	landingpage *LandingPage
19549	urlParams_  gensupport.URLParams
19550	ctx_        context.Context
19551	header_     http.Header
19552}
19553
19554// Update: Updates an existing landing page.
19555func (r *AdvertiserLandingPagesService) Update(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesUpdateCall {
19556	c := &AdvertiserLandingPagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19557	c.profileId = profileId
19558	c.landingpage = landingpage
19559	return c
19560}
19561
19562// Fields allows partial responses to be retrieved. See
19563// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19564// for more information.
19565func (c *AdvertiserLandingPagesUpdateCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesUpdateCall {
19566	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19567	return c
19568}
19569
19570// Context sets the context to be used in this call's Do method. Any
19571// pending HTTP request will be aborted if the provided context is
19572// canceled.
19573func (c *AdvertiserLandingPagesUpdateCall) Context(ctx context.Context) *AdvertiserLandingPagesUpdateCall {
19574	c.ctx_ = ctx
19575	return c
19576}
19577
19578// Header returns an http.Header that can be modified by the caller to
19579// add HTTP headers to the request.
19580func (c *AdvertiserLandingPagesUpdateCall) Header() http.Header {
19581	if c.header_ == nil {
19582		c.header_ = make(http.Header)
19583	}
19584	return c.header_
19585}
19586
19587func (c *AdvertiserLandingPagesUpdateCall) doRequest(alt string) (*http.Response, error) {
19588	reqHeaders := make(http.Header)
19589	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19590	for k, v := range c.header_ {
19591		reqHeaders[k] = v
19592	}
19593	reqHeaders.Set("User-Agent", c.s.userAgent())
19594	var body io.Reader = nil
19595	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
19596	if err != nil {
19597		return nil, err
19598	}
19599	reqHeaders.Set("Content-Type", "application/json")
19600	c.urlParams_.Set("alt", alt)
19601	c.urlParams_.Set("prettyPrint", "false")
19602	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19603	urls += "?" + c.urlParams_.Encode()
19604	req, err := http.NewRequest("PUT", urls, body)
19605	if err != nil {
19606		return nil, err
19607	}
19608	req.Header = reqHeaders
19609	googleapi.Expand(req.URL, map[string]string{
19610		"profileId": strconv.FormatInt(c.profileId, 10),
19611	})
19612	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19613}
19614
19615// Do executes the "dfareporting.advertiserLandingPages.update" call.
19616// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
19617// status code is an error. Response headers are in either
19618// *LandingPage.ServerResponse.Header or (if a response was returned at
19619// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19620// to check whether the returned error was because
19621// http.StatusNotModified was returned.
19622func (c *AdvertiserLandingPagesUpdateCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
19623	gensupport.SetOptions(c.urlParams_, opts...)
19624	res, err := c.doRequest("json")
19625	if res != nil && res.StatusCode == http.StatusNotModified {
19626		if res.Body != nil {
19627			res.Body.Close()
19628		}
19629		return nil, &googleapi.Error{
19630			Code:   res.StatusCode,
19631			Header: res.Header,
19632		}
19633	}
19634	if err != nil {
19635		return nil, err
19636	}
19637	defer googleapi.CloseBody(res)
19638	if err := googleapi.CheckResponse(res); err != nil {
19639		return nil, err
19640	}
19641	ret := &LandingPage{
19642		ServerResponse: googleapi.ServerResponse{
19643			Header:         res.Header,
19644			HTTPStatusCode: res.StatusCode,
19645		},
19646	}
19647	target := &ret
19648	if err := gensupport.DecodeResponse(target, res); err != nil {
19649		return nil, err
19650	}
19651	return ret, nil
19652	// {
19653	//   "description": "Updates an existing landing page.",
19654	//   "httpMethod": "PUT",
19655	//   "id": "dfareporting.advertiserLandingPages.update",
19656	//   "parameterOrder": [
19657	//     "profileId"
19658	//   ],
19659	//   "parameters": {
19660	//     "profileId": {
19661	//       "description": "User profile ID associated with this request.",
19662	//       "format": "int64",
19663	//       "location": "path",
19664	//       "required": true,
19665	//       "type": "string"
19666	//     }
19667	//   },
19668	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19669	//   "request": {
19670	//     "$ref": "LandingPage"
19671	//   },
19672	//   "response": {
19673	//     "$ref": "LandingPage"
19674	//   },
19675	//   "scopes": [
19676	//     "https://www.googleapis.com/auth/dfatrafficking"
19677	//   ]
19678	// }
19679
19680}
19681
19682// method id "dfareporting.advertisers.get":
19683
19684type AdvertisersGetCall struct {
19685	s            *Service
19686	profileId    int64
19687	id           int64
19688	urlParams_   gensupport.URLParams
19689	ifNoneMatch_ string
19690	ctx_         context.Context
19691	header_      http.Header
19692}
19693
19694// Get: Gets one advertiser by ID.
19695func (r *AdvertisersService) Get(profileId int64, id int64) *AdvertisersGetCall {
19696	c := &AdvertisersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19697	c.profileId = profileId
19698	c.id = id
19699	return c
19700}
19701
19702// Fields allows partial responses to be retrieved. See
19703// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19704// for more information.
19705func (c *AdvertisersGetCall) Fields(s ...googleapi.Field) *AdvertisersGetCall {
19706	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19707	return c
19708}
19709
19710// IfNoneMatch sets the optional parameter which makes the operation
19711// fail if the object's ETag matches the given value. This is useful for
19712// getting updates only after the object has changed since the last
19713// request. Use googleapi.IsNotModified to check whether the response
19714// error from Do is the result of In-None-Match.
19715func (c *AdvertisersGetCall) IfNoneMatch(entityTag string) *AdvertisersGetCall {
19716	c.ifNoneMatch_ = entityTag
19717	return c
19718}
19719
19720// Context sets the context to be used in this call's Do method. Any
19721// pending HTTP request will be aborted if the provided context is
19722// canceled.
19723func (c *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
19724	c.ctx_ = ctx
19725	return c
19726}
19727
19728// Header returns an http.Header that can be modified by the caller to
19729// add HTTP headers to the request.
19730func (c *AdvertisersGetCall) Header() http.Header {
19731	if c.header_ == nil {
19732		c.header_ = make(http.Header)
19733	}
19734	return c.header_
19735}
19736
19737func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
19738	reqHeaders := make(http.Header)
19739	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19740	for k, v := range c.header_ {
19741		reqHeaders[k] = v
19742	}
19743	reqHeaders.Set("User-Agent", c.s.userAgent())
19744	if c.ifNoneMatch_ != "" {
19745		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19746	}
19747	var body io.Reader = nil
19748	c.urlParams_.Set("alt", alt)
19749	c.urlParams_.Set("prettyPrint", "false")
19750	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers/{id}")
19751	urls += "?" + c.urlParams_.Encode()
19752	req, err := http.NewRequest("GET", urls, body)
19753	if err != nil {
19754		return nil, err
19755	}
19756	req.Header = reqHeaders
19757	googleapi.Expand(req.URL, map[string]string{
19758		"profileId": strconv.FormatInt(c.profileId, 10),
19759		"id":        strconv.FormatInt(c.id, 10),
19760	})
19761	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19762}
19763
19764// Do executes the "dfareporting.advertisers.get" call.
19765// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
19766// status code is an error. Response headers are in either
19767// *Advertiser.ServerResponse.Header or (if a response was returned at
19768// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19769// to check whether the returned error was because
19770// http.StatusNotModified was returned.
19771func (c *AdvertisersGetCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
19772	gensupport.SetOptions(c.urlParams_, opts...)
19773	res, err := c.doRequest("json")
19774	if res != nil && res.StatusCode == http.StatusNotModified {
19775		if res.Body != nil {
19776			res.Body.Close()
19777		}
19778		return nil, &googleapi.Error{
19779			Code:   res.StatusCode,
19780			Header: res.Header,
19781		}
19782	}
19783	if err != nil {
19784		return nil, err
19785	}
19786	defer googleapi.CloseBody(res)
19787	if err := googleapi.CheckResponse(res); err != nil {
19788		return nil, err
19789	}
19790	ret := &Advertiser{
19791		ServerResponse: googleapi.ServerResponse{
19792			Header:         res.Header,
19793			HTTPStatusCode: res.StatusCode,
19794		},
19795	}
19796	target := &ret
19797	if err := gensupport.DecodeResponse(target, res); err != nil {
19798		return nil, err
19799	}
19800	return ret, nil
19801	// {
19802	//   "description": "Gets one advertiser by ID.",
19803	//   "httpMethod": "GET",
19804	//   "id": "dfareporting.advertisers.get",
19805	//   "parameterOrder": [
19806	//     "profileId",
19807	//     "id"
19808	//   ],
19809	//   "parameters": {
19810	//     "id": {
19811	//       "description": "Advertiser ID.",
19812	//       "format": "int64",
19813	//       "location": "path",
19814	//       "required": true,
19815	//       "type": "string"
19816	//     },
19817	//     "profileId": {
19818	//       "description": "User profile ID associated with this request.",
19819	//       "format": "int64",
19820	//       "location": "path",
19821	//       "required": true,
19822	//       "type": "string"
19823	//     }
19824	//   },
19825	//   "path": "userprofiles/{profileId}/advertisers/{id}",
19826	//   "response": {
19827	//     "$ref": "Advertiser"
19828	//   },
19829	//   "scopes": [
19830	//     "https://www.googleapis.com/auth/dfatrafficking"
19831	//   ]
19832	// }
19833
19834}
19835
19836// method id "dfareporting.advertisers.insert":
19837
19838type AdvertisersInsertCall struct {
19839	s          *Service
19840	profileId  int64
19841	advertiser *Advertiser
19842	urlParams_ gensupport.URLParams
19843	ctx_       context.Context
19844	header_    http.Header
19845}
19846
19847// Insert: Inserts a new advertiser.
19848func (r *AdvertisersService) Insert(profileId int64, advertiser *Advertiser) *AdvertisersInsertCall {
19849	c := &AdvertisersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19850	c.profileId = profileId
19851	c.advertiser = advertiser
19852	return c
19853}
19854
19855// Fields allows partial responses to be retrieved. See
19856// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19857// for more information.
19858func (c *AdvertisersInsertCall) Fields(s ...googleapi.Field) *AdvertisersInsertCall {
19859	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19860	return c
19861}
19862
19863// Context sets the context to be used in this call's Do method. Any
19864// pending HTTP request will be aborted if the provided context is
19865// canceled.
19866func (c *AdvertisersInsertCall) Context(ctx context.Context) *AdvertisersInsertCall {
19867	c.ctx_ = ctx
19868	return c
19869}
19870
19871// Header returns an http.Header that can be modified by the caller to
19872// add HTTP headers to the request.
19873func (c *AdvertisersInsertCall) Header() http.Header {
19874	if c.header_ == nil {
19875		c.header_ = make(http.Header)
19876	}
19877	return c.header_
19878}
19879
19880func (c *AdvertisersInsertCall) doRequest(alt string) (*http.Response, error) {
19881	reqHeaders := make(http.Header)
19882	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
19883	for k, v := range c.header_ {
19884		reqHeaders[k] = v
19885	}
19886	reqHeaders.Set("User-Agent", c.s.userAgent())
19887	var body io.Reader = nil
19888	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
19889	if err != nil {
19890		return nil, err
19891	}
19892	reqHeaders.Set("Content-Type", "application/json")
19893	c.urlParams_.Set("alt", alt)
19894	c.urlParams_.Set("prettyPrint", "false")
19895	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
19896	urls += "?" + c.urlParams_.Encode()
19897	req, err := http.NewRequest("POST", urls, body)
19898	if err != nil {
19899		return nil, err
19900	}
19901	req.Header = reqHeaders
19902	googleapi.Expand(req.URL, map[string]string{
19903		"profileId": strconv.FormatInt(c.profileId, 10),
19904	})
19905	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19906}
19907
19908// Do executes the "dfareporting.advertisers.insert" call.
19909// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
19910// status code is an error. Response headers are in either
19911// *Advertiser.ServerResponse.Header or (if a response was returned at
19912// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19913// to check whether the returned error was because
19914// http.StatusNotModified was returned.
19915func (c *AdvertisersInsertCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
19916	gensupport.SetOptions(c.urlParams_, opts...)
19917	res, err := c.doRequest("json")
19918	if res != nil && res.StatusCode == http.StatusNotModified {
19919		if res.Body != nil {
19920			res.Body.Close()
19921		}
19922		return nil, &googleapi.Error{
19923			Code:   res.StatusCode,
19924			Header: res.Header,
19925		}
19926	}
19927	if err != nil {
19928		return nil, err
19929	}
19930	defer googleapi.CloseBody(res)
19931	if err := googleapi.CheckResponse(res); err != nil {
19932		return nil, err
19933	}
19934	ret := &Advertiser{
19935		ServerResponse: googleapi.ServerResponse{
19936			Header:         res.Header,
19937			HTTPStatusCode: res.StatusCode,
19938		},
19939	}
19940	target := &ret
19941	if err := gensupport.DecodeResponse(target, res); err != nil {
19942		return nil, err
19943	}
19944	return ret, nil
19945	// {
19946	//   "description": "Inserts a new advertiser.",
19947	//   "httpMethod": "POST",
19948	//   "id": "dfareporting.advertisers.insert",
19949	//   "parameterOrder": [
19950	//     "profileId"
19951	//   ],
19952	//   "parameters": {
19953	//     "profileId": {
19954	//       "description": "User profile ID associated with this request.",
19955	//       "format": "int64",
19956	//       "location": "path",
19957	//       "required": true,
19958	//       "type": "string"
19959	//     }
19960	//   },
19961	//   "path": "userprofiles/{profileId}/advertisers",
19962	//   "request": {
19963	//     "$ref": "Advertiser"
19964	//   },
19965	//   "response": {
19966	//     "$ref": "Advertiser"
19967	//   },
19968	//   "scopes": [
19969	//     "https://www.googleapis.com/auth/dfatrafficking"
19970	//   ]
19971	// }
19972
19973}
19974
19975// method id "dfareporting.advertisers.list":
19976
19977type AdvertisersListCall struct {
19978	s            *Service
19979	profileId    int64
19980	urlParams_   gensupport.URLParams
19981	ifNoneMatch_ string
19982	ctx_         context.Context
19983	header_      http.Header
19984}
19985
19986// List: Retrieves a list of advertisers, possibly filtered. This method
19987// supports paging.
19988func (r *AdvertisersService) List(profileId int64) *AdvertisersListCall {
19989	c := &AdvertisersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19990	c.profileId = profileId
19991	return c
19992}
19993
19994// AdvertiserGroupIds sets the optional parameter "advertiserGroupIds":
19995// Select only advertisers with these advertiser group IDs.
19996func (c *AdvertisersListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *AdvertisersListCall {
19997	var advertiserGroupIds_ []string
19998	for _, v := range advertiserGroupIds {
19999		advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
20000	}
20001	c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
20002	return c
20003}
20004
20005// FloodlightConfigurationIds sets the optional parameter
20006// "floodlightConfigurationIds": Select only advertisers with these
20007// floodlight configuration IDs.
20008func (c *AdvertisersListCall) FloodlightConfigurationIds(floodlightConfigurationIds ...int64) *AdvertisersListCall {
20009	var floodlightConfigurationIds_ []string
20010	for _, v := range floodlightConfigurationIds {
20011		floodlightConfigurationIds_ = append(floodlightConfigurationIds_, fmt.Sprint(v))
20012	}
20013	c.urlParams_.SetMulti("floodlightConfigurationIds", floodlightConfigurationIds_)
20014	return c
20015}
20016
20017// Ids sets the optional parameter "ids": Select only advertisers with
20018// these IDs.
20019func (c *AdvertisersListCall) Ids(ids ...int64) *AdvertisersListCall {
20020	var ids_ []string
20021	for _, v := range ids {
20022		ids_ = append(ids_, fmt.Sprint(v))
20023	}
20024	c.urlParams_.SetMulti("ids", ids_)
20025	return c
20026}
20027
20028// IncludeAdvertisersWithoutGroupsOnly sets the optional parameter
20029// "includeAdvertisersWithoutGroupsOnly": Select only advertisers which
20030// do not belong to any advertiser group.
20031func (c *AdvertisersListCall) IncludeAdvertisersWithoutGroupsOnly(includeAdvertisersWithoutGroupsOnly bool) *AdvertisersListCall {
20032	c.urlParams_.Set("includeAdvertisersWithoutGroupsOnly", fmt.Sprint(includeAdvertisersWithoutGroupsOnly))
20033	return c
20034}
20035
20036// MaxResults sets the optional parameter "maxResults": Maximum number
20037// of results to return.
20038func (c *AdvertisersListCall) MaxResults(maxResults int64) *AdvertisersListCall {
20039	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20040	return c
20041}
20042
20043// OnlyParent sets the optional parameter "onlyParent": Select only
20044// advertisers which use another advertiser's floodlight configuration.
20045func (c *AdvertisersListCall) OnlyParent(onlyParent bool) *AdvertisersListCall {
20046	c.urlParams_.Set("onlyParent", fmt.Sprint(onlyParent))
20047	return c
20048}
20049
20050// PageToken sets the optional parameter "pageToken": Value of the
20051// nextPageToken from the previous result page.
20052func (c *AdvertisersListCall) PageToken(pageToken string) *AdvertisersListCall {
20053	c.urlParams_.Set("pageToken", pageToken)
20054	return c
20055}
20056
20057// SearchString sets the optional parameter "searchString": Allows
20058// searching for objects by name or ID. Wildcards (*) are allowed. For
20059// example, "advertiser*2015" will return objects with names like
20060// "advertiser June 2015", "advertiser April 2015", or simply
20061// "advertiser 2015". Most of the searches also add wildcards implicitly
20062// at the start and the end of the search string. For example, a search
20063// string of "advertiser" will match objects with name "my advertiser",
20064// "advertiser 2015", or simply "advertiser".
20065func (c *AdvertisersListCall) SearchString(searchString string) *AdvertisersListCall {
20066	c.urlParams_.Set("searchString", searchString)
20067	return c
20068}
20069
20070// SortField sets the optional parameter "sortField": Field by which to
20071// sort the list.
20072//
20073// Possible values:
20074//   "ID" (default)
20075//   "NAME"
20076func (c *AdvertisersListCall) SortField(sortField string) *AdvertisersListCall {
20077	c.urlParams_.Set("sortField", sortField)
20078	return c
20079}
20080
20081// SortOrder sets the optional parameter "sortOrder": Order of sorted
20082// results.
20083//
20084// Possible values:
20085//   "ASCENDING" (default)
20086//   "DESCENDING"
20087func (c *AdvertisersListCall) SortOrder(sortOrder string) *AdvertisersListCall {
20088	c.urlParams_.Set("sortOrder", sortOrder)
20089	return c
20090}
20091
20092// Status sets the optional parameter "status": Select only advertisers
20093// with the specified status.
20094//
20095// Possible values:
20096//   "APPROVED"
20097//   "ON_HOLD"
20098func (c *AdvertisersListCall) Status(status string) *AdvertisersListCall {
20099	c.urlParams_.Set("status", status)
20100	return c
20101}
20102
20103// SubaccountId sets the optional parameter "subaccountId": Select only
20104// advertisers with these subaccount IDs.
20105func (c *AdvertisersListCall) SubaccountId(subaccountId int64) *AdvertisersListCall {
20106	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
20107	return c
20108}
20109
20110// Fields allows partial responses to be retrieved. See
20111// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20112// for more information.
20113func (c *AdvertisersListCall) Fields(s ...googleapi.Field) *AdvertisersListCall {
20114	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20115	return c
20116}
20117
20118// IfNoneMatch sets the optional parameter which makes the operation
20119// fail if the object's ETag matches the given value. This is useful for
20120// getting updates only after the object has changed since the last
20121// request. Use googleapi.IsNotModified to check whether the response
20122// error from Do is the result of In-None-Match.
20123func (c *AdvertisersListCall) IfNoneMatch(entityTag string) *AdvertisersListCall {
20124	c.ifNoneMatch_ = entityTag
20125	return c
20126}
20127
20128// Context sets the context to be used in this call's Do method. Any
20129// pending HTTP request will be aborted if the provided context is
20130// canceled.
20131func (c *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
20132	c.ctx_ = ctx
20133	return c
20134}
20135
20136// Header returns an http.Header that can be modified by the caller to
20137// add HTTP headers to the request.
20138func (c *AdvertisersListCall) Header() http.Header {
20139	if c.header_ == nil {
20140		c.header_ = make(http.Header)
20141	}
20142	return c.header_
20143}
20144
20145func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
20146	reqHeaders := make(http.Header)
20147	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
20148	for k, v := range c.header_ {
20149		reqHeaders[k] = v
20150	}
20151	reqHeaders.Set("User-Agent", c.s.userAgent())
20152	if c.ifNoneMatch_ != "" {
20153		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20154	}
20155	var body io.Reader = nil
20156	c.urlParams_.Set("alt", alt)
20157	c.urlParams_.Set("prettyPrint", "false")
20158	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20159	urls += "?" + c.urlParams_.Encode()
20160	req, err := http.NewRequest("GET", urls, body)
20161	if err != nil {
20162		return nil, err
20163	}
20164	req.Header = reqHeaders
20165	googleapi.Expand(req.URL, map[string]string{
20166		"profileId": strconv.FormatInt(c.profileId, 10),
20167	})
20168	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20169}
20170
20171// Do executes the "dfareporting.advertisers.list" call.
20172// Exactly one of *AdvertisersListResponse or error will be non-nil. Any
20173// non-2xx status code is an error. Response headers are in either
20174// *AdvertisersListResponse.ServerResponse.Header or (if a response was
20175// returned at all) in error.(*googleapi.Error).Header. Use
20176// googleapi.IsNotModified to check whether the returned error was
20177// because http.StatusNotModified was returned.
20178func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*AdvertisersListResponse, error) {
20179	gensupport.SetOptions(c.urlParams_, opts...)
20180	res, err := c.doRequest("json")
20181	if res != nil && res.StatusCode == http.StatusNotModified {
20182		if res.Body != nil {
20183			res.Body.Close()
20184		}
20185		return nil, &googleapi.Error{
20186			Code:   res.StatusCode,
20187			Header: res.Header,
20188		}
20189	}
20190	if err != nil {
20191		return nil, err
20192	}
20193	defer googleapi.CloseBody(res)
20194	if err := googleapi.CheckResponse(res); err != nil {
20195		return nil, err
20196	}
20197	ret := &AdvertisersListResponse{
20198		ServerResponse: googleapi.ServerResponse{
20199			Header:         res.Header,
20200			HTTPStatusCode: res.StatusCode,
20201		},
20202	}
20203	target := &ret
20204	if err := gensupport.DecodeResponse(target, res); err != nil {
20205		return nil, err
20206	}
20207	return ret, nil
20208	// {
20209	//   "description": "Retrieves a list of advertisers, possibly filtered. This method supports paging.",
20210	//   "httpMethod": "GET",
20211	//   "id": "dfareporting.advertisers.list",
20212	//   "parameterOrder": [
20213	//     "profileId"
20214	//   ],
20215	//   "parameters": {
20216	//     "advertiserGroupIds": {
20217	//       "description": "Select only advertisers with these advertiser group IDs.",
20218	//       "format": "int64",
20219	//       "location": "query",
20220	//       "repeated": true,
20221	//       "type": "string"
20222	//     },
20223	//     "floodlightConfigurationIds": {
20224	//       "description": "Select only advertisers with these floodlight configuration IDs.",
20225	//       "format": "int64",
20226	//       "location": "query",
20227	//       "repeated": true,
20228	//       "type": "string"
20229	//     },
20230	//     "ids": {
20231	//       "description": "Select only advertisers with these IDs.",
20232	//       "format": "int64",
20233	//       "location": "query",
20234	//       "repeated": true,
20235	//       "type": "string"
20236	//     },
20237	//     "includeAdvertisersWithoutGroupsOnly": {
20238	//       "description": "Select only advertisers which do not belong to any advertiser group.",
20239	//       "location": "query",
20240	//       "type": "boolean"
20241	//     },
20242	//     "maxResults": {
20243	//       "default": "1000",
20244	//       "description": "Maximum number of results to return.",
20245	//       "format": "int32",
20246	//       "location": "query",
20247	//       "maximum": "1000",
20248	//       "minimum": "0",
20249	//       "type": "integer"
20250	//     },
20251	//     "onlyParent": {
20252	//       "description": "Select only advertisers which use another advertiser's floodlight configuration.",
20253	//       "location": "query",
20254	//       "type": "boolean"
20255	//     },
20256	//     "pageToken": {
20257	//       "description": "Value of the nextPageToken from the previous result page.",
20258	//       "location": "query",
20259	//       "type": "string"
20260	//     },
20261	//     "profileId": {
20262	//       "description": "User profile ID associated with this request.",
20263	//       "format": "int64",
20264	//       "location": "path",
20265	//       "required": true,
20266	//       "type": "string"
20267	//     },
20268	//     "searchString": {
20269	//       "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\".",
20270	//       "location": "query",
20271	//       "type": "string"
20272	//     },
20273	//     "sortField": {
20274	//       "default": "ID",
20275	//       "description": "Field by which to sort the list.",
20276	//       "enum": [
20277	//         "ID",
20278	//         "NAME"
20279	//       ],
20280	//       "enumDescriptions": [
20281	//         "",
20282	//         ""
20283	//       ],
20284	//       "location": "query",
20285	//       "type": "string"
20286	//     },
20287	//     "sortOrder": {
20288	//       "default": "ASCENDING",
20289	//       "description": "Order of sorted results.",
20290	//       "enum": [
20291	//         "ASCENDING",
20292	//         "DESCENDING"
20293	//       ],
20294	//       "enumDescriptions": [
20295	//         "",
20296	//         ""
20297	//       ],
20298	//       "location": "query",
20299	//       "type": "string"
20300	//     },
20301	//     "status": {
20302	//       "description": "Select only advertisers with the specified status.",
20303	//       "enum": [
20304	//         "APPROVED",
20305	//         "ON_HOLD"
20306	//       ],
20307	//       "enumDescriptions": [
20308	//         "",
20309	//         ""
20310	//       ],
20311	//       "location": "query",
20312	//       "type": "string"
20313	//     },
20314	//     "subaccountId": {
20315	//       "description": "Select only advertisers with these subaccount IDs.",
20316	//       "format": "int64",
20317	//       "location": "query",
20318	//       "type": "string"
20319	//     }
20320	//   },
20321	//   "path": "userprofiles/{profileId}/advertisers",
20322	//   "response": {
20323	//     "$ref": "AdvertisersListResponse"
20324	//   },
20325	//   "scopes": [
20326	//     "https://www.googleapis.com/auth/dfatrafficking"
20327	//   ]
20328	// }
20329
20330}
20331
20332// Pages invokes f for each page of results.
20333// A non-nil error returned from f will halt the iteration.
20334// The provided context supersedes any context provided to the Context method.
20335func (c *AdvertisersListCall) Pages(ctx context.Context, f func(*AdvertisersListResponse) error) error {
20336	c.ctx_ = ctx
20337	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20338	for {
20339		x, err := c.Do()
20340		if err != nil {
20341			return err
20342		}
20343		if err := f(x); err != nil {
20344			return err
20345		}
20346		if x.NextPageToken == "" {
20347			return nil
20348		}
20349		c.PageToken(x.NextPageToken)
20350	}
20351}
20352
20353// method id "dfareporting.advertisers.patch":
20354
20355type AdvertisersPatchCall struct {
20356	s          *Service
20357	profileId  int64
20358	advertiser *Advertiser
20359	urlParams_ gensupport.URLParams
20360	ctx_       context.Context
20361	header_    http.Header
20362}
20363
20364// Patch: Updates an existing advertiser. This method supports patch
20365// semantics.
20366func (r *AdvertisersService) Patch(profileId int64, id int64, advertiser *Advertiser) *AdvertisersPatchCall {
20367	c := &AdvertisersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20368	c.profileId = profileId
20369	c.urlParams_.Set("id", fmt.Sprint(id))
20370	c.advertiser = advertiser
20371	return c
20372}
20373
20374// Fields allows partial responses to be retrieved. See
20375// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20376// for more information.
20377func (c *AdvertisersPatchCall) Fields(s ...googleapi.Field) *AdvertisersPatchCall {
20378	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20379	return c
20380}
20381
20382// Context sets the context to be used in this call's Do method. Any
20383// pending HTTP request will be aborted if the provided context is
20384// canceled.
20385func (c *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall {
20386	c.ctx_ = ctx
20387	return c
20388}
20389
20390// Header returns an http.Header that can be modified by the caller to
20391// add HTTP headers to the request.
20392func (c *AdvertisersPatchCall) Header() http.Header {
20393	if c.header_ == nil {
20394		c.header_ = make(http.Header)
20395	}
20396	return c.header_
20397}
20398
20399func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) {
20400	reqHeaders := make(http.Header)
20401	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
20402	for k, v := range c.header_ {
20403		reqHeaders[k] = v
20404	}
20405	reqHeaders.Set("User-Agent", c.s.userAgent())
20406	var body io.Reader = nil
20407	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
20408	if err != nil {
20409		return nil, err
20410	}
20411	reqHeaders.Set("Content-Type", "application/json")
20412	c.urlParams_.Set("alt", alt)
20413	c.urlParams_.Set("prettyPrint", "false")
20414	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20415	urls += "?" + c.urlParams_.Encode()
20416	req, err := http.NewRequest("PATCH", urls, body)
20417	if err != nil {
20418		return nil, err
20419	}
20420	req.Header = reqHeaders
20421	googleapi.Expand(req.URL, map[string]string{
20422		"profileId": strconv.FormatInt(c.profileId, 10),
20423	})
20424	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20425}
20426
20427// Do executes the "dfareporting.advertisers.patch" call.
20428// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
20429// status code is an error. Response headers are in either
20430// *Advertiser.ServerResponse.Header or (if a response was returned at
20431// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20432// to check whether the returned error was because
20433// http.StatusNotModified was returned.
20434func (c *AdvertisersPatchCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
20435	gensupport.SetOptions(c.urlParams_, opts...)
20436	res, err := c.doRequest("json")
20437	if res != nil && res.StatusCode == http.StatusNotModified {
20438		if res.Body != nil {
20439			res.Body.Close()
20440		}
20441		return nil, &googleapi.Error{
20442			Code:   res.StatusCode,
20443			Header: res.Header,
20444		}
20445	}
20446	if err != nil {
20447		return nil, err
20448	}
20449	defer googleapi.CloseBody(res)
20450	if err := googleapi.CheckResponse(res); err != nil {
20451		return nil, err
20452	}
20453	ret := &Advertiser{
20454		ServerResponse: googleapi.ServerResponse{
20455			Header:         res.Header,
20456			HTTPStatusCode: res.StatusCode,
20457		},
20458	}
20459	target := &ret
20460	if err := gensupport.DecodeResponse(target, res); err != nil {
20461		return nil, err
20462	}
20463	return ret, nil
20464	// {
20465	//   "description": "Updates an existing advertiser. This method supports patch semantics.",
20466	//   "httpMethod": "PATCH",
20467	//   "id": "dfareporting.advertisers.patch",
20468	//   "parameterOrder": [
20469	//     "profileId",
20470	//     "id"
20471	//   ],
20472	//   "parameters": {
20473	//     "id": {
20474	//       "description": "Advertiser ID.",
20475	//       "format": "int64",
20476	//       "location": "query",
20477	//       "required": true,
20478	//       "type": "string"
20479	//     },
20480	//     "profileId": {
20481	//       "description": "User profile ID associated with this request.",
20482	//       "format": "int64",
20483	//       "location": "path",
20484	//       "required": true,
20485	//       "type": "string"
20486	//     }
20487	//   },
20488	//   "path": "userprofiles/{profileId}/advertisers",
20489	//   "request": {
20490	//     "$ref": "Advertiser"
20491	//   },
20492	//   "response": {
20493	//     "$ref": "Advertiser"
20494	//   },
20495	//   "scopes": [
20496	//     "https://www.googleapis.com/auth/dfatrafficking"
20497	//   ]
20498	// }
20499
20500}
20501
20502// method id "dfareporting.advertisers.update":
20503
20504type AdvertisersUpdateCall struct {
20505	s          *Service
20506	profileId  int64
20507	advertiser *Advertiser
20508	urlParams_ gensupport.URLParams
20509	ctx_       context.Context
20510	header_    http.Header
20511}
20512
20513// Update: Updates an existing advertiser.
20514func (r *AdvertisersService) Update(profileId int64, advertiser *Advertiser) *AdvertisersUpdateCall {
20515	c := &AdvertisersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20516	c.profileId = profileId
20517	c.advertiser = advertiser
20518	return c
20519}
20520
20521// Fields allows partial responses to be retrieved. See
20522// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20523// for more information.
20524func (c *AdvertisersUpdateCall) Fields(s ...googleapi.Field) *AdvertisersUpdateCall {
20525	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20526	return c
20527}
20528
20529// Context sets the context to be used in this call's Do method. Any
20530// pending HTTP request will be aborted if the provided context is
20531// canceled.
20532func (c *AdvertisersUpdateCall) Context(ctx context.Context) *AdvertisersUpdateCall {
20533	c.ctx_ = ctx
20534	return c
20535}
20536
20537// Header returns an http.Header that can be modified by the caller to
20538// add HTTP headers to the request.
20539func (c *AdvertisersUpdateCall) Header() http.Header {
20540	if c.header_ == nil {
20541		c.header_ = make(http.Header)
20542	}
20543	return c.header_
20544}
20545
20546func (c *AdvertisersUpdateCall) doRequest(alt string) (*http.Response, error) {
20547	reqHeaders := make(http.Header)
20548	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
20549	for k, v := range c.header_ {
20550		reqHeaders[k] = v
20551	}
20552	reqHeaders.Set("User-Agent", c.s.userAgent())
20553	var body io.Reader = nil
20554	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
20555	if err != nil {
20556		return nil, err
20557	}
20558	reqHeaders.Set("Content-Type", "application/json")
20559	c.urlParams_.Set("alt", alt)
20560	c.urlParams_.Set("prettyPrint", "false")
20561	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20562	urls += "?" + c.urlParams_.Encode()
20563	req, err := http.NewRequest("PUT", urls, body)
20564	if err != nil {
20565		return nil, err
20566	}
20567	req.Header = reqHeaders
20568	googleapi.Expand(req.URL, map[string]string{
20569		"profileId": strconv.FormatInt(c.profileId, 10),
20570	})
20571	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20572}
20573
20574// Do executes the "dfareporting.advertisers.update" call.
20575// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
20576// status code is an error. Response headers are in either
20577// *Advertiser.ServerResponse.Header or (if a response was returned at
20578// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20579// to check whether the returned error was because
20580// http.StatusNotModified was returned.
20581func (c *AdvertisersUpdateCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
20582	gensupport.SetOptions(c.urlParams_, opts...)
20583	res, err := c.doRequest("json")
20584	if res != nil && res.StatusCode == http.StatusNotModified {
20585		if res.Body != nil {
20586			res.Body.Close()
20587		}
20588		return nil, &googleapi.Error{
20589			Code:   res.StatusCode,
20590			Header: res.Header,
20591		}
20592	}
20593	if err != nil {
20594		return nil, err
20595	}
20596	defer googleapi.CloseBody(res)
20597	if err := googleapi.CheckResponse(res); err != nil {
20598		return nil, err
20599	}
20600	ret := &Advertiser{
20601		ServerResponse: googleapi.ServerResponse{
20602			Header:         res.Header,
20603			HTTPStatusCode: res.StatusCode,
20604		},
20605	}
20606	target := &ret
20607	if err := gensupport.DecodeResponse(target, res); err != nil {
20608		return nil, err
20609	}
20610	return ret, nil
20611	// {
20612	//   "description": "Updates an existing advertiser.",
20613	//   "httpMethod": "PUT",
20614	//   "id": "dfareporting.advertisers.update",
20615	//   "parameterOrder": [
20616	//     "profileId"
20617	//   ],
20618	//   "parameters": {
20619	//     "profileId": {
20620	//       "description": "User profile ID associated with this request.",
20621	//       "format": "int64",
20622	//       "location": "path",
20623	//       "required": true,
20624	//       "type": "string"
20625	//     }
20626	//   },
20627	//   "path": "userprofiles/{profileId}/advertisers",
20628	//   "request": {
20629	//     "$ref": "Advertiser"
20630	//   },
20631	//   "response": {
20632	//     "$ref": "Advertiser"
20633	//   },
20634	//   "scopes": [
20635	//     "https://www.googleapis.com/auth/dfatrafficking"
20636	//   ]
20637	// }
20638
20639}
20640
20641// method id "dfareporting.browsers.list":
20642
20643type BrowsersListCall struct {
20644	s            *Service
20645	profileId    int64
20646	urlParams_   gensupport.URLParams
20647	ifNoneMatch_ string
20648	ctx_         context.Context
20649	header_      http.Header
20650}
20651
20652// List: Retrieves a list of browsers.
20653func (r *BrowsersService) List(profileId int64) *BrowsersListCall {
20654	c := &BrowsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20655	c.profileId = profileId
20656	return c
20657}
20658
20659// Fields allows partial responses to be retrieved. See
20660// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20661// for more information.
20662func (c *BrowsersListCall) Fields(s ...googleapi.Field) *BrowsersListCall {
20663	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20664	return c
20665}
20666
20667// IfNoneMatch sets the optional parameter which makes the operation
20668// fail if the object's ETag matches the given value. This is useful for
20669// getting updates only after the object has changed since the last
20670// request. Use googleapi.IsNotModified to check whether the response
20671// error from Do is the result of In-None-Match.
20672func (c *BrowsersListCall) IfNoneMatch(entityTag string) *BrowsersListCall {
20673	c.ifNoneMatch_ = entityTag
20674	return c
20675}
20676
20677// Context sets the context to be used in this call's Do method. Any
20678// pending HTTP request will be aborted if the provided context is
20679// canceled.
20680func (c *BrowsersListCall) Context(ctx context.Context) *BrowsersListCall {
20681	c.ctx_ = ctx
20682	return c
20683}
20684
20685// Header returns an http.Header that can be modified by the caller to
20686// add HTTP headers to the request.
20687func (c *BrowsersListCall) Header() http.Header {
20688	if c.header_ == nil {
20689		c.header_ = make(http.Header)
20690	}
20691	return c.header_
20692}
20693
20694func (c *BrowsersListCall) doRequest(alt string) (*http.Response, error) {
20695	reqHeaders := make(http.Header)
20696	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
20697	for k, v := range c.header_ {
20698		reqHeaders[k] = v
20699	}
20700	reqHeaders.Set("User-Agent", c.s.userAgent())
20701	if c.ifNoneMatch_ != "" {
20702		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20703	}
20704	var body io.Reader = nil
20705	c.urlParams_.Set("alt", alt)
20706	c.urlParams_.Set("prettyPrint", "false")
20707	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/browsers")
20708	urls += "?" + c.urlParams_.Encode()
20709	req, err := http.NewRequest("GET", urls, body)
20710	if err != nil {
20711		return nil, err
20712	}
20713	req.Header = reqHeaders
20714	googleapi.Expand(req.URL, map[string]string{
20715		"profileId": strconv.FormatInt(c.profileId, 10),
20716	})
20717	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20718}
20719
20720// Do executes the "dfareporting.browsers.list" call.
20721// Exactly one of *BrowsersListResponse or error will be non-nil. Any
20722// non-2xx status code is an error. Response headers are in either
20723// *BrowsersListResponse.ServerResponse.Header or (if a response was
20724// returned at all) in error.(*googleapi.Error).Header. Use
20725// googleapi.IsNotModified to check whether the returned error was
20726// because http.StatusNotModified was returned.
20727func (c *BrowsersListCall) Do(opts ...googleapi.CallOption) (*BrowsersListResponse, error) {
20728	gensupport.SetOptions(c.urlParams_, opts...)
20729	res, err := c.doRequest("json")
20730	if res != nil && res.StatusCode == http.StatusNotModified {
20731		if res.Body != nil {
20732			res.Body.Close()
20733		}
20734		return nil, &googleapi.Error{
20735			Code:   res.StatusCode,
20736			Header: res.Header,
20737		}
20738	}
20739	if err != nil {
20740		return nil, err
20741	}
20742	defer googleapi.CloseBody(res)
20743	if err := googleapi.CheckResponse(res); err != nil {
20744		return nil, err
20745	}
20746	ret := &BrowsersListResponse{
20747		ServerResponse: googleapi.ServerResponse{
20748			Header:         res.Header,
20749			HTTPStatusCode: res.StatusCode,
20750		},
20751	}
20752	target := &ret
20753	if err := gensupport.DecodeResponse(target, res); err != nil {
20754		return nil, err
20755	}
20756	return ret, nil
20757	// {
20758	//   "description": "Retrieves a list of browsers.",
20759	//   "httpMethod": "GET",
20760	//   "id": "dfareporting.browsers.list",
20761	//   "parameterOrder": [
20762	//     "profileId"
20763	//   ],
20764	//   "parameters": {
20765	//     "profileId": {
20766	//       "description": "User profile ID associated with this request.",
20767	//       "format": "int64",
20768	//       "location": "path",
20769	//       "required": true,
20770	//       "type": "string"
20771	//     }
20772	//   },
20773	//   "path": "userprofiles/{profileId}/browsers",
20774	//   "response": {
20775	//     "$ref": "BrowsersListResponse"
20776	//   },
20777	//   "scopes": [
20778	//     "https://www.googleapis.com/auth/dfatrafficking"
20779	//   ]
20780	// }
20781
20782}
20783
20784// method id "dfareporting.campaignCreativeAssociations.insert":
20785
20786type CampaignCreativeAssociationsInsertCall struct {
20787	s                           *Service
20788	profileId                   int64
20789	campaignId                  int64
20790	campaigncreativeassociation *CampaignCreativeAssociation
20791	urlParams_                  gensupport.URLParams
20792	ctx_                        context.Context
20793	header_                     http.Header
20794}
20795
20796// Insert: Associates a creative with the specified campaign. This
20797// method creates a default ad with dimensions matching the creative in
20798// the campaign if such a default ad does not exist already.
20799func (r *CampaignCreativeAssociationsService) Insert(profileId int64, campaignId int64, campaigncreativeassociation *CampaignCreativeAssociation) *CampaignCreativeAssociationsInsertCall {
20800	c := &CampaignCreativeAssociationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20801	c.profileId = profileId
20802	c.campaignId = campaignId
20803	c.campaigncreativeassociation = campaigncreativeassociation
20804	return c
20805}
20806
20807// Fields allows partial responses to be retrieved. See
20808// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20809// for more information.
20810func (c *CampaignCreativeAssociationsInsertCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsInsertCall {
20811	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20812	return c
20813}
20814
20815// Context sets the context to be used in this call's Do method. Any
20816// pending HTTP request will be aborted if the provided context is
20817// canceled.
20818func (c *CampaignCreativeAssociationsInsertCall) Context(ctx context.Context) *CampaignCreativeAssociationsInsertCall {
20819	c.ctx_ = ctx
20820	return c
20821}
20822
20823// Header returns an http.Header that can be modified by the caller to
20824// add HTTP headers to the request.
20825func (c *CampaignCreativeAssociationsInsertCall) Header() http.Header {
20826	if c.header_ == nil {
20827		c.header_ = make(http.Header)
20828	}
20829	return c.header_
20830}
20831
20832func (c *CampaignCreativeAssociationsInsertCall) doRequest(alt string) (*http.Response, error) {
20833	reqHeaders := make(http.Header)
20834	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
20835	for k, v := range c.header_ {
20836		reqHeaders[k] = v
20837	}
20838	reqHeaders.Set("User-Agent", c.s.userAgent())
20839	var body io.Reader = nil
20840	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaigncreativeassociation)
20841	if err != nil {
20842		return nil, err
20843	}
20844	reqHeaders.Set("Content-Type", "application/json")
20845	c.urlParams_.Set("alt", alt)
20846	c.urlParams_.Set("prettyPrint", "false")
20847	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
20848	urls += "?" + c.urlParams_.Encode()
20849	req, err := http.NewRequest("POST", urls, body)
20850	if err != nil {
20851		return nil, err
20852	}
20853	req.Header = reqHeaders
20854	googleapi.Expand(req.URL, map[string]string{
20855		"profileId":  strconv.FormatInt(c.profileId, 10),
20856		"campaignId": strconv.FormatInt(c.campaignId, 10),
20857	})
20858	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20859}
20860
20861// Do executes the "dfareporting.campaignCreativeAssociations.insert" call.
20862// Exactly one of *CampaignCreativeAssociation or error will be non-nil.
20863// Any non-2xx status code is an error. Response headers are in either
20864// *CampaignCreativeAssociation.ServerResponse.Header or (if a response
20865// was returned at all) in error.(*googleapi.Error).Header. Use
20866// googleapi.IsNotModified to check whether the returned error was
20867// because http.StatusNotModified was returned.
20868func (c *CampaignCreativeAssociationsInsertCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociation, error) {
20869	gensupport.SetOptions(c.urlParams_, opts...)
20870	res, err := c.doRequest("json")
20871	if res != nil && res.StatusCode == http.StatusNotModified {
20872		if res.Body != nil {
20873			res.Body.Close()
20874		}
20875		return nil, &googleapi.Error{
20876			Code:   res.StatusCode,
20877			Header: res.Header,
20878		}
20879	}
20880	if err != nil {
20881		return nil, err
20882	}
20883	defer googleapi.CloseBody(res)
20884	if err := googleapi.CheckResponse(res); err != nil {
20885		return nil, err
20886	}
20887	ret := &CampaignCreativeAssociation{
20888		ServerResponse: googleapi.ServerResponse{
20889			Header:         res.Header,
20890			HTTPStatusCode: res.StatusCode,
20891		},
20892	}
20893	target := &ret
20894	if err := gensupport.DecodeResponse(target, res); err != nil {
20895		return nil, err
20896	}
20897	return ret, nil
20898	// {
20899	//   "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.",
20900	//   "httpMethod": "POST",
20901	//   "id": "dfareporting.campaignCreativeAssociations.insert",
20902	//   "parameterOrder": [
20903	//     "profileId",
20904	//     "campaignId"
20905	//   ],
20906	//   "parameters": {
20907	//     "campaignId": {
20908	//       "description": "Campaign ID in this association.",
20909	//       "format": "int64",
20910	//       "location": "path",
20911	//       "required": true,
20912	//       "type": "string"
20913	//     },
20914	//     "profileId": {
20915	//       "description": "User profile ID associated with this request.",
20916	//       "format": "int64",
20917	//       "location": "path",
20918	//       "required": true,
20919	//       "type": "string"
20920	//     }
20921	//   },
20922	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
20923	//   "request": {
20924	//     "$ref": "CampaignCreativeAssociation"
20925	//   },
20926	//   "response": {
20927	//     "$ref": "CampaignCreativeAssociation"
20928	//   },
20929	//   "scopes": [
20930	//     "https://www.googleapis.com/auth/dfatrafficking"
20931	//   ]
20932	// }
20933
20934}
20935
20936// method id "dfareporting.campaignCreativeAssociations.list":
20937
20938type CampaignCreativeAssociationsListCall struct {
20939	s            *Service
20940	profileId    int64
20941	campaignId   int64
20942	urlParams_   gensupport.URLParams
20943	ifNoneMatch_ string
20944	ctx_         context.Context
20945	header_      http.Header
20946}
20947
20948// List: Retrieves the list of creative IDs associated with the
20949// specified campaign. This method supports paging.
20950func (r *CampaignCreativeAssociationsService) List(profileId int64, campaignId int64) *CampaignCreativeAssociationsListCall {
20951	c := &CampaignCreativeAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20952	c.profileId = profileId
20953	c.campaignId = campaignId
20954	return c
20955}
20956
20957// MaxResults sets the optional parameter "maxResults": Maximum number
20958// of results to return.
20959func (c *CampaignCreativeAssociationsListCall) MaxResults(maxResults int64) *CampaignCreativeAssociationsListCall {
20960	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20961	return c
20962}
20963
20964// PageToken sets the optional parameter "pageToken": Value of the
20965// nextPageToken from the previous result page.
20966func (c *CampaignCreativeAssociationsListCall) PageToken(pageToken string) *CampaignCreativeAssociationsListCall {
20967	c.urlParams_.Set("pageToken", pageToken)
20968	return c
20969}
20970
20971// SortOrder sets the optional parameter "sortOrder": Order of sorted
20972// results.
20973//
20974// Possible values:
20975//   "ASCENDING" (default)
20976//   "DESCENDING"
20977func (c *CampaignCreativeAssociationsListCall) SortOrder(sortOrder string) *CampaignCreativeAssociationsListCall {
20978	c.urlParams_.Set("sortOrder", sortOrder)
20979	return c
20980}
20981
20982// Fields allows partial responses to be retrieved. See
20983// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20984// for more information.
20985func (c *CampaignCreativeAssociationsListCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsListCall {
20986	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20987	return c
20988}
20989
20990// IfNoneMatch sets the optional parameter which makes the operation
20991// fail if the object's ETag matches the given value. This is useful for
20992// getting updates only after the object has changed since the last
20993// request. Use googleapi.IsNotModified to check whether the response
20994// error from Do is the result of In-None-Match.
20995func (c *CampaignCreativeAssociationsListCall) IfNoneMatch(entityTag string) *CampaignCreativeAssociationsListCall {
20996	c.ifNoneMatch_ = entityTag
20997	return c
20998}
20999
21000// Context sets the context to be used in this call's Do method. Any
21001// pending HTTP request will be aborted if the provided context is
21002// canceled.
21003func (c *CampaignCreativeAssociationsListCall) Context(ctx context.Context) *CampaignCreativeAssociationsListCall {
21004	c.ctx_ = ctx
21005	return c
21006}
21007
21008// Header returns an http.Header that can be modified by the caller to
21009// add HTTP headers to the request.
21010func (c *CampaignCreativeAssociationsListCall) Header() http.Header {
21011	if c.header_ == nil {
21012		c.header_ = make(http.Header)
21013	}
21014	return c.header_
21015}
21016
21017func (c *CampaignCreativeAssociationsListCall) doRequest(alt string) (*http.Response, error) {
21018	reqHeaders := make(http.Header)
21019	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
21020	for k, v := range c.header_ {
21021		reqHeaders[k] = v
21022	}
21023	reqHeaders.Set("User-Agent", c.s.userAgent())
21024	if c.ifNoneMatch_ != "" {
21025		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21026	}
21027	var body io.Reader = nil
21028	c.urlParams_.Set("alt", alt)
21029	c.urlParams_.Set("prettyPrint", "false")
21030	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
21031	urls += "?" + c.urlParams_.Encode()
21032	req, err := http.NewRequest("GET", urls, body)
21033	if err != nil {
21034		return nil, err
21035	}
21036	req.Header = reqHeaders
21037	googleapi.Expand(req.URL, map[string]string{
21038		"profileId":  strconv.FormatInt(c.profileId, 10),
21039		"campaignId": strconv.FormatInt(c.campaignId, 10),
21040	})
21041	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21042}
21043
21044// Do executes the "dfareporting.campaignCreativeAssociations.list" call.
21045// Exactly one of *CampaignCreativeAssociationsListResponse or error
21046// will be non-nil. Any non-2xx status code is an error. Response
21047// headers are in either
21048// *CampaignCreativeAssociationsListResponse.ServerResponse.Header or
21049// (if a response was returned at all) in
21050// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21051// whether the returned error was because http.StatusNotModified was
21052// returned.
21053func (c *CampaignCreativeAssociationsListCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociationsListResponse, error) {
21054	gensupport.SetOptions(c.urlParams_, opts...)
21055	res, err := c.doRequest("json")
21056	if res != nil && res.StatusCode == http.StatusNotModified {
21057		if res.Body != nil {
21058			res.Body.Close()
21059		}
21060		return nil, &googleapi.Error{
21061			Code:   res.StatusCode,
21062			Header: res.Header,
21063		}
21064	}
21065	if err != nil {
21066		return nil, err
21067	}
21068	defer googleapi.CloseBody(res)
21069	if err := googleapi.CheckResponse(res); err != nil {
21070		return nil, err
21071	}
21072	ret := &CampaignCreativeAssociationsListResponse{
21073		ServerResponse: googleapi.ServerResponse{
21074			Header:         res.Header,
21075			HTTPStatusCode: res.StatusCode,
21076		},
21077	}
21078	target := &ret
21079	if err := gensupport.DecodeResponse(target, res); err != nil {
21080		return nil, err
21081	}
21082	return ret, nil
21083	// {
21084	//   "description": "Retrieves the list of creative IDs associated with the specified campaign. This method supports paging.",
21085	//   "httpMethod": "GET",
21086	//   "id": "dfareporting.campaignCreativeAssociations.list",
21087	//   "parameterOrder": [
21088	//     "profileId",
21089	//     "campaignId"
21090	//   ],
21091	//   "parameters": {
21092	//     "campaignId": {
21093	//       "description": "Campaign ID in this association.",
21094	//       "format": "int64",
21095	//       "location": "path",
21096	//       "required": true,
21097	//       "type": "string"
21098	//     },
21099	//     "maxResults": {
21100	//       "default": "1000",
21101	//       "description": "Maximum number of results to return.",
21102	//       "format": "int32",
21103	//       "location": "query",
21104	//       "maximum": "1000",
21105	//       "minimum": "0",
21106	//       "type": "integer"
21107	//     },
21108	//     "pageToken": {
21109	//       "description": "Value of the nextPageToken from the previous result page.",
21110	//       "location": "query",
21111	//       "type": "string"
21112	//     },
21113	//     "profileId": {
21114	//       "description": "User profile ID associated with this request.",
21115	//       "format": "int64",
21116	//       "location": "path",
21117	//       "required": true,
21118	//       "type": "string"
21119	//     },
21120	//     "sortOrder": {
21121	//       "default": "ASCENDING",
21122	//       "description": "Order of sorted results.",
21123	//       "enum": [
21124	//         "ASCENDING",
21125	//         "DESCENDING"
21126	//       ],
21127	//       "enumDescriptions": [
21128	//         "",
21129	//         ""
21130	//       ],
21131	//       "location": "query",
21132	//       "type": "string"
21133	//     }
21134	//   },
21135	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
21136	//   "response": {
21137	//     "$ref": "CampaignCreativeAssociationsListResponse"
21138	//   },
21139	//   "scopes": [
21140	//     "https://www.googleapis.com/auth/dfatrafficking"
21141	//   ]
21142	// }
21143
21144}
21145
21146// Pages invokes f for each page of results.
21147// A non-nil error returned from f will halt the iteration.
21148// The provided context supersedes any context provided to the Context method.
21149func (c *CampaignCreativeAssociationsListCall) Pages(ctx context.Context, f func(*CampaignCreativeAssociationsListResponse) error) error {
21150	c.ctx_ = ctx
21151	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21152	for {
21153		x, err := c.Do()
21154		if err != nil {
21155			return err
21156		}
21157		if err := f(x); err != nil {
21158			return err
21159		}
21160		if x.NextPageToken == "" {
21161			return nil
21162		}
21163		c.PageToken(x.NextPageToken)
21164	}
21165}
21166
21167// method id "dfareporting.campaigns.get":
21168
21169type CampaignsGetCall struct {
21170	s            *Service
21171	profileId    int64
21172	id           int64
21173	urlParams_   gensupport.URLParams
21174	ifNoneMatch_ string
21175	ctx_         context.Context
21176	header_      http.Header
21177}
21178
21179// Get: Gets one campaign by ID.
21180func (r *CampaignsService) Get(profileId int64, id int64) *CampaignsGetCall {
21181	c := &CampaignsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21182	c.profileId = profileId
21183	c.id = id
21184	return c
21185}
21186
21187// Fields allows partial responses to be retrieved. See
21188// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21189// for more information.
21190func (c *CampaignsGetCall) Fields(s ...googleapi.Field) *CampaignsGetCall {
21191	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21192	return c
21193}
21194
21195// IfNoneMatch sets the optional parameter which makes the operation
21196// fail if the object's ETag matches the given value. This is useful for
21197// getting updates only after the object has changed since the last
21198// request. Use googleapi.IsNotModified to check whether the response
21199// error from Do is the result of In-None-Match.
21200func (c *CampaignsGetCall) IfNoneMatch(entityTag string) *CampaignsGetCall {
21201	c.ifNoneMatch_ = entityTag
21202	return c
21203}
21204
21205// Context sets the context to be used in this call's Do method. Any
21206// pending HTTP request will be aborted if the provided context is
21207// canceled.
21208func (c *CampaignsGetCall) Context(ctx context.Context) *CampaignsGetCall {
21209	c.ctx_ = ctx
21210	return c
21211}
21212
21213// Header returns an http.Header that can be modified by the caller to
21214// add HTTP headers to the request.
21215func (c *CampaignsGetCall) Header() http.Header {
21216	if c.header_ == nil {
21217		c.header_ = make(http.Header)
21218	}
21219	return c.header_
21220}
21221
21222func (c *CampaignsGetCall) doRequest(alt string) (*http.Response, error) {
21223	reqHeaders := make(http.Header)
21224	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
21225	for k, v := range c.header_ {
21226		reqHeaders[k] = v
21227	}
21228	reqHeaders.Set("User-Agent", c.s.userAgent())
21229	if c.ifNoneMatch_ != "" {
21230		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21231	}
21232	var body io.Reader = nil
21233	c.urlParams_.Set("alt", alt)
21234	c.urlParams_.Set("prettyPrint", "false")
21235	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{id}")
21236	urls += "?" + c.urlParams_.Encode()
21237	req, err := http.NewRequest("GET", urls, body)
21238	if err != nil {
21239		return nil, err
21240	}
21241	req.Header = reqHeaders
21242	googleapi.Expand(req.URL, map[string]string{
21243		"profileId": strconv.FormatInt(c.profileId, 10),
21244		"id":        strconv.FormatInt(c.id, 10),
21245	})
21246	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21247}
21248
21249// Do executes the "dfareporting.campaigns.get" call.
21250// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21251// code is an error. Response headers are in either
21252// *Campaign.ServerResponse.Header or (if a response was returned at
21253// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21254// to check whether the returned error was because
21255// http.StatusNotModified was returned.
21256func (c *CampaignsGetCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21257	gensupport.SetOptions(c.urlParams_, opts...)
21258	res, err := c.doRequest("json")
21259	if res != nil && res.StatusCode == http.StatusNotModified {
21260		if res.Body != nil {
21261			res.Body.Close()
21262		}
21263		return nil, &googleapi.Error{
21264			Code:   res.StatusCode,
21265			Header: res.Header,
21266		}
21267	}
21268	if err != nil {
21269		return nil, err
21270	}
21271	defer googleapi.CloseBody(res)
21272	if err := googleapi.CheckResponse(res); err != nil {
21273		return nil, err
21274	}
21275	ret := &Campaign{
21276		ServerResponse: googleapi.ServerResponse{
21277			Header:         res.Header,
21278			HTTPStatusCode: res.StatusCode,
21279		},
21280	}
21281	target := &ret
21282	if err := gensupport.DecodeResponse(target, res); err != nil {
21283		return nil, err
21284	}
21285	return ret, nil
21286	// {
21287	//   "description": "Gets one campaign by ID.",
21288	//   "httpMethod": "GET",
21289	//   "id": "dfareporting.campaigns.get",
21290	//   "parameterOrder": [
21291	//     "profileId",
21292	//     "id"
21293	//   ],
21294	//   "parameters": {
21295	//     "id": {
21296	//       "description": "Campaign ID.",
21297	//       "format": "int64",
21298	//       "location": "path",
21299	//       "required": true,
21300	//       "type": "string"
21301	//     },
21302	//     "profileId": {
21303	//       "description": "User profile ID associated with this request.",
21304	//       "format": "int64",
21305	//       "location": "path",
21306	//       "required": true,
21307	//       "type": "string"
21308	//     }
21309	//   },
21310	//   "path": "userprofiles/{profileId}/campaigns/{id}",
21311	//   "response": {
21312	//     "$ref": "Campaign"
21313	//   },
21314	//   "scopes": [
21315	//     "https://www.googleapis.com/auth/dfatrafficking"
21316	//   ]
21317	// }
21318
21319}
21320
21321// method id "dfareporting.campaigns.insert":
21322
21323type CampaignsInsertCall struct {
21324	s          *Service
21325	profileId  int64
21326	campaign   *Campaign
21327	urlParams_ gensupport.URLParams
21328	ctx_       context.Context
21329	header_    http.Header
21330}
21331
21332// Insert: Inserts a new campaign.
21333func (r *CampaignsService) Insert(profileId int64, campaign *Campaign) *CampaignsInsertCall {
21334	c := &CampaignsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21335	c.profileId = profileId
21336	c.campaign = campaign
21337	return c
21338}
21339
21340// Fields allows partial responses to be retrieved. See
21341// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21342// for more information.
21343func (c *CampaignsInsertCall) Fields(s ...googleapi.Field) *CampaignsInsertCall {
21344	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21345	return c
21346}
21347
21348// Context sets the context to be used in this call's Do method. Any
21349// pending HTTP request will be aborted if the provided context is
21350// canceled.
21351func (c *CampaignsInsertCall) Context(ctx context.Context) *CampaignsInsertCall {
21352	c.ctx_ = ctx
21353	return c
21354}
21355
21356// Header returns an http.Header that can be modified by the caller to
21357// add HTTP headers to the request.
21358func (c *CampaignsInsertCall) Header() http.Header {
21359	if c.header_ == nil {
21360		c.header_ = make(http.Header)
21361	}
21362	return c.header_
21363}
21364
21365func (c *CampaignsInsertCall) doRequest(alt string) (*http.Response, error) {
21366	reqHeaders := make(http.Header)
21367	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
21368	for k, v := range c.header_ {
21369		reqHeaders[k] = v
21370	}
21371	reqHeaders.Set("User-Agent", c.s.userAgent())
21372	var body io.Reader = nil
21373	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21374	if err != nil {
21375		return nil, err
21376	}
21377	reqHeaders.Set("Content-Type", "application/json")
21378	c.urlParams_.Set("alt", alt)
21379	c.urlParams_.Set("prettyPrint", "false")
21380	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21381	urls += "?" + c.urlParams_.Encode()
21382	req, err := http.NewRequest("POST", urls, body)
21383	if err != nil {
21384		return nil, err
21385	}
21386	req.Header = reqHeaders
21387	googleapi.Expand(req.URL, map[string]string{
21388		"profileId": strconv.FormatInt(c.profileId, 10),
21389	})
21390	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21391}
21392
21393// Do executes the "dfareporting.campaigns.insert" call.
21394// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21395// code is an error. Response headers are in either
21396// *Campaign.ServerResponse.Header or (if a response was returned at
21397// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21398// to check whether the returned error was because
21399// http.StatusNotModified was returned.
21400func (c *CampaignsInsertCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21401	gensupport.SetOptions(c.urlParams_, opts...)
21402	res, err := c.doRequest("json")
21403	if res != nil && res.StatusCode == http.StatusNotModified {
21404		if res.Body != nil {
21405			res.Body.Close()
21406		}
21407		return nil, &googleapi.Error{
21408			Code:   res.StatusCode,
21409			Header: res.Header,
21410		}
21411	}
21412	if err != nil {
21413		return nil, err
21414	}
21415	defer googleapi.CloseBody(res)
21416	if err := googleapi.CheckResponse(res); err != nil {
21417		return nil, err
21418	}
21419	ret := &Campaign{
21420		ServerResponse: googleapi.ServerResponse{
21421			Header:         res.Header,
21422			HTTPStatusCode: res.StatusCode,
21423		},
21424	}
21425	target := &ret
21426	if err := gensupport.DecodeResponse(target, res); err != nil {
21427		return nil, err
21428	}
21429	return ret, nil
21430	// {
21431	//   "description": "Inserts a new campaign.",
21432	//   "httpMethod": "POST",
21433	//   "id": "dfareporting.campaigns.insert",
21434	//   "parameterOrder": [
21435	//     "profileId"
21436	//   ],
21437	//   "parameters": {
21438	//     "profileId": {
21439	//       "description": "User profile ID associated with this request.",
21440	//       "format": "int64",
21441	//       "location": "path",
21442	//       "required": true,
21443	//       "type": "string"
21444	//     }
21445	//   },
21446	//   "path": "userprofiles/{profileId}/campaigns",
21447	//   "request": {
21448	//     "$ref": "Campaign"
21449	//   },
21450	//   "response": {
21451	//     "$ref": "Campaign"
21452	//   },
21453	//   "scopes": [
21454	//     "https://www.googleapis.com/auth/dfatrafficking"
21455	//   ]
21456	// }
21457
21458}
21459
21460// method id "dfareporting.campaigns.list":
21461
21462type CampaignsListCall struct {
21463	s            *Service
21464	profileId    int64
21465	urlParams_   gensupport.URLParams
21466	ifNoneMatch_ string
21467	ctx_         context.Context
21468	header_      http.Header
21469}
21470
21471// List: Retrieves a list of campaigns, possibly filtered. This method
21472// supports paging.
21473func (r *CampaignsService) List(profileId int64) *CampaignsListCall {
21474	c := &CampaignsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21475	c.profileId = profileId
21476	return c
21477}
21478
21479// AdvertiserGroupIds sets the optional parameter "advertiserGroupIds":
21480// Select only campaigns whose advertisers belong to these advertiser
21481// groups.
21482func (c *CampaignsListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *CampaignsListCall {
21483	var advertiserGroupIds_ []string
21484	for _, v := range advertiserGroupIds {
21485		advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
21486	}
21487	c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
21488	return c
21489}
21490
21491// AdvertiserIds sets the optional parameter "advertiserIds": Select
21492// only campaigns that belong to these advertisers.
21493func (c *CampaignsListCall) AdvertiserIds(advertiserIds ...int64) *CampaignsListCall {
21494	var advertiserIds_ []string
21495	for _, v := range advertiserIds {
21496		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
21497	}
21498	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
21499	return c
21500}
21501
21502// Archived sets the optional parameter "archived": Select only archived
21503// campaigns. Don't set this field to select both archived and
21504// non-archived campaigns.
21505func (c *CampaignsListCall) Archived(archived bool) *CampaignsListCall {
21506	c.urlParams_.Set("archived", fmt.Sprint(archived))
21507	return c
21508}
21509
21510// AtLeastOneOptimizationActivity sets the optional parameter
21511// "atLeastOneOptimizationActivity": Select only campaigns that have at
21512// least one optimization activity.
21513func (c *CampaignsListCall) AtLeastOneOptimizationActivity(atLeastOneOptimizationActivity bool) *CampaignsListCall {
21514	c.urlParams_.Set("atLeastOneOptimizationActivity", fmt.Sprint(atLeastOneOptimizationActivity))
21515	return c
21516}
21517
21518// ExcludedIds sets the optional parameter "excludedIds": Exclude
21519// campaigns with these IDs.
21520func (c *CampaignsListCall) ExcludedIds(excludedIds ...int64) *CampaignsListCall {
21521	var excludedIds_ []string
21522	for _, v := range excludedIds {
21523		excludedIds_ = append(excludedIds_, fmt.Sprint(v))
21524	}
21525	c.urlParams_.SetMulti("excludedIds", excludedIds_)
21526	return c
21527}
21528
21529// Ids sets the optional parameter "ids": Select only campaigns with
21530// these IDs.
21531func (c *CampaignsListCall) Ids(ids ...int64) *CampaignsListCall {
21532	var ids_ []string
21533	for _, v := range ids {
21534		ids_ = append(ids_, fmt.Sprint(v))
21535	}
21536	c.urlParams_.SetMulti("ids", ids_)
21537	return c
21538}
21539
21540// MaxResults sets the optional parameter "maxResults": Maximum number
21541// of results to return.
21542func (c *CampaignsListCall) MaxResults(maxResults int64) *CampaignsListCall {
21543	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
21544	return c
21545}
21546
21547// OverriddenEventTagId sets the optional parameter
21548// "overriddenEventTagId": Select only campaigns that have overridden
21549// this event tag ID.
21550func (c *CampaignsListCall) OverriddenEventTagId(overriddenEventTagId int64) *CampaignsListCall {
21551	c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
21552	return c
21553}
21554
21555// PageToken sets the optional parameter "pageToken": Value of the
21556// nextPageToken from the previous result page.
21557func (c *CampaignsListCall) PageToken(pageToken string) *CampaignsListCall {
21558	c.urlParams_.Set("pageToken", pageToken)
21559	return c
21560}
21561
21562// SearchString sets the optional parameter "searchString": Allows
21563// searching for campaigns by name or ID. Wildcards (*) are allowed. For
21564// example, "campaign*2015" will return campaigns with names like
21565// "campaign June 2015", "campaign April 2015", or simply "campaign
21566// 2015". Most of the searches also add wildcards implicitly at the
21567// start and the end of the search string. For example, a search string
21568// of "campaign" will match campaigns with name "my campaign", "campaign
21569// 2015", or simply "campaign".
21570func (c *CampaignsListCall) SearchString(searchString string) *CampaignsListCall {
21571	c.urlParams_.Set("searchString", searchString)
21572	return c
21573}
21574
21575// SortField sets the optional parameter "sortField": Field by which to
21576// sort the list.
21577//
21578// Possible values:
21579//   "ID" (default)
21580//   "NAME"
21581func (c *CampaignsListCall) SortField(sortField string) *CampaignsListCall {
21582	c.urlParams_.Set("sortField", sortField)
21583	return c
21584}
21585
21586// SortOrder sets the optional parameter "sortOrder": Order of sorted
21587// results.
21588//
21589// Possible values:
21590//   "ASCENDING" (default)
21591//   "DESCENDING"
21592func (c *CampaignsListCall) SortOrder(sortOrder string) *CampaignsListCall {
21593	c.urlParams_.Set("sortOrder", sortOrder)
21594	return c
21595}
21596
21597// SubaccountId sets the optional parameter "subaccountId": Select only
21598// campaigns that belong to this subaccount.
21599func (c *CampaignsListCall) SubaccountId(subaccountId int64) *CampaignsListCall {
21600	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
21601	return c
21602}
21603
21604// Fields allows partial responses to be retrieved. See
21605// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21606// for more information.
21607func (c *CampaignsListCall) Fields(s ...googleapi.Field) *CampaignsListCall {
21608	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21609	return c
21610}
21611
21612// IfNoneMatch sets the optional parameter which makes the operation
21613// fail if the object's ETag matches the given value. This is useful for
21614// getting updates only after the object has changed since the last
21615// request. Use googleapi.IsNotModified to check whether the response
21616// error from Do is the result of In-None-Match.
21617func (c *CampaignsListCall) IfNoneMatch(entityTag string) *CampaignsListCall {
21618	c.ifNoneMatch_ = entityTag
21619	return c
21620}
21621
21622// Context sets the context to be used in this call's Do method. Any
21623// pending HTTP request will be aborted if the provided context is
21624// canceled.
21625func (c *CampaignsListCall) Context(ctx context.Context) *CampaignsListCall {
21626	c.ctx_ = ctx
21627	return c
21628}
21629
21630// Header returns an http.Header that can be modified by the caller to
21631// add HTTP headers to the request.
21632func (c *CampaignsListCall) Header() http.Header {
21633	if c.header_ == nil {
21634		c.header_ = make(http.Header)
21635	}
21636	return c.header_
21637}
21638
21639func (c *CampaignsListCall) doRequest(alt string) (*http.Response, error) {
21640	reqHeaders := make(http.Header)
21641	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
21642	for k, v := range c.header_ {
21643		reqHeaders[k] = v
21644	}
21645	reqHeaders.Set("User-Agent", c.s.userAgent())
21646	if c.ifNoneMatch_ != "" {
21647		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21648	}
21649	var body io.Reader = nil
21650	c.urlParams_.Set("alt", alt)
21651	c.urlParams_.Set("prettyPrint", "false")
21652	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21653	urls += "?" + c.urlParams_.Encode()
21654	req, err := http.NewRequest("GET", urls, body)
21655	if err != nil {
21656		return nil, err
21657	}
21658	req.Header = reqHeaders
21659	googleapi.Expand(req.URL, map[string]string{
21660		"profileId": strconv.FormatInt(c.profileId, 10),
21661	})
21662	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21663}
21664
21665// Do executes the "dfareporting.campaigns.list" call.
21666// Exactly one of *CampaignsListResponse or error will be non-nil. Any
21667// non-2xx status code is an error. Response headers are in either
21668// *CampaignsListResponse.ServerResponse.Header or (if a response was
21669// returned at all) in error.(*googleapi.Error).Header. Use
21670// googleapi.IsNotModified to check whether the returned error was
21671// because http.StatusNotModified was returned.
21672func (c *CampaignsListCall) Do(opts ...googleapi.CallOption) (*CampaignsListResponse, error) {
21673	gensupport.SetOptions(c.urlParams_, opts...)
21674	res, err := c.doRequest("json")
21675	if res != nil && res.StatusCode == http.StatusNotModified {
21676		if res.Body != nil {
21677			res.Body.Close()
21678		}
21679		return nil, &googleapi.Error{
21680			Code:   res.StatusCode,
21681			Header: res.Header,
21682		}
21683	}
21684	if err != nil {
21685		return nil, err
21686	}
21687	defer googleapi.CloseBody(res)
21688	if err := googleapi.CheckResponse(res); err != nil {
21689		return nil, err
21690	}
21691	ret := &CampaignsListResponse{
21692		ServerResponse: googleapi.ServerResponse{
21693			Header:         res.Header,
21694			HTTPStatusCode: res.StatusCode,
21695		},
21696	}
21697	target := &ret
21698	if err := gensupport.DecodeResponse(target, res); err != nil {
21699		return nil, err
21700	}
21701	return ret, nil
21702	// {
21703	//   "description": "Retrieves a list of campaigns, possibly filtered. This method supports paging.",
21704	//   "httpMethod": "GET",
21705	//   "id": "dfareporting.campaigns.list",
21706	//   "parameterOrder": [
21707	//     "profileId"
21708	//   ],
21709	//   "parameters": {
21710	//     "advertiserGroupIds": {
21711	//       "description": "Select only campaigns whose advertisers belong to these advertiser groups.",
21712	//       "format": "int64",
21713	//       "location": "query",
21714	//       "repeated": true,
21715	//       "type": "string"
21716	//     },
21717	//     "advertiserIds": {
21718	//       "description": "Select only campaigns that belong to these advertisers.",
21719	//       "format": "int64",
21720	//       "location": "query",
21721	//       "repeated": true,
21722	//       "type": "string"
21723	//     },
21724	//     "archived": {
21725	//       "description": "Select only archived campaigns. Don't set this field to select both archived and non-archived campaigns.",
21726	//       "location": "query",
21727	//       "type": "boolean"
21728	//     },
21729	//     "atLeastOneOptimizationActivity": {
21730	//       "description": "Select only campaigns that have at least one optimization activity.",
21731	//       "location": "query",
21732	//       "type": "boolean"
21733	//     },
21734	//     "excludedIds": {
21735	//       "description": "Exclude campaigns with these IDs.",
21736	//       "format": "int64",
21737	//       "location": "query",
21738	//       "repeated": true,
21739	//       "type": "string"
21740	//     },
21741	//     "ids": {
21742	//       "description": "Select only campaigns with these IDs.",
21743	//       "format": "int64",
21744	//       "location": "query",
21745	//       "repeated": true,
21746	//       "type": "string"
21747	//     },
21748	//     "maxResults": {
21749	//       "default": "1000",
21750	//       "description": "Maximum number of results to return.",
21751	//       "format": "int32",
21752	//       "location": "query",
21753	//       "maximum": "1000",
21754	//       "minimum": "0",
21755	//       "type": "integer"
21756	//     },
21757	//     "overriddenEventTagId": {
21758	//       "description": "Select only campaigns that have overridden this event tag ID.",
21759	//       "format": "int64",
21760	//       "location": "query",
21761	//       "type": "string"
21762	//     },
21763	//     "pageToken": {
21764	//       "description": "Value of the nextPageToken from the previous result page.",
21765	//       "location": "query",
21766	//       "type": "string"
21767	//     },
21768	//     "profileId": {
21769	//       "description": "User profile ID associated with this request.",
21770	//       "format": "int64",
21771	//       "location": "path",
21772	//       "required": true,
21773	//       "type": "string"
21774	//     },
21775	//     "searchString": {
21776	//       "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\".",
21777	//       "location": "query",
21778	//       "type": "string"
21779	//     },
21780	//     "sortField": {
21781	//       "default": "ID",
21782	//       "description": "Field by which to sort the list.",
21783	//       "enum": [
21784	//         "ID",
21785	//         "NAME"
21786	//       ],
21787	//       "enumDescriptions": [
21788	//         "",
21789	//         ""
21790	//       ],
21791	//       "location": "query",
21792	//       "type": "string"
21793	//     },
21794	//     "sortOrder": {
21795	//       "default": "ASCENDING",
21796	//       "description": "Order of sorted results.",
21797	//       "enum": [
21798	//         "ASCENDING",
21799	//         "DESCENDING"
21800	//       ],
21801	//       "enumDescriptions": [
21802	//         "",
21803	//         ""
21804	//       ],
21805	//       "location": "query",
21806	//       "type": "string"
21807	//     },
21808	//     "subaccountId": {
21809	//       "description": "Select only campaigns that belong to this subaccount.",
21810	//       "format": "int64",
21811	//       "location": "query",
21812	//       "type": "string"
21813	//     }
21814	//   },
21815	//   "path": "userprofiles/{profileId}/campaigns",
21816	//   "response": {
21817	//     "$ref": "CampaignsListResponse"
21818	//   },
21819	//   "scopes": [
21820	//     "https://www.googleapis.com/auth/dfatrafficking"
21821	//   ]
21822	// }
21823
21824}
21825
21826// Pages invokes f for each page of results.
21827// A non-nil error returned from f will halt the iteration.
21828// The provided context supersedes any context provided to the Context method.
21829func (c *CampaignsListCall) Pages(ctx context.Context, f func(*CampaignsListResponse) error) error {
21830	c.ctx_ = ctx
21831	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21832	for {
21833		x, err := c.Do()
21834		if err != nil {
21835			return err
21836		}
21837		if err := f(x); err != nil {
21838			return err
21839		}
21840		if x.NextPageToken == "" {
21841			return nil
21842		}
21843		c.PageToken(x.NextPageToken)
21844	}
21845}
21846
21847// method id "dfareporting.campaigns.patch":
21848
21849type CampaignsPatchCall struct {
21850	s          *Service
21851	profileId  int64
21852	campaign   *Campaign
21853	urlParams_ gensupport.URLParams
21854	ctx_       context.Context
21855	header_    http.Header
21856}
21857
21858// Patch: Updates an existing campaign. This method supports patch
21859// semantics.
21860func (r *CampaignsService) Patch(profileId int64, id int64, campaign *Campaign) *CampaignsPatchCall {
21861	c := &CampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21862	c.profileId = profileId
21863	c.urlParams_.Set("id", fmt.Sprint(id))
21864	c.campaign = campaign
21865	return c
21866}
21867
21868// Fields allows partial responses to be retrieved. See
21869// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21870// for more information.
21871func (c *CampaignsPatchCall) Fields(s ...googleapi.Field) *CampaignsPatchCall {
21872	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21873	return c
21874}
21875
21876// Context sets the context to be used in this call's Do method. Any
21877// pending HTTP request will be aborted if the provided context is
21878// canceled.
21879func (c *CampaignsPatchCall) Context(ctx context.Context) *CampaignsPatchCall {
21880	c.ctx_ = ctx
21881	return c
21882}
21883
21884// Header returns an http.Header that can be modified by the caller to
21885// add HTTP headers to the request.
21886func (c *CampaignsPatchCall) Header() http.Header {
21887	if c.header_ == nil {
21888		c.header_ = make(http.Header)
21889	}
21890	return c.header_
21891}
21892
21893func (c *CampaignsPatchCall) doRequest(alt string) (*http.Response, error) {
21894	reqHeaders := make(http.Header)
21895	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
21896	for k, v := range c.header_ {
21897		reqHeaders[k] = v
21898	}
21899	reqHeaders.Set("User-Agent", c.s.userAgent())
21900	var body io.Reader = nil
21901	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21902	if err != nil {
21903		return nil, err
21904	}
21905	reqHeaders.Set("Content-Type", "application/json")
21906	c.urlParams_.Set("alt", alt)
21907	c.urlParams_.Set("prettyPrint", "false")
21908	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21909	urls += "?" + c.urlParams_.Encode()
21910	req, err := http.NewRequest("PATCH", urls, body)
21911	if err != nil {
21912		return nil, err
21913	}
21914	req.Header = reqHeaders
21915	googleapi.Expand(req.URL, map[string]string{
21916		"profileId": strconv.FormatInt(c.profileId, 10),
21917	})
21918	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21919}
21920
21921// Do executes the "dfareporting.campaigns.patch" call.
21922// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21923// code is an error. Response headers are in either
21924// *Campaign.ServerResponse.Header or (if a response was returned at
21925// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21926// to check whether the returned error was because
21927// http.StatusNotModified was returned.
21928func (c *CampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21929	gensupport.SetOptions(c.urlParams_, opts...)
21930	res, err := c.doRequest("json")
21931	if res != nil && res.StatusCode == http.StatusNotModified {
21932		if res.Body != nil {
21933			res.Body.Close()
21934		}
21935		return nil, &googleapi.Error{
21936			Code:   res.StatusCode,
21937			Header: res.Header,
21938		}
21939	}
21940	if err != nil {
21941		return nil, err
21942	}
21943	defer googleapi.CloseBody(res)
21944	if err := googleapi.CheckResponse(res); err != nil {
21945		return nil, err
21946	}
21947	ret := &Campaign{
21948		ServerResponse: googleapi.ServerResponse{
21949			Header:         res.Header,
21950			HTTPStatusCode: res.StatusCode,
21951		},
21952	}
21953	target := &ret
21954	if err := gensupport.DecodeResponse(target, res); err != nil {
21955		return nil, err
21956	}
21957	return ret, nil
21958	// {
21959	//   "description": "Updates an existing campaign. This method supports patch semantics.",
21960	//   "httpMethod": "PATCH",
21961	//   "id": "dfareporting.campaigns.patch",
21962	//   "parameterOrder": [
21963	//     "profileId",
21964	//     "id"
21965	//   ],
21966	//   "parameters": {
21967	//     "id": {
21968	//       "description": "Campaign ID.",
21969	//       "format": "int64",
21970	//       "location": "query",
21971	//       "required": true,
21972	//       "type": "string"
21973	//     },
21974	//     "profileId": {
21975	//       "description": "User profile ID associated with this request.",
21976	//       "format": "int64",
21977	//       "location": "path",
21978	//       "required": true,
21979	//       "type": "string"
21980	//     }
21981	//   },
21982	//   "path": "userprofiles/{profileId}/campaigns",
21983	//   "request": {
21984	//     "$ref": "Campaign"
21985	//   },
21986	//   "response": {
21987	//     "$ref": "Campaign"
21988	//   },
21989	//   "scopes": [
21990	//     "https://www.googleapis.com/auth/dfatrafficking"
21991	//   ]
21992	// }
21993
21994}
21995
21996// method id "dfareporting.campaigns.update":
21997
21998type CampaignsUpdateCall struct {
21999	s          *Service
22000	profileId  int64
22001	campaign   *Campaign
22002	urlParams_ gensupport.URLParams
22003	ctx_       context.Context
22004	header_    http.Header
22005}
22006
22007// Update: Updates an existing campaign.
22008func (r *CampaignsService) Update(profileId int64, campaign *Campaign) *CampaignsUpdateCall {
22009	c := &CampaignsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22010	c.profileId = profileId
22011	c.campaign = campaign
22012	return c
22013}
22014
22015// Fields allows partial responses to be retrieved. See
22016// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22017// for more information.
22018func (c *CampaignsUpdateCall) Fields(s ...googleapi.Field) *CampaignsUpdateCall {
22019	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22020	return c
22021}
22022
22023// Context sets the context to be used in this call's Do method. Any
22024// pending HTTP request will be aborted if the provided context is
22025// canceled.
22026func (c *CampaignsUpdateCall) Context(ctx context.Context) *CampaignsUpdateCall {
22027	c.ctx_ = ctx
22028	return c
22029}
22030
22031// Header returns an http.Header that can be modified by the caller to
22032// add HTTP headers to the request.
22033func (c *CampaignsUpdateCall) Header() http.Header {
22034	if c.header_ == nil {
22035		c.header_ = make(http.Header)
22036	}
22037	return c.header_
22038}
22039
22040func (c *CampaignsUpdateCall) doRequest(alt string) (*http.Response, error) {
22041	reqHeaders := make(http.Header)
22042	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
22043	for k, v := range c.header_ {
22044		reqHeaders[k] = v
22045	}
22046	reqHeaders.Set("User-Agent", c.s.userAgent())
22047	var body io.Reader = nil
22048	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
22049	if err != nil {
22050		return nil, err
22051	}
22052	reqHeaders.Set("Content-Type", "application/json")
22053	c.urlParams_.Set("alt", alt)
22054	c.urlParams_.Set("prettyPrint", "false")
22055	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
22056	urls += "?" + c.urlParams_.Encode()
22057	req, err := http.NewRequest("PUT", urls, body)
22058	if err != nil {
22059		return nil, err
22060	}
22061	req.Header = reqHeaders
22062	googleapi.Expand(req.URL, map[string]string{
22063		"profileId": strconv.FormatInt(c.profileId, 10),
22064	})
22065	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22066}
22067
22068// Do executes the "dfareporting.campaigns.update" call.
22069// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
22070// code is an error. Response headers are in either
22071// *Campaign.ServerResponse.Header or (if a response was returned at
22072// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22073// to check whether the returned error was because
22074// http.StatusNotModified was returned.
22075func (c *CampaignsUpdateCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
22076	gensupport.SetOptions(c.urlParams_, opts...)
22077	res, err := c.doRequest("json")
22078	if res != nil && res.StatusCode == http.StatusNotModified {
22079		if res.Body != nil {
22080			res.Body.Close()
22081		}
22082		return nil, &googleapi.Error{
22083			Code:   res.StatusCode,
22084			Header: res.Header,
22085		}
22086	}
22087	if err != nil {
22088		return nil, err
22089	}
22090	defer googleapi.CloseBody(res)
22091	if err := googleapi.CheckResponse(res); err != nil {
22092		return nil, err
22093	}
22094	ret := &Campaign{
22095		ServerResponse: googleapi.ServerResponse{
22096			Header:         res.Header,
22097			HTTPStatusCode: res.StatusCode,
22098		},
22099	}
22100	target := &ret
22101	if err := gensupport.DecodeResponse(target, res); err != nil {
22102		return nil, err
22103	}
22104	return ret, nil
22105	// {
22106	//   "description": "Updates an existing campaign.",
22107	//   "httpMethod": "PUT",
22108	//   "id": "dfareporting.campaigns.update",
22109	//   "parameterOrder": [
22110	//     "profileId"
22111	//   ],
22112	//   "parameters": {
22113	//     "profileId": {
22114	//       "description": "User profile ID associated with this request.",
22115	//       "format": "int64",
22116	//       "location": "path",
22117	//       "required": true,
22118	//       "type": "string"
22119	//     }
22120	//   },
22121	//   "path": "userprofiles/{profileId}/campaigns",
22122	//   "request": {
22123	//     "$ref": "Campaign"
22124	//   },
22125	//   "response": {
22126	//     "$ref": "Campaign"
22127	//   },
22128	//   "scopes": [
22129	//     "https://www.googleapis.com/auth/dfatrafficking"
22130	//   ]
22131	// }
22132
22133}
22134
22135// method id "dfareporting.changeLogs.get":
22136
22137type ChangeLogsGetCall struct {
22138	s            *Service
22139	profileId    int64
22140	id           int64
22141	urlParams_   gensupport.URLParams
22142	ifNoneMatch_ string
22143	ctx_         context.Context
22144	header_      http.Header
22145}
22146
22147// Get: Gets one change log by ID.
22148func (r *ChangeLogsService) Get(profileId int64, id int64) *ChangeLogsGetCall {
22149	c := &ChangeLogsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22150	c.profileId = profileId
22151	c.id = id
22152	return c
22153}
22154
22155// Fields allows partial responses to be retrieved. See
22156// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22157// for more information.
22158func (c *ChangeLogsGetCall) Fields(s ...googleapi.Field) *ChangeLogsGetCall {
22159	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22160	return c
22161}
22162
22163// IfNoneMatch sets the optional parameter which makes the operation
22164// fail if the object's ETag matches the given value. This is useful for
22165// getting updates only after the object has changed since the last
22166// request. Use googleapi.IsNotModified to check whether the response
22167// error from Do is the result of In-None-Match.
22168func (c *ChangeLogsGetCall) IfNoneMatch(entityTag string) *ChangeLogsGetCall {
22169	c.ifNoneMatch_ = entityTag
22170	return c
22171}
22172
22173// Context sets the context to be used in this call's Do method. Any
22174// pending HTTP request will be aborted if the provided context is
22175// canceled.
22176func (c *ChangeLogsGetCall) Context(ctx context.Context) *ChangeLogsGetCall {
22177	c.ctx_ = ctx
22178	return c
22179}
22180
22181// Header returns an http.Header that can be modified by the caller to
22182// add HTTP headers to the request.
22183func (c *ChangeLogsGetCall) Header() http.Header {
22184	if c.header_ == nil {
22185		c.header_ = make(http.Header)
22186	}
22187	return c.header_
22188}
22189
22190func (c *ChangeLogsGetCall) doRequest(alt string) (*http.Response, error) {
22191	reqHeaders := make(http.Header)
22192	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
22193	for k, v := range c.header_ {
22194		reqHeaders[k] = v
22195	}
22196	reqHeaders.Set("User-Agent", c.s.userAgent())
22197	if c.ifNoneMatch_ != "" {
22198		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22199	}
22200	var body io.Reader = nil
22201	c.urlParams_.Set("alt", alt)
22202	c.urlParams_.Set("prettyPrint", "false")
22203	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs/{id}")
22204	urls += "?" + c.urlParams_.Encode()
22205	req, err := http.NewRequest("GET", urls, body)
22206	if err != nil {
22207		return nil, err
22208	}
22209	req.Header = reqHeaders
22210	googleapi.Expand(req.URL, map[string]string{
22211		"profileId": strconv.FormatInt(c.profileId, 10),
22212		"id":        strconv.FormatInt(c.id, 10),
22213	})
22214	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22215}
22216
22217// Do executes the "dfareporting.changeLogs.get" call.
22218// Exactly one of *ChangeLog or error will be non-nil. Any non-2xx
22219// status code is an error. Response headers are in either
22220// *ChangeLog.ServerResponse.Header or (if a response was returned at
22221// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22222// to check whether the returned error was because
22223// http.StatusNotModified was returned.
22224func (c *ChangeLogsGetCall) Do(opts ...googleapi.CallOption) (*ChangeLog, error) {
22225	gensupport.SetOptions(c.urlParams_, opts...)
22226	res, err := c.doRequest("json")
22227	if res != nil && res.StatusCode == http.StatusNotModified {
22228		if res.Body != nil {
22229			res.Body.Close()
22230		}
22231		return nil, &googleapi.Error{
22232			Code:   res.StatusCode,
22233			Header: res.Header,
22234		}
22235	}
22236	if err != nil {
22237		return nil, err
22238	}
22239	defer googleapi.CloseBody(res)
22240	if err := googleapi.CheckResponse(res); err != nil {
22241		return nil, err
22242	}
22243	ret := &ChangeLog{
22244		ServerResponse: googleapi.ServerResponse{
22245			Header:         res.Header,
22246			HTTPStatusCode: res.StatusCode,
22247		},
22248	}
22249	target := &ret
22250	if err := gensupport.DecodeResponse(target, res); err != nil {
22251		return nil, err
22252	}
22253	return ret, nil
22254	// {
22255	//   "description": "Gets one change log by ID.",
22256	//   "httpMethod": "GET",
22257	//   "id": "dfareporting.changeLogs.get",
22258	//   "parameterOrder": [
22259	//     "profileId",
22260	//     "id"
22261	//   ],
22262	//   "parameters": {
22263	//     "id": {
22264	//       "description": "Change log ID.",
22265	//       "format": "int64",
22266	//       "location": "path",
22267	//       "required": true,
22268	//       "type": "string"
22269	//     },
22270	//     "profileId": {
22271	//       "description": "User profile ID associated with this request.",
22272	//       "format": "int64",
22273	//       "location": "path",
22274	//       "required": true,
22275	//       "type": "string"
22276	//     }
22277	//   },
22278	//   "path": "userprofiles/{profileId}/changeLogs/{id}",
22279	//   "response": {
22280	//     "$ref": "ChangeLog"
22281	//   },
22282	//   "scopes": [
22283	//     "https://www.googleapis.com/auth/dfatrafficking"
22284	//   ]
22285	// }
22286
22287}
22288
22289// method id "dfareporting.changeLogs.list":
22290
22291type ChangeLogsListCall struct {
22292	s            *Service
22293	profileId    int64
22294	urlParams_   gensupport.URLParams
22295	ifNoneMatch_ string
22296	ctx_         context.Context
22297	header_      http.Header
22298}
22299
22300// List: Retrieves a list of change logs. This method supports paging.
22301func (r *ChangeLogsService) List(profileId int64) *ChangeLogsListCall {
22302	c := &ChangeLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22303	c.profileId = profileId
22304	return c
22305}
22306
22307// Action sets the optional parameter "action": Select only change logs
22308// with the specified action.
22309//
22310// Possible values:
22311//   "ACTION_ADD"
22312//   "ACTION_ASSIGN"
22313//   "ACTION_ASSOCIATE"
22314//   "ACTION_CREATE"
22315//   "ACTION_DELETE"
22316//   "ACTION_DISABLE"
22317//   "ACTION_EMAIL_TAGS"
22318//   "ACTION_ENABLE"
22319//   "ACTION_LINK"
22320//   "ACTION_MARK_AS_DEFAULT"
22321//   "ACTION_PUSH"
22322//   "ACTION_REMOVE"
22323//   "ACTION_SEND"
22324//   "ACTION_SHARE"
22325//   "ACTION_UNASSIGN"
22326//   "ACTION_UNLINK"
22327//   "ACTION_UPDATE"
22328func (c *ChangeLogsListCall) Action(action string) *ChangeLogsListCall {
22329	c.urlParams_.Set("action", action)
22330	return c
22331}
22332
22333// Ids sets the optional parameter "ids": Select only change logs with
22334// these IDs.
22335func (c *ChangeLogsListCall) Ids(ids ...int64) *ChangeLogsListCall {
22336	var ids_ []string
22337	for _, v := range ids {
22338		ids_ = append(ids_, fmt.Sprint(v))
22339	}
22340	c.urlParams_.SetMulti("ids", ids_)
22341	return c
22342}
22343
22344// MaxChangeTime sets the optional parameter "maxChangeTime": Select
22345// only change logs whose change time is before the specified
22346// maxChangeTime.The time should be formatted as an RFC3339 date/time
22347// string. For example, for 10:54 PM on July 18th, 2015, in the
22348// America/New York time zone, the format is
22349// "2015-07-18T22:54:00-04:00". In other words, the year, month, day,
22350// the letter T, the hour (24-hour clock system), minute, second, and
22351// then the time zone offset.
22352func (c *ChangeLogsListCall) MaxChangeTime(maxChangeTime string) *ChangeLogsListCall {
22353	c.urlParams_.Set("maxChangeTime", maxChangeTime)
22354	return c
22355}
22356
22357// MaxResults sets the optional parameter "maxResults": Maximum number
22358// of results to return.
22359func (c *ChangeLogsListCall) MaxResults(maxResults int64) *ChangeLogsListCall {
22360	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22361	return c
22362}
22363
22364// MinChangeTime sets the optional parameter "minChangeTime": Select
22365// only change logs whose change time is after the specified
22366// minChangeTime.The time should be formatted as an RFC3339 date/time
22367// string. For example, for 10:54 PM on July 18th, 2015, in the
22368// America/New York time zone, the format is
22369// "2015-07-18T22:54:00-04:00". In other words, the year, month, day,
22370// the letter T, the hour (24-hour clock system), minute, second, and
22371// then the time zone offset.
22372func (c *ChangeLogsListCall) MinChangeTime(minChangeTime string) *ChangeLogsListCall {
22373	c.urlParams_.Set("minChangeTime", minChangeTime)
22374	return c
22375}
22376
22377// ObjectIds sets the optional parameter "objectIds": Select only change
22378// logs with these object IDs.
22379func (c *ChangeLogsListCall) ObjectIds(objectIds ...int64) *ChangeLogsListCall {
22380	var objectIds_ []string
22381	for _, v := range objectIds {
22382		objectIds_ = append(objectIds_, fmt.Sprint(v))
22383	}
22384	c.urlParams_.SetMulti("objectIds", objectIds_)
22385	return c
22386}
22387
22388// ObjectType sets the optional parameter "objectType": Select only
22389// change logs with the specified object type.
22390//
22391// Possible values:
22392//   "OBJECT_ACCOUNT"
22393//   "OBJECT_ACCOUNT_BILLING_FEATURE"
22394//   "OBJECT_AD"
22395//   "OBJECT_ADVERTISER"
22396//   "OBJECT_ADVERTISER_GROUP"
22397//   "OBJECT_BILLING_ACCOUNT_GROUP"
22398//   "OBJECT_BILLING_FEATURE"
22399//   "OBJECT_BILLING_MINIMUM_FEE"
22400//   "OBJECT_BILLING_PROFILE"
22401//   "OBJECT_CAMPAIGN"
22402//   "OBJECT_CONTENT_CATEGORY"
22403//   "OBJECT_CREATIVE"
22404//   "OBJECT_CREATIVE_ASSET"
22405//   "OBJECT_CREATIVE_BUNDLE"
22406//   "OBJECT_CREATIVE_FIELD"
22407//   "OBJECT_CREATIVE_GROUP"
22408//   "OBJECT_DFA_SITE"
22409//   "OBJECT_EVENT_TAG"
22410//   "OBJECT_FLOODLIGHT_ACTIVITY_GROUP"
22411//   "OBJECT_FLOODLIGHT_ACTVITY"
22412//   "OBJECT_FLOODLIGHT_CONFIGURATION"
22413//   "OBJECT_FLOODLIGHT_DV360_LINK"
22414//   "OBJECT_INSTREAM_CREATIVE"
22415//   "OBJECT_LANDING_PAGE"
22416//   "OBJECT_MEDIA_ORDER"
22417//   "OBJECT_PLACEMENT"
22418//   "OBJECT_PLACEMENT_STRATEGY"
22419//   "OBJECT_PLAYSTORE_LINK"
22420//   "OBJECT_PROVIDED_LIST_CLIENT"
22421//   "OBJECT_RATE_CARD"
22422//   "OBJECT_REMARKETING_LIST"
22423//   "OBJECT_RICHMEDIA_CREATIVE"
22424//   "OBJECT_SD_SITE"
22425//   "OBJECT_SEARCH_LIFT_STUDY"
22426//   "OBJECT_SIZE"
22427//   "OBJECT_SUBACCOUNT"
22428//   "OBJECT_TARGETING_TEMPLATE"
22429//   "OBJECT_USER_PROFILE"
22430//   "OBJECT_USER_PROFILE_FILTER"
22431//   "OBJECT_USER_ROLE"
22432func (c *ChangeLogsListCall) ObjectType(objectType string) *ChangeLogsListCall {
22433	c.urlParams_.Set("objectType", objectType)
22434	return c
22435}
22436
22437// PageToken sets the optional parameter "pageToken": Value of the
22438// nextPageToken from the previous result page.
22439func (c *ChangeLogsListCall) PageToken(pageToken string) *ChangeLogsListCall {
22440	c.urlParams_.Set("pageToken", pageToken)
22441	return c
22442}
22443
22444// SearchString sets the optional parameter "searchString": Select only
22445// change logs whose object ID, user name, old or new values match the
22446// search string.
22447func (c *ChangeLogsListCall) SearchString(searchString string) *ChangeLogsListCall {
22448	c.urlParams_.Set("searchString", searchString)
22449	return c
22450}
22451
22452// UserProfileIds sets the optional parameter "userProfileIds": Select
22453// only change logs with these user profile IDs.
22454func (c *ChangeLogsListCall) UserProfileIds(userProfileIds ...int64) *ChangeLogsListCall {
22455	var userProfileIds_ []string
22456	for _, v := range userProfileIds {
22457		userProfileIds_ = append(userProfileIds_, fmt.Sprint(v))
22458	}
22459	c.urlParams_.SetMulti("userProfileIds", userProfileIds_)
22460	return c
22461}
22462
22463// Fields allows partial responses to be retrieved. See
22464// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22465// for more information.
22466func (c *ChangeLogsListCall) Fields(s ...googleapi.Field) *ChangeLogsListCall {
22467	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22468	return c
22469}
22470
22471// IfNoneMatch sets the optional parameter which makes the operation
22472// fail if the object's ETag matches the given value. This is useful for
22473// getting updates only after the object has changed since the last
22474// request. Use googleapi.IsNotModified to check whether the response
22475// error from Do is the result of In-None-Match.
22476func (c *ChangeLogsListCall) IfNoneMatch(entityTag string) *ChangeLogsListCall {
22477	c.ifNoneMatch_ = entityTag
22478	return c
22479}
22480
22481// Context sets the context to be used in this call's Do method. Any
22482// pending HTTP request will be aborted if the provided context is
22483// canceled.
22484func (c *ChangeLogsListCall) Context(ctx context.Context) *ChangeLogsListCall {
22485	c.ctx_ = ctx
22486	return c
22487}
22488
22489// Header returns an http.Header that can be modified by the caller to
22490// add HTTP headers to the request.
22491func (c *ChangeLogsListCall) Header() http.Header {
22492	if c.header_ == nil {
22493		c.header_ = make(http.Header)
22494	}
22495	return c.header_
22496}
22497
22498func (c *ChangeLogsListCall) doRequest(alt string) (*http.Response, error) {
22499	reqHeaders := make(http.Header)
22500	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
22501	for k, v := range c.header_ {
22502		reqHeaders[k] = v
22503	}
22504	reqHeaders.Set("User-Agent", c.s.userAgent())
22505	if c.ifNoneMatch_ != "" {
22506		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22507	}
22508	var body io.Reader = nil
22509	c.urlParams_.Set("alt", alt)
22510	c.urlParams_.Set("prettyPrint", "false")
22511	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs")
22512	urls += "?" + c.urlParams_.Encode()
22513	req, err := http.NewRequest("GET", urls, body)
22514	if err != nil {
22515		return nil, err
22516	}
22517	req.Header = reqHeaders
22518	googleapi.Expand(req.URL, map[string]string{
22519		"profileId": strconv.FormatInt(c.profileId, 10),
22520	})
22521	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22522}
22523
22524// Do executes the "dfareporting.changeLogs.list" call.
22525// Exactly one of *ChangeLogsListResponse or error will be non-nil. Any
22526// non-2xx status code is an error. Response headers are in either
22527// *ChangeLogsListResponse.ServerResponse.Header or (if a response was
22528// returned at all) in error.(*googleapi.Error).Header. Use
22529// googleapi.IsNotModified to check whether the returned error was
22530// because http.StatusNotModified was returned.
22531func (c *ChangeLogsListCall) Do(opts ...googleapi.CallOption) (*ChangeLogsListResponse, error) {
22532	gensupport.SetOptions(c.urlParams_, opts...)
22533	res, err := c.doRequest("json")
22534	if res != nil && res.StatusCode == http.StatusNotModified {
22535		if res.Body != nil {
22536			res.Body.Close()
22537		}
22538		return nil, &googleapi.Error{
22539			Code:   res.StatusCode,
22540			Header: res.Header,
22541		}
22542	}
22543	if err != nil {
22544		return nil, err
22545	}
22546	defer googleapi.CloseBody(res)
22547	if err := googleapi.CheckResponse(res); err != nil {
22548		return nil, err
22549	}
22550	ret := &ChangeLogsListResponse{
22551		ServerResponse: googleapi.ServerResponse{
22552			Header:         res.Header,
22553			HTTPStatusCode: res.StatusCode,
22554		},
22555	}
22556	target := &ret
22557	if err := gensupport.DecodeResponse(target, res); err != nil {
22558		return nil, err
22559	}
22560	return ret, nil
22561	// {
22562	//   "description": "Retrieves a list of change logs. This method supports paging.",
22563	//   "httpMethod": "GET",
22564	//   "id": "dfareporting.changeLogs.list",
22565	//   "parameterOrder": [
22566	//     "profileId"
22567	//   ],
22568	//   "parameters": {
22569	//     "action": {
22570	//       "description": "Select only change logs with the specified action.",
22571	//       "enum": [
22572	//         "ACTION_ADD",
22573	//         "ACTION_ASSIGN",
22574	//         "ACTION_ASSOCIATE",
22575	//         "ACTION_CREATE",
22576	//         "ACTION_DELETE",
22577	//         "ACTION_DISABLE",
22578	//         "ACTION_EMAIL_TAGS",
22579	//         "ACTION_ENABLE",
22580	//         "ACTION_LINK",
22581	//         "ACTION_MARK_AS_DEFAULT",
22582	//         "ACTION_PUSH",
22583	//         "ACTION_REMOVE",
22584	//         "ACTION_SEND",
22585	//         "ACTION_SHARE",
22586	//         "ACTION_UNASSIGN",
22587	//         "ACTION_UNLINK",
22588	//         "ACTION_UPDATE"
22589	//       ],
22590	//       "enumDescriptions": [
22591	//         "",
22592	//         "",
22593	//         "",
22594	//         "",
22595	//         "",
22596	//         "",
22597	//         "",
22598	//         "",
22599	//         "",
22600	//         "",
22601	//         "",
22602	//         "",
22603	//         "",
22604	//         "",
22605	//         "",
22606	//         "",
22607	//         ""
22608	//       ],
22609	//       "location": "query",
22610	//       "type": "string"
22611	//     },
22612	//     "ids": {
22613	//       "description": "Select only change logs with these IDs.",
22614	//       "format": "int64",
22615	//       "location": "query",
22616	//       "repeated": true,
22617	//       "type": "string"
22618	//     },
22619	//     "maxChangeTime": {
22620	//       "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.",
22621	//       "location": "query",
22622	//       "type": "string"
22623	//     },
22624	//     "maxResults": {
22625	//       "default": "1000",
22626	//       "description": "Maximum number of results to return.",
22627	//       "format": "int32",
22628	//       "location": "query",
22629	//       "maximum": "1000",
22630	//       "minimum": "0",
22631	//       "type": "integer"
22632	//     },
22633	//     "minChangeTime": {
22634	//       "description": "Select only change logs whose change time is after the specified minChangeTime.The time should be formatted as an RFC3339 date/time string. For example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is \"2015-07-18T22:54:00-04:00\". In other words, the year, month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset.",
22635	//       "location": "query",
22636	//       "type": "string"
22637	//     },
22638	//     "objectIds": {
22639	//       "description": "Select only change logs with these object IDs.",
22640	//       "format": "int64",
22641	//       "location": "query",
22642	//       "repeated": true,
22643	//       "type": "string"
22644	//     },
22645	//     "objectType": {
22646	//       "description": "Select only change logs with the specified object type.",
22647	//       "enum": [
22648	//         "OBJECT_ACCOUNT",
22649	//         "OBJECT_ACCOUNT_BILLING_FEATURE",
22650	//         "OBJECT_AD",
22651	//         "OBJECT_ADVERTISER",
22652	//         "OBJECT_ADVERTISER_GROUP",
22653	//         "OBJECT_BILLING_ACCOUNT_GROUP",
22654	//         "OBJECT_BILLING_FEATURE",
22655	//         "OBJECT_BILLING_MINIMUM_FEE",
22656	//         "OBJECT_BILLING_PROFILE",
22657	//         "OBJECT_CAMPAIGN",
22658	//         "OBJECT_CONTENT_CATEGORY",
22659	//         "OBJECT_CREATIVE",
22660	//         "OBJECT_CREATIVE_ASSET",
22661	//         "OBJECT_CREATIVE_BUNDLE",
22662	//         "OBJECT_CREATIVE_FIELD",
22663	//         "OBJECT_CREATIVE_GROUP",
22664	//         "OBJECT_DFA_SITE",
22665	//         "OBJECT_EVENT_TAG",
22666	//         "OBJECT_FLOODLIGHT_ACTIVITY_GROUP",
22667	//         "OBJECT_FLOODLIGHT_ACTVITY",
22668	//         "OBJECT_FLOODLIGHT_CONFIGURATION",
22669	//         "OBJECT_FLOODLIGHT_DV360_LINK",
22670	//         "OBJECT_INSTREAM_CREATIVE",
22671	//         "OBJECT_LANDING_PAGE",
22672	//         "OBJECT_MEDIA_ORDER",
22673	//         "OBJECT_PLACEMENT",
22674	//         "OBJECT_PLACEMENT_STRATEGY",
22675	//         "OBJECT_PLAYSTORE_LINK",
22676	//         "OBJECT_PROVIDED_LIST_CLIENT",
22677	//         "OBJECT_RATE_CARD",
22678	//         "OBJECT_REMARKETING_LIST",
22679	//         "OBJECT_RICHMEDIA_CREATIVE",
22680	//         "OBJECT_SD_SITE",
22681	//         "OBJECT_SEARCH_LIFT_STUDY",
22682	//         "OBJECT_SIZE",
22683	//         "OBJECT_SUBACCOUNT",
22684	//         "OBJECT_TARGETING_TEMPLATE",
22685	//         "OBJECT_USER_PROFILE",
22686	//         "OBJECT_USER_PROFILE_FILTER",
22687	//         "OBJECT_USER_ROLE"
22688	//       ],
22689	//       "enumDescriptions": [
22690	//         "",
22691	//         "",
22692	//         "",
22693	//         "",
22694	//         "",
22695	//         "",
22696	//         "",
22697	//         "",
22698	//         "",
22699	//         "",
22700	//         "",
22701	//         "",
22702	//         "",
22703	//         "",
22704	//         "",
22705	//         "",
22706	//         "",
22707	//         "",
22708	//         "",
22709	//         "",
22710	//         "",
22711	//         "",
22712	//         "",
22713	//         "",
22714	//         "",
22715	//         "",
22716	//         "",
22717	//         "",
22718	//         "",
22719	//         "",
22720	//         "",
22721	//         "",
22722	//         "",
22723	//         "",
22724	//         "",
22725	//         "",
22726	//         "",
22727	//         "",
22728	//         "",
22729	//         ""
22730	//       ],
22731	//       "location": "query",
22732	//       "type": "string"
22733	//     },
22734	//     "pageToken": {
22735	//       "description": "Value of the nextPageToken from the previous result page.",
22736	//       "location": "query",
22737	//       "type": "string"
22738	//     },
22739	//     "profileId": {
22740	//       "description": "User profile ID associated with this request.",
22741	//       "format": "int64",
22742	//       "location": "path",
22743	//       "required": true,
22744	//       "type": "string"
22745	//     },
22746	//     "searchString": {
22747	//       "description": "Select only change logs whose object ID, user name, old or new values match the search string.",
22748	//       "location": "query",
22749	//       "type": "string"
22750	//     },
22751	//     "userProfileIds": {
22752	//       "description": "Select only change logs with these user profile IDs.",
22753	//       "format": "int64",
22754	//       "location": "query",
22755	//       "repeated": true,
22756	//       "type": "string"
22757	//     }
22758	//   },
22759	//   "path": "userprofiles/{profileId}/changeLogs",
22760	//   "response": {
22761	//     "$ref": "ChangeLogsListResponse"
22762	//   },
22763	//   "scopes": [
22764	//     "https://www.googleapis.com/auth/dfatrafficking"
22765	//   ]
22766	// }
22767
22768}
22769
22770// Pages invokes f for each page of results.
22771// A non-nil error returned from f will halt the iteration.
22772// The provided context supersedes any context provided to the Context method.
22773func (c *ChangeLogsListCall) Pages(ctx context.Context, f func(*ChangeLogsListResponse) error) error {
22774	c.ctx_ = ctx
22775	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22776	for {
22777		x, err := c.Do()
22778		if err != nil {
22779			return err
22780		}
22781		if err := f(x); err != nil {
22782			return err
22783		}
22784		if x.NextPageToken == "" {
22785			return nil
22786		}
22787		c.PageToken(x.NextPageToken)
22788	}
22789}
22790
22791// method id "dfareporting.cities.list":
22792
22793type CitiesListCall struct {
22794	s            *Service
22795	profileId    int64
22796	urlParams_   gensupport.URLParams
22797	ifNoneMatch_ string
22798	ctx_         context.Context
22799	header_      http.Header
22800}
22801
22802// List: Retrieves a list of cities, possibly filtered.
22803func (r *CitiesService) List(profileId int64) *CitiesListCall {
22804	c := &CitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22805	c.profileId = profileId
22806	return c
22807}
22808
22809// CountryDartIds sets the optional parameter "countryDartIds": Select
22810// only cities from these countries.
22811func (c *CitiesListCall) CountryDartIds(countryDartIds ...int64) *CitiesListCall {
22812	var countryDartIds_ []string
22813	for _, v := range countryDartIds {
22814		countryDartIds_ = append(countryDartIds_, fmt.Sprint(v))
22815	}
22816	c.urlParams_.SetMulti("countryDartIds", countryDartIds_)
22817	return c
22818}
22819
22820// DartIds sets the optional parameter "dartIds": Select only cities
22821// with these DART IDs.
22822func (c *CitiesListCall) DartIds(dartIds ...int64) *CitiesListCall {
22823	var dartIds_ []string
22824	for _, v := range dartIds {
22825		dartIds_ = append(dartIds_, fmt.Sprint(v))
22826	}
22827	c.urlParams_.SetMulti("dartIds", dartIds_)
22828	return c
22829}
22830
22831// NamePrefix sets the optional parameter "namePrefix": Select only
22832// cities with names starting with this prefix.
22833func (c *CitiesListCall) NamePrefix(namePrefix string) *CitiesListCall {
22834	c.urlParams_.Set("namePrefix", namePrefix)
22835	return c
22836}
22837
22838// RegionDartIds sets the optional parameter "regionDartIds": Select
22839// only cities from these regions.
22840func (c *CitiesListCall) RegionDartIds(regionDartIds ...int64) *CitiesListCall {
22841	var regionDartIds_ []string
22842	for _, v := range regionDartIds {
22843		regionDartIds_ = append(regionDartIds_, fmt.Sprint(v))
22844	}
22845	c.urlParams_.SetMulti("regionDartIds", regionDartIds_)
22846	return c
22847}
22848
22849// Fields allows partial responses to be retrieved. See
22850// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22851// for more information.
22852func (c *CitiesListCall) Fields(s ...googleapi.Field) *CitiesListCall {
22853	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22854	return c
22855}
22856
22857// IfNoneMatch sets the optional parameter which makes the operation
22858// fail if the object's ETag matches the given value. This is useful for
22859// getting updates only after the object has changed since the last
22860// request. Use googleapi.IsNotModified to check whether the response
22861// error from Do is the result of In-None-Match.
22862func (c *CitiesListCall) IfNoneMatch(entityTag string) *CitiesListCall {
22863	c.ifNoneMatch_ = entityTag
22864	return c
22865}
22866
22867// Context sets the context to be used in this call's Do method. Any
22868// pending HTTP request will be aborted if the provided context is
22869// canceled.
22870func (c *CitiesListCall) Context(ctx context.Context) *CitiesListCall {
22871	c.ctx_ = ctx
22872	return c
22873}
22874
22875// Header returns an http.Header that can be modified by the caller to
22876// add HTTP headers to the request.
22877func (c *CitiesListCall) Header() http.Header {
22878	if c.header_ == nil {
22879		c.header_ = make(http.Header)
22880	}
22881	return c.header_
22882}
22883
22884func (c *CitiesListCall) doRequest(alt string) (*http.Response, error) {
22885	reqHeaders := make(http.Header)
22886	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
22887	for k, v := range c.header_ {
22888		reqHeaders[k] = v
22889	}
22890	reqHeaders.Set("User-Agent", c.s.userAgent())
22891	if c.ifNoneMatch_ != "" {
22892		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22893	}
22894	var body io.Reader = nil
22895	c.urlParams_.Set("alt", alt)
22896	c.urlParams_.Set("prettyPrint", "false")
22897	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/cities")
22898	urls += "?" + c.urlParams_.Encode()
22899	req, err := http.NewRequest("GET", urls, body)
22900	if err != nil {
22901		return nil, err
22902	}
22903	req.Header = reqHeaders
22904	googleapi.Expand(req.URL, map[string]string{
22905		"profileId": strconv.FormatInt(c.profileId, 10),
22906	})
22907	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22908}
22909
22910// Do executes the "dfareporting.cities.list" call.
22911// Exactly one of *CitiesListResponse or error will be non-nil. Any
22912// non-2xx status code is an error. Response headers are in either
22913// *CitiesListResponse.ServerResponse.Header or (if a response was
22914// returned at all) in error.(*googleapi.Error).Header. Use
22915// googleapi.IsNotModified to check whether the returned error was
22916// because http.StatusNotModified was returned.
22917func (c *CitiesListCall) Do(opts ...googleapi.CallOption) (*CitiesListResponse, error) {
22918	gensupport.SetOptions(c.urlParams_, opts...)
22919	res, err := c.doRequest("json")
22920	if res != nil && res.StatusCode == http.StatusNotModified {
22921		if res.Body != nil {
22922			res.Body.Close()
22923		}
22924		return nil, &googleapi.Error{
22925			Code:   res.StatusCode,
22926			Header: res.Header,
22927		}
22928	}
22929	if err != nil {
22930		return nil, err
22931	}
22932	defer googleapi.CloseBody(res)
22933	if err := googleapi.CheckResponse(res); err != nil {
22934		return nil, err
22935	}
22936	ret := &CitiesListResponse{
22937		ServerResponse: googleapi.ServerResponse{
22938			Header:         res.Header,
22939			HTTPStatusCode: res.StatusCode,
22940		},
22941	}
22942	target := &ret
22943	if err := gensupport.DecodeResponse(target, res); err != nil {
22944		return nil, err
22945	}
22946	return ret, nil
22947	// {
22948	//   "description": "Retrieves a list of cities, possibly filtered.",
22949	//   "httpMethod": "GET",
22950	//   "id": "dfareporting.cities.list",
22951	//   "parameterOrder": [
22952	//     "profileId"
22953	//   ],
22954	//   "parameters": {
22955	//     "countryDartIds": {
22956	//       "description": "Select only cities from these countries.",
22957	//       "format": "int64",
22958	//       "location": "query",
22959	//       "repeated": true,
22960	//       "type": "string"
22961	//     },
22962	//     "dartIds": {
22963	//       "description": "Select only cities with these DART IDs.",
22964	//       "format": "int64",
22965	//       "location": "query",
22966	//       "repeated": true,
22967	//       "type": "string"
22968	//     },
22969	//     "namePrefix": {
22970	//       "description": "Select only cities with names starting with this prefix.",
22971	//       "location": "query",
22972	//       "type": "string"
22973	//     },
22974	//     "profileId": {
22975	//       "description": "User profile ID associated with this request.",
22976	//       "format": "int64",
22977	//       "location": "path",
22978	//       "required": true,
22979	//       "type": "string"
22980	//     },
22981	//     "regionDartIds": {
22982	//       "description": "Select only cities from these regions.",
22983	//       "format": "int64",
22984	//       "location": "query",
22985	//       "repeated": true,
22986	//       "type": "string"
22987	//     }
22988	//   },
22989	//   "path": "userprofiles/{profileId}/cities",
22990	//   "response": {
22991	//     "$ref": "CitiesListResponse"
22992	//   },
22993	//   "scopes": [
22994	//     "https://www.googleapis.com/auth/dfatrafficking"
22995	//   ]
22996	// }
22997
22998}
22999
23000// method id "dfareporting.connectionTypes.get":
23001
23002type ConnectionTypesGetCall struct {
23003	s            *Service
23004	profileId    int64
23005	id           int64
23006	urlParams_   gensupport.URLParams
23007	ifNoneMatch_ string
23008	ctx_         context.Context
23009	header_      http.Header
23010}
23011
23012// Get: Gets one connection type by ID.
23013func (r *ConnectionTypesService) Get(profileId int64, id int64) *ConnectionTypesGetCall {
23014	c := &ConnectionTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23015	c.profileId = profileId
23016	c.id = id
23017	return c
23018}
23019
23020// Fields allows partial responses to be retrieved. See
23021// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23022// for more information.
23023func (c *ConnectionTypesGetCall) Fields(s ...googleapi.Field) *ConnectionTypesGetCall {
23024	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23025	return c
23026}
23027
23028// IfNoneMatch sets the optional parameter which makes the operation
23029// fail if the object's ETag matches the given value. This is useful for
23030// getting updates only after the object has changed since the last
23031// request. Use googleapi.IsNotModified to check whether the response
23032// error from Do is the result of In-None-Match.
23033func (c *ConnectionTypesGetCall) IfNoneMatch(entityTag string) *ConnectionTypesGetCall {
23034	c.ifNoneMatch_ = entityTag
23035	return c
23036}
23037
23038// Context sets the context to be used in this call's Do method. Any
23039// pending HTTP request will be aborted if the provided context is
23040// canceled.
23041func (c *ConnectionTypesGetCall) Context(ctx context.Context) *ConnectionTypesGetCall {
23042	c.ctx_ = ctx
23043	return c
23044}
23045
23046// Header returns an http.Header that can be modified by the caller to
23047// add HTTP headers to the request.
23048func (c *ConnectionTypesGetCall) Header() http.Header {
23049	if c.header_ == nil {
23050		c.header_ = make(http.Header)
23051	}
23052	return c.header_
23053}
23054
23055func (c *ConnectionTypesGetCall) doRequest(alt string) (*http.Response, error) {
23056	reqHeaders := make(http.Header)
23057	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
23058	for k, v := range c.header_ {
23059		reqHeaders[k] = v
23060	}
23061	reqHeaders.Set("User-Agent", c.s.userAgent())
23062	if c.ifNoneMatch_ != "" {
23063		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23064	}
23065	var body io.Reader = nil
23066	c.urlParams_.Set("alt", alt)
23067	c.urlParams_.Set("prettyPrint", "false")
23068	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes/{id}")
23069	urls += "?" + c.urlParams_.Encode()
23070	req, err := http.NewRequest("GET", urls, body)
23071	if err != nil {
23072		return nil, err
23073	}
23074	req.Header = reqHeaders
23075	googleapi.Expand(req.URL, map[string]string{
23076		"profileId": strconv.FormatInt(c.profileId, 10),
23077		"id":        strconv.FormatInt(c.id, 10),
23078	})
23079	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23080}
23081
23082// Do executes the "dfareporting.connectionTypes.get" call.
23083// Exactly one of *ConnectionType or error will be non-nil. Any non-2xx
23084// status code is an error. Response headers are in either
23085// *ConnectionType.ServerResponse.Header or (if a response was returned
23086// at all) in error.(*googleapi.Error).Header. Use
23087// googleapi.IsNotModified to check whether the returned error was
23088// because http.StatusNotModified was returned.
23089func (c *ConnectionTypesGetCall) Do(opts ...googleapi.CallOption) (*ConnectionType, error) {
23090	gensupport.SetOptions(c.urlParams_, opts...)
23091	res, err := c.doRequest("json")
23092	if res != nil && res.StatusCode == http.StatusNotModified {
23093		if res.Body != nil {
23094			res.Body.Close()
23095		}
23096		return nil, &googleapi.Error{
23097			Code:   res.StatusCode,
23098			Header: res.Header,
23099		}
23100	}
23101	if err != nil {
23102		return nil, err
23103	}
23104	defer googleapi.CloseBody(res)
23105	if err := googleapi.CheckResponse(res); err != nil {
23106		return nil, err
23107	}
23108	ret := &ConnectionType{
23109		ServerResponse: googleapi.ServerResponse{
23110			Header:         res.Header,
23111			HTTPStatusCode: res.StatusCode,
23112		},
23113	}
23114	target := &ret
23115	if err := gensupport.DecodeResponse(target, res); err != nil {
23116		return nil, err
23117	}
23118	return ret, nil
23119	// {
23120	//   "description": "Gets one connection type by ID.",
23121	//   "httpMethod": "GET",
23122	//   "id": "dfareporting.connectionTypes.get",
23123	//   "parameterOrder": [
23124	//     "profileId",
23125	//     "id"
23126	//   ],
23127	//   "parameters": {
23128	//     "id": {
23129	//       "description": "Connection type ID.",
23130	//       "format": "int64",
23131	//       "location": "path",
23132	//       "required": true,
23133	//       "type": "string"
23134	//     },
23135	//     "profileId": {
23136	//       "description": "User profile ID associated with this request.",
23137	//       "format": "int64",
23138	//       "location": "path",
23139	//       "required": true,
23140	//       "type": "string"
23141	//     }
23142	//   },
23143	//   "path": "userprofiles/{profileId}/connectionTypes/{id}",
23144	//   "response": {
23145	//     "$ref": "ConnectionType"
23146	//   },
23147	//   "scopes": [
23148	//     "https://www.googleapis.com/auth/dfatrafficking"
23149	//   ]
23150	// }
23151
23152}
23153
23154// method id "dfareporting.connectionTypes.list":
23155
23156type ConnectionTypesListCall struct {
23157	s            *Service
23158	profileId    int64
23159	urlParams_   gensupport.URLParams
23160	ifNoneMatch_ string
23161	ctx_         context.Context
23162	header_      http.Header
23163}
23164
23165// List: Retrieves a list of connection types.
23166func (r *ConnectionTypesService) List(profileId int64) *ConnectionTypesListCall {
23167	c := &ConnectionTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23168	c.profileId = profileId
23169	return c
23170}
23171
23172// Fields allows partial responses to be retrieved. See
23173// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23174// for more information.
23175func (c *ConnectionTypesListCall) Fields(s ...googleapi.Field) *ConnectionTypesListCall {
23176	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23177	return c
23178}
23179
23180// IfNoneMatch sets the optional parameter which makes the operation
23181// fail if the object's ETag matches the given value. This is useful for
23182// getting updates only after the object has changed since the last
23183// request. Use googleapi.IsNotModified to check whether the response
23184// error from Do is the result of In-None-Match.
23185func (c *ConnectionTypesListCall) IfNoneMatch(entityTag string) *ConnectionTypesListCall {
23186	c.ifNoneMatch_ = entityTag
23187	return c
23188}
23189
23190// Context sets the context to be used in this call's Do method. Any
23191// pending HTTP request will be aborted if the provided context is
23192// canceled.
23193func (c *ConnectionTypesListCall) Context(ctx context.Context) *ConnectionTypesListCall {
23194	c.ctx_ = ctx
23195	return c
23196}
23197
23198// Header returns an http.Header that can be modified by the caller to
23199// add HTTP headers to the request.
23200func (c *ConnectionTypesListCall) Header() http.Header {
23201	if c.header_ == nil {
23202		c.header_ = make(http.Header)
23203	}
23204	return c.header_
23205}
23206
23207func (c *ConnectionTypesListCall) doRequest(alt string) (*http.Response, error) {
23208	reqHeaders := make(http.Header)
23209	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
23210	for k, v := range c.header_ {
23211		reqHeaders[k] = v
23212	}
23213	reqHeaders.Set("User-Agent", c.s.userAgent())
23214	if c.ifNoneMatch_ != "" {
23215		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23216	}
23217	var body io.Reader = nil
23218	c.urlParams_.Set("alt", alt)
23219	c.urlParams_.Set("prettyPrint", "false")
23220	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes")
23221	urls += "?" + c.urlParams_.Encode()
23222	req, err := http.NewRequest("GET", urls, body)
23223	if err != nil {
23224		return nil, err
23225	}
23226	req.Header = reqHeaders
23227	googleapi.Expand(req.URL, map[string]string{
23228		"profileId": strconv.FormatInt(c.profileId, 10),
23229	})
23230	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23231}
23232
23233// Do executes the "dfareporting.connectionTypes.list" call.
23234// Exactly one of *ConnectionTypesListResponse or error will be non-nil.
23235// Any non-2xx status code is an error. Response headers are in either
23236// *ConnectionTypesListResponse.ServerResponse.Header or (if a response
23237// was returned at all) in error.(*googleapi.Error).Header. Use
23238// googleapi.IsNotModified to check whether the returned error was
23239// because http.StatusNotModified was returned.
23240func (c *ConnectionTypesListCall) Do(opts ...googleapi.CallOption) (*ConnectionTypesListResponse, error) {
23241	gensupport.SetOptions(c.urlParams_, opts...)
23242	res, err := c.doRequest("json")
23243	if res != nil && res.StatusCode == http.StatusNotModified {
23244		if res.Body != nil {
23245			res.Body.Close()
23246		}
23247		return nil, &googleapi.Error{
23248			Code:   res.StatusCode,
23249			Header: res.Header,
23250		}
23251	}
23252	if err != nil {
23253		return nil, err
23254	}
23255	defer googleapi.CloseBody(res)
23256	if err := googleapi.CheckResponse(res); err != nil {
23257		return nil, err
23258	}
23259	ret := &ConnectionTypesListResponse{
23260		ServerResponse: googleapi.ServerResponse{
23261			Header:         res.Header,
23262			HTTPStatusCode: res.StatusCode,
23263		},
23264	}
23265	target := &ret
23266	if err := gensupport.DecodeResponse(target, res); err != nil {
23267		return nil, err
23268	}
23269	return ret, nil
23270	// {
23271	//   "description": "Retrieves a list of connection types.",
23272	//   "httpMethod": "GET",
23273	//   "id": "dfareporting.connectionTypes.list",
23274	//   "parameterOrder": [
23275	//     "profileId"
23276	//   ],
23277	//   "parameters": {
23278	//     "profileId": {
23279	//       "description": "User profile ID associated with this request.",
23280	//       "format": "int64",
23281	//       "location": "path",
23282	//       "required": true,
23283	//       "type": "string"
23284	//     }
23285	//   },
23286	//   "path": "userprofiles/{profileId}/connectionTypes",
23287	//   "response": {
23288	//     "$ref": "ConnectionTypesListResponse"
23289	//   },
23290	//   "scopes": [
23291	//     "https://www.googleapis.com/auth/dfatrafficking"
23292	//   ]
23293	// }
23294
23295}
23296
23297// method id "dfareporting.contentCategories.delete":
23298
23299type ContentCategoriesDeleteCall struct {
23300	s          *Service
23301	profileId  int64
23302	id         int64
23303	urlParams_ gensupport.URLParams
23304	ctx_       context.Context
23305	header_    http.Header
23306}
23307
23308// Delete: Deletes an existing content category.
23309func (r *ContentCategoriesService) Delete(profileId int64, id int64) *ContentCategoriesDeleteCall {
23310	c := &ContentCategoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23311	c.profileId = profileId
23312	c.id = id
23313	return c
23314}
23315
23316// Fields allows partial responses to be retrieved. See
23317// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23318// for more information.
23319func (c *ContentCategoriesDeleteCall) Fields(s ...googleapi.Field) *ContentCategoriesDeleteCall {
23320	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23321	return c
23322}
23323
23324// Context sets the context to be used in this call's Do method. Any
23325// pending HTTP request will be aborted if the provided context is
23326// canceled.
23327func (c *ContentCategoriesDeleteCall) Context(ctx context.Context) *ContentCategoriesDeleteCall {
23328	c.ctx_ = ctx
23329	return c
23330}
23331
23332// Header returns an http.Header that can be modified by the caller to
23333// add HTTP headers to the request.
23334func (c *ContentCategoriesDeleteCall) Header() http.Header {
23335	if c.header_ == nil {
23336		c.header_ = make(http.Header)
23337	}
23338	return c.header_
23339}
23340
23341func (c *ContentCategoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
23342	reqHeaders := make(http.Header)
23343	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
23344	for k, v := range c.header_ {
23345		reqHeaders[k] = v
23346	}
23347	reqHeaders.Set("User-Agent", c.s.userAgent())
23348	var body io.Reader = nil
23349	c.urlParams_.Set("alt", alt)
23350	c.urlParams_.Set("prettyPrint", "false")
23351	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
23352	urls += "?" + c.urlParams_.Encode()
23353	req, err := http.NewRequest("DELETE", urls, body)
23354	if err != nil {
23355		return nil, err
23356	}
23357	req.Header = reqHeaders
23358	googleapi.Expand(req.URL, map[string]string{
23359		"profileId": strconv.FormatInt(c.profileId, 10),
23360		"id":        strconv.FormatInt(c.id, 10),
23361	})
23362	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23363}
23364
23365// Do executes the "dfareporting.contentCategories.delete" call.
23366func (c *ContentCategoriesDeleteCall) Do(opts ...googleapi.CallOption) error {
23367	gensupport.SetOptions(c.urlParams_, opts...)
23368	res, err := c.doRequest("json")
23369	if err != nil {
23370		return err
23371	}
23372	defer googleapi.CloseBody(res)
23373	if err := googleapi.CheckResponse(res); err != nil {
23374		return err
23375	}
23376	return nil
23377	// {
23378	//   "description": "Deletes an existing content category.",
23379	//   "httpMethod": "DELETE",
23380	//   "id": "dfareporting.contentCategories.delete",
23381	//   "parameterOrder": [
23382	//     "profileId",
23383	//     "id"
23384	//   ],
23385	//   "parameters": {
23386	//     "id": {
23387	//       "description": "Content category ID.",
23388	//       "format": "int64",
23389	//       "location": "path",
23390	//       "required": true,
23391	//       "type": "string"
23392	//     },
23393	//     "profileId": {
23394	//       "description": "User profile ID associated with this request.",
23395	//       "format": "int64",
23396	//       "location": "path",
23397	//       "required": true,
23398	//       "type": "string"
23399	//     }
23400	//   },
23401	//   "path": "userprofiles/{profileId}/contentCategories/{id}",
23402	//   "scopes": [
23403	//     "https://www.googleapis.com/auth/dfatrafficking"
23404	//   ]
23405	// }
23406
23407}
23408
23409// method id "dfareporting.contentCategories.get":
23410
23411type ContentCategoriesGetCall struct {
23412	s            *Service
23413	profileId    int64
23414	id           int64
23415	urlParams_   gensupport.URLParams
23416	ifNoneMatch_ string
23417	ctx_         context.Context
23418	header_      http.Header
23419}
23420
23421// Get: Gets one content category by ID.
23422func (r *ContentCategoriesService) Get(profileId int64, id int64) *ContentCategoriesGetCall {
23423	c := &ContentCategoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23424	c.profileId = profileId
23425	c.id = id
23426	return c
23427}
23428
23429// Fields allows partial responses to be retrieved. See
23430// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23431// for more information.
23432func (c *ContentCategoriesGetCall) Fields(s ...googleapi.Field) *ContentCategoriesGetCall {
23433	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23434	return c
23435}
23436
23437// IfNoneMatch sets the optional parameter which makes the operation
23438// fail if the object's ETag matches the given value. This is useful for
23439// getting updates only after the object has changed since the last
23440// request. Use googleapi.IsNotModified to check whether the response
23441// error from Do is the result of In-None-Match.
23442func (c *ContentCategoriesGetCall) IfNoneMatch(entityTag string) *ContentCategoriesGetCall {
23443	c.ifNoneMatch_ = entityTag
23444	return c
23445}
23446
23447// Context sets the context to be used in this call's Do method. Any
23448// pending HTTP request will be aborted if the provided context is
23449// canceled.
23450func (c *ContentCategoriesGetCall) Context(ctx context.Context) *ContentCategoriesGetCall {
23451	c.ctx_ = ctx
23452	return c
23453}
23454
23455// Header returns an http.Header that can be modified by the caller to
23456// add HTTP headers to the request.
23457func (c *ContentCategoriesGetCall) Header() http.Header {
23458	if c.header_ == nil {
23459		c.header_ = make(http.Header)
23460	}
23461	return c.header_
23462}
23463
23464func (c *ContentCategoriesGetCall) doRequest(alt string) (*http.Response, error) {
23465	reqHeaders := make(http.Header)
23466	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
23467	for k, v := range c.header_ {
23468		reqHeaders[k] = v
23469	}
23470	reqHeaders.Set("User-Agent", c.s.userAgent())
23471	if c.ifNoneMatch_ != "" {
23472		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23473	}
23474	var body io.Reader = nil
23475	c.urlParams_.Set("alt", alt)
23476	c.urlParams_.Set("prettyPrint", "false")
23477	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
23478	urls += "?" + c.urlParams_.Encode()
23479	req, err := http.NewRequest("GET", urls, body)
23480	if err != nil {
23481		return nil, err
23482	}
23483	req.Header = reqHeaders
23484	googleapi.Expand(req.URL, map[string]string{
23485		"profileId": strconv.FormatInt(c.profileId, 10),
23486		"id":        strconv.FormatInt(c.id, 10),
23487	})
23488	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23489}
23490
23491// Do executes the "dfareporting.contentCategories.get" call.
23492// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23493// status code is an error. Response headers are in either
23494// *ContentCategory.ServerResponse.Header or (if a response was returned
23495// at all) in error.(*googleapi.Error).Header. Use
23496// googleapi.IsNotModified to check whether the returned error was
23497// because http.StatusNotModified was returned.
23498func (c *ContentCategoriesGetCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23499	gensupport.SetOptions(c.urlParams_, opts...)
23500	res, err := c.doRequest("json")
23501	if res != nil && res.StatusCode == http.StatusNotModified {
23502		if res.Body != nil {
23503			res.Body.Close()
23504		}
23505		return nil, &googleapi.Error{
23506			Code:   res.StatusCode,
23507			Header: res.Header,
23508		}
23509	}
23510	if err != nil {
23511		return nil, err
23512	}
23513	defer googleapi.CloseBody(res)
23514	if err := googleapi.CheckResponse(res); err != nil {
23515		return nil, err
23516	}
23517	ret := &ContentCategory{
23518		ServerResponse: googleapi.ServerResponse{
23519			Header:         res.Header,
23520			HTTPStatusCode: res.StatusCode,
23521		},
23522	}
23523	target := &ret
23524	if err := gensupport.DecodeResponse(target, res); err != nil {
23525		return nil, err
23526	}
23527	return ret, nil
23528	// {
23529	//   "description": "Gets one content category by ID.",
23530	//   "httpMethod": "GET",
23531	//   "id": "dfareporting.contentCategories.get",
23532	//   "parameterOrder": [
23533	//     "profileId",
23534	//     "id"
23535	//   ],
23536	//   "parameters": {
23537	//     "id": {
23538	//       "description": "Content category ID.",
23539	//       "format": "int64",
23540	//       "location": "path",
23541	//       "required": true,
23542	//       "type": "string"
23543	//     },
23544	//     "profileId": {
23545	//       "description": "User profile ID associated with this request.",
23546	//       "format": "int64",
23547	//       "location": "path",
23548	//       "required": true,
23549	//       "type": "string"
23550	//     }
23551	//   },
23552	//   "path": "userprofiles/{profileId}/contentCategories/{id}",
23553	//   "response": {
23554	//     "$ref": "ContentCategory"
23555	//   },
23556	//   "scopes": [
23557	//     "https://www.googleapis.com/auth/dfatrafficking"
23558	//   ]
23559	// }
23560
23561}
23562
23563// method id "dfareporting.contentCategories.insert":
23564
23565type ContentCategoriesInsertCall struct {
23566	s               *Service
23567	profileId       int64
23568	contentcategory *ContentCategory
23569	urlParams_      gensupport.URLParams
23570	ctx_            context.Context
23571	header_         http.Header
23572}
23573
23574// Insert: Inserts a new content category.
23575func (r *ContentCategoriesService) Insert(profileId int64, contentcategory *ContentCategory) *ContentCategoriesInsertCall {
23576	c := &ContentCategoriesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23577	c.profileId = profileId
23578	c.contentcategory = contentcategory
23579	return c
23580}
23581
23582// Fields allows partial responses to be retrieved. See
23583// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23584// for more information.
23585func (c *ContentCategoriesInsertCall) Fields(s ...googleapi.Field) *ContentCategoriesInsertCall {
23586	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23587	return c
23588}
23589
23590// Context sets the context to be used in this call's Do method. Any
23591// pending HTTP request will be aborted if the provided context is
23592// canceled.
23593func (c *ContentCategoriesInsertCall) Context(ctx context.Context) *ContentCategoriesInsertCall {
23594	c.ctx_ = ctx
23595	return c
23596}
23597
23598// Header returns an http.Header that can be modified by the caller to
23599// add HTTP headers to the request.
23600func (c *ContentCategoriesInsertCall) Header() http.Header {
23601	if c.header_ == nil {
23602		c.header_ = make(http.Header)
23603	}
23604	return c.header_
23605}
23606
23607func (c *ContentCategoriesInsertCall) doRequest(alt string) (*http.Response, error) {
23608	reqHeaders := make(http.Header)
23609	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
23610	for k, v := range c.header_ {
23611		reqHeaders[k] = v
23612	}
23613	reqHeaders.Set("User-Agent", c.s.userAgent())
23614	var body io.Reader = nil
23615	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
23616	if err != nil {
23617		return nil, err
23618	}
23619	reqHeaders.Set("Content-Type", "application/json")
23620	c.urlParams_.Set("alt", alt)
23621	c.urlParams_.Set("prettyPrint", "false")
23622	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23623	urls += "?" + c.urlParams_.Encode()
23624	req, err := http.NewRequest("POST", urls, body)
23625	if err != nil {
23626		return nil, err
23627	}
23628	req.Header = reqHeaders
23629	googleapi.Expand(req.URL, map[string]string{
23630		"profileId": strconv.FormatInt(c.profileId, 10),
23631	})
23632	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23633}
23634
23635// Do executes the "dfareporting.contentCategories.insert" call.
23636// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23637// status code is an error. Response headers are in either
23638// *ContentCategory.ServerResponse.Header or (if a response was returned
23639// at all) in error.(*googleapi.Error).Header. Use
23640// googleapi.IsNotModified to check whether the returned error was
23641// because http.StatusNotModified was returned.
23642func (c *ContentCategoriesInsertCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23643	gensupport.SetOptions(c.urlParams_, opts...)
23644	res, err := c.doRequest("json")
23645	if res != nil && res.StatusCode == http.StatusNotModified {
23646		if res.Body != nil {
23647			res.Body.Close()
23648		}
23649		return nil, &googleapi.Error{
23650			Code:   res.StatusCode,
23651			Header: res.Header,
23652		}
23653	}
23654	if err != nil {
23655		return nil, err
23656	}
23657	defer googleapi.CloseBody(res)
23658	if err := googleapi.CheckResponse(res); err != nil {
23659		return nil, err
23660	}
23661	ret := &ContentCategory{
23662		ServerResponse: googleapi.ServerResponse{
23663			Header:         res.Header,
23664			HTTPStatusCode: res.StatusCode,
23665		},
23666	}
23667	target := &ret
23668	if err := gensupport.DecodeResponse(target, res); err != nil {
23669		return nil, err
23670	}
23671	return ret, nil
23672	// {
23673	//   "description": "Inserts a new content category.",
23674	//   "httpMethod": "POST",
23675	//   "id": "dfareporting.contentCategories.insert",
23676	//   "parameterOrder": [
23677	//     "profileId"
23678	//   ],
23679	//   "parameters": {
23680	//     "profileId": {
23681	//       "description": "User profile ID associated with this request.",
23682	//       "format": "int64",
23683	//       "location": "path",
23684	//       "required": true,
23685	//       "type": "string"
23686	//     }
23687	//   },
23688	//   "path": "userprofiles/{profileId}/contentCategories",
23689	//   "request": {
23690	//     "$ref": "ContentCategory"
23691	//   },
23692	//   "response": {
23693	//     "$ref": "ContentCategory"
23694	//   },
23695	//   "scopes": [
23696	//     "https://www.googleapis.com/auth/dfatrafficking"
23697	//   ]
23698	// }
23699
23700}
23701
23702// method id "dfareporting.contentCategories.list":
23703
23704type ContentCategoriesListCall struct {
23705	s            *Service
23706	profileId    int64
23707	urlParams_   gensupport.URLParams
23708	ifNoneMatch_ string
23709	ctx_         context.Context
23710	header_      http.Header
23711}
23712
23713// List: Retrieves a list of content categories, possibly filtered. This
23714// method supports paging.
23715func (r *ContentCategoriesService) List(profileId int64) *ContentCategoriesListCall {
23716	c := &ContentCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23717	c.profileId = profileId
23718	return c
23719}
23720
23721// Ids sets the optional parameter "ids": Select only content categories
23722// with these IDs.
23723func (c *ContentCategoriesListCall) Ids(ids ...int64) *ContentCategoriesListCall {
23724	var ids_ []string
23725	for _, v := range ids {
23726		ids_ = append(ids_, fmt.Sprint(v))
23727	}
23728	c.urlParams_.SetMulti("ids", ids_)
23729	return c
23730}
23731
23732// MaxResults sets the optional parameter "maxResults": Maximum number
23733// of results to return.
23734func (c *ContentCategoriesListCall) MaxResults(maxResults int64) *ContentCategoriesListCall {
23735	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23736	return c
23737}
23738
23739// PageToken sets the optional parameter "pageToken": Value of the
23740// nextPageToken from the previous result page.
23741func (c *ContentCategoriesListCall) PageToken(pageToken string) *ContentCategoriesListCall {
23742	c.urlParams_.Set("pageToken", pageToken)
23743	return c
23744}
23745
23746// SearchString sets the optional parameter "searchString": Allows
23747// searching for objects by name or ID. Wildcards (*) are allowed. For
23748// example, "contentcategory*2015" will return objects with names like
23749// "contentcategory June 2015", "contentcategory April 2015", or simply
23750// "contentcategory 2015". Most of the searches also add wildcards
23751// implicitly at the start and the end of the search string. For
23752// example, a search string of "contentcategory" will match objects with
23753// name "my contentcategory", "contentcategory 2015", or simply
23754// "contentcategory".
23755func (c *ContentCategoriesListCall) SearchString(searchString string) *ContentCategoriesListCall {
23756	c.urlParams_.Set("searchString", searchString)
23757	return c
23758}
23759
23760// SortField sets the optional parameter "sortField": Field by which to
23761// sort the list.
23762//
23763// Possible values:
23764//   "ID" (default)
23765//   "NAME"
23766func (c *ContentCategoriesListCall) SortField(sortField string) *ContentCategoriesListCall {
23767	c.urlParams_.Set("sortField", sortField)
23768	return c
23769}
23770
23771// SortOrder sets the optional parameter "sortOrder": Order of sorted
23772// results.
23773//
23774// Possible values:
23775//   "ASCENDING" (default)
23776//   "DESCENDING"
23777func (c *ContentCategoriesListCall) SortOrder(sortOrder string) *ContentCategoriesListCall {
23778	c.urlParams_.Set("sortOrder", sortOrder)
23779	return c
23780}
23781
23782// Fields allows partial responses to be retrieved. See
23783// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23784// for more information.
23785func (c *ContentCategoriesListCall) Fields(s ...googleapi.Field) *ContentCategoriesListCall {
23786	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23787	return c
23788}
23789
23790// IfNoneMatch sets the optional parameter which makes the operation
23791// fail if the object's ETag matches the given value. This is useful for
23792// getting updates only after the object has changed since the last
23793// request. Use googleapi.IsNotModified to check whether the response
23794// error from Do is the result of In-None-Match.
23795func (c *ContentCategoriesListCall) IfNoneMatch(entityTag string) *ContentCategoriesListCall {
23796	c.ifNoneMatch_ = entityTag
23797	return c
23798}
23799
23800// Context sets the context to be used in this call's Do method. Any
23801// pending HTTP request will be aborted if the provided context is
23802// canceled.
23803func (c *ContentCategoriesListCall) Context(ctx context.Context) *ContentCategoriesListCall {
23804	c.ctx_ = ctx
23805	return c
23806}
23807
23808// Header returns an http.Header that can be modified by the caller to
23809// add HTTP headers to the request.
23810func (c *ContentCategoriesListCall) Header() http.Header {
23811	if c.header_ == nil {
23812		c.header_ = make(http.Header)
23813	}
23814	return c.header_
23815}
23816
23817func (c *ContentCategoriesListCall) doRequest(alt string) (*http.Response, error) {
23818	reqHeaders := make(http.Header)
23819	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
23820	for k, v := range c.header_ {
23821		reqHeaders[k] = v
23822	}
23823	reqHeaders.Set("User-Agent", c.s.userAgent())
23824	if c.ifNoneMatch_ != "" {
23825		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23826	}
23827	var body io.Reader = nil
23828	c.urlParams_.Set("alt", alt)
23829	c.urlParams_.Set("prettyPrint", "false")
23830	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23831	urls += "?" + c.urlParams_.Encode()
23832	req, err := http.NewRequest("GET", urls, body)
23833	if err != nil {
23834		return nil, err
23835	}
23836	req.Header = reqHeaders
23837	googleapi.Expand(req.URL, map[string]string{
23838		"profileId": strconv.FormatInt(c.profileId, 10),
23839	})
23840	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23841}
23842
23843// Do executes the "dfareporting.contentCategories.list" call.
23844// Exactly one of *ContentCategoriesListResponse or error will be
23845// non-nil. Any non-2xx status code is an error. Response headers are in
23846// either *ContentCategoriesListResponse.ServerResponse.Header or (if a
23847// response was returned at all) in error.(*googleapi.Error).Header. Use
23848// googleapi.IsNotModified to check whether the returned error was
23849// because http.StatusNotModified was returned.
23850func (c *ContentCategoriesListCall) Do(opts ...googleapi.CallOption) (*ContentCategoriesListResponse, error) {
23851	gensupport.SetOptions(c.urlParams_, opts...)
23852	res, err := c.doRequest("json")
23853	if res != nil && res.StatusCode == http.StatusNotModified {
23854		if res.Body != nil {
23855			res.Body.Close()
23856		}
23857		return nil, &googleapi.Error{
23858			Code:   res.StatusCode,
23859			Header: res.Header,
23860		}
23861	}
23862	if err != nil {
23863		return nil, err
23864	}
23865	defer googleapi.CloseBody(res)
23866	if err := googleapi.CheckResponse(res); err != nil {
23867		return nil, err
23868	}
23869	ret := &ContentCategoriesListResponse{
23870		ServerResponse: googleapi.ServerResponse{
23871			Header:         res.Header,
23872			HTTPStatusCode: res.StatusCode,
23873		},
23874	}
23875	target := &ret
23876	if err := gensupport.DecodeResponse(target, res); err != nil {
23877		return nil, err
23878	}
23879	return ret, nil
23880	// {
23881	//   "description": "Retrieves a list of content categories, possibly filtered. This method supports paging.",
23882	//   "httpMethod": "GET",
23883	//   "id": "dfareporting.contentCategories.list",
23884	//   "parameterOrder": [
23885	//     "profileId"
23886	//   ],
23887	//   "parameters": {
23888	//     "ids": {
23889	//       "description": "Select only content categories with these IDs.",
23890	//       "format": "int64",
23891	//       "location": "query",
23892	//       "repeated": true,
23893	//       "type": "string"
23894	//     },
23895	//     "maxResults": {
23896	//       "default": "1000",
23897	//       "description": "Maximum number of results to return.",
23898	//       "format": "int32",
23899	//       "location": "query",
23900	//       "maximum": "1000",
23901	//       "minimum": "0",
23902	//       "type": "integer"
23903	//     },
23904	//     "pageToken": {
23905	//       "description": "Value of the nextPageToken from the previous result page.",
23906	//       "location": "query",
23907	//       "type": "string"
23908	//     },
23909	//     "profileId": {
23910	//       "description": "User profile ID associated with this request.",
23911	//       "format": "int64",
23912	//       "location": "path",
23913	//       "required": true,
23914	//       "type": "string"
23915	//     },
23916	//     "searchString": {
23917	//       "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\".",
23918	//       "location": "query",
23919	//       "type": "string"
23920	//     },
23921	//     "sortField": {
23922	//       "default": "ID",
23923	//       "description": "Field by which to sort the list.",
23924	//       "enum": [
23925	//         "ID",
23926	//         "NAME"
23927	//       ],
23928	//       "enumDescriptions": [
23929	//         "",
23930	//         ""
23931	//       ],
23932	//       "location": "query",
23933	//       "type": "string"
23934	//     },
23935	//     "sortOrder": {
23936	//       "default": "ASCENDING",
23937	//       "description": "Order of sorted results.",
23938	//       "enum": [
23939	//         "ASCENDING",
23940	//         "DESCENDING"
23941	//       ],
23942	//       "enumDescriptions": [
23943	//         "",
23944	//         ""
23945	//       ],
23946	//       "location": "query",
23947	//       "type": "string"
23948	//     }
23949	//   },
23950	//   "path": "userprofiles/{profileId}/contentCategories",
23951	//   "response": {
23952	//     "$ref": "ContentCategoriesListResponse"
23953	//   },
23954	//   "scopes": [
23955	//     "https://www.googleapis.com/auth/dfatrafficking"
23956	//   ]
23957	// }
23958
23959}
23960
23961// Pages invokes f for each page of results.
23962// A non-nil error returned from f will halt the iteration.
23963// The provided context supersedes any context provided to the Context method.
23964func (c *ContentCategoriesListCall) Pages(ctx context.Context, f func(*ContentCategoriesListResponse) error) error {
23965	c.ctx_ = ctx
23966	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
23967	for {
23968		x, err := c.Do()
23969		if err != nil {
23970			return err
23971		}
23972		if err := f(x); err != nil {
23973			return err
23974		}
23975		if x.NextPageToken == "" {
23976			return nil
23977		}
23978		c.PageToken(x.NextPageToken)
23979	}
23980}
23981
23982// method id "dfareporting.contentCategories.patch":
23983
23984type ContentCategoriesPatchCall struct {
23985	s               *Service
23986	profileId       int64
23987	contentcategory *ContentCategory
23988	urlParams_      gensupport.URLParams
23989	ctx_            context.Context
23990	header_         http.Header
23991}
23992
23993// Patch: Updates an existing content category. This method supports
23994// patch semantics.
23995func (r *ContentCategoriesService) Patch(profileId int64, id int64, contentcategory *ContentCategory) *ContentCategoriesPatchCall {
23996	c := &ContentCategoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23997	c.profileId = profileId
23998	c.urlParams_.Set("id", fmt.Sprint(id))
23999	c.contentcategory = contentcategory
24000	return c
24001}
24002
24003// Fields allows partial responses to be retrieved. See
24004// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24005// for more information.
24006func (c *ContentCategoriesPatchCall) Fields(s ...googleapi.Field) *ContentCategoriesPatchCall {
24007	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24008	return c
24009}
24010
24011// Context sets the context to be used in this call's Do method. Any
24012// pending HTTP request will be aborted if the provided context is
24013// canceled.
24014func (c *ContentCategoriesPatchCall) Context(ctx context.Context) *ContentCategoriesPatchCall {
24015	c.ctx_ = ctx
24016	return c
24017}
24018
24019// Header returns an http.Header that can be modified by the caller to
24020// add HTTP headers to the request.
24021func (c *ContentCategoriesPatchCall) Header() http.Header {
24022	if c.header_ == nil {
24023		c.header_ = make(http.Header)
24024	}
24025	return c.header_
24026}
24027
24028func (c *ContentCategoriesPatchCall) doRequest(alt string) (*http.Response, error) {
24029	reqHeaders := make(http.Header)
24030	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
24031	for k, v := range c.header_ {
24032		reqHeaders[k] = v
24033	}
24034	reqHeaders.Set("User-Agent", c.s.userAgent())
24035	var body io.Reader = nil
24036	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
24037	if err != nil {
24038		return nil, err
24039	}
24040	reqHeaders.Set("Content-Type", "application/json")
24041	c.urlParams_.Set("alt", alt)
24042	c.urlParams_.Set("prettyPrint", "false")
24043	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
24044	urls += "?" + c.urlParams_.Encode()
24045	req, err := http.NewRequest("PATCH", urls, body)
24046	if err != nil {
24047		return nil, err
24048	}
24049	req.Header = reqHeaders
24050	googleapi.Expand(req.URL, map[string]string{
24051		"profileId": strconv.FormatInt(c.profileId, 10),
24052	})
24053	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24054}
24055
24056// Do executes the "dfareporting.contentCategories.patch" call.
24057// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
24058// status code is an error. Response headers are in either
24059// *ContentCategory.ServerResponse.Header or (if a response was returned
24060// at all) in error.(*googleapi.Error).Header. Use
24061// googleapi.IsNotModified to check whether the returned error was
24062// because http.StatusNotModified was returned.
24063func (c *ContentCategoriesPatchCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
24064	gensupport.SetOptions(c.urlParams_, opts...)
24065	res, err := c.doRequest("json")
24066	if res != nil && res.StatusCode == http.StatusNotModified {
24067		if res.Body != nil {
24068			res.Body.Close()
24069		}
24070		return nil, &googleapi.Error{
24071			Code:   res.StatusCode,
24072			Header: res.Header,
24073		}
24074	}
24075	if err != nil {
24076		return nil, err
24077	}
24078	defer googleapi.CloseBody(res)
24079	if err := googleapi.CheckResponse(res); err != nil {
24080		return nil, err
24081	}
24082	ret := &ContentCategory{
24083		ServerResponse: googleapi.ServerResponse{
24084			Header:         res.Header,
24085			HTTPStatusCode: res.StatusCode,
24086		},
24087	}
24088	target := &ret
24089	if err := gensupport.DecodeResponse(target, res); err != nil {
24090		return nil, err
24091	}
24092	return ret, nil
24093	// {
24094	//   "description": "Updates an existing content category. This method supports patch semantics.",
24095	//   "httpMethod": "PATCH",
24096	//   "id": "dfareporting.contentCategories.patch",
24097	//   "parameterOrder": [
24098	//     "profileId",
24099	//     "id"
24100	//   ],
24101	//   "parameters": {
24102	//     "id": {
24103	//       "description": "Content category ID.",
24104	//       "format": "int64",
24105	//       "location": "query",
24106	//       "required": true,
24107	//       "type": "string"
24108	//     },
24109	//     "profileId": {
24110	//       "description": "User profile ID associated with this request.",
24111	//       "format": "int64",
24112	//       "location": "path",
24113	//       "required": true,
24114	//       "type": "string"
24115	//     }
24116	//   },
24117	//   "path": "userprofiles/{profileId}/contentCategories",
24118	//   "request": {
24119	//     "$ref": "ContentCategory"
24120	//   },
24121	//   "response": {
24122	//     "$ref": "ContentCategory"
24123	//   },
24124	//   "scopes": [
24125	//     "https://www.googleapis.com/auth/dfatrafficking"
24126	//   ]
24127	// }
24128
24129}
24130
24131// method id "dfareporting.contentCategories.update":
24132
24133type ContentCategoriesUpdateCall struct {
24134	s               *Service
24135	profileId       int64
24136	contentcategory *ContentCategory
24137	urlParams_      gensupport.URLParams
24138	ctx_            context.Context
24139	header_         http.Header
24140}
24141
24142// Update: Updates an existing content category.
24143func (r *ContentCategoriesService) Update(profileId int64, contentcategory *ContentCategory) *ContentCategoriesUpdateCall {
24144	c := &ContentCategoriesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24145	c.profileId = profileId
24146	c.contentcategory = contentcategory
24147	return c
24148}
24149
24150// Fields allows partial responses to be retrieved. See
24151// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24152// for more information.
24153func (c *ContentCategoriesUpdateCall) Fields(s ...googleapi.Field) *ContentCategoriesUpdateCall {
24154	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24155	return c
24156}
24157
24158// Context sets the context to be used in this call's Do method. Any
24159// pending HTTP request will be aborted if the provided context is
24160// canceled.
24161func (c *ContentCategoriesUpdateCall) Context(ctx context.Context) *ContentCategoriesUpdateCall {
24162	c.ctx_ = ctx
24163	return c
24164}
24165
24166// Header returns an http.Header that can be modified by the caller to
24167// add HTTP headers to the request.
24168func (c *ContentCategoriesUpdateCall) Header() http.Header {
24169	if c.header_ == nil {
24170		c.header_ = make(http.Header)
24171	}
24172	return c.header_
24173}
24174
24175func (c *ContentCategoriesUpdateCall) doRequest(alt string) (*http.Response, error) {
24176	reqHeaders := make(http.Header)
24177	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
24178	for k, v := range c.header_ {
24179		reqHeaders[k] = v
24180	}
24181	reqHeaders.Set("User-Agent", c.s.userAgent())
24182	var body io.Reader = nil
24183	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
24184	if err != nil {
24185		return nil, err
24186	}
24187	reqHeaders.Set("Content-Type", "application/json")
24188	c.urlParams_.Set("alt", alt)
24189	c.urlParams_.Set("prettyPrint", "false")
24190	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
24191	urls += "?" + c.urlParams_.Encode()
24192	req, err := http.NewRequest("PUT", urls, body)
24193	if err != nil {
24194		return nil, err
24195	}
24196	req.Header = reqHeaders
24197	googleapi.Expand(req.URL, map[string]string{
24198		"profileId": strconv.FormatInt(c.profileId, 10),
24199	})
24200	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24201}
24202
24203// Do executes the "dfareporting.contentCategories.update" call.
24204// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
24205// status code is an error. Response headers are in either
24206// *ContentCategory.ServerResponse.Header or (if a response was returned
24207// at all) in error.(*googleapi.Error).Header. Use
24208// googleapi.IsNotModified to check whether the returned error was
24209// because http.StatusNotModified was returned.
24210func (c *ContentCategoriesUpdateCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
24211	gensupport.SetOptions(c.urlParams_, opts...)
24212	res, err := c.doRequest("json")
24213	if res != nil && res.StatusCode == http.StatusNotModified {
24214		if res.Body != nil {
24215			res.Body.Close()
24216		}
24217		return nil, &googleapi.Error{
24218			Code:   res.StatusCode,
24219			Header: res.Header,
24220		}
24221	}
24222	if err != nil {
24223		return nil, err
24224	}
24225	defer googleapi.CloseBody(res)
24226	if err := googleapi.CheckResponse(res); err != nil {
24227		return nil, err
24228	}
24229	ret := &ContentCategory{
24230		ServerResponse: googleapi.ServerResponse{
24231			Header:         res.Header,
24232			HTTPStatusCode: res.StatusCode,
24233		},
24234	}
24235	target := &ret
24236	if err := gensupport.DecodeResponse(target, res); err != nil {
24237		return nil, err
24238	}
24239	return ret, nil
24240	// {
24241	//   "description": "Updates an existing content category.",
24242	//   "httpMethod": "PUT",
24243	//   "id": "dfareporting.contentCategories.update",
24244	//   "parameterOrder": [
24245	//     "profileId"
24246	//   ],
24247	//   "parameters": {
24248	//     "profileId": {
24249	//       "description": "User profile ID associated with this request.",
24250	//       "format": "int64",
24251	//       "location": "path",
24252	//       "required": true,
24253	//       "type": "string"
24254	//     }
24255	//   },
24256	//   "path": "userprofiles/{profileId}/contentCategories",
24257	//   "request": {
24258	//     "$ref": "ContentCategory"
24259	//   },
24260	//   "response": {
24261	//     "$ref": "ContentCategory"
24262	//   },
24263	//   "scopes": [
24264	//     "https://www.googleapis.com/auth/dfatrafficking"
24265	//   ]
24266	// }
24267
24268}
24269
24270// method id "dfareporting.conversions.batchinsert":
24271
24272type ConversionsBatchinsertCall struct {
24273	s                             *Service
24274	profileId                     int64
24275	conversionsbatchinsertrequest *ConversionsBatchInsertRequest
24276	urlParams_                    gensupport.URLParams
24277	ctx_                          context.Context
24278	header_                       http.Header
24279}
24280
24281// Batchinsert: Inserts conversions.
24282func (r *ConversionsService) Batchinsert(profileId int64, conversionsbatchinsertrequest *ConversionsBatchInsertRequest) *ConversionsBatchinsertCall {
24283	c := &ConversionsBatchinsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24284	c.profileId = profileId
24285	c.conversionsbatchinsertrequest = conversionsbatchinsertrequest
24286	return c
24287}
24288
24289// Fields allows partial responses to be retrieved. See
24290// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24291// for more information.
24292func (c *ConversionsBatchinsertCall) Fields(s ...googleapi.Field) *ConversionsBatchinsertCall {
24293	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24294	return c
24295}
24296
24297// Context sets the context to be used in this call's Do method. Any
24298// pending HTTP request will be aborted if the provided context is
24299// canceled.
24300func (c *ConversionsBatchinsertCall) Context(ctx context.Context) *ConversionsBatchinsertCall {
24301	c.ctx_ = ctx
24302	return c
24303}
24304
24305// Header returns an http.Header that can be modified by the caller to
24306// add HTTP headers to the request.
24307func (c *ConversionsBatchinsertCall) Header() http.Header {
24308	if c.header_ == nil {
24309		c.header_ = make(http.Header)
24310	}
24311	return c.header_
24312}
24313
24314func (c *ConversionsBatchinsertCall) doRequest(alt string) (*http.Response, error) {
24315	reqHeaders := make(http.Header)
24316	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
24317	for k, v := range c.header_ {
24318		reqHeaders[k] = v
24319	}
24320	reqHeaders.Set("User-Agent", c.s.userAgent())
24321	var body io.Reader = nil
24322	body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchinsertrequest)
24323	if err != nil {
24324		return nil, err
24325	}
24326	reqHeaders.Set("Content-Type", "application/json")
24327	c.urlParams_.Set("alt", alt)
24328	c.urlParams_.Set("prettyPrint", "false")
24329	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchinsert")
24330	urls += "?" + c.urlParams_.Encode()
24331	req, err := http.NewRequest("POST", urls, body)
24332	if err != nil {
24333		return nil, err
24334	}
24335	req.Header = reqHeaders
24336	googleapi.Expand(req.URL, map[string]string{
24337		"profileId": strconv.FormatInt(c.profileId, 10),
24338	})
24339	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24340}
24341
24342// Do executes the "dfareporting.conversions.batchinsert" call.
24343// Exactly one of *ConversionsBatchInsertResponse or error will be
24344// non-nil. Any non-2xx status code is an error. Response headers are in
24345// either *ConversionsBatchInsertResponse.ServerResponse.Header or (if a
24346// response was returned at all) in error.(*googleapi.Error).Header. Use
24347// googleapi.IsNotModified to check whether the returned error was
24348// because http.StatusNotModified was returned.
24349func (c *ConversionsBatchinsertCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchInsertResponse, error) {
24350	gensupport.SetOptions(c.urlParams_, opts...)
24351	res, err := c.doRequest("json")
24352	if res != nil && res.StatusCode == http.StatusNotModified {
24353		if res.Body != nil {
24354			res.Body.Close()
24355		}
24356		return nil, &googleapi.Error{
24357			Code:   res.StatusCode,
24358			Header: res.Header,
24359		}
24360	}
24361	if err != nil {
24362		return nil, err
24363	}
24364	defer googleapi.CloseBody(res)
24365	if err := googleapi.CheckResponse(res); err != nil {
24366		return nil, err
24367	}
24368	ret := &ConversionsBatchInsertResponse{
24369		ServerResponse: googleapi.ServerResponse{
24370			Header:         res.Header,
24371			HTTPStatusCode: res.StatusCode,
24372		},
24373	}
24374	target := &ret
24375	if err := gensupport.DecodeResponse(target, res); err != nil {
24376		return nil, err
24377	}
24378	return ret, nil
24379	// {
24380	//   "description": "Inserts conversions.",
24381	//   "httpMethod": "POST",
24382	//   "id": "dfareporting.conversions.batchinsert",
24383	//   "parameterOrder": [
24384	//     "profileId"
24385	//   ],
24386	//   "parameters": {
24387	//     "profileId": {
24388	//       "description": "User profile ID associated with this request.",
24389	//       "format": "int64",
24390	//       "location": "path",
24391	//       "required": true,
24392	//       "type": "string"
24393	//     }
24394	//   },
24395	//   "path": "userprofiles/{profileId}/conversions/batchinsert",
24396	//   "request": {
24397	//     "$ref": "ConversionsBatchInsertRequest"
24398	//   },
24399	//   "response": {
24400	//     "$ref": "ConversionsBatchInsertResponse"
24401	//   },
24402	//   "scopes": [
24403	//     "https://www.googleapis.com/auth/ddmconversions"
24404	//   ]
24405	// }
24406
24407}
24408
24409// method id "dfareporting.conversions.batchupdate":
24410
24411type ConversionsBatchupdateCall struct {
24412	s                             *Service
24413	profileId                     int64
24414	conversionsbatchupdaterequest *ConversionsBatchUpdateRequest
24415	urlParams_                    gensupport.URLParams
24416	ctx_                          context.Context
24417	header_                       http.Header
24418}
24419
24420// Batchupdate: Updates existing conversions.
24421func (r *ConversionsService) Batchupdate(profileId int64, conversionsbatchupdaterequest *ConversionsBatchUpdateRequest) *ConversionsBatchupdateCall {
24422	c := &ConversionsBatchupdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24423	c.profileId = profileId
24424	c.conversionsbatchupdaterequest = conversionsbatchupdaterequest
24425	return c
24426}
24427
24428// Fields allows partial responses to be retrieved. See
24429// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24430// for more information.
24431func (c *ConversionsBatchupdateCall) Fields(s ...googleapi.Field) *ConversionsBatchupdateCall {
24432	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24433	return c
24434}
24435
24436// Context sets the context to be used in this call's Do method. Any
24437// pending HTTP request will be aborted if the provided context is
24438// canceled.
24439func (c *ConversionsBatchupdateCall) Context(ctx context.Context) *ConversionsBatchupdateCall {
24440	c.ctx_ = ctx
24441	return c
24442}
24443
24444// Header returns an http.Header that can be modified by the caller to
24445// add HTTP headers to the request.
24446func (c *ConversionsBatchupdateCall) Header() http.Header {
24447	if c.header_ == nil {
24448		c.header_ = make(http.Header)
24449	}
24450	return c.header_
24451}
24452
24453func (c *ConversionsBatchupdateCall) doRequest(alt string) (*http.Response, error) {
24454	reqHeaders := make(http.Header)
24455	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
24456	for k, v := range c.header_ {
24457		reqHeaders[k] = v
24458	}
24459	reqHeaders.Set("User-Agent", c.s.userAgent())
24460	var body io.Reader = nil
24461	body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchupdaterequest)
24462	if err != nil {
24463		return nil, err
24464	}
24465	reqHeaders.Set("Content-Type", "application/json")
24466	c.urlParams_.Set("alt", alt)
24467	c.urlParams_.Set("prettyPrint", "false")
24468	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchupdate")
24469	urls += "?" + c.urlParams_.Encode()
24470	req, err := http.NewRequest("POST", urls, body)
24471	if err != nil {
24472		return nil, err
24473	}
24474	req.Header = reqHeaders
24475	googleapi.Expand(req.URL, map[string]string{
24476		"profileId": strconv.FormatInt(c.profileId, 10),
24477	})
24478	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24479}
24480
24481// Do executes the "dfareporting.conversions.batchupdate" call.
24482// Exactly one of *ConversionsBatchUpdateResponse or error will be
24483// non-nil. Any non-2xx status code is an error. Response headers are in
24484// either *ConversionsBatchUpdateResponse.ServerResponse.Header or (if a
24485// response was returned at all) in error.(*googleapi.Error).Header. Use
24486// googleapi.IsNotModified to check whether the returned error was
24487// because http.StatusNotModified was returned.
24488func (c *ConversionsBatchupdateCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchUpdateResponse, error) {
24489	gensupport.SetOptions(c.urlParams_, opts...)
24490	res, err := c.doRequest("json")
24491	if res != nil && res.StatusCode == http.StatusNotModified {
24492		if res.Body != nil {
24493			res.Body.Close()
24494		}
24495		return nil, &googleapi.Error{
24496			Code:   res.StatusCode,
24497			Header: res.Header,
24498		}
24499	}
24500	if err != nil {
24501		return nil, err
24502	}
24503	defer googleapi.CloseBody(res)
24504	if err := googleapi.CheckResponse(res); err != nil {
24505		return nil, err
24506	}
24507	ret := &ConversionsBatchUpdateResponse{
24508		ServerResponse: googleapi.ServerResponse{
24509			Header:         res.Header,
24510			HTTPStatusCode: res.StatusCode,
24511		},
24512	}
24513	target := &ret
24514	if err := gensupport.DecodeResponse(target, res); err != nil {
24515		return nil, err
24516	}
24517	return ret, nil
24518	// {
24519	//   "description": "Updates existing conversions.",
24520	//   "httpMethod": "POST",
24521	//   "id": "dfareporting.conversions.batchupdate",
24522	//   "parameterOrder": [
24523	//     "profileId"
24524	//   ],
24525	//   "parameters": {
24526	//     "profileId": {
24527	//       "description": "User profile ID associated with this request.",
24528	//       "format": "int64",
24529	//       "location": "path",
24530	//       "required": true,
24531	//       "type": "string"
24532	//     }
24533	//   },
24534	//   "path": "userprofiles/{profileId}/conversions/batchupdate",
24535	//   "request": {
24536	//     "$ref": "ConversionsBatchUpdateRequest"
24537	//   },
24538	//   "response": {
24539	//     "$ref": "ConversionsBatchUpdateResponse"
24540	//   },
24541	//   "scopes": [
24542	//     "https://www.googleapis.com/auth/ddmconversions"
24543	//   ]
24544	// }
24545
24546}
24547
24548// method id "dfareporting.countries.get":
24549
24550type CountriesGetCall struct {
24551	s            *Service
24552	profileId    int64
24553	dartId       int64
24554	urlParams_   gensupport.URLParams
24555	ifNoneMatch_ string
24556	ctx_         context.Context
24557	header_      http.Header
24558}
24559
24560// Get: Gets one country by ID.
24561func (r *CountriesService) Get(profileId int64, dartId int64) *CountriesGetCall {
24562	c := &CountriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24563	c.profileId = profileId
24564	c.dartId = dartId
24565	return c
24566}
24567
24568// Fields allows partial responses to be retrieved. See
24569// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24570// for more information.
24571func (c *CountriesGetCall) Fields(s ...googleapi.Field) *CountriesGetCall {
24572	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24573	return c
24574}
24575
24576// IfNoneMatch sets the optional parameter which makes the operation
24577// fail if the object's ETag matches the given value. This is useful for
24578// getting updates only after the object has changed since the last
24579// request. Use googleapi.IsNotModified to check whether the response
24580// error from Do is the result of In-None-Match.
24581func (c *CountriesGetCall) IfNoneMatch(entityTag string) *CountriesGetCall {
24582	c.ifNoneMatch_ = entityTag
24583	return c
24584}
24585
24586// Context sets the context to be used in this call's Do method. Any
24587// pending HTTP request will be aborted if the provided context is
24588// canceled.
24589func (c *CountriesGetCall) Context(ctx context.Context) *CountriesGetCall {
24590	c.ctx_ = ctx
24591	return c
24592}
24593
24594// Header returns an http.Header that can be modified by the caller to
24595// add HTTP headers to the request.
24596func (c *CountriesGetCall) Header() http.Header {
24597	if c.header_ == nil {
24598		c.header_ = make(http.Header)
24599	}
24600	return c.header_
24601}
24602
24603func (c *CountriesGetCall) doRequest(alt string) (*http.Response, error) {
24604	reqHeaders := make(http.Header)
24605	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
24606	for k, v := range c.header_ {
24607		reqHeaders[k] = v
24608	}
24609	reqHeaders.Set("User-Agent", c.s.userAgent())
24610	if c.ifNoneMatch_ != "" {
24611		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24612	}
24613	var body io.Reader = nil
24614	c.urlParams_.Set("alt", alt)
24615	c.urlParams_.Set("prettyPrint", "false")
24616	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries/{dartId}")
24617	urls += "?" + c.urlParams_.Encode()
24618	req, err := http.NewRequest("GET", urls, body)
24619	if err != nil {
24620		return nil, err
24621	}
24622	req.Header = reqHeaders
24623	googleapi.Expand(req.URL, map[string]string{
24624		"profileId": strconv.FormatInt(c.profileId, 10),
24625		"dartId":    strconv.FormatInt(c.dartId, 10),
24626	})
24627	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24628}
24629
24630// Do executes the "dfareporting.countries.get" call.
24631// Exactly one of *Country or error will be non-nil. Any non-2xx status
24632// code is an error. Response headers are in either
24633// *Country.ServerResponse.Header or (if a response was returned at all)
24634// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
24635// check whether the returned error was because http.StatusNotModified
24636// was returned.
24637func (c *CountriesGetCall) Do(opts ...googleapi.CallOption) (*Country, error) {
24638	gensupport.SetOptions(c.urlParams_, opts...)
24639	res, err := c.doRequest("json")
24640	if res != nil && res.StatusCode == http.StatusNotModified {
24641		if res.Body != nil {
24642			res.Body.Close()
24643		}
24644		return nil, &googleapi.Error{
24645			Code:   res.StatusCode,
24646			Header: res.Header,
24647		}
24648	}
24649	if err != nil {
24650		return nil, err
24651	}
24652	defer googleapi.CloseBody(res)
24653	if err := googleapi.CheckResponse(res); err != nil {
24654		return nil, err
24655	}
24656	ret := &Country{
24657		ServerResponse: googleapi.ServerResponse{
24658			Header:         res.Header,
24659			HTTPStatusCode: res.StatusCode,
24660		},
24661	}
24662	target := &ret
24663	if err := gensupport.DecodeResponse(target, res); err != nil {
24664		return nil, err
24665	}
24666	return ret, nil
24667	// {
24668	//   "description": "Gets one country by ID.",
24669	//   "httpMethod": "GET",
24670	//   "id": "dfareporting.countries.get",
24671	//   "parameterOrder": [
24672	//     "profileId",
24673	//     "dartId"
24674	//   ],
24675	//   "parameters": {
24676	//     "dartId": {
24677	//       "description": "Country DART ID.",
24678	//       "format": "int64",
24679	//       "location": "path",
24680	//       "required": true,
24681	//       "type": "string"
24682	//     },
24683	//     "profileId": {
24684	//       "description": "User profile ID associated with this request.",
24685	//       "format": "int64",
24686	//       "location": "path",
24687	//       "required": true,
24688	//       "type": "string"
24689	//     }
24690	//   },
24691	//   "path": "userprofiles/{profileId}/countries/{dartId}",
24692	//   "response": {
24693	//     "$ref": "Country"
24694	//   },
24695	//   "scopes": [
24696	//     "https://www.googleapis.com/auth/dfatrafficking"
24697	//   ]
24698	// }
24699
24700}
24701
24702// method id "dfareporting.countries.list":
24703
24704type CountriesListCall struct {
24705	s            *Service
24706	profileId    int64
24707	urlParams_   gensupport.URLParams
24708	ifNoneMatch_ string
24709	ctx_         context.Context
24710	header_      http.Header
24711}
24712
24713// List: Retrieves a list of countries.
24714func (r *CountriesService) List(profileId int64) *CountriesListCall {
24715	c := &CountriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24716	c.profileId = profileId
24717	return c
24718}
24719
24720// Fields allows partial responses to be retrieved. See
24721// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24722// for more information.
24723func (c *CountriesListCall) Fields(s ...googleapi.Field) *CountriesListCall {
24724	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24725	return c
24726}
24727
24728// IfNoneMatch sets the optional parameter which makes the operation
24729// fail if the object's ETag matches the given value. This is useful for
24730// getting updates only after the object has changed since the last
24731// request. Use googleapi.IsNotModified to check whether the response
24732// error from Do is the result of In-None-Match.
24733func (c *CountriesListCall) IfNoneMatch(entityTag string) *CountriesListCall {
24734	c.ifNoneMatch_ = entityTag
24735	return c
24736}
24737
24738// Context sets the context to be used in this call's Do method. Any
24739// pending HTTP request will be aborted if the provided context is
24740// canceled.
24741func (c *CountriesListCall) Context(ctx context.Context) *CountriesListCall {
24742	c.ctx_ = ctx
24743	return c
24744}
24745
24746// Header returns an http.Header that can be modified by the caller to
24747// add HTTP headers to the request.
24748func (c *CountriesListCall) Header() http.Header {
24749	if c.header_ == nil {
24750		c.header_ = make(http.Header)
24751	}
24752	return c.header_
24753}
24754
24755func (c *CountriesListCall) doRequest(alt string) (*http.Response, error) {
24756	reqHeaders := make(http.Header)
24757	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
24758	for k, v := range c.header_ {
24759		reqHeaders[k] = v
24760	}
24761	reqHeaders.Set("User-Agent", c.s.userAgent())
24762	if c.ifNoneMatch_ != "" {
24763		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24764	}
24765	var body io.Reader = nil
24766	c.urlParams_.Set("alt", alt)
24767	c.urlParams_.Set("prettyPrint", "false")
24768	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries")
24769	urls += "?" + c.urlParams_.Encode()
24770	req, err := http.NewRequest("GET", urls, body)
24771	if err != nil {
24772		return nil, err
24773	}
24774	req.Header = reqHeaders
24775	googleapi.Expand(req.URL, map[string]string{
24776		"profileId": strconv.FormatInt(c.profileId, 10),
24777	})
24778	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24779}
24780
24781// Do executes the "dfareporting.countries.list" call.
24782// Exactly one of *CountriesListResponse or error will be non-nil. Any
24783// non-2xx status code is an error. Response headers are in either
24784// *CountriesListResponse.ServerResponse.Header or (if a response was
24785// returned at all) in error.(*googleapi.Error).Header. Use
24786// googleapi.IsNotModified to check whether the returned error was
24787// because http.StatusNotModified was returned.
24788func (c *CountriesListCall) Do(opts ...googleapi.CallOption) (*CountriesListResponse, error) {
24789	gensupport.SetOptions(c.urlParams_, opts...)
24790	res, err := c.doRequest("json")
24791	if res != nil && res.StatusCode == http.StatusNotModified {
24792		if res.Body != nil {
24793			res.Body.Close()
24794		}
24795		return nil, &googleapi.Error{
24796			Code:   res.StatusCode,
24797			Header: res.Header,
24798		}
24799	}
24800	if err != nil {
24801		return nil, err
24802	}
24803	defer googleapi.CloseBody(res)
24804	if err := googleapi.CheckResponse(res); err != nil {
24805		return nil, err
24806	}
24807	ret := &CountriesListResponse{
24808		ServerResponse: googleapi.ServerResponse{
24809			Header:         res.Header,
24810			HTTPStatusCode: res.StatusCode,
24811		},
24812	}
24813	target := &ret
24814	if err := gensupport.DecodeResponse(target, res); err != nil {
24815		return nil, err
24816	}
24817	return ret, nil
24818	// {
24819	//   "description": "Retrieves a list of countries.",
24820	//   "httpMethod": "GET",
24821	//   "id": "dfareporting.countries.list",
24822	//   "parameterOrder": [
24823	//     "profileId"
24824	//   ],
24825	//   "parameters": {
24826	//     "profileId": {
24827	//       "description": "User profile ID associated with this request.",
24828	//       "format": "int64",
24829	//       "location": "path",
24830	//       "required": true,
24831	//       "type": "string"
24832	//     }
24833	//   },
24834	//   "path": "userprofiles/{profileId}/countries",
24835	//   "response": {
24836	//     "$ref": "CountriesListResponse"
24837	//   },
24838	//   "scopes": [
24839	//     "https://www.googleapis.com/auth/dfatrafficking"
24840	//   ]
24841	// }
24842
24843}
24844
24845// method id "dfareporting.creativeAssets.insert":
24846
24847type CreativeAssetsInsertCall struct {
24848	s                     *Service
24849	profileId             int64
24850	advertiserId          int64
24851	creativeassetmetadata *CreativeAssetMetadata
24852	urlParams_            gensupport.URLParams
24853	mediaInfo_            *gensupport.MediaInfo
24854	ctx_                  context.Context
24855	header_               http.Header
24856}
24857
24858// Insert: Inserts a new creative asset.
24859func (r *CreativeAssetsService) Insert(profileId int64, advertiserId int64, creativeassetmetadata *CreativeAssetMetadata) *CreativeAssetsInsertCall {
24860	c := &CreativeAssetsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24861	c.profileId = profileId
24862	c.advertiserId = advertiserId
24863	c.creativeassetmetadata = creativeassetmetadata
24864	return c
24865}
24866
24867// Media specifies the media to upload in one or more chunks. The chunk
24868// size may be controlled by supplying a MediaOption generated by
24869// googleapi.ChunkSize. The chunk size defaults to
24870// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
24871// upload request will be determined by sniffing the contents of r,
24872// unless a MediaOption generated by googleapi.ContentType is
24873// supplied.
24874// At most one of Media and ResumableMedia may be set.
24875func (c *CreativeAssetsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CreativeAssetsInsertCall {
24876	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
24877	return c
24878}
24879
24880// ResumableMedia specifies the media to upload in chunks and can be
24881// canceled with ctx.
24882//
24883// Deprecated: use Media instead.
24884//
24885// At most one of Media and ResumableMedia may be set. mediaType
24886// identifies the MIME media type of the upload, such as "image/png". If
24887// mediaType is "", it will be auto-detected. The provided ctx will
24888// supersede any context previously provided to the Context method.
24889func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CreativeAssetsInsertCall {
24890	c.ctx_ = ctx
24891	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
24892	return c
24893}
24894
24895// ProgressUpdater provides a callback function that will be called
24896// after every chunk. It should be a low-latency function in order to
24897// not slow down the upload operation. This should only be called when
24898// using ResumableMedia (as opposed to Media).
24899func (c *CreativeAssetsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CreativeAssetsInsertCall {
24900	c.mediaInfo_.SetProgressUpdater(pu)
24901	return c
24902}
24903
24904// Fields allows partial responses to be retrieved. See
24905// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24906// for more information.
24907func (c *CreativeAssetsInsertCall) Fields(s ...googleapi.Field) *CreativeAssetsInsertCall {
24908	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24909	return c
24910}
24911
24912// Context sets the context to be used in this call's Do method. Any
24913// pending HTTP request will be aborted if the provided context is
24914// canceled.
24915// This context will supersede any context previously provided to the
24916// ResumableMedia method.
24917func (c *CreativeAssetsInsertCall) Context(ctx context.Context) *CreativeAssetsInsertCall {
24918	c.ctx_ = ctx
24919	return c
24920}
24921
24922// Header returns an http.Header that can be modified by the caller to
24923// add HTTP headers to the request.
24924func (c *CreativeAssetsInsertCall) Header() http.Header {
24925	if c.header_ == nil {
24926		c.header_ = make(http.Header)
24927	}
24928	return c.header_
24929}
24930
24931func (c *CreativeAssetsInsertCall) doRequest(alt string) (*http.Response, error) {
24932	reqHeaders := make(http.Header)
24933	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
24934	for k, v := range c.header_ {
24935		reqHeaders[k] = v
24936	}
24937	reqHeaders.Set("User-Agent", c.s.userAgent())
24938	var body io.Reader = nil
24939	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativeassetmetadata)
24940	if err != nil {
24941		return nil, err
24942	}
24943	reqHeaders.Set("Content-Type", "application/json")
24944	c.urlParams_.Set("alt", alt)
24945	c.urlParams_.Set("prettyPrint", "false")
24946	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets")
24947	if c.mediaInfo_ != nil {
24948		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/dfareporting/v3.3/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets")
24949		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
24950	}
24951	if body == nil {
24952		body = new(bytes.Buffer)
24953		reqHeaders.Set("Content-Type", "application/json")
24954	}
24955	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
24956	defer cleanup()
24957	urls += "?" + c.urlParams_.Encode()
24958	req, err := http.NewRequest("POST", urls, body)
24959	if err != nil {
24960		return nil, err
24961	}
24962	req.Header = reqHeaders
24963	req.GetBody = getBody
24964	googleapi.Expand(req.URL, map[string]string{
24965		"profileId":    strconv.FormatInt(c.profileId, 10),
24966		"advertiserId": strconv.FormatInt(c.advertiserId, 10),
24967	})
24968	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24969}
24970
24971// Do executes the "dfareporting.creativeAssets.insert" call.
24972// Exactly one of *CreativeAssetMetadata or error will be non-nil. Any
24973// non-2xx status code is an error. Response headers are in either
24974// *CreativeAssetMetadata.ServerResponse.Header or (if a response was
24975// returned at all) in error.(*googleapi.Error).Header. Use
24976// googleapi.IsNotModified to check whether the returned error was
24977// because http.StatusNotModified was returned.
24978func (c *CreativeAssetsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeAssetMetadata, error) {
24979	gensupport.SetOptions(c.urlParams_, opts...)
24980	res, err := c.doRequest("json")
24981	if res != nil && res.StatusCode == http.StatusNotModified {
24982		if res.Body != nil {
24983			res.Body.Close()
24984		}
24985		return nil, &googleapi.Error{
24986			Code:   res.StatusCode,
24987			Header: res.Header,
24988		}
24989	}
24990	if err != nil {
24991		return nil, err
24992	}
24993	defer googleapi.CloseBody(res)
24994	if err := googleapi.CheckResponse(res); err != nil {
24995		return nil, err
24996	}
24997	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
24998	if rx != nil {
24999		rx.Client = c.s.client
25000		rx.UserAgent = c.s.userAgent()
25001		ctx := c.ctx_
25002		if ctx == nil {
25003			ctx = context.TODO()
25004		}
25005		res, err = rx.Upload(ctx)
25006		if err != nil {
25007			return nil, err
25008		}
25009		defer res.Body.Close()
25010		if err := googleapi.CheckResponse(res); err != nil {
25011			return nil, err
25012		}
25013	}
25014	ret := &CreativeAssetMetadata{
25015		ServerResponse: googleapi.ServerResponse{
25016			Header:         res.Header,
25017			HTTPStatusCode: res.StatusCode,
25018		},
25019	}
25020	target := &ret
25021	if err := gensupport.DecodeResponse(target, res); err != nil {
25022		return nil, err
25023	}
25024	return ret, nil
25025	// {
25026	//   "description": "Inserts a new creative asset.",
25027	//   "httpMethod": "POST",
25028	//   "id": "dfareporting.creativeAssets.insert",
25029	//   "mediaUpload": {
25030	//     "accept": [
25031	//       "*/*"
25032	//     ],
25033	//     "maxSize": "1024MB",
25034	//     "protocols": {
25035	//       "resumable": {
25036	//         "multipart": true,
25037	//         "path": "/resumable/upload/dfareporting/v3.3/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets"
25038	//       },
25039	//       "simple": {
25040	//         "multipart": true,
25041	//         "path": "/upload/dfareporting/v3.3/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets"
25042	//       }
25043	//     }
25044	//   },
25045	//   "parameterOrder": [
25046	//     "profileId",
25047	//     "advertiserId"
25048	//   ],
25049	//   "parameters": {
25050	//     "advertiserId": {
25051	//       "description": "Advertiser ID of this creative. This is a required field.",
25052	//       "format": "int64",
25053	//       "location": "path",
25054	//       "required": true,
25055	//       "type": "string"
25056	//     },
25057	//     "profileId": {
25058	//       "description": "User profile ID associated with this request.",
25059	//       "format": "int64",
25060	//       "location": "path",
25061	//       "required": true,
25062	//       "type": "string"
25063	//     }
25064	//   },
25065	//   "path": "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets",
25066	//   "request": {
25067	//     "$ref": "CreativeAssetMetadata"
25068	//   },
25069	//   "response": {
25070	//     "$ref": "CreativeAssetMetadata"
25071	//   },
25072	//   "scopes": [
25073	//     "https://www.googleapis.com/auth/dfatrafficking"
25074	//   ],
25075	//   "supportsMediaUpload": true
25076	// }
25077
25078}
25079
25080// method id "dfareporting.creativeFieldValues.delete":
25081
25082type CreativeFieldValuesDeleteCall struct {
25083	s               *Service
25084	profileId       int64
25085	creativeFieldId int64
25086	id              int64
25087	urlParams_      gensupport.URLParams
25088	ctx_            context.Context
25089	header_         http.Header
25090}
25091
25092// Delete: Deletes an existing creative field value.
25093func (r *CreativeFieldValuesService) Delete(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesDeleteCall {
25094	c := &CreativeFieldValuesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25095	c.profileId = profileId
25096	c.creativeFieldId = creativeFieldId
25097	c.id = id
25098	return c
25099}
25100
25101// Fields allows partial responses to be retrieved. See
25102// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25103// for more information.
25104func (c *CreativeFieldValuesDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldValuesDeleteCall {
25105	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25106	return c
25107}
25108
25109// Context sets the context to be used in this call's Do method. Any
25110// pending HTTP request will be aborted if the provided context is
25111// canceled.
25112func (c *CreativeFieldValuesDeleteCall) Context(ctx context.Context) *CreativeFieldValuesDeleteCall {
25113	c.ctx_ = ctx
25114	return c
25115}
25116
25117// Header returns an http.Header that can be modified by the caller to
25118// add HTTP headers to the request.
25119func (c *CreativeFieldValuesDeleteCall) Header() http.Header {
25120	if c.header_ == nil {
25121		c.header_ = make(http.Header)
25122	}
25123	return c.header_
25124}
25125
25126func (c *CreativeFieldValuesDeleteCall) doRequest(alt string) (*http.Response, error) {
25127	reqHeaders := make(http.Header)
25128	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
25129	for k, v := range c.header_ {
25130		reqHeaders[k] = v
25131	}
25132	reqHeaders.Set("User-Agent", c.s.userAgent())
25133	var body io.Reader = nil
25134	c.urlParams_.Set("alt", alt)
25135	c.urlParams_.Set("prettyPrint", "false")
25136	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
25137	urls += "?" + c.urlParams_.Encode()
25138	req, err := http.NewRequest("DELETE", urls, body)
25139	if err != nil {
25140		return nil, err
25141	}
25142	req.Header = reqHeaders
25143	googleapi.Expand(req.URL, map[string]string{
25144		"profileId":       strconv.FormatInt(c.profileId, 10),
25145		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25146		"id":              strconv.FormatInt(c.id, 10),
25147	})
25148	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25149}
25150
25151// Do executes the "dfareporting.creativeFieldValues.delete" call.
25152func (c *CreativeFieldValuesDeleteCall) Do(opts ...googleapi.CallOption) error {
25153	gensupport.SetOptions(c.urlParams_, opts...)
25154	res, err := c.doRequest("json")
25155	if err != nil {
25156		return err
25157	}
25158	defer googleapi.CloseBody(res)
25159	if err := googleapi.CheckResponse(res); err != nil {
25160		return err
25161	}
25162	return nil
25163	// {
25164	//   "description": "Deletes an existing creative field value.",
25165	//   "httpMethod": "DELETE",
25166	//   "id": "dfareporting.creativeFieldValues.delete",
25167	//   "parameterOrder": [
25168	//     "profileId",
25169	//     "creativeFieldId",
25170	//     "id"
25171	//   ],
25172	//   "parameters": {
25173	//     "creativeFieldId": {
25174	//       "description": "Creative field ID for this creative field value.",
25175	//       "format": "int64",
25176	//       "location": "path",
25177	//       "required": true,
25178	//       "type": "string"
25179	//     },
25180	//     "id": {
25181	//       "description": "Creative Field Value ID",
25182	//       "format": "int64",
25183	//       "location": "path",
25184	//       "required": true,
25185	//       "type": "string"
25186	//     },
25187	//     "profileId": {
25188	//       "description": "User profile ID associated with this request.",
25189	//       "format": "int64",
25190	//       "location": "path",
25191	//       "required": true,
25192	//       "type": "string"
25193	//     }
25194	//   },
25195	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
25196	//   "scopes": [
25197	//     "https://www.googleapis.com/auth/dfatrafficking"
25198	//   ]
25199	// }
25200
25201}
25202
25203// method id "dfareporting.creativeFieldValues.get":
25204
25205type CreativeFieldValuesGetCall struct {
25206	s               *Service
25207	profileId       int64
25208	creativeFieldId int64
25209	id              int64
25210	urlParams_      gensupport.URLParams
25211	ifNoneMatch_    string
25212	ctx_            context.Context
25213	header_         http.Header
25214}
25215
25216// Get: Gets one creative field value by ID.
25217func (r *CreativeFieldValuesService) Get(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesGetCall {
25218	c := &CreativeFieldValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25219	c.profileId = profileId
25220	c.creativeFieldId = creativeFieldId
25221	c.id = id
25222	return c
25223}
25224
25225// Fields allows partial responses to be retrieved. See
25226// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25227// for more information.
25228func (c *CreativeFieldValuesGetCall) Fields(s ...googleapi.Field) *CreativeFieldValuesGetCall {
25229	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25230	return c
25231}
25232
25233// IfNoneMatch sets the optional parameter which makes the operation
25234// fail if the object's ETag matches the given value. This is useful for
25235// getting updates only after the object has changed since the last
25236// request. Use googleapi.IsNotModified to check whether the response
25237// error from Do is the result of In-None-Match.
25238func (c *CreativeFieldValuesGetCall) IfNoneMatch(entityTag string) *CreativeFieldValuesGetCall {
25239	c.ifNoneMatch_ = entityTag
25240	return c
25241}
25242
25243// Context sets the context to be used in this call's Do method. Any
25244// pending HTTP request will be aborted if the provided context is
25245// canceled.
25246func (c *CreativeFieldValuesGetCall) Context(ctx context.Context) *CreativeFieldValuesGetCall {
25247	c.ctx_ = ctx
25248	return c
25249}
25250
25251// Header returns an http.Header that can be modified by the caller to
25252// add HTTP headers to the request.
25253func (c *CreativeFieldValuesGetCall) Header() http.Header {
25254	if c.header_ == nil {
25255		c.header_ = make(http.Header)
25256	}
25257	return c.header_
25258}
25259
25260func (c *CreativeFieldValuesGetCall) doRequest(alt string) (*http.Response, error) {
25261	reqHeaders := make(http.Header)
25262	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
25263	for k, v := range c.header_ {
25264		reqHeaders[k] = v
25265	}
25266	reqHeaders.Set("User-Agent", c.s.userAgent())
25267	if c.ifNoneMatch_ != "" {
25268		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25269	}
25270	var body io.Reader = nil
25271	c.urlParams_.Set("alt", alt)
25272	c.urlParams_.Set("prettyPrint", "false")
25273	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
25274	urls += "?" + c.urlParams_.Encode()
25275	req, err := http.NewRequest("GET", urls, body)
25276	if err != nil {
25277		return nil, err
25278	}
25279	req.Header = reqHeaders
25280	googleapi.Expand(req.URL, map[string]string{
25281		"profileId":       strconv.FormatInt(c.profileId, 10),
25282		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25283		"id":              strconv.FormatInt(c.id, 10),
25284	})
25285	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25286}
25287
25288// Do executes the "dfareporting.creativeFieldValues.get" call.
25289// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25290// non-2xx status code is an error. Response headers are in either
25291// *CreativeFieldValue.ServerResponse.Header or (if a response was
25292// returned at all) in error.(*googleapi.Error).Header. Use
25293// googleapi.IsNotModified to check whether the returned error was
25294// because http.StatusNotModified was returned.
25295func (c *CreativeFieldValuesGetCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25296	gensupport.SetOptions(c.urlParams_, opts...)
25297	res, err := c.doRequest("json")
25298	if res != nil && res.StatusCode == http.StatusNotModified {
25299		if res.Body != nil {
25300			res.Body.Close()
25301		}
25302		return nil, &googleapi.Error{
25303			Code:   res.StatusCode,
25304			Header: res.Header,
25305		}
25306	}
25307	if err != nil {
25308		return nil, err
25309	}
25310	defer googleapi.CloseBody(res)
25311	if err := googleapi.CheckResponse(res); err != nil {
25312		return nil, err
25313	}
25314	ret := &CreativeFieldValue{
25315		ServerResponse: googleapi.ServerResponse{
25316			Header:         res.Header,
25317			HTTPStatusCode: res.StatusCode,
25318		},
25319	}
25320	target := &ret
25321	if err := gensupport.DecodeResponse(target, res); err != nil {
25322		return nil, err
25323	}
25324	return ret, nil
25325	// {
25326	//   "description": "Gets one creative field value by ID.",
25327	//   "httpMethod": "GET",
25328	//   "id": "dfareporting.creativeFieldValues.get",
25329	//   "parameterOrder": [
25330	//     "profileId",
25331	//     "creativeFieldId",
25332	//     "id"
25333	//   ],
25334	//   "parameters": {
25335	//     "creativeFieldId": {
25336	//       "description": "Creative field ID for this creative field value.",
25337	//       "format": "int64",
25338	//       "location": "path",
25339	//       "required": true,
25340	//       "type": "string"
25341	//     },
25342	//     "id": {
25343	//       "description": "Creative Field Value ID",
25344	//       "format": "int64",
25345	//       "location": "path",
25346	//       "required": true,
25347	//       "type": "string"
25348	//     },
25349	//     "profileId": {
25350	//       "description": "User profile ID associated with this request.",
25351	//       "format": "int64",
25352	//       "location": "path",
25353	//       "required": true,
25354	//       "type": "string"
25355	//     }
25356	//   },
25357	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
25358	//   "response": {
25359	//     "$ref": "CreativeFieldValue"
25360	//   },
25361	//   "scopes": [
25362	//     "https://www.googleapis.com/auth/dfatrafficking"
25363	//   ]
25364	// }
25365
25366}
25367
25368// method id "dfareporting.creativeFieldValues.insert":
25369
25370type CreativeFieldValuesInsertCall struct {
25371	s                  *Service
25372	profileId          int64
25373	creativeFieldId    int64
25374	creativefieldvalue *CreativeFieldValue
25375	urlParams_         gensupport.URLParams
25376	ctx_               context.Context
25377	header_            http.Header
25378}
25379
25380// Insert: Inserts a new creative field value.
25381func (r *CreativeFieldValuesService) Insert(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesInsertCall {
25382	c := &CreativeFieldValuesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25383	c.profileId = profileId
25384	c.creativeFieldId = creativeFieldId
25385	c.creativefieldvalue = creativefieldvalue
25386	return c
25387}
25388
25389// Fields allows partial responses to be retrieved. See
25390// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25391// for more information.
25392func (c *CreativeFieldValuesInsertCall) Fields(s ...googleapi.Field) *CreativeFieldValuesInsertCall {
25393	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25394	return c
25395}
25396
25397// Context sets the context to be used in this call's Do method. Any
25398// pending HTTP request will be aborted if the provided context is
25399// canceled.
25400func (c *CreativeFieldValuesInsertCall) Context(ctx context.Context) *CreativeFieldValuesInsertCall {
25401	c.ctx_ = ctx
25402	return c
25403}
25404
25405// Header returns an http.Header that can be modified by the caller to
25406// add HTTP headers to the request.
25407func (c *CreativeFieldValuesInsertCall) Header() http.Header {
25408	if c.header_ == nil {
25409		c.header_ = make(http.Header)
25410	}
25411	return c.header_
25412}
25413
25414func (c *CreativeFieldValuesInsertCall) doRequest(alt string) (*http.Response, error) {
25415	reqHeaders := make(http.Header)
25416	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
25417	for k, v := range c.header_ {
25418		reqHeaders[k] = v
25419	}
25420	reqHeaders.Set("User-Agent", c.s.userAgent())
25421	var body io.Reader = nil
25422	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25423	if err != nil {
25424		return nil, err
25425	}
25426	reqHeaders.Set("Content-Type", "application/json")
25427	c.urlParams_.Set("alt", alt)
25428	c.urlParams_.Set("prettyPrint", "false")
25429	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25430	urls += "?" + c.urlParams_.Encode()
25431	req, err := http.NewRequest("POST", urls, body)
25432	if err != nil {
25433		return nil, err
25434	}
25435	req.Header = reqHeaders
25436	googleapi.Expand(req.URL, map[string]string{
25437		"profileId":       strconv.FormatInt(c.profileId, 10),
25438		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25439	})
25440	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25441}
25442
25443// Do executes the "dfareporting.creativeFieldValues.insert" call.
25444// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25445// non-2xx status code is an error. Response headers are in either
25446// *CreativeFieldValue.ServerResponse.Header or (if a response was
25447// returned at all) in error.(*googleapi.Error).Header. Use
25448// googleapi.IsNotModified to check whether the returned error was
25449// because http.StatusNotModified was returned.
25450func (c *CreativeFieldValuesInsertCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25451	gensupport.SetOptions(c.urlParams_, opts...)
25452	res, err := c.doRequest("json")
25453	if res != nil && res.StatusCode == http.StatusNotModified {
25454		if res.Body != nil {
25455			res.Body.Close()
25456		}
25457		return nil, &googleapi.Error{
25458			Code:   res.StatusCode,
25459			Header: res.Header,
25460		}
25461	}
25462	if err != nil {
25463		return nil, err
25464	}
25465	defer googleapi.CloseBody(res)
25466	if err := googleapi.CheckResponse(res); err != nil {
25467		return nil, err
25468	}
25469	ret := &CreativeFieldValue{
25470		ServerResponse: googleapi.ServerResponse{
25471			Header:         res.Header,
25472			HTTPStatusCode: res.StatusCode,
25473		},
25474	}
25475	target := &ret
25476	if err := gensupport.DecodeResponse(target, res); err != nil {
25477		return nil, err
25478	}
25479	return ret, nil
25480	// {
25481	//   "description": "Inserts a new creative field value.",
25482	//   "httpMethod": "POST",
25483	//   "id": "dfareporting.creativeFieldValues.insert",
25484	//   "parameterOrder": [
25485	//     "profileId",
25486	//     "creativeFieldId"
25487	//   ],
25488	//   "parameters": {
25489	//     "creativeFieldId": {
25490	//       "description": "Creative field ID for this creative field value.",
25491	//       "format": "int64",
25492	//       "location": "path",
25493	//       "required": true,
25494	//       "type": "string"
25495	//     },
25496	//     "profileId": {
25497	//       "description": "User profile ID associated with this request.",
25498	//       "format": "int64",
25499	//       "location": "path",
25500	//       "required": true,
25501	//       "type": "string"
25502	//     }
25503	//   },
25504	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25505	//   "request": {
25506	//     "$ref": "CreativeFieldValue"
25507	//   },
25508	//   "response": {
25509	//     "$ref": "CreativeFieldValue"
25510	//   },
25511	//   "scopes": [
25512	//     "https://www.googleapis.com/auth/dfatrafficking"
25513	//   ]
25514	// }
25515
25516}
25517
25518// method id "dfareporting.creativeFieldValues.list":
25519
25520type CreativeFieldValuesListCall struct {
25521	s               *Service
25522	profileId       int64
25523	creativeFieldId int64
25524	urlParams_      gensupport.URLParams
25525	ifNoneMatch_    string
25526	ctx_            context.Context
25527	header_         http.Header
25528}
25529
25530// List: Retrieves a list of creative field values, possibly filtered.
25531// This method supports paging.
25532func (r *CreativeFieldValuesService) List(profileId int64, creativeFieldId int64) *CreativeFieldValuesListCall {
25533	c := &CreativeFieldValuesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25534	c.profileId = profileId
25535	c.creativeFieldId = creativeFieldId
25536	return c
25537}
25538
25539// Ids sets the optional parameter "ids": Select only creative field
25540// values with these IDs.
25541func (c *CreativeFieldValuesListCall) Ids(ids ...int64) *CreativeFieldValuesListCall {
25542	var ids_ []string
25543	for _, v := range ids {
25544		ids_ = append(ids_, fmt.Sprint(v))
25545	}
25546	c.urlParams_.SetMulti("ids", ids_)
25547	return c
25548}
25549
25550// MaxResults sets the optional parameter "maxResults": Maximum number
25551// of results to return.
25552func (c *CreativeFieldValuesListCall) MaxResults(maxResults int64) *CreativeFieldValuesListCall {
25553	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
25554	return c
25555}
25556
25557// PageToken sets the optional parameter "pageToken": Value of the
25558// nextPageToken from the previous result page.
25559func (c *CreativeFieldValuesListCall) PageToken(pageToken string) *CreativeFieldValuesListCall {
25560	c.urlParams_.Set("pageToken", pageToken)
25561	return c
25562}
25563
25564// SearchString sets the optional parameter "searchString": Allows
25565// searching for creative field values by their values. Wildcards (e.g.
25566// *) are not allowed.
25567func (c *CreativeFieldValuesListCall) SearchString(searchString string) *CreativeFieldValuesListCall {
25568	c.urlParams_.Set("searchString", searchString)
25569	return c
25570}
25571
25572// SortField sets the optional parameter "sortField": Field by which to
25573// sort the list.
25574//
25575// Possible values:
25576//   "ID" (default)
25577//   "VALUE"
25578func (c *CreativeFieldValuesListCall) SortField(sortField string) *CreativeFieldValuesListCall {
25579	c.urlParams_.Set("sortField", sortField)
25580	return c
25581}
25582
25583// SortOrder sets the optional parameter "sortOrder": Order of sorted
25584// results.
25585//
25586// Possible values:
25587//   "ASCENDING" (default)
25588//   "DESCENDING"
25589func (c *CreativeFieldValuesListCall) SortOrder(sortOrder string) *CreativeFieldValuesListCall {
25590	c.urlParams_.Set("sortOrder", sortOrder)
25591	return c
25592}
25593
25594// Fields allows partial responses to be retrieved. See
25595// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25596// for more information.
25597func (c *CreativeFieldValuesListCall) Fields(s ...googleapi.Field) *CreativeFieldValuesListCall {
25598	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25599	return c
25600}
25601
25602// IfNoneMatch sets the optional parameter which makes the operation
25603// fail if the object's ETag matches the given value. This is useful for
25604// getting updates only after the object has changed since the last
25605// request. Use googleapi.IsNotModified to check whether the response
25606// error from Do is the result of In-None-Match.
25607func (c *CreativeFieldValuesListCall) IfNoneMatch(entityTag string) *CreativeFieldValuesListCall {
25608	c.ifNoneMatch_ = entityTag
25609	return c
25610}
25611
25612// Context sets the context to be used in this call's Do method. Any
25613// pending HTTP request will be aborted if the provided context is
25614// canceled.
25615func (c *CreativeFieldValuesListCall) Context(ctx context.Context) *CreativeFieldValuesListCall {
25616	c.ctx_ = ctx
25617	return c
25618}
25619
25620// Header returns an http.Header that can be modified by the caller to
25621// add HTTP headers to the request.
25622func (c *CreativeFieldValuesListCall) Header() http.Header {
25623	if c.header_ == nil {
25624		c.header_ = make(http.Header)
25625	}
25626	return c.header_
25627}
25628
25629func (c *CreativeFieldValuesListCall) doRequest(alt string) (*http.Response, error) {
25630	reqHeaders := make(http.Header)
25631	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
25632	for k, v := range c.header_ {
25633		reqHeaders[k] = v
25634	}
25635	reqHeaders.Set("User-Agent", c.s.userAgent())
25636	if c.ifNoneMatch_ != "" {
25637		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25638	}
25639	var body io.Reader = nil
25640	c.urlParams_.Set("alt", alt)
25641	c.urlParams_.Set("prettyPrint", "false")
25642	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25643	urls += "?" + c.urlParams_.Encode()
25644	req, err := http.NewRequest("GET", urls, body)
25645	if err != nil {
25646		return nil, err
25647	}
25648	req.Header = reqHeaders
25649	googleapi.Expand(req.URL, map[string]string{
25650		"profileId":       strconv.FormatInt(c.profileId, 10),
25651		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25652	})
25653	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25654}
25655
25656// Do executes the "dfareporting.creativeFieldValues.list" call.
25657// Exactly one of *CreativeFieldValuesListResponse or error will be
25658// non-nil. Any non-2xx status code is an error. Response headers are in
25659// either *CreativeFieldValuesListResponse.ServerResponse.Header or (if
25660// a response was returned at all) in error.(*googleapi.Error).Header.
25661// Use googleapi.IsNotModified to check whether the returned error was
25662// because http.StatusNotModified was returned.
25663func (c *CreativeFieldValuesListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValuesListResponse, error) {
25664	gensupport.SetOptions(c.urlParams_, opts...)
25665	res, err := c.doRequest("json")
25666	if res != nil && res.StatusCode == http.StatusNotModified {
25667		if res.Body != nil {
25668			res.Body.Close()
25669		}
25670		return nil, &googleapi.Error{
25671			Code:   res.StatusCode,
25672			Header: res.Header,
25673		}
25674	}
25675	if err != nil {
25676		return nil, err
25677	}
25678	defer googleapi.CloseBody(res)
25679	if err := googleapi.CheckResponse(res); err != nil {
25680		return nil, err
25681	}
25682	ret := &CreativeFieldValuesListResponse{
25683		ServerResponse: googleapi.ServerResponse{
25684			Header:         res.Header,
25685			HTTPStatusCode: res.StatusCode,
25686		},
25687	}
25688	target := &ret
25689	if err := gensupport.DecodeResponse(target, res); err != nil {
25690		return nil, err
25691	}
25692	return ret, nil
25693	// {
25694	//   "description": "Retrieves a list of creative field values, possibly filtered. This method supports paging.",
25695	//   "httpMethod": "GET",
25696	//   "id": "dfareporting.creativeFieldValues.list",
25697	//   "parameterOrder": [
25698	//     "profileId",
25699	//     "creativeFieldId"
25700	//   ],
25701	//   "parameters": {
25702	//     "creativeFieldId": {
25703	//       "description": "Creative field ID for this creative field value.",
25704	//       "format": "int64",
25705	//       "location": "path",
25706	//       "required": true,
25707	//       "type": "string"
25708	//     },
25709	//     "ids": {
25710	//       "description": "Select only creative field values with these IDs.",
25711	//       "format": "int64",
25712	//       "location": "query",
25713	//       "repeated": true,
25714	//       "type": "string"
25715	//     },
25716	//     "maxResults": {
25717	//       "default": "1000",
25718	//       "description": "Maximum number of results to return.",
25719	//       "format": "int32",
25720	//       "location": "query",
25721	//       "maximum": "1000",
25722	//       "minimum": "0",
25723	//       "type": "integer"
25724	//     },
25725	//     "pageToken": {
25726	//       "description": "Value of the nextPageToken from the previous result page.",
25727	//       "location": "query",
25728	//       "type": "string"
25729	//     },
25730	//     "profileId": {
25731	//       "description": "User profile ID associated with this request.",
25732	//       "format": "int64",
25733	//       "location": "path",
25734	//       "required": true,
25735	//       "type": "string"
25736	//     },
25737	//     "searchString": {
25738	//       "description": "Allows searching for creative field values by their values. Wildcards (e.g. *) are not allowed.",
25739	//       "location": "query",
25740	//       "type": "string"
25741	//     },
25742	//     "sortField": {
25743	//       "default": "ID",
25744	//       "description": "Field by which to sort the list.",
25745	//       "enum": [
25746	//         "ID",
25747	//         "VALUE"
25748	//       ],
25749	//       "enumDescriptions": [
25750	//         "",
25751	//         ""
25752	//       ],
25753	//       "location": "query",
25754	//       "type": "string"
25755	//     },
25756	//     "sortOrder": {
25757	//       "default": "ASCENDING",
25758	//       "description": "Order of sorted results.",
25759	//       "enum": [
25760	//         "ASCENDING",
25761	//         "DESCENDING"
25762	//       ],
25763	//       "enumDescriptions": [
25764	//         "",
25765	//         ""
25766	//       ],
25767	//       "location": "query",
25768	//       "type": "string"
25769	//     }
25770	//   },
25771	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25772	//   "response": {
25773	//     "$ref": "CreativeFieldValuesListResponse"
25774	//   },
25775	//   "scopes": [
25776	//     "https://www.googleapis.com/auth/dfatrafficking"
25777	//   ]
25778	// }
25779
25780}
25781
25782// Pages invokes f for each page of results.
25783// A non-nil error returned from f will halt the iteration.
25784// The provided context supersedes any context provided to the Context method.
25785func (c *CreativeFieldValuesListCall) Pages(ctx context.Context, f func(*CreativeFieldValuesListResponse) error) error {
25786	c.ctx_ = ctx
25787	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
25788	for {
25789		x, err := c.Do()
25790		if err != nil {
25791			return err
25792		}
25793		if err := f(x); err != nil {
25794			return err
25795		}
25796		if x.NextPageToken == "" {
25797			return nil
25798		}
25799		c.PageToken(x.NextPageToken)
25800	}
25801}
25802
25803// method id "dfareporting.creativeFieldValues.patch":
25804
25805type CreativeFieldValuesPatchCall struct {
25806	s                  *Service
25807	profileId          int64
25808	creativeFieldId    int64
25809	creativefieldvalue *CreativeFieldValue
25810	urlParams_         gensupport.URLParams
25811	ctx_               context.Context
25812	header_            http.Header
25813}
25814
25815// Patch: Updates an existing creative field value. This method supports
25816// patch semantics.
25817func (r *CreativeFieldValuesService) Patch(profileId int64, creativeFieldId int64, id int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesPatchCall {
25818	c := &CreativeFieldValuesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25819	c.profileId = profileId
25820	c.creativeFieldId = creativeFieldId
25821	c.urlParams_.Set("id", fmt.Sprint(id))
25822	c.creativefieldvalue = creativefieldvalue
25823	return c
25824}
25825
25826// Fields allows partial responses to be retrieved. See
25827// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25828// for more information.
25829func (c *CreativeFieldValuesPatchCall) Fields(s ...googleapi.Field) *CreativeFieldValuesPatchCall {
25830	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25831	return c
25832}
25833
25834// Context sets the context to be used in this call's Do method. Any
25835// pending HTTP request will be aborted if the provided context is
25836// canceled.
25837func (c *CreativeFieldValuesPatchCall) Context(ctx context.Context) *CreativeFieldValuesPatchCall {
25838	c.ctx_ = ctx
25839	return c
25840}
25841
25842// Header returns an http.Header that can be modified by the caller to
25843// add HTTP headers to the request.
25844func (c *CreativeFieldValuesPatchCall) Header() http.Header {
25845	if c.header_ == nil {
25846		c.header_ = make(http.Header)
25847	}
25848	return c.header_
25849}
25850
25851func (c *CreativeFieldValuesPatchCall) doRequest(alt string) (*http.Response, error) {
25852	reqHeaders := make(http.Header)
25853	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
25854	for k, v := range c.header_ {
25855		reqHeaders[k] = v
25856	}
25857	reqHeaders.Set("User-Agent", c.s.userAgent())
25858	var body io.Reader = nil
25859	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25860	if err != nil {
25861		return nil, err
25862	}
25863	reqHeaders.Set("Content-Type", "application/json")
25864	c.urlParams_.Set("alt", alt)
25865	c.urlParams_.Set("prettyPrint", "false")
25866	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25867	urls += "?" + c.urlParams_.Encode()
25868	req, err := http.NewRequest("PATCH", urls, body)
25869	if err != nil {
25870		return nil, err
25871	}
25872	req.Header = reqHeaders
25873	googleapi.Expand(req.URL, map[string]string{
25874		"profileId":       strconv.FormatInt(c.profileId, 10),
25875		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25876	})
25877	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25878}
25879
25880// Do executes the "dfareporting.creativeFieldValues.patch" call.
25881// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25882// non-2xx status code is an error. Response headers are in either
25883// *CreativeFieldValue.ServerResponse.Header or (if a response was
25884// returned at all) in error.(*googleapi.Error).Header. Use
25885// googleapi.IsNotModified to check whether the returned error was
25886// because http.StatusNotModified was returned.
25887func (c *CreativeFieldValuesPatchCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25888	gensupport.SetOptions(c.urlParams_, opts...)
25889	res, err := c.doRequest("json")
25890	if res != nil && res.StatusCode == http.StatusNotModified {
25891		if res.Body != nil {
25892			res.Body.Close()
25893		}
25894		return nil, &googleapi.Error{
25895			Code:   res.StatusCode,
25896			Header: res.Header,
25897		}
25898	}
25899	if err != nil {
25900		return nil, err
25901	}
25902	defer googleapi.CloseBody(res)
25903	if err := googleapi.CheckResponse(res); err != nil {
25904		return nil, err
25905	}
25906	ret := &CreativeFieldValue{
25907		ServerResponse: googleapi.ServerResponse{
25908			Header:         res.Header,
25909			HTTPStatusCode: res.StatusCode,
25910		},
25911	}
25912	target := &ret
25913	if err := gensupport.DecodeResponse(target, res); err != nil {
25914		return nil, err
25915	}
25916	return ret, nil
25917	// {
25918	//   "description": "Updates an existing creative field value. This method supports patch semantics.",
25919	//   "httpMethod": "PATCH",
25920	//   "id": "dfareporting.creativeFieldValues.patch",
25921	//   "parameterOrder": [
25922	//     "profileId",
25923	//     "creativeFieldId",
25924	//     "id"
25925	//   ],
25926	//   "parameters": {
25927	//     "creativeFieldId": {
25928	//       "description": "Creative field ID for this creative field value.",
25929	//       "format": "int64",
25930	//       "location": "path",
25931	//       "required": true,
25932	//       "type": "string"
25933	//     },
25934	//     "id": {
25935	//       "description": "Creative Field Value ID",
25936	//       "format": "int64",
25937	//       "location": "query",
25938	//       "required": true,
25939	//       "type": "string"
25940	//     },
25941	//     "profileId": {
25942	//       "description": "User profile ID associated with this request.",
25943	//       "format": "int64",
25944	//       "location": "path",
25945	//       "required": true,
25946	//       "type": "string"
25947	//     }
25948	//   },
25949	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25950	//   "request": {
25951	//     "$ref": "CreativeFieldValue"
25952	//   },
25953	//   "response": {
25954	//     "$ref": "CreativeFieldValue"
25955	//   },
25956	//   "scopes": [
25957	//     "https://www.googleapis.com/auth/dfatrafficking"
25958	//   ]
25959	// }
25960
25961}
25962
25963// method id "dfareporting.creativeFieldValues.update":
25964
25965type CreativeFieldValuesUpdateCall struct {
25966	s                  *Service
25967	profileId          int64
25968	creativeFieldId    int64
25969	creativefieldvalue *CreativeFieldValue
25970	urlParams_         gensupport.URLParams
25971	ctx_               context.Context
25972	header_            http.Header
25973}
25974
25975// Update: Updates an existing creative field value.
25976func (r *CreativeFieldValuesService) Update(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesUpdateCall {
25977	c := &CreativeFieldValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25978	c.profileId = profileId
25979	c.creativeFieldId = creativeFieldId
25980	c.creativefieldvalue = creativefieldvalue
25981	return c
25982}
25983
25984// Fields allows partial responses to be retrieved. See
25985// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25986// for more information.
25987func (c *CreativeFieldValuesUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldValuesUpdateCall {
25988	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25989	return c
25990}
25991
25992// Context sets the context to be used in this call's Do method. Any
25993// pending HTTP request will be aborted if the provided context is
25994// canceled.
25995func (c *CreativeFieldValuesUpdateCall) Context(ctx context.Context) *CreativeFieldValuesUpdateCall {
25996	c.ctx_ = ctx
25997	return c
25998}
25999
26000// Header returns an http.Header that can be modified by the caller to
26001// add HTTP headers to the request.
26002func (c *CreativeFieldValuesUpdateCall) Header() http.Header {
26003	if c.header_ == nil {
26004		c.header_ = make(http.Header)
26005	}
26006	return c.header_
26007}
26008
26009func (c *CreativeFieldValuesUpdateCall) doRequest(alt string) (*http.Response, error) {
26010	reqHeaders := make(http.Header)
26011	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
26012	for k, v := range c.header_ {
26013		reqHeaders[k] = v
26014	}
26015	reqHeaders.Set("User-Agent", c.s.userAgent())
26016	var body io.Reader = nil
26017	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
26018	if err != nil {
26019		return nil, err
26020	}
26021	reqHeaders.Set("Content-Type", "application/json")
26022	c.urlParams_.Set("alt", alt)
26023	c.urlParams_.Set("prettyPrint", "false")
26024	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
26025	urls += "?" + c.urlParams_.Encode()
26026	req, err := http.NewRequest("PUT", urls, body)
26027	if err != nil {
26028		return nil, err
26029	}
26030	req.Header = reqHeaders
26031	googleapi.Expand(req.URL, map[string]string{
26032		"profileId":       strconv.FormatInt(c.profileId, 10),
26033		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
26034	})
26035	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26036}
26037
26038// Do executes the "dfareporting.creativeFieldValues.update" call.
26039// Exactly one of *CreativeFieldValue or error will be non-nil. Any
26040// non-2xx status code is an error. Response headers are in either
26041// *CreativeFieldValue.ServerResponse.Header or (if a response was
26042// returned at all) in error.(*googleapi.Error).Header. Use
26043// googleapi.IsNotModified to check whether the returned error was
26044// because http.StatusNotModified was returned.
26045func (c *CreativeFieldValuesUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
26046	gensupport.SetOptions(c.urlParams_, opts...)
26047	res, err := c.doRequest("json")
26048	if res != nil && res.StatusCode == http.StatusNotModified {
26049		if res.Body != nil {
26050			res.Body.Close()
26051		}
26052		return nil, &googleapi.Error{
26053			Code:   res.StatusCode,
26054			Header: res.Header,
26055		}
26056	}
26057	if err != nil {
26058		return nil, err
26059	}
26060	defer googleapi.CloseBody(res)
26061	if err := googleapi.CheckResponse(res); err != nil {
26062		return nil, err
26063	}
26064	ret := &CreativeFieldValue{
26065		ServerResponse: googleapi.ServerResponse{
26066			Header:         res.Header,
26067			HTTPStatusCode: res.StatusCode,
26068		},
26069	}
26070	target := &ret
26071	if err := gensupport.DecodeResponse(target, res); err != nil {
26072		return nil, err
26073	}
26074	return ret, nil
26075	// {
26076	//   "description": "Updates an existing creative field value.",
26077	//   "httpMethod": "PUT",
26078	//   "id": "dfareporting.creativeFieldValues.update",
26079	//   "parameterOrder": [
26080	//     "profileId",
26081	//     "creativeFieldId"
26082	//   ],
26083	//   "parameters": {
26084	//     "creativeFieldId": {
26085	//       "description": "Creative field ID for this creative field value.",
26086	//       "format": "int64",
26087	//       "location": "path",
26088	//       "required": true,
26089	//       "type": "string"
26090	//     },
26091	//     "profileId": {
26092	//       "description": "User profile ID associated with this request.",
26093	//       "format": "int64",
26094	//       "location": "path",
26095	//       "required": true,
26096	//       "type": "string"
26097	//     }
26098	//   },
26099	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
26100	//   "request": {
26101	//     "$ref": "CreativeFieldValue"
26102	//   },
26103	//   "response": {
26104	//     "$ref": "CreativeFieldValue"
26105	//   },
26106	//   "scopes": [
26107	//     "https://www.googleapis.com/auth/dfatrafficking"
26108	//   ]
26109	// }
26110
26111}
26112
26113// method id "dfareporting.creativeFields.delete":
26114
26115type CreativeFieldsDeleteCall struct {
26116	s          *Service
26117	profileId  int64
26118	id         int64
26119	urlParams_ gensupport.URLParams
26120	ctx_       context.Context
26121	header_    http.Header
26122}
26123
26124// Delete: Deletes an existing creative field.
26125func (r *CreativeFieldsService) Delete(profileId int64, id int64) *CreativeFieldsDeleteCall {
26126	c := &CreativeFieldsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26127	c.profileId = profileId
26128	c.id = id
26129	return c
26130}
26131
26132// Fields allows partial responses to be retrieved. See
26133// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26134// for more information.
26135func (c *CreativeFieldsDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldsDeleteCall {
26136	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26137	return c
26138}
26139
26140// Context sets the context to be used in this call's Do method. Any
26141// pending HTTP request will be aborted if the provided context is
26142// canceled.
26143func (c *CreativeFieldsDeleteCall) Context(ctx context.Context) *CreativeFieldsDeleteCall {
26144	c.ctx_ = ctx
26145	return c
26146}
26147
26148// Header returns an http.Header that can be modified by the caller to
26149// add HTTP headers to the request.
26150func (c *CreativeFieldsDeleteCall) Header() http.Header {
26151	if c.header_ == nil {
26152		c.header_ = make(http.Header)
26153	}
26154	return c.header_
26155}
26156
26157func (c *CreativeFieldsDeleteCall) doRequest(alt string) (*http.Response, error) {
26158	reqHeaders := make(http.Header)
26159	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
26160	for k, v := range c.header_ {
26161		reqHeaders[k] = v
26162	}
26163	reqHeaders.Set("User-Agent", c.s.userAgent())
26164	var body io.Reader = nil
26165	c.urlParams_.Set("alt", alt)
26166	c.urlParams_.Set("prettyPrint", "false")
26167	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
26168	urls += "?" + c.urlParams_.Encode()
26169	req, err := http.NewRequest("DELETE", urls, body)
26170	if err != nil {
26171		return nil, err
26172	}
26173	req.Header = reqHeaders
26174	googleapi.Expand(req.URL, map[string]string{
26175		"profileId": strconv.FormatInt(c.profileId, 10),
26176		"id":        strconv.FormatInt(c.id, 10),
26177	})
26178	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26179}
26180
26181// Do executes the "dfareporting.creativeFields.delete" call.
26182func (c *CreativeFieldsDeleteCall) Do(opts ...googleapi.CallOption) error {
26183	gensupport.SetOptions(c.urlParams_, opts...)
26184	res, err := c.doRequest("json")
26185	if err != nil {
26186		return err
26187	}
26188	defer googleapi.CloseBody(res)
26189	if err := googleapi.CheckResponse(res); err != nil {
26190		return err
26191	}
26192	return nil
26193	// {
26194	//   "description": "Deletes an existing creative field.",
26195	//   "httpMethod": "DELETE",
26196	//   "id": "dfareporting.creativeFields.delete",
26197	//   "parameterOrder": [
26198	//     "profileId",
26199	//     "id"
26200	//   ],
26201	//   "parameters": {
26202	//     "id": {
26203	//       "description": "Creative Field ID",
26204	//       "format": "int64",
26205	//       "location": "path",
26206	//       "required": true,
26207	//       "type": "string"
26208	//     },
26209	//     "profileId": {
26210	//       "description": "User profile ID associated with this request.",
26211	//       "format": "int64",
26212	//       "location": "path",
26213	//       "required": true,
26214	//       "type": "string"
26215	//     }
26216	//   },
26217	//   "path": "userprofiles/{profileId}/creativeFields/{id}",
26218	//   "scopes": [
26219	//     "https://www.googleapis.com/auth/dfatrafficking"
26220	//   ]
26221	// }
26222
26223}
26224
26225// method id "dfareporting.creativeFields.get":
26226
26227type CreativeFieldsGetCall struct {
26228	s            *Service
26229	profileId    int64
26230	id           int64
26231	urlParams_   gensupport.URLParams
26232	ifNoneMatch_ string
26233	ctx_         context.Context
26234	header_      http.Header
26235}
26236
26237// Get: Gets one creative field by ID.
26238func (r *CreativeFieldsService) Get(profileId int64, id int64) *CreativeFieldsGetCall {
26239	c := &CreativeFieldsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26240	c.profileId = profileId
26241	c.id = id
26242	return c
26243}
26244
26245// Fields allows partial responses to be retrieved. See
26246// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26247// for more information.
26248func (c *CreativeFieldsGetCall) Fields(s ...googleapi.Field) *CreativeFieldsGetCall {
26249	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26250	return c
26251}
26252
26253// IfNoneMatch sets the optional parameter which makes the operation
26254// fail if the object's ETag matches the given value. This is useful for
26255// getting updates only after the object has changed since the last
26256// request. Use googleapi.IsNotModified to check whether the response
26257// error from Do is the result of In-None-Match.
26258func (c *CreativeFieldsGetCall) IfNoneMatch(entityTag string) *CreativeFieldsGetCall {
26259	c.ifNoneMatch_ = entityTag
26260	return c
26261}
26262
26263// Context sets the context to be used in this call's Do method. Any
26264// pending HTTP request will be aborted if the provided context is
26265// canceled.
26266func (c *CreativeFieldsGetCall) Context(ctx context.Context) *CreativeFieldsGetCall {
26267	c.ctx_ = ctx
26268	return c
26269}
26270
26271// Header returns an http.Header that can be modified by the caller to
26272// add HTTP headers to the request.
26273func (c *CreativeFieldsGetCall) Header() http.Header {
26274	if c.header_ == nil {
26275		c.header_ = make(http.Header)
26276	}
26277	return c.header_
26278}
26279
26280func (c *CreativeFieldsGetCall) doRequest(alt string) (*http.Response, error) {
26281	reqHeaders := make(http.Header)
26282	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
26283	for k, v := range c.header_ {
26284		reqHeaders[k] = v
26285	}
26286	reqHeaders.Set("User-Agent", c.s.userAgent())
26287	if c.ifNoneMatch_ != "" {
26288		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26289	}
26290	var body io.Reader = nil
26291	c.urlParams_.Set("alt", alt)
26292	c.urlParams_.Set("prettyPrint", "false")
26293	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
26294	urls += "?" + c.urlParams_.Encode()
26295	req, err := http.NewRequest("GET", urls, body)
26296	if err != nil {
26297		return nil, err
26298	}
26299	req.Header = reqHeaders
26300	googleapi.Expand(req.URL, map[string]string{
26301		"profileId": strconv.FormatInt(c.profileId, 10),
26302		"id":        strconv.FormatInt(c.id, 10),
26303	})
26304	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26305}
26306
26307// Do executes the "dfareporting.creativeFields.get" call.
26308// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26309// status code is an error. Response headers are in either
26310// *CreativeField.ServerResponse.Header or (if a response was returned
26311// at all) in error.(*googleapi.Error).Header. Use
26312// googleapi.IsNotModified to check whether the returned error was
26313// because http.StatusNotModified was returned.
26314func (c *CreativeFieldsGetCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26315	gensupport.SetOptions(c.urlParams_, opts...)
26316	res, err := c.doRequest("json")
26317	if res != nil && res.StatusCode == http.StatusNotModified {
26318		if res.Body != nil {
26319			res.Body.Close()
26320		}
26321		return nil, &googleapi.Error{
26322			Code:   res.StatusCode,
26323			Header: res.Header,
26324		}
26325	}
26326	if err != nil {
26327		return nil, err
26328	}
26329	defer googleapi.CloseBody(res)
26330	if err := googleapi.CheckResponse(res); err != nil {
26331		return nil, err
26332	}
26333	ret := &CreativeField{
26334		ServerResponse: googleapi.ServerResponse{
26335			Header:         res.Header,
26336			HTTPStatusCode: res.StatusCode,
26337		},
26338	}
26339	target := &ret
26340	if err := gensupport.DecodeResponse(target, res); err != nil {
26341		return nil, err
26342	}
26343	return ret, nil
26344	// {
26345	//   "description": "Gets one creative field by ID.",
26346	//   "httpMethod": "GET",
26347	//   "id": "dfareporting.creativeFields.get",
26348	//   "parameterOrder": [
26349	//     "profileId",
26350	//     "id"
26351	//   ],
26352	//   "parameters": {
26353	//     "id": {
26354	//       "description": "Creative Field ID",
26355	//       "format": "int64",
26356	//       "location": "path",
26357	//       "required": true,
26358	//       "type": "string"
26359	//     },
26360	//     "profileId": {
26361	//       "description": "User profile ID associated with this request.",
26362	//       "format": "int64",
26363	//       "location": "path",
26364	//       "required": true,
26365	//       "type": "string"
26366	//     }
26367	//   },
26368	//   "path": "userprofiles/{profileId}/creativeFields/{id}",
26369	//   "response": {
26370	//     "$ref": "CreativeField"
26371	//   },
26372	//   "scopes": [
26373	//     "https://www.googleapis.com/auth/dfatrafficking"
26374	//   ]
26375	// }
26376
26377}
26378
26379// method id "dfareporting.creativeFields.insert":
26380
26381type CreativeFieldsInsertCall struct {
26382	s             *Service
26383	profileId     int64
26384	creativefield *CreativeField
26385	urlParams_    gensupport.URLParams
26386	ctx_          context.Context
26387	header_       http.Header
26388}
26389
26390// Insert: Inserts a new creative field.
26391func (r *CreativeFieldsService) Insert(profileId int64, creativefield *CreativeField) *CreativeFieldsInsertCall {
26392	c := &CreativeFieldsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26393	c.profileId = profileId
26394	c.creativefield = creativefield
26395	return c
26396}
26397
26398// Fields allows partial responses to be retrieved. See
26399// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26400// for more information.
26401func (c *CreativeFieldsInsertCall) Fields(s ...googleapi.Field) *CreativeFieldsInsertCall {
26402	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26403	return c
26404}
26405
26406// Context sets the context to be used in this call's Do method. Any
26407// pending HTTP request will be aborted if the provided context is
26408// canceled.
26409func (c *CreativeFieldsInsertCall) Context(ctx context.Context) *CreativeFieldsInsertCall {
26410	c.ctx_ = ctx
26411	return c
26412}
26413
26414// Header returns an http.Header that can be modified by the caller to
26415// add HTTP headers to the request.
26416func (c *CreativeFieldsInsertCall) Header() http.Header {
26417	if c.header_ == nil {
26418		c.header_ = make(http.Header)
26419	}
26420	return c.header_
26421}
26422
26423func (c *CreativeFieldsInsertCall) doRequest(alt string) (*http.Response, error) {
26424	reqHeaders := make(http.Header)
26425	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
26426	for k, v := range c.header_ {
26427		reqHeaders[k] = v
26428	}
26429	reqHeaders.Set("User-Agent", c.s.userAgent())
26430	var body io.Reader = nil
26431	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26432	if err != nil {
26433		return nil, err
26434	}
26435	reqHeaders.Set("Content-Type", "application/json")
26436	c.urlParams_.Set("alt", alt)
26437	c.urlParams_.Set("prettyPrint", "false")
26438	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26439	urls += "?" + c.urlParams_.Encode()
26440	req, err := http.NewRequest("POST", urls, body)
26441	if err != nil {
26442		return nil, err
26443	}
26444	req.Header = reqHeaders
26445	googleapi.Expand(req.URL, map[string]string{
26446		"profileId": strconv.FormatInt(c.profileId, 10),
26447	})
26448	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26449}
26450
26451// Do executes the "dfareporting.creativeFields.insert" call.
26452// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26453// status code is an error. Response headers are in either
26454// *CreativeField.ServerResponse.Header or (if a response was returned
26455// at all) in error.(*googleapi.Error).Header. Use
26456// googleapi.IsNotModified to check whether the returned error was
26457// because http.StatusNotModified was returned.
26458func (c *CreativeFieldsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26459	gensupport.SetOptions(c.urlParams_, opts...)
26460	res, err := c.doRequest("json")
26461	if res != nil && res.StatusCode == http.StatusNotModified {
26462		if res.Body != nil {
26463			res.Body.Close()
26464		}
26465		return nil, &googleapi.Error{
26466			Code:   res.StatusCode,
26467			Header: res.Header,
26468		}
26469	}
26470	if err != nil {
26471		return nil, err
26472	}
26473	defer googleapi.CloseBody(res)
26474	if err := googleapi.CheckResponse(res); err != nil {
26475		return nil, err
26476	}
26477	ret := &CreativeField{
26478		ServerResponse: googleapi.ServerResponse{
26479			Header:         res.Header,
26480			HTTPStatusCode: res.StatusCode,
26481		},
26482	}
26483	target := &ret
26484	if err := gensupport.DecodeResponse(target, res); err != nil {
26485		return nil, err
26486	}
26487	return ret, nil
26488	// {
26489	//   "description": "Inserts a new creative field.",
26490	//   "httpMethod": "POST",
26491	//   "id": "dfareporting.creativeFields.insert",
26492	//   "parameterOrder": [
26493	//     "profileId"
26494	//   ],
26495	//   "parameters": {
26496	//     "profileId": {
26497	//       "description": "User profile ID associated with this request.",
26498	//       "format": "int64",
26499	//       "location": "path",
26500	//       "required": true,
26501	//       "type": "string"
26502	//     }
26503	//   },
26504	//   "path": "userprofiles/{profileId}/creativeFields",
26505	//   "request": {
26506	//     "$ref": "CreativeField"
26507	//   },
26508	//   "response": {
26509	//     "$ref": "CreativeField"
26510	//   },
26511	//   "scopes": [
26512	//     "https://www.googleapis.com/auth/dfatrafficking"
26513	//   ]
26514	// }
26515
26516}
26517
26518// method id "dfareporting.creativeFields.list":
26519
26520type CreativeFieldsListCall struct {
26521	s            *Service
26522	profileId    int64
26523	urlParams_   gensupport.URLParams
26524	ifNoneMatch_ string
26525	ctx_         context.Context
26526	header_      http.Header
26527}
26528
26529// List: Retrieves a list of creative fields, possibly filtered. This
26530// method supports paging.
26531func (r *CreativeFieldsService) List(profileId int64) *CreativeFieldsListCall {
26532	c := &CreativeFieldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26533	c.profileId = profileId
26534	return c
26535}
26536
26537// AdvertiserIds sets the optional parameter "advertiserIds": Select
26538// only creative fields that belong to these advertisers.
26539func (c *CreativeFieldsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeFieldsListCall {
26540	var advertiserIds_ []string
26541	for _, v := range advertiserIds {
26542		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
26543	}
26544	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
26545	return c
26546}
26547
26548// Ids sets the optional parameter "ids": Select only creative fields
26549// with these IDs.
26550func (c *CreativeFieldsListCall) Ids(ids ...int64) *CreativeFieldsListCall {
26551	var ids_ []string
26552	for _, v := range ids {
26553		ids_ = append(ids_, fmt.Sprint(v))
26554	}
26555	c.urlParams_.SetMulti("ids", ids_)
26556	return c
26557}
26558
26559// MaxResults sets the optional parameter "maxResults": Maximum number
26560// of results to return.
26561func (c *CreativeFieldsListCall) MaxResults(maxResults int64) *CreativeFieldsListCall {
26562	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
26563	return c
26564}
26565
26566// PageToken sets the optional parameter "pageToken": Value of the
26567// nextPageToken from the previous result page.
26568func (c *CreativeFieldsListCall) PageToken(pageToken string) *CreativeFieldsListCall {
26569	c.urlParams_.Set("pageToken", pageToken)
26570	return c
26571}
26572
26573// SearchString sets the optional parameter "searchString": Allows
26574// searching for creative fields by name or ID. Wildcards (*) are
26575// allowed. For example, "creativefield*2015" will return creative
26576// fields with names like "creativefield June 2015", "creativefield
26577// April 2015", or simply "creativefield 2015". Most of the searches
26578// also add wild-cards implicitly at the start and the end of the search
26579// string. For example, a search string of "creativefield" will match
26580// creative fields with the name "my creativefield", "creativefield
26581// 2015", or simply "creativefield".
26582func (c *CreativeFieldsListCall) SearchString(searchString string) *CreativeFieldsListCall {
26583	c.urlParams_.Set("searchString", searchString)
26584	return c
26585}
26586
26587// SortField sets the optional parameter "sortField": Field by which to
26588// sort the list.
26589//
26590// Possible values:
26591//   "ID" (default)
26592//   "NAME"
26593func (c *CreativeFieldsListCall) SortField(sortField string) *CreativeFieldsListCall {
26594	c.urlParams_.Set("sortField", sortField)
26595	return c
26596}
26597
26598// SortOrder sets the optional parameter "sortOrder": Order of sorted
26599// results.
26600//
26601// Possible values:
26602//   "ASCENDING" (default)
26603//   "DESCENDING"
26604func (c *CreativeFieldsListCall) SortOrder(sortOrder string) *CreativeFieldsListCall {
26605	c.urlParams_.Set("sortOrder", sortOrder)
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 *CreativeFieldsListCall) Fields(s ...googleapi.Field) *CreativeFieldsListCall {
26613	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26614	return c
26615}
26616
26617// IfNoneMatch sets the optional parameter which makes the operation
26618// fail if the object's ETag matches the given value. This is useful for
26619// getting updates only after the object has changed since the last
26620// request. Use googleapi.IsNotModified to check whether the response
26621// error from Do is the result of In-None-Match.
26622func (c *CreativeFieldsListCall) IfNoneMatch(entityTag string) *CreativeFieldsListCall {
26623	c.ifNoneMatch_ = entityTag
26624	return c
26625}
26626
26627// Context sets the context to be used in this call's Do method. Any
26628// pending HTTP request will be aborted if the provided context is
26629// canceled.
26630func (c *CreativeFieldsListCall) Context(ctx context.Context) *CreativeFieldsListCall {
26631	c.ctx_ = ctx
26632	return c
26633}
26634
26635// Header returns an http.Header that can be modified by the caller to
26636// add HTTP headers to the request.
26637func (c *CreativeFieldsListCall) Header() http.Header {
26638	if c.header_ == nil {
26639		c.header_ = make(http.Header)
26640	}
26641	return c.header_
26642}
26643
26644func (c *CreativeFieldsListCall) doRequest(alt string) (*http.Response, error) {
26645	reqHeaders := make(http.Header)
26646	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
26647	for k, v := range c.header_ {
26648		reqHeaders[k] = v
26649	}
26650	reqHeaders.Set("User-Agent", c.s.userAgent())
26651	if c.ifNoneMatch_ != "" {
26652		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26653	}
26654	var body io.Reader = nil
26655	c.urlParams_.Set("alt", alt)
26656	c.urlParams_.Set("prettyPrint", "false")
26657	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26658	urls += "?" + c.urlParams_.Encode()
26659	req, err := http.NewRequest("GET", urls, body)
26660	if err != nil {
26661		return nil, err
26662	}
26663	req.Header = reqHeaders
26664	googleapi.Expand(req.URL, map[string]string{
26665		"profileId": strconv.FormatInt(c.profileId, 10),
26666	})
26667	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26668}
26669
26670// Do executes the "dfareporting.creativeFields.list" call.
26671// Exactly one of *CreativeFieldsListResponse or error will be non-nil.
26672// Any non-2xx status code is an error. Response headers are in either
26673// *CreativeFieldsListResponse.ServerResponse.Header or (if a response
26674// was returned at all) in error.(*googleapi.Error).Header. Use
26675// googleapi.IsNotModified to check whether the returned error was
26676// because http.StatusNotModified was returned.
26677func (c *CreativeFieldsListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldsListResponse, error) {
26678	gensupport.SetOptions(c.urlParams_, opts...)
26679	res, err := c.doRequest("json")
26680	if res != nil && res.StatusCode == http.StatusNotModified {
26681		if res.Body != nil {
26682			res.Body.Close()
26683		}
26684		return nil, &googleapi.Error{
26685			Code:   res.StatusCode,
26686			Header: res.Header,
26687		}
26688	}
26689	if err != nil {
26690		return nil, err
26691	}
26692	defer googleapi.CloseBody(res)
26693	if err := googleapi.CheckResponse(res); err != nil {
26694		return nil, err
26695	}
26696	ret := &CreativeFieldsListResponse{
26697		ServerResponse: googleapi.ServerResponse{
26698			Header:         res.Header,
26699			HTTPStatusCode: res.StatusCode,
26700		},
26701	}
26702	target := &ret
26703	if err := gensupport.DecodeResponse(target, res); err != nil {
26704		return nil, err
26705	}
26706	return ret, nil
26707	// {
26708	//   "description": "Retrieves a list of creative fields, possibly filtered. This method supports paging.",
26709	//   "httpMethod": "GET",
26710	//   "id": "dfareporting.creativeFields.list",
26711	//   "parameterOrder": [
26712	//     "profileId"
26713	//   ],
26714	//   "parameters": {
26715	//     "advertiserIds": {
26716	//       "description": "Select only creative fields that belong to these advertisers.",
26717	//       "format": "int64",
26718	//       "location": "query",
26719	//       "repeated": true,
26720	//       "type": "string"
26721	//     },
26722	//     "ids": {
26723	//       "description": "Select only creative fields with these IDs.",
26724	//       "format": "int64",
26725	//       "location": "query",
26726	//       "repeated": true,
26727	//       "type": "string"
26728	//     },
26729	//     "maxResults": {
26730	//       "default": "1000",
26731	//       "description": "Maximum number of results to return.",
26732	//       "format": "int32",
26733	//       "location": "query",
26734	//       "maximum": "1000",
26735	//       "minimum": "0",
26736	//       "type": "integer"
26737	//     },
26738	//     "pageToken": {
26739	//       "description": "Value of the nextPageToken from the previous result page.",
26740	//       "location": "query",
26741	//       "type": "string"
26742	//     },
26743	//     "profileId": {
26744	//       "description": "User profile ID associated with this request.",
26745	//       "format": "int64",
26746	//       "location": "path",
26747	//       "required": true,
26748	//       "type": "string"
26749	//     },
26750	//     "searchString": {
26751	//       "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\".",
26752	//       "location": "query",
26753	//       "type": "string"
26754	//     },
26755	//     "sortField": {
26756	//       "default": "ID",
26757	//       "description": "Field by which to sort the list.",
26758	//       "enum": [
26759	//         "ID",
26760	//         "NAME"
26761	//       ],
26762	//       "enumDescriptions": [
26763	//         "",
26764	//         ""
26765	//       ],
26766	//       "location": "query",
26767	//       "type": "string"
26768	//     },
26769	//     "sortOrder": {
26770	//       "default": "ASCENDING",
26771	//       "description": "Order of sorted results.",
26772	//       "enum": [
26773	//         "ASCENDING",
26774	//         "DESCENDING"
26775	//       ],
26776	//       "enumDescriptions": [
26777	//         "",
26778	//         ""
26779	//       ],
26780	//       "location": "query",
26781	//       "type": "string"
26782	//     }
26783	//   },
26784	//   "path": "userprofiles/{profileId}/creativeFields",
26785	//   "response": {
26786	//     "$ref": "CreativeFieldsListResponse"
26787	//   },
26788	//   "scopes": [
26789	//     "https://www.googleapis.com/auth/dfatrafficking"
26790	//   ]
26791	// }
26792
26793}
26794
26795// Pages invokes f for each page of results.
26796// A non-nil error returned from f will halt the iteration.
26797// The provided context supersedes any context provided to the Context method.
26798func (c *CreativeFieldsListCall) Pages(ctx context.Context, f func(*CreativeFieldsListResponse) error) error {
26799	c.ctx_ = ctx
26800	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26801	for {
26802		x, err := c.Do()
26803		if err != nil {
26804			return err
26805		}
26806		if err := f(x); err != nil {
26807			return err
26808		}
26809		if x.NextPageToken == "" {
26810			return nil
26811		}
26812		c.PageToken(x.NextPageToken)
26813	}
26814}
26815
26816// method id "dfareporting.creativeFields.patch":
26817
26818type CreativeFieldsPatchCall struct {
26819	s             *Service
26820	profileId     int64
26821	creativefield *CreativeField
26822	urlParams_    gensupport.URLParams
26823	ctx_          context.Context
26824	header_       http.Header
26825}
26826
26827// Patch: Updates an existing creative field. This method supports patch
26828// semantics.
26829func (r *CreativeFieldsService) Patch(profileId int64, id int64, creativefield *CreativeField) *CreativeFieldsPatchCall {
26830	c := &CreativeFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26831	c.profileId = profileId
26832	c.urlParams_.Set("id", fmt.Sprint(id))
26833	c.creativefield = creativefield
26834	return c
26835}
26836
26837// Fields allows partial responses to be retrieved. See
26838// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26839// for more information.
26840func (c *CreativeFieldsPatchCall) Fields(s ...googleapi.Field) *CreativeFieldsPatchCall {
26841	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26842	return c
26843}
26844
26845// Context sets the context to be used in this call's Do method. Any
26846// pending HTTP request will be aborted if the provided context is
26847// canceled.
26848func (c *CreativeFieldsPatchCall) Context(ctx context.Context) *CreativeFieldsPatchCall {
26849	c.ctx_ = ctx
26850	return c
26851}
26852
26853// Header returns an http.Header that can be modified by the caller to
26854// add HTTP headers to the request.
26855func (c *CreativeFieldsPatchCall) Header() http.Header {
26856	if c.header_ == nil {
26857		c.header_ = make(http.Header)
26858	}
26859	return c.header_
26860}
26861
26862func (c *CreativeFieldsPatchCall) doRequest(alt string) (*http.Response, error) {
26863	reqHeaders := make(http.Header)
26864	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
26865	for k, v := range c.header_ {
26866		reqHeaders[k] = v
26867	}
26868	reqHeaders.Set("User-Agent", c.s.userAgent())
26869	var body io.Reader = nil
26870	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26871	if err != nil {
26872		return nil, err
26873	}
26874	reqHeaders.Set("Content-Type", "application/json")
26875	c.urlParams_.Set("alt", alt)
26876	c.urlParams_.Set("prettyPrint", "false")
26877	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26878	urls += "?" + c.urlParams_.Encode()
26879	req, err := http.NewRequest("PATCH", urls, body)
26880	if err != nil {
26881		return nil, err
26882	}
26883	req.Header = reqHeaders
26884	googleapi.Expand(req.URL, map[string]string{
26885		"profileId": strconv.FormatInt(c.profileId, 10),
26886	})
26887	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26888}
26889
26890// Do executes the "dfareporting.creativeFields.patch" call.
26891// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26892// status code is an error. Response headers are in either
26893// *CreativeField.ServerResponse.Header or (if a response was returned
26894// at all) in error.(*googleapi.Error).Header. Use
26895// googleapi.IsNotModified to check whether the returned error was
26896// because http.StatusNotModified was returned.
26897func (c *CreativeFieldsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26898	gensupport.SetOptions(c.urlParams_, opts...)
26899	res, err := c.doRequest("json")
26900	if res != nil && res.StatusCode == http.StatusNotModified {
26901		if res.Body != nil {
26902			res.Body.Close()
26903		}
26904		return nil, &googleapi.Error{
26905			Code:   res.StatusCode,
26906			Header: res.Header,
26907		}
26908	}
26909	if err != nil {
26910		return nil, err
26911	}
26912	defer googleapi.CloseBody(res)
26913	if err := googleapi.CheckResponse(res); err != nil {
26914		return nil, err
26915	}
26916	ret := &CreativeField{
26917		ServerResponse: googleapi.ServerResponse{
26918			Header:         res.Header,
26919			HTTPStatusCode: res.StatusCode,
26920		},
26921	}
26922	target := &ret
26923	if err := gensupport.DecodeResponse(target, res); err != nil {
26924		return nil, err
26925	}
26926	return ret, nil
26927	// {
26928	//   "description": "Updates an existing creative field. This method supports patch semantics.",
26929	//   "httpMethod": "PATCH",
26930	//   "id": "dfareporting.creativeFields.patch",
26931	//   "parameterOrder": [
26932	//     "profileId",
26933	//     "id"
26934	//   ],
26935	//   "parameters": {
26936	//     "id": {
26937	//       "description": "Creative Field ID",
26938	//       "format": "int64",
26939	//       "location": "query",
26940	//       "required": true,
26941	//       "type": "string"
26942	//     },
26943	//     "profileId": {
26944	//       "description": "User profile ID associated with this request.",
26945	//       "format": "int64",
26946	//       "location": "path",
26947	//       "required": true,
26948	//       "type": "string"
26949	//     }
26950	//   },
26951	//   "path": "userprofiles/{profileId}/creativeFields",
26952	//   "request": {
26953	//     "$ref": "CreativeField"
26954	//   },
26955	//   "response": {
26956	//     "$ref": "CreativeField"
26957	//   },
26958	//   "scopes": [
26959	//     "https://www.googleapis.com/auth/dfatrafficking"
26960	//   ]
26961	// }
26962
26963}
26964
26965// method id "dfareporting.creativeFields.update":
26966
26967type CreativeFieldsUpdateCall struct {
26968	s             *Service
26969	profileId     int64
26970	creativefield *CreativeField
26971	urlParams_    gensupport.URLParams
26972	ctx_          context.Context
26973	header_       http.Header
26974}
26975
26976// Update: Updates an existing creative field.
26977func (r *CreativeFieldsService) Update(profileId int64, creativefield *CreativeField) *CreativeFieldsUpdateCall {
26978	c := &CreativeFieldsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26979	c.profileId = profileId
26980	c.creativefield = creativefield
26981	return c
26982}
26983
26984// Fields allows partial responses to be retrieved. See
26985// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26986// for more information.
26987func (c *CreativeFieldsUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldsUpdateCall {
26988	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26989	return c
26990}
26991
26992// Context sets the context to be used in this call's Do method. Any
26993// pending HTTP request will be aborted if the provided context is
26994// canceled.
26995func (c *CreativeFieldsUpdateCall) Context(ctx context.Context) *CreativeFieldsUpdateCall {
26996	c.ctx_ = ctx
26997	return c
26998}
26999
27000// Header returns an http.Header that can be modified by the caller to
27001// add HTTP headers to the request.
27002func (c *CreativeFieldsUpdateCall) Header() http.Header {
27003	if c.header_ == nil {
27004		c.header_ = make(http.Header)
27005	}
27006	return c.header_
27007}
27008
27009func (c *CreativeFieldsUpdateCall) doRequest(alt string) (*http.Response, error) {
27010	reqHeaders := make(http.Header)
27011	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
27012	for k, v := range c.header_ {
27013		reqHeaders[k] = v
27014	}
27015	reqHeaders.Set("User-Agent", c.s.userAgent())
27016	var body io.Reader = nil
27017	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
27018	if err != nil {
27019		return nil, err
27020	}
27021	reqHeaders.Set("Content-Type", "application/json")
27022	c.urlParams_.Set("alt", alt)
27023	c.urlParams_.Set("prettyPrint", "false")
27024	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
27025	urls += "?" + c.urlParams_.Encode()
27026	req, err := http.NewRequest("PUT", urls, body)
27027	if err != nil {
27028		return nil, err
27029	}
27030	req.Header = reqHeaders
27031	googleapi.Expand(req.URL, map[string]string{
27032		"profileId": strconv.FormatInt(c.profileId, 10),
27033	})
27034	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27035}
27036
27037// Do executes the "dfareporting.creativeFields.update" call.
27038// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
27039// status code is an error. Response headers are in either
27040// *CreativeField.ServerResponse.Header or (if a response was returned
27041// at all) in error.(*googleapi.Error).Header. Use
27042// googleapi.IsNotModified to check whether the returned error was
27043// because http.StatusNotModified was returned.
27044func (c *CreativeFieldsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
27045	gensupport.SetOptions(c.urlParams_, opts...)
27046	res, err := c.doRequest("json")
27047	if res != nil && res.StatusCode == http.StatusNotModified {
27048		if res.Body != nil {
27049			res.Body.Close()
27050		}
27051		return nil, &googleapi.Error{
27052			Code:   res.StatusCode,
27053			Header: res.Header,
27054		}
27055	}
27056	if err != nil {
27057		return nil, err
27058	}
27059	defer googleapi.CloseBody(res)
27060	if err := googleapi.CheckResponse(res); err != nil {
27061		return nil, err
27062	}
27063	ret := &CreativeField{
27064		ServerResponse: googleapi.ServerResponse{
27065			Header:         res.Header,
27066			HTTPStatusCode: res.StatusCode,
27067		},
27068	}
27069	target := &ret
27070	if err := gensupport.DecodeResponse(target, res); err != nil {
27071		return nil, err
27072	}
27073	return ret, nil
27074	// {
27075	//   "description": "Updates an existing creative field.",
27076	//   "httpMethod": "PUT",
27077	//   "id": "dfareporting.creativeFields.update",
27078	//   "parameterOrder": [
27079	//     "profileId"
27080	//   ],
27081	//   "parameters": {
27082	//     "profileId": {
27083	//       "description": "User profile ID associated with this request.",
27084	//       "format": "int64",
27085	//       "location": "path",
27086	//       "required": true,
27087	//       "type": "string"
27088	//     }
27089	//   },
27090	//   "path": "userprofiles/{profileId}/creativeFields",
27091	//   "request": {
27092	//     "$ref": "CreativeField"
27093	//   },
27094	//   "response": {
27095	//     "$ref": "CreativeField"
27096	//   },
27097	//   "scopes": [
27098	//     "https://www.googleapis.com/auth/dfatrafficking"
27099	//   ]
27100	// }
27101
27102}
27103
27104// method id "dfareporting.creativeGroups.get":
27105
27106type CreativeGroupsGetCall struct {
27107	s            *Service
27108	profileId    int64
27109	id           int64
27110	urlParams_   gensupport.URLParams
27111	ifNoneMatch_ string
27112	ctx_         context.Context
27113	header_      http.Header
27114}
27115
27116// Get: Gets one creative group by ID.
27117func (r *CreativeGroupsService) Get(profileId int64, id int64) *CreativeGroupsGetCall {
27118	c := &CreativeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27119	c.profileId = profileId
27120	c.id = id
27121	return c
27122}
27123
27124// Fields allows partial responses to be retrieved. See
27125// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27126// for more information.
27127func (c *CreativeGroupsGetCall) Fields(s ...googleapi.Field) *CreativeGroupsGetCall {
27128	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27129	return c
27130}
27131
27132// IfNoneMatch sets the optional parameter which makes the operation
27133// fail if the object's ETag matches the given value. This is useful for
27134// getting updates only after the object has changed since the last
27135// request. Use googleapi.IsNotModified to check whether the response
27136// error from Do is the result of In-None-Match.
27137func (c *CreativeGroupsGetCall) IfNoneMatch(entityTag string) *CreativeGroupsGetCall {
27138	c.ifNoneMatch_ = entityTag
27139	return c
27140}
27141
27142// Context sets the context to be used in this call's Do method. Any
27143// pending HTTP request will be aborted if the provided context is
27144// canceled.
27145func (c *CreativeGroupsGetCall) Context(ctx context.Context) *CreativeGroupsGetCall {
27146	c.ctx_ = ctx
27147	return c
27148}
27149
27150// Header returns an http.Header that can be modified by the caller to
27151// add HTTP headers to the request.
27152func (c *CreativeGroupsGetCall) Header() http.Header {
27153	if c.header_ == nil {
27154		c.header_ = make(http.Header)
27155	}
27156	return c.header_
27157}
27158
27159func (c *CreativeGroupsGetCall) doRequest(alt string) (*http.Response, error) {
27160	reqHeaders := make(http.Header)
27161	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
27162	for k, v := range c.header_ {
27163		reqHeaders[k] = v
27164	}
27165	reqHeaders.Set("User-Agent", c.s.userAgent())
27166	if c.ifNoneMatch_ != "" {
27167		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27168	}
27169	var body io.Reader = nil
27170	c.urlParams_.Set("alt", alt)
27171	c.urlParams_.Set("prettyPrint", "false")
27172	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups/{id}")
27173	urls += "?" + c.urlParams_.Encode()
27174	req, err := http.NewRequest("GET", urls, body)
27175	if err != nil {
27176		return nil, err
27177	}
27178	req.Header = reqHeaders
27179	googleapi.Expand(req.URL, map[string]string{
27180		"profileId": strconv.FormatInt(c.profileId, 10),
27181		"id":        strconv.FormatInt(c.id, 10),
27182	})
27183	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27184}
27185
27186// Do executes the "dfareporting.creativeGroups.get" call.
27187// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27188// status code is an error. Response headers are in either
27189// *CreativeGroup.ServerResponse.Header or (if a response was returned
27190// at all) in error.(*googleapi.Error).Header. Use
27191// googleapi.IsNotModified to check whether the returned error was
27192// because http.StatusNotModified was returned.
27193func (c *CreativeGroupsGetCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27194	gensupport.SetOptions(c.urlParams_, opts...)
27195	res, err := c.doRequest("json")
27196	if res != nil && res.StatusCode == http.StatusNotModified {
27197		if res.Body != nil {
27198			res.Body.Close()
27199		}
27200		return nil, &googleapi.Error{
27201			Code:   res.StatusCode,
27202			Header: res.Header,
27203		}
27204	}
27205	if err != nil {
27206		return nil, err
27207	}
27208	defer googleapi.CloseBody(res)
27209	if err := googleapi.CheckResponse(res); err != nil {
27210		return nil, err
27211	}
27212	ret := &CreativeGroup{
27213		ServerResponse: googleapi.ServerResponse{
27214			Header:         res.Header,
27215			HTTPStatusCode: res.StatusCode,
27216		},
27217	}
27218	target := &ret
27219	if err := gensupport.DecodeResponse(target, res); err != nil {
27220		return nil, err
27221	}
27222	return ret, nil
27223	// {
27224	//   "description": "Gets one creative group by ID.",
27225	//   "httpMethod": "GET",
27226	//   "id": "dfareporting.creativeGroups.get",
27227	//   "parameterOrder": [
27228	//     "profileId",
27229	//     "id"
27230	//   ],
27231	//   "parameters": {
27232	//     "id": {
27233	//       "description": "Creative group ID.",
27234	//       "format": "int64",
27235	//       "location": "path",
27236	//       "required": true,
27237	//       "type": "string"
27238	//     },
27239	//     "profileId": {
27240	//       "description": "User profile ID associated with this request.",
27241	//       "format": "int64",
27242	//       "location": "path",
27243	//       "required": true,
27244	//       "type": "string"
27245	//     }
27246	//   },
27247	//   "path": "userprofiles/{profileId}/creativeGroups/{id}",
27248	//   "response": {
27249	//     "$ref": "CreativeGroup"
27250	//   },
27251	//   "scopes": [
27252	//     "https://www.googleapis.com/auth/dfatrafficking"
27253	//   ]
27254	// }
27255
27256}
27257
27258// method id "dfareporting.creativeGroups.insert":
27259
27260type CreativeGroupsInsertCall struct {
27261	s             *Service
27262	profileId     int64
27263	creativegroup *CreativeGroup
27264	urlParams_    gensupport.URLParams
27265	ctx_          context.Context
27266	header_       http.Header
27267}
27268
27269// Insert: Inserts a new creative group.
27270func (r *CreativeGroupsService) Insert(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsInsertCall {
27271	c := &CreativeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27272	c.profileId = profileId
27273	c.creativegroup = creativegroup
27274	return c
27275}
27276
27277// Fields allows partial responses to be retrieved. See
27278// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27279// for more information.
27280func (c *CreativeGroupsInsertCall) Fields(s ...googleapi.Field) *CreativeGroupsInsertCall {
27281	c.urlParams_.Set("fields", googleapi.CombineFields(s))
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 *CreativeGroupsInsertCall) Context(ctx context.Context) *CreativeGroupsInsertCall {
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 *CreativeGroupsInsertCall) Header() http.Header {
27296	if c.header_ == nil {
27297		c.header_ = make(http.Header)
27298	}
27299	return c.header_
27300}
27301
27302func (c *CreativeGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
27303	reqHeaders := make(http.Header)
27304	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
27305	for k, v := range c.header_ {
27306		reqHeaders[k] = v
27307	}
27308	reqHeaders.Set("User-Agent", c.s.userAgent())
27309	var body io.Reader = nil
27310	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27311	if err != nil {
27312		return nil, err
27313	}
27314	reqHeaders.Set("Content-Type", "application/json")
27315	c.urlParams_.Set("alt", alt)
27316	c.urlParams_.Set("prettyPrint", "false")
27317	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27318	urls += "?" + c.urlParams_.Encode()
27319	req, err := http.NewRequest("POST", urls, body)
27320	if err != nil {
27321		return nil, err
27322	}
27323	req.Header = reqHeaders
27324	googleapi.Expand(req.URL, map[string]string{
27325		"profileId": strconv.FormatInt(c.profileId, 10),
27326	})
27327	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27328}
27329
27330// Do executes the "dfareporting.creativeGroups.insert" call.
27331// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27332// status code is an error. Response headers are in either
27333// *CreativeGroup.ServerResponse.Header or (if a response was returned
27334// at all) in error.(*googleapi.Error).Header. Use
27335// googleapi.IsNotModified to check whether the returned error was
27336// because http.StatusNotModified was returned.
27337func (c *CreativeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27338	gensupport.SetOptions(c.urlParams_, opts...)
27339	res, err := c.doRequest("json")
27340	if res != nil && res.StatusCode == http.StatusNotModified {
27341		if res.Body != nil {
27342			res.Body.Close()
27343		}
27344		return nil, &googleapi.Error{
27345			Code:   res.StatusCode,
27346			Header: res.Header,
27347		}
27348	}
27349	if err != nil {
27350		return nil, err
27351	}
27352	defer googleapi.CloseBody(res)
27353	if err := googleapi.CheckResponse(res); err != nil {
27354		return nil, err
27355	}
27356	ret := &CreativeGroup{
27357		ServerResponse: googleapi.ServerResponse{
27358			Header:         res.Header,
27359			HTTPStatusCode: res.StatusCode,
27360		},
27361	}
27362	target := &ret
27363	if err := gensupport.DecodeResponse(target, res); err != nil {
27364		return nil, err
27365	}
27366	return ret, nil
27367	// {
27368	//   "description": "Inserts a new creative group.",
27369	//   "httpMethod": "POST",
27370	//   "id": "dfareporting.creativeGroups.insert",
27371	//   "parameterOrder": [
27372	//     "profileId"
27373	//   ],
27374	//   "parameters": {
27375	//     "profileId": {
27376	//       "description": "User profile ID associated with this request.",
27377	//       "format": "int64",
27378	//       "location": "path",
27379	//       "required": true,
27380	//       "type": "string"
27381	//     }
27382	//   },
27383	//   "path": "userprofiles/{profileId}/creativeGroups",
27384	//   "request": {
27385	//     "$ref": "CreativeGroup"
27386	//   },
27387	//   "response": {
27388	//     "$ref": "CreativeGroup"
27389	//   },
27390	//   "scopes": [
27391	//     "https://www.googleapis.com/auth/dfatrafficking"
27392	//   ]
27393	// }
27394
27395}
27396
27397// method id "dfareporting.creativeGroups.list":
27398
27399type CreativeGroupsListCall struct {
27400	s            *Service
27401	profileId    int64
27402	urlParams_   gensupport.URLParams
27403	ifNoneMatch_ string
27404	ctx_         context.Context
27405	header_      http.Header
27406}
27407
27408// List: Retrieves a list of creative groups, possibly filtered. This
27409// method supports paging.
27410func (r *CreativeGroupsService) List(profileId int64) *CreativeGroupsListCall {
27411	c := &CreativeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27412	c.profileId = profileId
27413	return c
27414}
27415
27416// AdvertiserIds sets the optional parameter "advertiserIds": Select
27417// only creative groups that belong to these advertisers.
27418func (c *CreativeGroupsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeGroupsListCall {
27419	var advertiserIds_ []string
27420	for _, v := range advertiserIds {
27421		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
27422	}
27423	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
27424	return c
27425}
27426
27427// GroupNumber sets the optional parameter "groupNumber": Select only
27428// creative groups that belong to this subgroup.
27429func (c *CreativeGroupsListCall) GroupNumber(groupNumber int64) *CreativeGroupsListCall {
27430	c.urlParams_.Set("groupNumber", fmt.Sprint(groupNumber))
27431	return c
27432}
27433
27434// Ids sets the optional parameter "ids": Select only creative groups
27435// with these IDs.
27436func (c *CreativeGroupsListCall) Ids(ids ...int64) *CreativeGroupsListCall {
27437	var ids_ []string
27438	for _, v := range ids {
27439		ids_ = append(ids_, fmt.Sprint(v))
27440	}
27441	c.urlParams_.SetMulti("ids", ids_)
27442	return c
27443}
27444
27445// MaxResults sets the optional parameter "maxResults": Maximum number
27446// of results to return.
27447func (c *CreativeGroupsListCall) MaxResults(maxResults int64) *CreativeGroupsListCall {
27448	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27449	return c
27450}
27451
27452// PageToken sets the optional parameter "pageToken": Value of the
27453// nextPageToken from the previous result page.
27454func (c *CreativeGroupsListCall) PageToken(pageToken string) *CreativeGroupsListCall {
27455	c.urlParams_.Set("pageToken", pageToken)
27456	return c
27457}
27458
27459// SearchString sets the optional parameter "searchString": Allows
27460// searching for creative groups by name or ID. Wildcards (*) are
27461// allowed. For example, "creativegroup*2015" will return creative
27462// groups with names like "creativegroup June 2015", "creativegroup
27463// April 2015", or simply "creativegroup 2015". Most of the searches
27464// also add wild-cards implicitly at the start and the end of the search
27465// string. For example, a search string of "creativegroup" will match
27466// creative groups with the name "my creativegroup", "creativegroup
27467// 2015", or simply "creativegroup".
27468func (c *CreativeGroupsListCall) SearchString(searchString string) *CreativeGroupsListCall {
27469	c.urlParams_.Set("searchString", searchString)
27470	return c
27471}
27472
27473// SortField sets the optional parameter "sortField": Field by which to
27474// sort the list.
27475//
27476// Possible values:
27477//   "ID" (default)
27478//   "NAME"
27479func (c *CreativeGroupsListCall) SortField(sortField string) *CreativeGroupsListCall {
27480	c.urlParams_.Set("sortField", sortField)
27481	return c
27482}
27483
27484// SortOrder sets the optional parameter "sortOrder": Order of sorted
27485// results.
27486//
27487// Possible values:
27488//   "ASCENDING" (default)
27489//   "DESCENDING"
27490func (c *CreativeGroupsListCall) SortOrder(sortOrder string) *CreativeGroupsListCall {
27491	c.urlParams_.Set("sortOrder", sortOrder)
27492	return c
27493}
27494
27495// Fields allows partial responses to be retrieved. See
27496// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27497// for more information.
27498func (c *CreativeGroupsListCall) Fields(s ...googleapi.Field) *CreativeGroupsListCall {
27499	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27500	return c
27501}
27502
27503// IfNoneMatch sets the optional parameter which makes the operation
27504// fail if the object's ETag matches the given value. This is useful for
27505// getting updates only after the object has changed since the last
27506// request. Use googleapi.IsNotModified to check whether the response
27507// error from Do is the result of In-None-Match.
27508func (c *CreativeGroupsListCall) IfNoneMatch(entityTag string) *CreativeGroupsListCall {
27509	c.ifNoneMatch_ = entityTag
27510	return c
27511}
27512
27513// Context sets the context to be used in this call's Do method. Any
27514// pending HTTP request will be aborted if the provided context is
27515// canceled.
27516func (c *CreativeGroupsListCall) Context(ctx context.Context) *CreativeGroupsListCall {
27517	c.ctx_ = ctx
27518	return c
27519}
27520
27521// Header returns an http.Header that can be modified by the caller to
27522// add HTTP headers to the request.
27523func (c *CreativeGroupsListCall) Header() http.Header {
27524	if c.header_ == nil {
27525		c.header_ = make(http.Header)
27526	}
27527	return c.header_
27528}
27529
27530func (c *CreativeGroupsListCall) doRequest(alt string) (*http.Response, error) {
27531	reqHeaders := make(http.Header)
27532	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
27533	for k, v := range c.header_ {
27534		reqHeaders[k] = v
27535	}
27536	reqHeaders.Set("User-Agent", c.s.userAgent())
27537	if c.ifNoneMatch_ != "" {
27538		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27539	}
27540	var body io.Reader = nil
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("GET", 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.list" call.
27557// Exactly one of *CreativeGroupsListResponse or error will be non-nil.
27558// Any non-2xx status code is an error. Response headers are in either
27559// *CreativeGroupsListResponse.ServerResponse.Header or (if a response
27560// was returned 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 *CreativeGroupsListCall) Do(opts ...googleapi.CallOption) (*CreativeGroupsListResponse, 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 := &CreativeGroupsListResponse{
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": "Retrieves a list of creative groups, possibly filtered. This method supports paging.",
27595	//   "httpMethod": "GET",
27596	//   "id": "dfareporting.creativeGroups.list",
27597	//   "parameterOrder": [
27598	//     "profileId"
27599	//   ],
27600	//   "parameters": {
27601	//     "advertiserIds": {
27602	//       "description": "Select only creative groups that belong to these advertisers.",
27603	//       "format": "int64",
27604	//       "location": "query",
27605	//       "repeated": true,
27606	//       "type": "string"
27607	//     },
27608	//     "groupNumber": {
27609	//       "description": "Select only creative groups that belong to this subgroup.",
27610	//       "format": "int32",
27611	//       "location": "query",
27612	//       "maximum": "2",
27613	//       "minimum": "1",
27614	//       "type": "integer"
27615	//     },
27616	//     "ids": {
27617	//       "description": "Select only creative groups with these IDs.",
27618	//       "format": "int64",
27619	//       "location": "query",
27620	//       "repeated": true,
27621	//       "type": "string"
27622	//     },
27623	//     "maxResults": {
27624	//       "default": "1000",
27625	//       "description": "Maximum number of results to return.",
27626	//       "format": "int32",
27627	//       "location": "query",
27628	//       "maximum": "1000",
27629	//       "minimum": "0",
27630	//       "type": "integer"
27631	//     },
27632	//     "pageToken": {
27633	//       "description": "Value of the nextPageToken from the previous result page.",
27634	//       "location": "query",
27635	//       "type": "string"
27636	//     },
27637	//     "profileId": {
27638	//       "description": "User profile ID associated with this request.",
27639	//       "format": "int64",
27640	//       "location": "path",
27641	//       "required": true,
27642	//       "type": "string"
27643	//     },
27644	//     "searchString": {
27645	//       "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\".",
27646	//       "location": "query",
27647	//       "type": "string"
27648	//     },
27649	//     "sortField": {
27650	//       "default": "ID",
27651	//       "description": "Field by which to sort the list.",
27652	//       "enum": [
27653	//         "ID",
27654	//         "NAME"
27655	//       ],
27656	//       "enumDescriptions": [
27657	//         "",
27658	//         ""
27659	//       ],
27660	//       "location": "query",
27661	//       "type": "string"
27662	//     },
27663	//     "sortOrder": {
27664	//       "default": "ASCENDING",
27665	//       "description": "Order of sorted results.",
27666	//       "enum": [
27667	//         "ASCENDING",
27668	//         "DESCENDING"
27669	//       ],
27670	//       "enumDescriptions": [
27671	//         "",
27672	//         ""
27673	//       ],
27674	//       "location": "query",
27675	//       "type": "string"
27676	//     }
27677	//   },
27678	//   "path": "userprofiles/{profileId}/creativeGroups",
27679	//   "response": {
27680	//     "$ref": "CreativeGroupsListResponse"
27681	//   },
27682	//   "scopes": [
27683	//     "https://www.googleapis.com/auth/dfatrafficking"
27684	//   ]
27685	// }
27686
27687}
27688
27689// Pages invokes f for each page of results.
27690// A non-nil error returned from f will halt the iteration.
27691// The provided context supersedes any context provided to the Context method.
27692func (c *CreativeGroupsListCall) Pages(ctx context.Context, f func(*CreativeGroupsListResponse) error) error {
27693	c.ctx_ = ctx
27694	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27695	for {
27696		x, err := c.Do()
27697		if err != nil {
27698			return err
27699		}
27700		if err := f(x); err != nil {
27701			return err
27702		}
27703		if x.NextPageToken == "" {
27704			return nil
27705		}
27706		c.PageToken(x.NextPageToken)
27707	}
27708}
27709
27710// method id "dfareporting.creativeGroups.patch":
27711
27712type CreativeGroupsPatchCall struct {
27713	s             *Service
27714	profileId     int64
27715	creativegroup *CreativeGroup
27716	urlParams_    gensupport.URLParams
27717	ctx_          context.Context
27718	header_       http.Header
27719}
27720
27721// Patch: Updates an existing creative group. This method supports patch
27722// semantics.
27723func (r *CreativeGroupsService) Patch(profileId int64, id int64, creativegroup *CreativeGroup) *CreativeGroupsPatchCall {
27724	c := &CreativeGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27725	c.profileId = profileId
27726	c.urlParams_.Set("id", fmt.Sprint(id))
27727	c.creativegroup = creativegroup
27728	return c
27729}
27730
27731// Fields allows partial responses to be retrieved. See
27732// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27733// for more information.
27734func (c *CreativeGroupsPatchCall) Fields(s ...googleapi.Field) *CreativeGroupsPatchCall {
27735	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27736	return c
27737}
27738
27739// Context sets the context to be used in this call's Do method. Any
27740// pending HTTP request will be aborted if the provided context is
27741// canceled.
27742func (c *CreativeGroupsPatchCall) Context(ctx context.Context) *CreativeGroupsPatchCall {
27743	c.ctx_ = ctx
27744	return c
27745}
27746
27747// Header returns an http.Header that can be modified by the caller to
27748// add HTTP headers to the request.
27749func (c *CreativeGroupsPatchCall) Header() http.Header {
27750	if c.header_ == nil {
27751		c.header_ = make(http.Header)
27752	}
27753	return c.header_
27754}
27755
27756func (c *CreativeGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
27757	reqHeaders := make(http.Header)
27758	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
27759	for k, v := range c.header_ {
27760		reqHeaders[k] = v
27761	}
27762	reqHeaders.Set("User-Agent", c.s.userAgent())
27763	var body io.Reader = nil
27764	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27765	if err != nil {
27766		return nil, err
27767	}
27768	reqHeaders.Set("Content-Type", "application/json")
27769	c.urlParams_.Set("alt", alt)
27770	c.urlParams_.Set("prettyPrint", "false")
27771	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27772	urls += "?" + c.urlParams_.Encode()
27773	req, err := http.NewRequest("PATCH", urls, body)
27774	if err != nil {
27775		return nil, err
27776	}
27777	req.Header = reqHeaders
27778	googleapi.Expand(req.URL, map[string]string{
27779		"profileId": strconv.FormatInt(c.profileId, 10),
27780	})
27781	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27782}
27783
27784// Do executes the "dfareporting.creativeGroups.patch" call.
27785// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27786// status code is an error. Response headers are in either
27787// *CreativeGroup.ServerResponse.Header or (if a response was returned
27788// at all) in error.(*googleapi.Error).Header. Use
27789// googleapi.IsNotModified to check whether the returned error was
27790// because http.StatusNotModified was returned.
27791func (c *CreativeGroupsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27792	gensupport.SetOptions(c.urlParams_, opts...)
27793	res, err := c.doRequest("json")
27794	if res != nil && res.StatusCode == http.StatusNotModified {
27795		if res.Body != nil {
27796			res.Body.Close()
27797		}
27798		return nil, &googleapi.Error{
27799			Code:   res.StatusCode,
27800			Header: res.Header,
27801		}
27802	}
27803	if err != nil {
27804		return nil, err
27805	}
27806	defer googleapi.CloseBody(res)
27807	if err := googleapi.CheckResponse(res); err != nil {
27808		return nil, err
27809	}
27810	ret := &CreativeGroup{
27811		ServerResponse: googleapi.ServerResponse{
27812			Header:         res.Header,
27813			HTTPStatusCode: res.StatusCode,
27814		},
27815	}
27816	target := &ret
27817	if err := gensupport.DecodeResponse(target, res); err != nil {
27818		return nil, err
27819	}
27820	return ret, nil
27821	// {
27822	//   "description": "Updates an existing creative group. This method supports patch semantics.",
27823	//   "httpMethod": "PATCH",
27824	//   "id": "dfareporting.creativeGroups.patch",
27825	//   "parameterOrder": [
27826	//     "profileId",
27827	//     "id"
27828	//   ],
27829	//   "parameters": {
27830	//     "id": {
27831	//       "description": "Creative group ID.",
27832	//       "format": "int64",
27833	//       "location": "query",
27834	//       "required": true,
27835	//       "type": "string"
27836	//     },
27837	//     "profileId": {
27838	//       "description": "User profile ID associated with this request.",
27839	//       "format": "int64",
27840	//       "location": "path",
27841	//       "required": true,
27842	//       "type": "string"
27843	//     }
27844	//   },
27845	//   "path": "userprofiles/{profileId}/creativeGroups",
27846	//   "request": {
27847	//     "$ref": "CreativeGroup"
27848	//   },
27849	//   "response": {
27850	//     "$ref": "CreativeGroup"
27851	//   },
27852	//   "scopes": [
27853	//     "https://www.googleapis.com/auth/dfatrafficking"
27854	//   ]
27855	// }
27856
27857}
27858
27859// method id "dfareporting.creativeGroups.update":
27860
27861type CreativeGroupsUpdateCall struct {
27862	s             *Service
27863	profileId     int64
27864	creativegroup *CreativeGroup
27865	urlParams_    gensupport.URLParams
27866	ctx_          context.Context
27867	header_       http.Header
27868}
27869
27870// Update: Updates an existing creative group.
27871func (r *CreativeGroupsService) Update(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsUpdateCall {
27872	c := &CreativeGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27873	c.profileId = profileId
27874	c.creativegroup = creativegroup
27875	return c
27876}
27877
27878// Fields allows partial responses to be retrieved. See
27879// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27880// for more information.
27881func (c *CreativeGroupsUpdateCall) Fields(s ...googleapi.Field) *CreativeGroupsUpdateCall {
27882	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27883	return c
27884}
27885
27886// Context sets the context to be used in this call's Do method. Any
27887// pending HTTP request will be aborted if the provided context is
27888// canceled.
27889func (c *CreativeGroupsUpdateCall) Context(ctx context.Context) *CreativeGroupsUpdateCall {
27890	c.ctx_ = ctx
27891	return c
27892}
27893
27894// Header returns an http.Header that can be modified by the caller to
27895// add HTTP headers to the request.
27896func (c *CreativeGroupsUpdateCall) Header() http.Header {
27897	if c.header_ == nil {
27898		c.header_ = make(http.Header)
27899	}
27900	return c.header_
27901}
27902
27903func (c *CreativeGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
27904	reqHeaders := make(http.Header)
27905	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
27906	for k, v := range c.header_ {
27907		reqHeaders[k] = v
27908	}
27909	reqHeaders.Set("User-Agent", c.s.userAgent())
27910	var body io.Reader = nil
27911	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27912	if err != nil {
27913		return nil, err
27914	}
27915	reqHeaders.Set("Content-Type", "application/json")
27916	c.urlParams_.Set("alt", alt)
27917	c.urlParams_.Set("prettyPrint", "false")
27918	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27919	urls += "?" + c.urlParams_.Encode()
27920	req, err := http.NewRequest("PUT", urls, body)
27921	if err != nil {
27922		return nil, err
27923	}
27924	req.Header = reqHeaders
27925	googleapi.Expand(req.URL, map[string]string{
27926		"profileId": strconv.FormatInt(c.profileId, 10),
27927	})
27928	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27929}
27930
27931// Do executes the "dfareporting.creativeGroups.update" call.
27932// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27933// status code is an error. Response headers are in either
27934// *CreativeGroup.ServerResponse.Header or (if a response was returned
27935// at all) in error.(*googleapi.Error).Header. Use
27936// googleapi.IsNotModified to check whether the returned error was
27937// because http.StatusNotModified was returned.
27938func (c *CreativeGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27939	gensupport.SetOptions(c.urlParams_, opts...)
27940	res, err := c.doRequest("json")
27941	if res != nil && res.StatusCode == http.StatusNotModified {
27942		if res.Body != nil {
27943			res.Body.Close()
27944		}
27945		return nil, &googleapi.Error{
27946			Code:   res.StatusCode,
27947			Header: res.Header,
27948		}
27949	}
27950	if err != nil {
27951		return nil, err
27952	}
27953	defer googleapi.CloseBody(res)
27954	if err := googleapi.CheckResponse(res); err != nil {
27955		return nil, err
27956	}
27957	ret := &CreativeGroup{
27958		ServerResponse: googleapi.ServerResponse{
27959			Header:         res.Header,
27960			HTTPStatusCode: res.StatusCode,
27961		},
27962	}
27963	target := &ret
27964	if err := gensupport.DecodeResponse(target, res); err != nil {
27965		return nil, err
27966	}
27967	return ret, nil
27968	// {
27969	//   "description": "Updates an existing creative group.",
27970	//   "httpMethod": "PUT",
27971	//   "id": "dfareporting.creativeGroups.update",
27972	//   "parameterOrder": [
27973	//     "profileId"
27974	//   ],
27975	//   "parameters": {
27976	//     "profileId": {
27977	//       "description": "User profile ID associated with this request.",
27978	//       "format": "int64",
27979	//       "location": "path",
27980	//       "required": true,
27981	//       "type": "string"
27982	//     }
27983	//   },
27984	//   "path": "userprofiles/{profileId}/creativeGroups",
27985	//   "request": {
27986	//     "$ref": "CreativeGroup"
27987	//   },
27988	//   "response": {
27989	//     "$ref": "CreativeGroup"
27990	//   },
27991	//   "scopes": [
27992	//     "https://www.googleapis.com/auth/dfatrafficking"
27993	//   ]
27994	// }
27995
27996}
27997
27998// method id "dfareporting.creatives.get":
27999
28000type CreativesGetCall struct {
28001	s            *Service
28002	profileId    int64
28003	id           int64
28004	urlParams_   gensupport.URLParams
28005	ifNoneMatch_ string
28006	ctx_         context.Context
28007	header_      http.Header
28008}
28009
28010// Get: Gets one creative by ID.
28011func (r *CreativesService) Get(profileId int64, id int64) *CreativesGetCall {
28012	c := &CreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28013	c.profileId = profileId
28014	c.id = id
28015	return c
28016}
28017
28018// Fields allows partial responses to be retrieved. See
28019// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28020// for more information.
28021func (c *CreativesGetCall) Fields(s ...googleapi.Field) *CreativesGetCall {
28022	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28023	return c
28024}
28025
28026// IfNoneMatch sets the optional parameter which makes the operation
28027// fail if the object's ETag matches the given value. This is useful for
28028// getting updates only after the object has changed since the last
28029// request. Use googleapi.IsNotModified to check whether the response
28030// error from Do is the result of In-None-Match.
28031func (c *CreativesGetCall) IfNoneMatch(entityTag string) *CreativesGetCall {
28032	c.ifNoneMatch_ = entityTag
28033	return c
28034}
28035
28036// Context sets the context to be used in this call's Do method. Any
28037// pending HTTP request will be aborted if the provided context is
28038// canceled.
28039func (c *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
28040	c.ctx_ = ctx
28041	return c
28042}
28043
28044// Header returns an http.Header that can be modified by the caller to
28045// add HTTP headers to the request.
28046func (c *CreativesGetCall) Header() http.Header {
28047	if c.header_ == nil {
28048		c.header_ = make(http.Header)
28049	}
28050	return c.header_
28051}
28052
28053func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
28054	reqHeaders := make(http.Header)
28055	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
28056	for k, v := range c.header_ {
28057		reqHeaders[k] = v
28058	}
28059	reqHeaders.Set("User-Agent", c.s.userAgent())
28060	if c.ifNoneMatch_ != "" {
28061		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28062	}
28063	var body io.Reader = nil
28064	c.urlParams_.Set("alt", alt)
28065	c.urlParams_.Set("prettyPrint", "false")
28066	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives/{id}")
28067	urls += "?" + c.urlParams_.Encode()
28068	req, err := http.NewRequest("GET", urls, body)
28069	if err != nil {
28070		return nil, err
28071	}
28072	req.Header = reqHeaders
28073	googleapi.Expand(req.URL, map[string]string{
28074		"profileId": strconv.FormatInt(c.profileId, 10),
28075		"id":        strconv.FormatInt(c.id, 10),
28076	})
28077	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28078}
28079
28080// Do executes the "dfareporting.creatives.get" call.
28081// Exactly one of *Creative or error will be non-nil. Any non-2xx status
28082// code is an error. Response headers are in either
28083// *Creative.ServerResponse.Header or (if a response was returned at
28084// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28085// to check whether the returned error was because
28086// http.StatusNotModified was returned.
28087func (c *CreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28088	gensupport.SetOptions(c.urlParams_, opts...)
28089	res, err := c.doRequest("json")
28090	if res != nil && res.StatusCode == http.StatusNotModified {
28091		if res.Body != nil {
28092			res.Body.Close()
28093		}
28094		return nil, &googleapi.Error{
28095			Code:   res.StatusCode,
28096			Header: res.Header,
28097		}
28098	}
28099	if err != nil {
28100		return nil, err
28101	}
28102	defer googleapi.CloseBody(res)
28103	if err := googleapi.CheckResponse(res); err != nil {
28104		return nil, err
28105	}
28106	ret := &Creative{
28107		ServerResponse: googleapi.ServerResponse{
28108			Header:         res.Header,
28109			HTTPStatusCode: res.StatusCode,
28110		},
28111	}
28112	target := &ret
28113	if err := gensupport.DecodeResponse(target, res); err != nil {
28114		return nil, err
28115	}
28116	return ret, nil
28117	// {
28118	//   "description": "Gets one creative by ID.",
28119	//   "httpMethod": "GET",
28120	//   "id": "dfareporting.creatives.get",
28121	//   "parameterOrder": [
28122	//     "profileId",
28123	//     "id"
28124	//   ],
28125	//   "parameters": {
28126	//     "id": {
28127	//       "description": "Creative ID.",
28128	//       "format": "int64",
28129	//       "location": "path",
28130	//       "required": true,
28131	//       "type": "string"
28132	//     },
28133	//     "profileId": {
28134	//       "description": "User profile ID associated with this request.",
28135	//       "format": "int64",
28136	//       "location": "path",
28137	//       "required": true,
28138	//       "type": "string"
28139	//     }
28140	//   },
28141	//   "path": "userprofiles/{profileId}/creatives/{id}",
28142	//   "response": {
28143	//     "$ref": "Creative"
28144	//   },
28145	//   "scopes": [
28146	//     "https://www.googleapis.com/auth/dfatrafficking"
28147	//   ]
28148	// }
28149
28150}
28151
28152// method id "dfareporting.creatives.insert":
28153
28154type CreativesInsertCall struct {
28155	s          *Service
28156	profileId  int64
28157	creative   *Creative
28158	urlParams_ gensupport.URLParams
28159	ctx_       context.Context
28160	header_    http.Header
28161}
28162
28163// Insert: Inserts a new creative.
28164func (r *CreativesService) Insert(profileId int64, creative *Creative) *CreativesInsertCall {
28165	c := &CreativesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28166	c.profileId = profileId
28167	c.creative = creative
28168	return c
28169}
28170
28171// Fields allows partial responses to be retrieved. See
28172// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28173// for more information.
28174func (c *CreativesInsertCall) Fields(s ...googleapi.Field) *CreativesInsertCall {
28175	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28176	return c
28177}
28178
28179// Context sets the context to be used in this call's Do method. Any
28180// pending HTTP request will be aborted if the provided context is
28181// canceled.
28182func (c *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
28183	c.ctx_ = ctx
28184	return c
28185}
28186
28187// Header returns an http.Header that can be modified by the caller to
28188// add HTTP headers to the request.
28189func (c *CreativesInsertCall) Header() http.Header {
28190	if c.header_ == nil {
28191		c.header_ = make(http.Header)
28192	}
28193	return c.header_
28194}
28195
28196func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
28197	reqHeaders := make(http.Header)
28198	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
28199	for k, v := range c.header_ {
28200		reqHeaders[k] = v
28201	}
28202	reqHeaders.Set("User-Agent", c.s.userAgent())
28203	var body io.Reader = nil
28204	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
28205	if err != nil {
28206		return nil, err
28207	}
28208	reqHeaders.Set("Content-Type", "application/json")
28209	c.urlParams_.Set("alt", alt)
28210	c.urlParams_.Set("prettyPrint", "false")
28211	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28212	urls += "?" + c.urlParams_.Encode()
28213	req, err := http.NewRequest("POST", urls, body)
28214	if err != nil {
28215		return nil, err
28216	}
28217	req.Header = reqHeaders
28218	googleapi.Expand(req.URL, map[string]string{
28219		"profileId": strconv.FormatInt(c.profileId, 10),
28220	})
28221	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28222}
28223
28224// Do executes the "dfareporting.creatives.insert" call.
28225// Exactly one of *Creative or error will be non-nil. Any non-2xx status
28226// code is an error. Response headers are in either
28227// *Creative.ServerResponse.Header or (if a response was returned at
28228// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28229// to check whether the returned error was because
28230// http.StatusNotModified was returned.
28231func (c *CreativesInsertCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28232	gensupport.SetOptions(c.urlParams_, opts...)
28233	res, err := c.doRequest("json")
28234	if res != nil && res.StatusCode == http.StatusNotModified {
28235		if res.Body != nil {
28236			res.Body.Close()
28237		}
28238		return nil, &googleapi.Error{
28239			Code:   res.StatusCode,
28240			Header: res.Header,
28241		}
28242	}
28243	if err != nil {
28244		return nil, err
28245	}
28246	defer googleapi.CloseBody(res)
28247	if err := googleapi.CheckResponse(res); err != nil {
28248		return nil, err
28249	}
28250	ret := &Creative{
28251		ServerResponse: googleapi.ServerResponse{
28252			Header:         res.Header,
28253			HTTPStatusCode: res.StatusCode,
28254		},
28255	}
28256	target := &ret
28257	if err := gensupport.DecodeResponse(target, res); err != nil {
28258		return nil, err
28259	}
28260	return ret, nil
28261	// {
28262	//   "description": "Inserts a new creative.",
28263	//   "httpMethod": "POST",
28264	//   "id": "dfareporting.creatives.insert",
28265	//   "parameterOrder": [
28266	//     "profileId"
28267	//   ],
28268	//   "parameters": {
28269	//     "profileId": {
28270	//       "description": "User profile ID associated with this request.",
28271	//       "format": "int64",
28272	//       "location": "path",
28273	//       "required": true,
28274	//       "type": "string"
28275	//     }
28276	//   },
28277	//   "path": "userprofiles/{profileId}/creatives",
28278	//   "request": {
28279	//     "$ref": "Creative"
28280	//   },
28281	//   "response": {
28282	//     "$ref": "Creative"
28283	//   },
28284	//   "scopes": [
28285	//     "https://www.googleapis.com/auth/dfatrafficking"
28286	//   ]
28287	// }
28288
28289}
28290
28291// method id "dfareporting.creatives.list":
28292
28293type CreativesListCall struct {
28294	s            *Service
28295	profileId    int64
28296	urlParams_   gensupport.URLParams
28297	ifNoneMatch_ string
28298	ctx_         context.Context
28299	header_      http.Header
28300}
28301
28302// List: Retrieves a list of creatives, possibly filtered. This method
28303// supports paging.
28304func (r *CreativesService) List(profileId int64) *CreativesListCall {
28305	c := &CreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28306	c.profileId = profileId
28307	return c
28308}
28309
28310// Active sets the optional parameter "active": Select only active
28311// creatives. Leave blank to select active and inactive creatives.
28312func (c *CreativesListCall) Active(active bool) *CreativesListCall {
28313	c.urlParams_.Set("active", fmt.Sprint(active))
28314	return c
28315}
28316
28317// AdvertiserId sets the optional parameter "advertiserId": Select only
28318// creatives with this advertiser ID.
28319func (c *CreativesListCall) AdvertiserId(advertiserId int64) *CreativesListCall {
28320	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28321	return c
28322}
28323
28324// Archived sets the optional parameter "archived": Select only archived
28325// creatives. Leave blank to select archived and unarchived creatives.
28326func (c *CreativesListCall) Archived(archived bool) *CreativesListCall {
28327	c.urlParams_.Set("archived", fmt.Sprint(archived))
28328	return c
28329}
28330
28331// CampaignId sets the optional parameter "campaignId": Select only
28332// creatives with this campaign ID.
28333func (c *CreativesListCall) CampaignId(campaignId int64) *CreativesListCall {
28334	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
28335	return c
28336}
28337
28338// CompanionCreativeIds sets the optional parameter
28339// "companionCreativeIds": Select only in-stream video creatives with
28340// these companion IDs.
28341func (c *CreativesListCall) CompanionCreativeIds(companionCreativeIds ...int64) *CreativesListCall {
28342	var companionCreativeIds_ []string
28343	for _, v := range companionCreativeIds {
28344		companionCreativeIds_ = append(companionCreativeIds_, fmt.Sprint(v))
28345	}
28346	c.urlParams_.SetMulti("companionCreativeIds", companionCreativeIds_)
28347	return c
28348}
28349
28350// CreativeFieldIds sets the optional parameter "creativeFieldIds":
28351// Select only creatives with these creative field IDs.
28352func (c *CreativesListCall) CreativeFieldIds(creativeFieldIds ...int64) *CreativesListCall {
28353	var creativeFieldIds_ []string
28354	for _, v := range creativeFieldIds {
28355		creativeFieldIds_ = append(creativeFieldIds_, fmt.Sprint(v))
28356	}
28357	c.urlParams_.SetMulti("creativeFieldIds", creativeFieldIds_)
28358	return c
28359}
28360
28361// Ids sets the optional parameter "ids": Select only creatives with
28362// these IDs.
28363func (c *CreativesListCall) Ids(ids ...int64) *CreativesListCall {
28364	var ids_ []string
28365	for _, v := range ids {
28366		ids_ = append(ids_, fmt.Sprint(v))
28367	}
28368	c.urlParams_.SetMulti("ids", ids_)
28369	return c
28370}
28371
28372// MaxResults sets the optional parameter "maxResults": Maximum number
28373// of results to return.
28374func (c *CreativesListCall) MaxResults(maxResults int64) *CreativesListCall {
28375	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28376	return c
28377}
28378
28379// PageToken sets the optional parameter "pageToken": Value of the
28380// nextPageToken from the previous result page.
28381func (c *CreativesListCall) PageToken(pageToken string) *CreativesListCall {
28382	c.urlParams_.Set("pageToken", pageToken)
28383	return c
28384}
28385
28386// RenderingIds sets the optional parameter "renderingIds": Select only
28387// creatives with these rendering IDs.
28388func (c *CreativesListCall) RenderingIds(renderingIds ...int64) *CreativesListCall {
28389	var renderingIds_ []string
28390	for _, v := range renderingIds {
28391		renderingIds_ = append(renderingIds_, fmt.Sprint(v))
28392	}
28393	c.urlParams_.SetMulti("renderingIds", renderingIds_)
28394	return c
28395}
28396
28397// SearchString sets the optional parameter "searchString": Allows
28398// searching for objects by name or ID. Wildcards (*) are allowed. For
28399// example, "creative*2015" will return objects with names like
28400// "creative June 2015", "creative April 2015", or simply "creative
28401// 2015". Most of the searches also add wildcards implicitly at the
28402// start and the end of the search string. For example, a search string
28403// of "creative" will match objects with name "my creative", "creative
28404// 2015", or simply "creative".
28405func (c *CreativesListCall) SearchString(searchString string) *CreativesListCall {
28406	c.urlParams_.Set("searchString", searchString)
28407	return c
28408}
28409
28410// SizeIds sets the optional parameter "sizeIds": Select only creatives
28411// with these size IDs.
28412func (c *CreativesListCall) SizeIds(sizeIds ...int64) *CreativesListCall {
28413	var sizeIds_ []string
28414	for _, v := range sizeIds {
28415		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
28416	}
28417	c.urlParams_.SetMulti("sizeIds", sizeIds_)
28418	return c
28419}
28420
28421// SortField sets the optional parameter "sortField": Field by which to
28422// sort the list.
28423//
28424// Possible values:
28425//   "ID" (default)
28426//   "NAME"
28427func (c *CreativesListCall) SortField(sortField string) *CreativesListCall {
28428	c.urlParams_.Set("sortField", sortField)
28429	return c
28430}
28431
28432// SortOrder sets the optional parameter "sortOrder": Order of sorted
28433// results.
28434//
28435// Possible values:
28436//   "ASCENDING" (default)
28437//   "DESCENDING"
28438func (c *CreativesListCall) SortOrder(sortOrder string) *CreativesListCall {
28439	c.urlParams_.Set("sortOrder", sortOrder)
28440	return c
28441}
28442
28443// StudioCreativeId sets the optional parameter "studioCreativeId":
28444// Select only creatives corresponding to this Studio creative ID.
28445func (c *CreativesListCall) StudioCreativeId(studioCreativeId int64) *CreativesListCall {
28446	c.urlParams_.Set("studioCreativeId", fmt.Sprint(studioCreativeId))
28447	return c
28448}
28449
28450// Types sets the optional parameter "types": Select only creatives with
28451// these creative types.
28452//
28453// Possible values:
28454//   "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
28455//   "CUSTOM_DISPLAY"
28456//   "CUSTOM_DISPLAY_INTERSTITIAL"
28457//   "DISPLAY"
28458//   "DISPLAY_IMAGE_GALLERY"
28459//   "DISPLAY_REDIRECT"
28460//   "FLASH_INPAGE"
28461//   "HTML5_BANNER"
28462//   "IMAGE"
28463//   "INSTREAM_AUDIO"
28464//   "INSTREAM_VIDEO"
28465//   "INSTREAM_VIDEO_REDIRECT"
28466//   "INTERNAL_REDIRECT"
28467//   "INTERSTITIAL_INTERNAL_REDIRECT"
28468//   "RICH_MEDIA_DISPLAY_BANNER"
28469//   "RICH_MEDIA_DISPLAY_EXPANDING"
28470//   "RICH_MEDIA_DISPLAY_INTERSTITIAL"
28471//   "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL"
28472//   "RICH_MEDIA_IM_EXPAND"
28473//   "RICH_MEDIA_INPAGE_FLOATING"
28474//   "RICH_MEDIA_MOBILE_IN_APP"
28475//   "RICH_MEDIA_PEEL_DOWN"
28476//   "TRACKING_TEXT"
28477//   "VPAID_LINEAR_VIDEO"
28478//   "VPAID_NON_LINEAR_VIDEO"
28479func (c *CreativesListCall) Types(types ...string) *CreativesListCall {
28480	c.urlParams_.SetMulti("types", append([]string{}, types...))
28481	return c
28482}
28483
28484// Fields allows partial responses to be retrieved. See
28485// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28486// for more information.
28487func (c *CreativesListCall) Fields(s ...googleapi.Field) *CreativesListCall {
28488	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28489	return c
28490}
28491
28492// IfNoneMatch sets the optional parameter which makes the operation
28493// fail if the object's ETag matches the given value. This is useful for
28494// getting updates only after the object has changed since the last
28495// request. Use googleapi.IsNotModified to check whether the response
28496// error from Do is the result of In-None-Match.
28497func (c *CreativesListCall) IfNoneMatch(entityTag string) *CreativesListCall {
28498	c.ifNoneMatch_ = entityTag
28499	return c
28500}
28501
28502// Context sets the context to be used in this call's Do method. Any
28503// pending HTTP request will be aborted if the provided context is
28504// canceled.
28505func (c *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
28506	c.ctx_ = ctx
28507	return c
28508}
28509
28510// Header returns an http.Header that can be modified by the caller to
28511// add HTTP headers to the request.
28512func (c *CreativesListCall) Header() http.Header {
28513	if c.header_ == nil {
28514		c.header_ = make(http.Header)
28515	}
28516	return c.header_
28517}
28518
28519func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
28520	reqHeaders := make(http.Header)
28521	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
28522	for k, v := range c.header_ {
28523		reqHeaders[k] = v
28524	}
28525	reqHeaders.Set("User-Agent", c.s.userAgent())
28526	if c.ifNoneMatch_ != "" {
28527		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28528	}
28529	var body io.Reader = nil
28530	c.urlParams_.Set("alt", alt)
28531	c.urlParams_.Set("prettyPrint", "false")
28532	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28533	urls += "?" + c.urlParams_.Encode()
28534	req, err := http.NewRequest("GET", urls, body)
28535	if err != nil {
28536		return nil, err
28537	}
28538	req.Header = reqHeaders
28539	googleapi.Expand(req.URL, map[string]string{
28540		"profileId": strconv.FormatInt(c.profileId, 10),
28541	})
28542	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28543}
28544
28545// Do executes the "dfareporting.creatives.list" call.
28546// Exactly one of *CreativesListResponse or error will be non-nil. Any
28547// non-2xx status code is an error. Response headers are in either
28548// *CreativesListResponse.ServerResponse.Header or (if a response was
28549// returned at all) in error.(*googleapi.Error).Header. Use
28550// googleapi.IsNotModified to check whether the returned error was
28551// because http.StatusNotModified was returned.
28552func (c *CreativesListCall) Do(opts ...googleapi.CallOption) (*CreativesListResponse, error) {
28553	gensupport.SetOptions(c.urlParams_, opts...)
28554	res, err := c.doRequest("json")
28555	if res != nil && res.StatusCode == http.StatusNotModified {
28556		if res.Body != nil {
28557			res.Body.Close()
28558		}
28559		return nil, &googleapi.Error{
28560			Code:   res.StatusCode,
28561			Header: res.Header,
28562		}
28563	}
28564	if err != nil {
28565		return nil, err
28566	}
28567	defer googleapi.CloseBody(res)
28568	if err := googleapi.CheckResponse(res); err != nil {
28569		return nil, err
28570	}
28571	ret := &CreativesListResponse{
28572		ServerResponse: googleapi.ServerResponse{
28573			Header:         res.Header,
28574			HTTPStatusCode: res.StatusCode,
28575		},
28576	}
28577	target := &ret
28578	if err := gensupport.DecodeResponse(target, res); err != nil {
28579		return nil, err
28580	}
28581	return ret, nil
28582	// {
28583	//   "description": "Retrieves a list of creatives, possibly filtered. This method supports paging.",
28584	//   "httpMethod": "GET",
28585	//   "id": "dfareporting.creatives.list",
28586	//   "parameterOrder": [
28587	//     "profileId"
28588	//   ],
28589	//   "parameters": {
28590	//     "active": {
28591	//       "description": "Select only active creatives. Leave blank to select active and inactive creatives.",
28592	//       "location": "query",
28593	//       "type": "boolean"
28594	//     },
28595	//     "advertiserId": {
28596	//       "description": "Select only creatives with this advertiser ID.",
28597	//       "format": "int64",
28598	//       "location": "query",
28599	//       "type": "string"
28600	//     },
28601	//     "archived": {
28602	//       "description": "Select only archived creatives. Leave blank to select archived and unarchived creatives.",
28603	//       "location": "query",
28604	//       "type": "boolean"
28605	//     },
28606	//     "campaignId": {
28607	//       "description": "Select only creatives with this campaign ID.",
28608	//       "format": "int64",
28609	//       "location": "query",
28610	//       "type": "string"
28611	//     },
28612	//     "companionCreativeIds": {
28613	//       "description": "Select only in-stream video creatives with these companion IDs.",
28614	//       "format": "int64",
28615	//       "location": "query",
28616	//       "repeated": true,
28617	//       "type": "string"
28618	//     },
28619	//     "creativeFieldIds": {
28620	//       "description": "Select only creatives with these creative field IDs.",
28621	//       "format": "int64",
28622	//       "location": "query",
28623	//       "repeated": true,
28624	//       "type": "string"
28625	//     },
28626	//     "ids": {
28627	//       "description": "Select only creatives with these IDs.",
28628	//       "format": "int64",
28629	//       "location": "query",
28630	//       "repeated": true,
28631	//       "type": "string"
28632	//     },
28633	//     "maxResults": {
28634	//       "default": "1000",
28635	//       "description": "Maximum number of results to return.",
28636	//       "format": "int32",
28637	//       "location": "query",
28638	//       "maximum": "1000",
28639	//       "minimum": "0",
28640	//       "type": "integer"
28641	//     },
28642	//     "pageToken": {
28643	//       "description": "Value of the nextPageToken from the previous result page.",
28644	//       "location": "query",
28645	//       "type": "string"
28646	//     },
28647	//     "profileId": {
28648	//       "description": "User profile ID associated with this request.",
28649	//       "format": "int64",
28650	//       "location": "path",
28651	//       "required": true,
28652	//       "type": "string"
28653	//     },
28654	//     "renderingIds": {
28655	//       "description": "Select only creatives with these rendering IDs.",
28656	//       "format": "int64",
28657	//       "location": "query",
28658	//       "repeated": true,
28659	//       "type": "string"
28660	//     },
28661	//     "searchString": {
28662	//       "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\".",
28663	//       "location": "query",
28664	//       "type": "string"
28665	//     },
28666	//     "sizeIds": {
28667	//       "description": "Select only creatives with these size IDs.",
28668	//       "format": "int64",
28669	//       "location": "query",
28670	//       "repeated": true,
28671	//       "type": "string"
28672	//     },
28673	//     "sortField": {
28674	//       "default": "ID",
28675	//       "description": "Field by which to sort the list.",
28676	//       "enum": [
28677	//         "ID",
28678	//         "NAME"
28679	//       ],
28680	//       "enumDescriptions": [
28681	//         "",
28682	//         ""
28683	//       ],
28684	//       "location": "query",
28685	//       "type": "string"
28686	//     },
28687	//     "sortOrder": {
28688	//       "default": "ASCENDING",
28689	//       "description": "Order of sorted results.",
28690	//       "enum": [
28691	//         "ASCENDING",
28692	//         "DESCENDING"
28693	//       ],
28694	//       "enumDescriptions": [
28695	//         "",
28696	//         ""
28697	//       ],
28698	//       "location": "query",
28699	//       "type": "string"
28700	//     },
28701	//     "studioCreativeId": {
28702	//       "description": "Select only creatives corresponding to this Studio creative ID.",
28703	//       "format": "int64",
28704	//       "location": "query",
28705	//       "type": "string"
28706	//     },
28707	//     "types": {
28708	//       "description": "Select only creatives with these creative types.",
28709	//       "enum": [
28710	//         "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO",
28711	//         "CUSTOM_DISPLAY",
28712	//         "CUSTOM_DISPLAY_INTERSTITIAL",
28713	//         "DISPLAY",
28714	//         "DISPLAY_IMAGE_GALLERY",
28715	//         "DISPLAY_REDIRECT",
28716	//         "FLASH_INPAGE",
28717	//         "HTML5_BANNER",
28718	//         "IMAGE",
28719	//         "INSTREAM_AUDIO",
28720	//         "INSTREAM_VIDEO",
28721	//         "INSTREAM_VIDEO_REDIRECT",
28722	//         "INTERNAL_REDIRECT",
28723	//         "INTERSTITIAL_INTERNAL_REDIRECT",
28724	//         "RICH_MEDIA_DISPLAY_BANNER",
28725	//         "RICH_MEDIA_DISPLAY_EXPANDING",
28726	//         "RICH_MEDIA_DISPLAY_INTERSTITIAL",
28727	//         "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL",
28728	//         "RICH_MEDIA_IM_EXPAND",
28729	//         "RICH_MEDIA_INPAGE_FLOATING",
28730	//         "RICH_MEDIA_MOBILE_IN_APP",
28731	//         "RICH_MEDIA_PEEL_DOWN",
28732	//         "TRACKING_TEXT",
28733	//         "VPAID_LINEAR_VIDEO",
28734	//         "VPAID_NON_LINEAR_VIDEO"
28735	//       ],
28736	//       "enumDescriptions": [
28737	//         "",
28738	//         "",
28739	//         "",
28740	//         "",
28741	//         "",
28742	//         "",
28743	//         "",
28744	//         "",
28745	//         "",
28746	//         "",
28747	//         "",
28748	//         "",
28749	//         "",
28750	//         "",
28751	//         "",
28752	//         "",
28753	//         "",
28754	//         "",
28755	//         "",
28756	//         "",
28757	//         "",
28758	//         "",
28759	//         "",
28760	//         "",
28761	//         ""
28762	//       ],
28763	//       "location": "query",
28764	//       "repeated": true,
28765	//       "type": "string"
28766	//     }
28767	//   },
28768	//   "path": "userprofiles/{profileId}/creatives",
28769	//   "response": {
28770	//     "$ref": "CreativesListResponse"
28771	//   },
28772	//   "scopes": [
28773	//     "https://www.googleapis.com/auth/dfatrafficking"
28774	//   ]
28775	// }
28776
28777}
28778
28779// Pages invokes f for each page of results.
28780// A non-nil error returned from f will halt the iteration.
28781// The provided context supersedes any context provided to the Context method.
28782func (c *CreativesListCall) Pages(ctx context.Context, f func(*CreativesListResponse) error) error {
28783	c.ctx_ = ctx
28784	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28785	for {
28786		x, err := c.Do()
28787		if err != nil {
28788			return err
28789		}
28790		if err := f(x); err != nil {
28791			return err
28792		}
28793		if x.NextPageToken == "" {
28794			return nil
28795		}
28796		c.PageToken(x.NextPageToken)
28797	}
28798}
28799
28800// method id "dfareporting.creatives.patch":
28801
28802type CreativesPatchCall struct {
28803	s          *Service
28804	profileId  int64
28805	creative   *Creative
28806	urlParams_ gensupport.URLParams
28807	ctx_       context.Context
28808	header_    http.Header
28809}
28810
28811// Patch: Updates an existing creative. This method supports patch
28812// semantics.
28813func (r *CreativesService) Patch(profileId int64, id int64, creative *Creative) *CreativesPatchCall {
28814	c := &CreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28815	c.profileId = profileId
28816	c.urlParams_.Set("id", fmt.Sprint(id))
28817	c.creative = creative
28818	return c
28819}
28820
28821// Fields allows partial responses to be retrieved. See
28822// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28823// for more information.
28824func (c *CreativesPatchCall) Fields(s ...googleapi.Field) *CreativesPatchCall {
28825	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28826	return c
28827}
28828
28829// Context sets the context to be used in this call's Do method. Any
28830// pending HTTP request will be aborted if the provided context is
28831// canceled.
28832func (c *CreativesPatchCall) Context(ctx context.Context) *CreativesPatchCall {
28833	c.ctx_ = ctx
28834	return c
28835}
28836
28837// Header returns an http.Header that can be modified by the caller to
28838// add HTTP headers to the request.
28839func (c *CreativesPatchCall) Header() http.Header {
28840	if c.header_ == nil {
28841		c.header_ = make(http.Header)
28842	}
28843	return c.header_
28844}
28845
28846func (c *CreativesPatchCall) doRequest(alt string) (*http.Response, error) {
28847	reqHeaders := make(http.Header)
28848	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
28849	for k, v := range c.header_ {
28850		reqHeaders[k] = v
28851	}
28852	reqHeaders.Set("User-Agent", c.s.userAgent())
28853	var body io.Reader = nil
28854	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
28855	if err != nil {
28856		return nil, err
28857	}
28858	reqHeaders.Set("Content-Type", "application/json")
28859	c.urlParams_.Set("alt", alt)
28860	c.urlParams_.Set("prettyPrint", "false")
28861	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28862	urls += "?" + c.urlParams_.Encode()
28863	req, err := http.NewRequest("PATCH", urls, body)
28864	if err != nil {
28865		return nil, err
28866	}
28867	req.Header = reqHeaders
28868	googleapi.Expand(req.URL, map[string]string{
28869		"profileId": strconv.FormatInt(c.profileId, 10),
28870	})
28871	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28872}
28873
28874// Do executes the "dfareporting.creatives.patch" call.
28875// Exactly one of *Creative or error will be non-nil. Any non-2xx status
28876// code is an error. Response headers are in either
28877// *Creative.ServerResponse.Header or (if a response was returned at
28878// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28879// to check whether the returned error was because
28880// http.StatusNotModified was returned.
28881func (c *CreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28882	gensupport.SetOptions(c.urlParams_, opts...)
28883	res, err := c.doRequest("json")
28884	if res != nil && res.StatusCode == http.StatusNotModified {
28885		if res.Body != nil {
28886			res.Body.Close()
28887		}
28888		return nil, &googleapi.Error{
28889			Code:   res.StatusCode,
28890			Header: res.Header,
28891		}
28892	}
28893	if err != nil {
28894		return nil, err
28895	}
28896	defer googleapi.CloseBody(res)
28897	if err := googleapi.CheckResponse(res); err != nil {
28898		return nil, err
28899	}
28900	ret := &Creative{
28901		ServerResponse: googleapi.ServerResponse{
28902			Header:         res.Header,
28903			HTTPStatusCode: res.StatusCode,
28904		},
28905	}
28906	target := &ret
28907	if err := gensupport.DecodeResponse(target, res); err != nil {
28908		return nil, err
28909	}
28910	return ret, nil
28911	// {
28912	//   "description": "Updates an existing creative. This method supports patch semantics.",
28913	//   "httpMethod": "PATCH",
28914	//   "id": "dfareporting.creatives.patch",
28915	//   "parameterOrder": [
28916	//     "profileId",
28917	//     "id"
28918	//   ],
28919	//   "parameters": {
28920	//     "id": {
28921	//       "description": "Creative ID.",
28922	//       "format": "int64",
28923	//       "location": "query",
28924	//       "required": true,
28925	//       "type": "string"
28926	//     },
28927	//     "profileId": {
28928	//       "description": "User profile ID associated with this request.",
28929	//       "format": "int64",
28930	//       "location": "path",
28931	//       "required": true,
28932	//       "type": "string"
28933	//     }
28934	//   },
28935	//   "path": "userprofiles/{profileId}/creatives",
28936	//   "request": {
28937	//     "$ref": "Creative"
28938	//   },
28939	//   "response": {
28940	//     "$ref": "Creative"
28941	//   },
28942	//   "scopes": [
28943	//     "https://www.googleapis.com/auth/dfatrafficking"
28944	//   ]
28945	// }
28946
28947}
28948
28949// method id "dfareporting.creatives.update":
28950
28951type CreativesUpdateCall struct {
28952	s          *Service
28953	profileId  int64
28954	creative   *Creative
28955	urlParams_ gensupport.URLParams
28956	ctx_       context.Context
28957	header_    http.Header
28958}
28959
28960// Update: Updates an existing creative.
28961func (r *CreativesService) Update(profileId int64, creative *Creative) *CreativesUpdateCall {
28962	c := &CreativesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28963	c.profileId = profileId
28964	c.creative = creative
28965	return c
28966}
28967
28968// Fields allows partial responses to be retrieved. See
28969// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28970// for more information.
28971func (c *CreativesUpdateCall) Fields(s ...googleapi.Field) *CreativesUpdateCall {
28972	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28973	return c
28974}
28975
28976// Context sets the context to be used in this call's Do method. Any
28977// pending HTTP request will be aborted if the provided context is
28978// canceled.
28979func (c *CreativesUpdateCall) Context(ctx context.Context) *CreativesUpdateCall {
28980	c.ctx_ = ctx
28981	return c
28982}
28983
28984// Header returns an http.Header that can be modified by the caller to
28985// add HTTP headers to the request.
28986func (c *CreativesUpdateCall) Header() http.Header {
28987	if c.header_ == nil {
28988		c.header_ = make(http.Header)
28989	}
28990	return c.header_
28991}
28992
28993func (c *CreativesUpdateCall) doRequest(alt string) (*http.Response, error) {
28994	reqHeaders := make(http.Header)
28995	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
28996	for k, v := range c.header_ {
28997		reqHeaders[k] = v
28998	}
28999	reqHeaders.Set("User-Agent", c.s.userAgent())
29000	var body io.Reader = nil
29001	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
29002	if err != nil {
29003		return nil, err
29004	}
29005	reqHeaders.Set("Content-Type", "application/json")
29006	c.urlParams_.Set("alt", alt)
29007	c.urlParams_.Set("prettyPrint", "false")
29008	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
29009	urls += "?" + c.urlParams_.Encode()
29010	req, err := http.NewRequest("PUT", urls, body)
29011	if err != nil {
29012		return nil, err
29013	}
29014	req.Header = reqHeaders
29015	googleapi.Expand(req.URL, map[string]string{
29016		"profileId": strconv.FormatInt(c.profileId, 10),
29017	})
29018	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29019}
29020
29021// Do executes the "dfareporting.creatives.update" call.
29022// Exactly one of *Creative or error will be non-nil. Any non-2xx status
29023// code is an error. Response headers are in either
29024// *Creative.ServerResponse.Header or (if a response was returned at
29025// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29026// to check whether the returned error was because
29027// http.StatusNotModified was returned.
29028func (c *CreativesUpdateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
29029	gensupport.SetOptions(c.urlParams_, opts...)
29030	res, err := c.doRequest("json")
29031	if res != nil && res.StatusCode == http.StatusNotModified {
29032		if res.Body != nil {
29033			res.Body.Close()
29034		}
29035		return nil, &googleapi.Error{
29036			Code:   res.StatusCode,
29037			Header: res.Header,
29038		}
29039	}
29040	if err != nil {
29041		return nil, err
29042	}
29043	defer googleapi.CloseBody(res)
29044	if err := googleapi.CheckResponse(res); err != nil {
29045		return nil, err
29046	}
29047	ret := &Creative{
29048		ServerResponse: googleapi.ServerResponse{
29049			Header:         res.Header,
29050			HTTPStatusCode: res.StatusCode,
29051		},
29052	}
29053	target := &ret
29054	if err := gensupport.DecodeResponse(target, res); err != nil {
29055		return nil, err
29056	}
29057	return ret, nil
29058	// {
29059	//   "description": "Updates an existing creative.",
29060	//   "httpMethod": "PUT",
29061	//   "id": "dfareporting.creatives.update",
29062	//   "parameterOrder": [
29063	//     "profileId"
29064	//   ],
29065	//   "parameters": {
29066	//     "profileId": {
29067	//       "description": "User profile ID associated with this request.",
29068	//       "format": "int64",
29069	//       "location": "path",
29070	//       "required": true,
29071	//       "type": "string"
29072	//     }
29073	//   },
29074	//   "path": "userprofiles/{profileId}/creatives",
29075	//   "request": {
29076	//     "$ref": "Creative"
29077	//   },
29078	//   "response": {
29079	//     "$ref": "Creative"
29080	//   },
29081	//   "scopes": [
29082	//     "https://www.googleapis.com/auth/dfatrafficking"
29083	//   ]
29084	// }
29085
29086}
29087
29088// method id "dfareporting.dimensionValues.query":
29089
29090type DimensionValuesQueryCall struct {
29091	s                     *Service
29092	profileId             int64
29093	dimensionvaluerequest *DimensionValueRequest
29094	urlParams_            gensupport.URLParams
29095	ctx_                  context.Context
29096	header_               http.Header
29097}
29098
29099// Query: Retrieves list of report dimension values for a list of
29100// filters.
29101func (r *DimensionValuesService) Query(profileId int64, dimensionvaluerequest *DimensionValueRequest) *DimensionValuesQueryCall {
29102	c := &DimensionValuesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29103	c.profileId = profileId
29104	c.dimensionvaluerequest = dimensionvaluerequest
29105	return c
29106}
29107
29108// MaxResults sets the optional parameter "maxResults": Maximum number
29109// of results to return.
29110func (c *DimensionValuesQueryCall) MaxResults(maxResults int64) *DimensionValuesQueryCall {
29111	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29112	return c
29113}
29114
29115// PageToken sets the optional parameter "pageToken": The value of the
29116// nextToken from the previous result page.
29117func (c *DimensionValuesQueryCall) PageToken(pageToken string) *DimensionValuesQueryCall {
29118	c.urlParams_.Set("pageToken", pageToken)
29119	return c
29120}
29121
29122// Fields allows partial responses to be retrieved. See
29123// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29124// for more information.
29125func (c *DimensionValuesQueryCall) Fields(s ...googleapi.Field) *DimensionValuesQueryCall {
29126	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29127	return c
29128}
29129
29130// Context sets the context to be used in this call's Do method. Any
29131// pending HTTP request will be aborted if the provided context is
29132// canceled.
29133func (c *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
29134	c.ctx_ = ctx
29135	return c
29136}
29137
29138// Header returns an http.Header that can be modified by the caller to
29139// add HTTP headers to the request.
29140func (c *DimensionValuesQueryCall) Header() http.Header {
29141	if c.header_ == nil {
29142		c.header_ = make(http.Header)
29143	}
29144	return c.header_
29145}
29146
29147func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
29148	reqHeaders := make(http.Header)
29149	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
29150	for k, v := range c.header_ {
29151		reqHeaders[k] = v
29152	}
29153	reqHeaders.Set("User-Agent", c.s.userAgent())
29154	var body io.Reader = nil
29155	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
29156	if err != nil {
29157		return nil, err
29158	}
29159	reqHeaders.Set("Content-Type", "application/json")
29160	c.urlParams_.Set("alt", alt)
29161	c.urlParams_.Set("prettyPrint", "false")
29162	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dimensionvalues/query")
29163	urls += "?" + c.urlParams_.Encode()
29164	req, err := http.NewRequest("POST", urls, body)
29165	if err != nil {
29166		return nil, err
29167	}
29168	req.Header = reqHeaders
29169	googleapi.Expand(req.URL, map[string]string{
29170		"profileId": strconv.FormatInt(c.profileId, 10),
29171	})
29172	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29173}
29174
29175// Do executes the "dfareporting.dimensionValues.query" call.
29176// Exactly one of *DimensionValueList or error will be non-nil. Any
29177// non-2xx status code is an error. Response headers are in either
29178// *DimensionValueList.ServerResponse.Header or (if a response was
29179// returned at all) in error.(*googleapi.Error).Header. Use
29180// googleapi.IsNotModified to check whether the returned error was
29181// because http.StatusNotModified was returned.
29182func (c *DimensionValuesQueryCall) Do(opts ...googleapi.CallOption) (*DimensionValueList, error) {
29183	gensupport.SetOptions(c.urlParams_, opts...)
29184	res, err := c.doRequest("json")
29185	if res != nil && res.StatusCode == http.StatusNotModified {
29186		if res.Body != nil {
29187			res.Body.Close()
29188		}
29189		return nil, &googleapi.Error{
29190			Code:   res.StatusCode,
29191			Header: res.Header,
29192		}
29193	}
29194	if err != nil {
29195		return nil, err
29196	}
29197	defer googleapi.CloseBody(res)
29198	if err := googleapi.CheckResponse(res); err != nil {
29199		return nil, err
29200	}
29201	ret := &DimensionValueList{
29202		ServerResponse: googleapi.ServerResponse{
29203			Header:         res.Header,
29204			HTTPStatusCode: res.StatusCode,
29205		},
29206	}
29207	target := &ret
29208	if err := gensupport.DecodeResponse(target, res); err != nil {
29209		return nil, err
29210	}
29211	return ret, nil
29212	// {
29213	//   "description": "Retrieves list of report dimension values for a list of filters.",
29214	//   "httpMethod": "POST",
29215	//   "id": "dfareporting.dimensionValues.query",
29216	//   "parameterOrder": [
29217	//     "profileId"
29218	//   ],
29219	//   "parameters": {
29220	//     "maxResults": {
29221	//       "default": "100",
29222	//       "description": "Maximum number of results to return.",
29223	//       "format": "int32",
29224	//       "location": "query",
29225	//       "maximum": "100",
29226	//       "minimum": "0",
29227	//       "type": "integer"
29228	//     },
29229	//     "pageToken": {
29230	//       "description": "The value of the nextToken from the previous result page.",
29231	//       "location": "query",
29232	//       "type": "string"
29233	//     },
29234	//     "profileId": {
29235	//       "description": "The DFA user profile ID.",
29236	//       "format": "int64",
29237	//       "location": "path",
29238	//       "required": true,
29239	//       "type": "string"
29240	//     }
29241	//   },
29242	//   "path": "userprofiles/{profileId}/dimensionvalues/query",
29243	//   "request": {
29244	//     "$ref": "DimensionValueRequest"
29245	//   },
29246	//   "response": {
29247	//     "$ref": "DimensionValueList"
29248	//   },
29249	//   "scopes": [
29250	//     "https://www.googleapis.com/auth/dfareporting"
29251	//   ]
29252	// }
29253
29254}
29255
29256// Pages invokes f for each page of results.
29257// A non-nil error returned from f will halt the iteration.
29258// The provided context supersedes any context provided to the Context method.
29259func (c *DimensionValuesQueryCall) Pages(ctx context.Context, f func(*DimensionValueList) error) error {
29260	c.ctx_ = ctx
29261	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29262	for {
29263		x, err := c.Do()
29264		if err != nil {
29265			return err
29266		}
29267		if err := f(x); err != nil {
29268			return err
29269		}
29270		if x.NextPageToken == "" {
29271			return nil
29272		}
29273		c.PageToken(x.NextPageToken)
29274	}
29275}
29276
29277// method id "dfareporting.directorySites.get":
29278
29279type DirectorySitesGetCall struct {
29280	s            *Service
29281	profileId    int64
29282	id           int64
29283	urlParams_   gensupport.URLParams
29284	ifNoneMatch_ string
29285	ctx_         context.Context
29286	header_      http.Header
29287}
29288
29289// Get: Gets one directory site by ID.
29290func (r *DirectorySitesService) Get(profileId int64, id int64) *DirectorySitesGetCall {
29291	c := &DirectorySitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29292	c.profileId = profileId
29293	c.id = id
29294	return c
29295}
29296
29297// Fields allows partial responses to be retrieved. See
29298// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29299// for more information.
29300func (c *DirectorySitesGetCall) Fields(s ...googleapi.Field) *DirectorySitesGetCall {
29301	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29302	return c
29303}
29304
29305// IfNoneMatch sets the optional parameter which makes the operation
29306// fail if the object's ETag matches the given value. This is useful for
29307// getting updates only after the object has changed since the last
29308// request. Use googleapi.IsNotModified to check whether the response
29309// error from Do is the result of In-None-Match.
29310func (c *DirectorySitesGetCall) IfNoneMatch(entityTag string) *DirectorySitesGetCall {
29311	c.ifNoneMatch_ = entityTag
29312	return c
29313}
29314
29315// Context sets the context to be used in this call's Do method. Any
29316// pending HTTP request will be aborted if the provided context is
29317// canceled.
29318func (c *DirectorySitesGetCall) Context(ctx context.Context) *DirectorySitesGetCall {
29319	c.ctx_ = ctx
29320	return c
29321}
29322
29323// Header returns an http.Header that can be modified by the caller to
29324// add HTTP headers to the request.
29325func (c *DirectorySitesGetCall) Header() http.Header {
29326	if c.header_ == nil {
29327		c.header_ = make(http.Header)
29328	}
29329	return c.header_
29330}
29331
29332func (c *DirectorySitesGetCall) doRequest(alt string) (*http.Response, error) {
29333	reqHeaders := make(http.Header)
29334	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
29335	for k, v := range c.header_ {
29336		reqHeaders[k] = v
29337	}
29338	reqHeaders.Set("User-Agent", c.s.userAgent())
29339	if c.ifNoneMatch_ != "" {
29340		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29341	}
29342	var body io.Reader = nil
29343	c.urlParams_.Set("alt", alt)
29344	c.urlParams_.Set("prettyPrint", "false")
29345	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites/{id}")
29346	urls += "?" + c.urlParams_.Encode()
29347	req, err := http.NewRequest("GET", urls, body)
29348	if err != nil {
29349		return nil, err
29350	}
29351	req.Header = reqHeaders
29352	googleapi.Expand(req.URL, map[string]string{
29353		"profileId": strconv.FormatInt(c.profileId, 10),
29354		"id":        strconv.FormatInt(c.id, 10),
29355	})
29356	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29357}
29358
29359// Do executes the "dfareporting.directorySites.get" call.
29360// Exactly one of *DirectorySite or error will be non-nil. Any non-2xx
29361// status code is an error. Response headers are in either
29362// *DirectorySite.ServerResponse.Header or (if a response was returned
29363// at all) in error.(*googleapi.Error).Header. Use
29364// googleapi.IsNotModified to check whether the returned error was
29365// because http.StatusNotModified was returned.
29366func (c *DirectorySitesGetCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
29367	gensupport.SetOptions(c.urlParams_, opts...)
29368	res, err := c.doRequest("json")
29369	if res != nil && res.StatusCode == http.StatusNotModified {
29370		if res.Body != nil {
29371			res.Body.Close()
29372		}
29373		return nil, &googleapi.Error{
29374			Code:   res.StatusCode,
29375			Header: res.Header,
29376		}
29377	}
29378	if err != nil {
29379		return nil, err
29380	}
29381	defer googleapi.CloseBody(res)
29382	if err := googleapi.CheckResponse(res); err != nil {
29383		return nil, err
29384	}
29385	ret := &DirectorySite{
29386		ServerResponse: googleapi.ServerResponse{
29387			Header:         res.Header,
29388			HTTPStatusCode: res.StatusCode,
29389		},
29390	}
29391	target := &ret
29392	if err := gensupport.DecodeResponse(target, res); err != nil {
29393		return nil, err
29394	}
29395	return ret, nil
29396	// {
29397	//   "description": "Gets one directory site by ID.",
29398	//   "httpMethod": "GET",
29399	//   "id": "dfareporting.directorySites.get",
29400	//   "parameterOrder": [
29401	//     "profileId",
29402	//     "id"
29403	//   ],
29404	//   "parameters": {
29405	//     "id": {
29406	//       "description": "Directory site ID.",
29407	//       "format": "int64",
29408	//       "location": "path",
29409	//       "required": true,
29410	//       "type": "string"
29411	//     },
29412	//     "profileId": {
29413	//       "description": "User profile ID associated with this request.",
29414	//       "format": "int64",
29415	//       "location": "path",
29416	//       "required": true,
29417	//       "type": "string"
29418	//     }
29419	//   },
29420	//   "path": "userprofiles/{profileId}/directorySites/{id}",
29421	//   "response": {
29422	//     "$ref": "DirectorySite"
29423	//   },
29424	//   "scopes": [
29425	//     "https://www.googleapis.com/auth/dfatrafficking"
29426	//   ]
29427	// }
29428
29429}
29430
29431// method id "dfareporting.directorySites.insert":
29432
29433type DirectorySitesInsertCall struct {
29434	s             *Service
29435	profileId     int64
29436	directorysite *DirectorySite
29437	urlParams_    gensupport.URLParams
29438	ctx_          context.Context
29439	header_       http.Header
29440}
29441
29442// Insert: Inserts a new directory site.
29443func (r *DirectorySitesService) Insert(profileId int64, directorysite *DirectorySite) *DirectorySitesInsertCall {
29444	c := &DirectorySitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29445	c.profileId = profileId
29446	c.directorysite = directorysite
29447	return c
29448}
29449
29450// Fields allows partial responses to be retrieved. See
29451// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29452// for more information.
29453func (c *DirectorySitesInsertCall) Fields(s ...googleapi.Field) *DirectorySitesInsertCall {
29454	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29455	return c
29456}
29457
29458// Context sets the context to be used in this call's Do method. Any
29459// pending HTTP request will be aborted if the provided context is
29460// canceled.
29461func (c *DirectorySitesInsertCall) Context(ctx context.Context) *DirectorySitesInsertCall {
29462	c.ctx_ = ctx
29463	return c
29464}
29465
29466// Header returns an http.Header that can be modified by the caller to
29467// add HTTP headers to the request.
29468func (c *DirectorySitesInsertCall) Header() http.Header {
29469	if c.header_ == nil {
29470		c.header_ = make(http.Header)
29471	}
29472	return c.header_
29473}
29474
29475func (c *DirectorySitesInsertCall) doRequest(alt string) (*http.Response, error) {
29476	reqHeaders := make(http.Header)
29477	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
29478	for k, v := range c.header_ {
29479		reqHeaders[k] = v
29480	}
29481	reqHeaders.Set("User-Agent", c.s.userAgent())
29482	var body io.Reader = nil
29483	body, err := googleapi.WithoutDataWrapper.JSONReader(c.directorysite)
29484	if err != nil {
29485		return nil, err
29486	}
29487	reqHeaders.Set("Content-Type", "application/json")
29488	c.urlParams_.Set("alt", alt)
29489	c.urlParams_.Set("prettyPrint", "false")
29490	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
29491	urls += "?" + c.urlParams_.Encode()
29492	req, err := http.NewRequest("POST", urls, body)
29493	if err != nil {
29494		return nil, err
29495	}
29496	req.Header = reqHeaders
29497	googleapi.Expand(req.URL, map[string]string{
29498		"profileId": strconv.FormatInt(c.profileId, 10),
29499	})
29500	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29501}
29502
29503// Do executes the "dfareporting.directorySites.insert" call.
29504// Exactly one of *DirectorySite or error will be non-nil. Any non-2xx
29505// status code is an error. Response headers are in either
29506// *DirectorySite.ServerResponse.Header or (if a response was returned
29507// at all) in error.(*googleapi.Error).Header. Use
29508// googleapi.IsNotModified to check whether the returned error was
29509// because http.StatusNotModified was returned.
29510func (c *DirectorySitesInsertCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
29511	gensupport.SetOptions(c.urlParams_, opts...)
29512	res, err := c.doRequest("json")
29513	if res != nil && res.StatusCode == http.StatusNotModified {
29514		if res.Body != nil {
29515			res.Body.Close()
29516		}
29517		return nil, &googleapi.Error{
29518			Code:   res.StatusCode,
29519			Header: res.Header,
29520		}
29521	}
29522	if err != nil {
29523		return nil, err
29524	}
29525	defer googleapi.CloseBody(res)
29526	if err := googleapi.CheckResponse(res); err != nil {
29527		return nil, err
29528	}
29529	ret := &DirectorySite{
29530		ServerResponse: googleapi.ServerResponse{
29531			Header:         res.Header,
29532			HTTPStatusCode: res.StatusCode,
29533		},
29534	}
29535	target := &ret
29536	if err := gensupport.DecodeResponse(target, res); err != nil {
29537		return nil, err
29538	}
29539	return ret, nil
29540	// {
29541	//   "description": "Inserts a new directory site.",
29542	//   "httpMethod": "POST",
29543	//   "id": "dfareporting.directorySites.insert",
29544	//   "parameterOrder": [
29545	//     "profileId"
29546	//   ],
29547	//   "parameters": {
29548	//     "profileId": {
29549	//       "description": "User profile ID associated with this request.",
29550	//       "format": "int64",
29551	//       "location": "path",
29552	//       "required": true,
29553	//       "type": "string"
29554	//     }
29555	//   },
29556	//   "path": "userprofiles/{profileId}/directorySites",
29557	//   "request": {
29558	//     "$ref": "DirectorySite"
29559	//   },
29560	//   "response": {
29561	//     "$ref": "DirectorySite"
29562	//   },
29563	//   "scopes": [
29564	//     "https://www.googleapis.com/auth/dfatrafficking"
29565	//   ]
29566	// }
29567
29568}
29569
29570// method id "dfareporting.directorySites.list":
29571
29572type DirectorySitesListCall struct {
29573	s            *Service
29574	profileId    int64
29575	urlParams_   gensupport.URLParams
29576	ifNoneMatch_ string
29577	ctx_         context.Context
29578	header_      http.Header
29579}
29580
29581// List: Retrieves a list of directory sites, possibly filtered. This
29582// method supports paging.
29583func (r *DirectorySitesService) List(profileId int64) *DirectorySitesListCall {
29584	c := &DirectorySitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29585	c.profileId = profileId
29586	return c
29587}
29588
29589// AcceptsInStreamVideoPlacements sets the optional parameter
29590// "acceptsInStreamVideoPlacements": This search filter is no longer
29591// supported and will have no effect on the results returned.
29592func (c *DirectorySitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *DirectorySitesListCall {
29593	c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
29594	return c
29595}
29596
29597// AcceptsInterstitialPlacements sets the optional parameter
29598// "acceptsInterstitialPlacements": This search filter is no longer
29599// supported and will have no effect on the results returned.
29600func (c *DirectorySitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *DirectorySitesListCall {
29601	c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
29602	return c
29603}
29604
29605// AcceptsPublisherPaidPlacements sets the optional parameter
29606// "acceptsPublisherPaidPlacements": Select only directory sites that
29607// accept publisher paid placements. This field can be left blank.
29608func (c *DirectorySitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *DirectorySitesListCall {
29609	c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
29610	return c
29611}
29612
29613// Active sets the optional parameter "active": Select only active
29614// directory sites. Leave blank to retrieve both active and inactive
29615// directory sites.
29616func (c *DirectorySitesListCall) Active(active bool) *DirectorySitesListCall {
29617	c.urlParams_.Set("active", fmt.Sprint(active))
29618	return c
29619}
29620
29621// DfpNetworkCode sets the optional parameter "dfpNetworkCode": Select
29622// only directory sites with this Ad Manager network code.
29623func (c *DirectorySitesListCall) DfpNetworkCode(dfpNetworkCode string) *DirectorySitesListCall {
29624	c.urlParams_.Set("dfpNetworkCode", dfpNetworkCode)
29625	return c
29626}
29627
29628// Ids sets the optional parameter "ids": Select only directory sites
29629// with these IDs.
29630func (c *DirectorySitesListCall) Ids(ids ...int64) *DirectorySitesListCall {
29631	var ids_ []string
29632	for _, v := range ids {
29633		ids_ = append(ids_, fmt.Sprint(v))
29634	}
29635	c.urlParams_.SetMulti("ids", ids_)
29636	return c
29637}
29638
29639// MaxResults sets the optional parameter "maxResults": Maximum number
29640// of results to return.
29641func (c *DirectorySitesListCall) MaxResults(maxResults int64) *DirectorySitesListCall {
29642	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29643	return c
29644}
29645
29646// PageToken sets the optional parameter "pageToken": Value of the
29647// nextPageToken from the previous result page.
29648func (c *DirectorySitesListCall) PageToken(pageToken string) *DirectorySitesListCall {
29649	c.urlParams_.Set("pageToken", pageToken)
29650	return c
29651}
29652
29653// SearchString sets the optional parameter "searchString": Allows
29654// searching for objects by name, ID or URL. Wildcards (*) are allowed.
29655// For example, "directory site*2015" will return objects with names
29656// like "directory site June 2015", "directory site April 2015", or
29657// simply "directory site 2015". Most of the searches also add wildcards
29658// implicitly at the start and the end of the search string. For
29659// example, a search string of "directory site" will match objects with
29660// name "my directory site", "directory site 2015" or simply, "directory
29661// site".
29662func (c *DirectorySitesListCall) SearchString(searchString string) *DirectorySitesListCall {
29663	c.urlParams_.Set("searchString", searchString)
29664	return c
29665}
29666
29667// SortField sets the optional parameter "sortField": Field by which to
29668// sort the list.
29669//
29670// Possible values:
29671//   "ID" (default)
29672//   "NAME"
29673func (c *DirectorySitesListCall) SortField(sortField string) *DirectorySitesListCall {
29674	c.urlParams_.Set("sortField", sortField)
29675	return c
29676}
29677
29678// SortOrder sets the optional parameter "sortOrder": Order of sorted
29679// results.
29680//
29681// Possible values:
29682//   "ASCENDING" (default)
29683//   "DESCENDING"
29684func (c *DirectorySitesListCall) SortOrder(sortOrder string) *DirectorySitesListCall {
29685	c.urlParams_.Set("sortOrder", sortOrder)
29686	return c
29687}
29688
29689// Fields allows partial responses to be retrieved. See
29690// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29691// for more information.
29692func (c *DirectorySitesListCall) Fields(s ...googleapi.Field) *DirectorySitesListCall {
29693	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29694	return c
29695}
29696
29697// IfNoneMatch sets the optional parameter which makes the operation
29698// fail if the object's ETag matches the given value. This is useful for
29699// getting updates only after the object has changed since the last
29700// request. Use googleapi.IsNotModified to check whether the response
29701// error from Do is the result of In-None-Match.
29702func (c *DirectorySitesListCall) IfNoneMatch(entityTag string) *DirectorySitesListCall {
29703	c.ifNoneMatch_ = entityTag
29704	return c
29705}
29706
29707// Context sets the context to be used in this call's Do method. Any
29708// pending HTTP request will be aborted if the provided context is
29709// canceled.
29710func (c *DirectorySitesListCall) Context(ctx context.Context) *DirectorySitesListCall {
29711	c.ctx_ = ctx
29712	return c
29713}
29714
29715// Header returns an http.Header that can be modified by the caller to
29716// add HTTP headers to the request.
29717func (c *DirectorySitesListCall) Header() http.Header {
29718	if c.header_ == nil {
29719		c.header_ = make(http.Header)
29720	}
29721	return c.header_
29722}
29723
29724func (c *DirectorySitesListCall) doRequest(alt string) (*http.Response, error) {
29725	reqHeaders := make(http.Header)
29726	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
29727	for k, v := range c.header_ {
29728		reqHeaders[k] = v
29729	}
29730	reqHeaders.Set("User-Agent", c.s.userAgent())
29731	if c.ifNoneMatch_ != "" {
29732		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29733	}
29734	var body io.Reader = nil
29735	c.urlParams_.Set("alt", alt)
29736	c.urlParams_.Set("prettyPrint", "false")
29737	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
29738	urls += "?" + c.urlParams_.Encode()
29739	req, err := http.NewRequest("GET", urls, body)
29740	if err != nil {
29741		return nil, err
29742	}
29743	req.Header = reqHeaders
29744	googleapi.Expand(req.URL, map[string]string{
29745		"profileId": strconv.FormatInt(c.profileId, 10),
29746	})
29747	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29748}
29749
29750// Do executes the "dfareporting.directorySites.list" call.
29751// Exactly one of *DirectorySitesListResponse or error will be non-nil.
29752// Any non-2xx status code is an error. Response headers are in either
29753// *DirectorySitesListResponse.ServerResponse.Header or (if a response
29754// was returned at all) in error.(*googleapi.Error).Header. Use
29755// googleapi.IsNotModified to check whether the returned error was
29756// because http.StatusNotModified was returned.
29757func (c *DirectorySitesListCall) Do(opts ...googleapi.CallOption) (*DirectorySitesListResponse, error) {
29758	gensupport.SetOptions(c.urlParams_, opts...)
29759	res, err := c.doRequest("json")
29760	if res != nil && res.StatusCode == http.StatusNotModified {
29761		if res.Body != nil {
29762			res.Body.Close()
29763		}
29764		return nil, &googleapi.Error{
29765			Code:   res.StatusCode,
29766			Header: res.Header,
29767		}
29768	}
29769	if err != nil {
29770		return nil, err
29771	}
29772	defer googleapi.CloseBody(res)
29773	if err := googleapi.CheckResponse(res); err != nil {
29774		return nil, err
29775	}
29776	ret := &DirectorySitesListResponse{
29777		ServerResponse: googleapi.ServerResponse{
29778			Header:         res.Header,
29779			HTTPStatusCode: res.StatusCode,
29780		},
29781	}
29782	target := &ret
29783	if err := gensupport.DecodeResponse(target, res); err != nil {
29784		return nil, err
29785	}
29786	return ret, nil
29787	// {
29788	//   "description": "Retrieves a list of directory sites, possibly filtered. This method supports paging.",
29789	//   "httpMethod": "GET",
29790	//   "id": "dfareporting.directorySites.list",
29791	//   "parameterOrder": [
29792	//     "profileId"
29793	//   ],
29794	//   "parameters": {
29795	//     "acceptsInStreamVideoPlacements": {
29796	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
29797	//       "location": "query",
29798	//       "type": "boolean"
29799	//     },
29800	//     "acceptsInterstitialPlacements": {
29801	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
29802	//       "location": "query",
29803	//       "type": "boolean"
29804	//     },
29805	//     "acceptsPublisherPaidPlacements": {
29806	//       "description": "Select only directory sites that accept publisher paid placements. This field can be left blank.",
29807	//       "location": "query",
29808	//       "type": "boolean"
29809	//     },
29810	//     "active": {
29811	//       "description": "Select only active directory sites. Leave blank to retrieve both active and inactive directory sites.",
29812	//       "location": "query",
29813	//       "type": "boolean"
29814	//     },
29815	//     "dfpNetworkCode": {
29816	//       "description": "Select only directory sites with this Ad Manager network code.",
29817	//       "location": "query",
29818	//       "type": "string"
29819	//     },
29820	//     "ids": {
29821	//       "description": "Select only directory sites with these IDs.",
29822	//       "format": "int64",
29823	//       "location": "query",
29824	//       "repeated": true,
29825	//       "type": "string"
29826	//     },
29827	//     "maxResults": {
29828	//       "default": "1000",
29829	//       "description": "Maximum number of results to return.",
29830	//       "format": "int32",
29831	//       "location": "query",
29832	//       "maximum": "1000",
29833	//       "minimum": "0",
29834	//       "type": "integer"
29835	//     },
29836	//     "pageToken": {
29837	//       "description": "Value of the nextPageToken from the previous result page.",
29838	//       "location": "query",
29839	//       "type": "string"
29840	//     },
29841	//     "profileId": {
29842	//       "description": "User profile ID associated with this request.",
29843	//       "format": "int64",
29844	//       "location": "path",
29845	//       "required": true,
29846	//       "type": "string"
29847	//     },
29848	//     "searchString": {
29849	//       "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\".",
29850	//       "location": "query",
29851	//       "type": "string"
29852	//     },
29853	//     "sortField": {
29854	//       "default": "ID",
29855	//       "description": "Field by which to sort the list.",
29856	//       "enum": [
29857	//         "ID",
29858	//         "NAME"
29859	//       ],
29860	//       "enumDescriptions": [
29861	//         "",
29862	//         ""
29863	//       ],
29864	//       "location": "query",
29865	//       "type": "string"
29866	//     },
29867	//     "sortOrder": {
29868	//       "default": "ASCENDING",
29869	//       "description": "Order of sorted results.",
29870	//       "enum": [
29871	//         "ASCENDING",
29872	//         "DESCENDING"
29873	//       ],
29874	//       "enumDescriptions": [
29875	//         "",
29876	//         ""
29877	//       ],
29878	//       "location": "query",
29879	//       "type": "string"
29880	//     }
29881	//   },
29882	//   "path": "userprofiles/{profileId}/directorySites",
29883	//   "response": {
29884	//     "$ref": "DirectorySitesListResponse"
29885	//   },
29886	//   "scopes": [
29887	//     "https://www.googleapis.com/auth/dfatrafficking"
29888	//   ]
29889	// }
29890
29891}
29892
29893// Pages invokes f for each page of results.
29894// A non-nil error returned from f will halt the iteration.
29895// The provided context supersedes any context provided to the Context method.
29896func (c *DirectorySitesListCall) Pages(ctx context.Context, f func(*DirectorySitesListResponse) error) error {
29897	c.ctx_ = ctx
29898	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29899	for {
29900		x, err := c.Do()
29901		if err != nil {
29902			return err
29903		}
29904		if err := f(x); err != nil {
29905			return err
29906		}
29907		if x.NextPageToken == "" {
29908			return nil
29909		}
29910		c.PageToken(x.NextPageToken)
29911	}
29912}
29913
29914// method id "dfareporting.dynamicTargetingKeys.delete":
29915
29916type DynamicTargetingKeysDeleteCall struct {
29917	s          *Service
29918	profileId  int64
29919	objectId   int64
29920	urlParams_ gensupport.URLParams
29921	ctx_       context.Context
29922	header_    http.Header
29923}
29924
29925// Delete: Deletes an existing dynamic targeting key.
29926func (r *DynamicTargetingKeysService) Delete(profileId int64, objectId int64, name string, objectType string) *DynamicTargetingKeysDeleteCall {
29927	c := &DynamicTargetingKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29928	c.profileId = profileId
29929	c.objectId = objectId
29930	c.urlParams_.Set("name", name)
29931	c.urlParams_.Set("objectType", objectType)
29932	return c
29933}
29934
29935// Fields allows partial responses to be retrieved. See
29936// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29937// for more information.
29938func (c *DynamicTargetingKeysDeleteCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysDeleteCall {
29939	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29940	return c
29941}
29942
29943// Context sets the context to be used in this call's Do method. Any
29944// pending HTTP request will be aborted if the provided context is
29945// canceled.
29946func (c *DynamicTargetingKeysDeleteCall) Context(ctx context.Context) *DynamicTargetingKeysDeleteCall {
29947	c.ctx_ = ctx
29948	return c
29949}
29950
29951// Header returns an http.Header that can be modified by the caller to
29952// add HTTP headers to the request.
29953func (c *DynamicTargetingKeysDeleteCall) Header() http.Header {
29954	if c.header_ == nil {
29955		c.header_ = make(http.Header)
29956	}
29957	return c.header_
29958}
29959
29960func (c *DynamicTargetingKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
29961	reqHeaders := make(http.Header)
29962	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
29963	for k, v := range c.header_ {
29964		reqHeaders[k] = v
29965	}
29966	reqHeaders.Set("User-Agent", c.s.userAgent())
29967	var body io.Reader = nil
29968	c.urlParams_.Set("alt", alt)
29969	c.urlParams_.Set("prettyPrint", "false")
29970	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}")
29971	urls += "?" + c.urlParams_.Encode()
29972	req, err := http.NewRequest("DELETE", urls, body)
29973	if err != nil {
29974		return nil, err
29975	}
29976	req.Header = reqHeaders
29977	googleapi.Expand(req.URL, map[string]string{
29978		"profileId": strconv.FormatInt(c.profileId, 10),
29979		"objectId":  strconv.FormatInt(c.objectId, 10),
29980	})
29981	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29982}
29983
29984// Do executes the "dfareporting.dynamicTargetingKeys.delete" call.
29985func (c *DynamicTargetingKeysDeleteCall) Do(opts ...googleapi.CallOption) error {
29986	gensupport.SetOptions(c.urlParams_, opts...)
29987	res, err := c.doRequest("json")
29988	if err != nil {
29989		return err
29990	}
29991	defer googleapi.CloseBody(res)
29992	if err := googleapi.CheckResponse(res); err != nil {
29993		return err
29994	}
29995	return nil
29996	// {
29997	//   "description": "Deletes an existing dynamic targeting key.",
29998	//   "httpMethod": "DELETE",
29999	//   "id": "dfareporting.dynamicTargetingKeys.delete",
30000	//   "parameterOrder": [
30001	//     "profileId",
30002	//     "objectId",
30003	//     "name",
30004	//     "objectType"
30005	//   ],
30006	//   "parameters": {
30007	//     "name": {
30008	//       "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.",
30009	//       "location": "query",
30010	//       "required": true,
30011	//       "type": "string"
30012	//     },
30013	//     "objectId": {
30014	//       "description": "ID of the object of this dynamic targeting key. This is a required field.",
30015	//       "format": "int64",
30016	//       "location": "path",
30017	//       "required": true,
30018	//       "type": "string"
30019	//     },
30020	//     "objectType": {
30021	//       "description": "Type of the object of this dynamic targeting key. This is a required field.",
30022	//       "enum": [
30023	//         "OBJECT_AD",
30024	//         "OBJECT_ADVERTISER",
30025	//         "OBJECT_CREATIVE",
30026	//         "OBJECT_PLACEMENT"
30027	//       ],
30028	//       "enumDescriptions": [
30029	//         "",
30030	//         "",
30031	//         "",
30032	//         ""
30033	//       ],
30034	//       "location": "query",
30035	//       "required": true,
30036	//       "type": "string"
30037	//     },
30038	//     "profileId": {
30039	//       "description": "User profile ID associated with this request.",
30040	//       "format": "int64",
30041	//       "location": "path",
30042	//       "required": true,
30043	//       "type": "string"
30044	//     }
30045	//   },
30046	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}",
30047	//   "scopes": [
30048	//     "https://www.googleapis.com/auth/dfatrafficking"
30049	//   ]
30050	// }
30051
30052}
30053
30054// method id "dfareporting.dynamicTargetingKeys.insert":
30055
30056type DynamicTargetingKeysInsertCall struct {
30057	s                   *Service
30058	profileId           int64
30059	dynamictargetingkey *DynamicTargetingKey
30060	urlParams_          gensupport.URLParams
30061	ctx_                context.Context
30062	header_             http.Header
30063}
30064
30065// Insert: Inserts a new dynamic targeting key. Keys must be created at
30066// the advertiser level before being assigned to the advertiser's ads,
30067// creatives, or placements. There is a maximum of 1000 keys per
30068// advertiser, out of which a maximum of 20 keys can be assigned per ad,
30069// creative, or placement.
30070func (r *DynamicTargetingKeysService) Insert(profileId int64, dynamictargetingkey *DynamicTargetingKey) *DynamicTargetingKeysInsertCall {
30071	c := &DynamicTargetingKeysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30072	c.profileId = profileId
30073	c.dynamictargetingkey = dynamictargetingkey
30074	return c
30075}
30076
30077// Fields allows partial responses to be retrieved. See
30078// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30079// for more information.
30080func (c *DynamicTargetingKeysInsertCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysInsertCall {
30081	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30082	return c
30083}
30084
30085// Context sets the context to be used in this call's Do method. Any
30086// pending HTTP request will be aborted if the provided context is
30087// canceled.
30088func (c *DynamicTargetingKeysInsertCall) Context(ctx context.Context) *DynamicTargetingKeysInsertCall {
30089	c.ctx_ = ctx
30090	return c
30091}
30092
30093// Header returns an http.Header that can be modified by the caller to
30094// add HTTP headers to the request.
30095func (c *DynamicTargetingKeysInsertCall) Header() http.Header {
30096	if c.header_ == nil {
30097		c.header_ = make(http.Header)
30098	}
30099	return c.header_
30100}
30101
30102func (c *DynamicTargetingKeysInsertCall) doRequest(alt string) (*http.Response, error) {
30103	reqHeaders := make(http.Header)
30104	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
30105	for k, v := range c.header_ {
30106		reqHeaders[k] = v
30107	}
30108	reqHeaders.Set("User-Agent", c.s.userAgent())
30109	var body io.Reader = nil
30110	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dynamictargetingkey)
30111	if err != nil {
30112		return nil, err
30113	}
30114	reqHeaders.Set("Content-Type", "application/json")
30115	c.urlParams_.Set("alt", alt)
30116	c.urlParams_.Set("prettyPrint", "false")
30117	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
30118	urls += "?" + c.urlParams_.Encode()
30119	req, err := http.NewRequest("POST", urls, body)
30120	if err != nil {
30121		return nil, err
30122	}
30123	req.Header = reqHeaders
30124	googleapi.Expand(req.URL, map[string]string{
30125		"profileId": strconv.FormatInt(c.profileId, 10),
30126	})
30127	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30128}
30129
30130// Do executes the "dfareporting.dynamicTargetingKeys.insert" call.
30131// Exactly one of *DynamicTargetingKey or error will be non-nil. Any
30132// non-2xx status code is an error. Response headers are in either
30133// *DynamicTargetingKey.ServerResponse.Header or (if a response was
30134// returned at all) in error.(*googleapi.Error).Header. Use
30135// googleapi.IsNotModified to check whether the returned error was
30136// because http.StatusNotModified was returned.
30137func (c *DynamicTargetingKeysInsertCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKey, error) {
30138	gensupport.SetOptions(c.urlParams_, opts...)
30139	res, err := c.doRequest("json")
30140	if res != nil && res.StatusCode == http.StatusNotModified {
30141		if res.Body != nil {
30142			res.Body.Close()
30143		}
30144		return nil, &googleapi.Error{
30145			Code:   res.StatusCode,
30146			Header: res.Header,
30147		}
30148	}
30149	if err != nil {
30150		return nil, err
30151	}
30152	defer googleapi.CloseBody(res)
30153	if err := googleapi.CheckResponse(res); err != nil {
30154		return nil, err
30155	}
30156	ret := &DynamicTargetingKey{
30157		ServerResponse: googleapi.ServerResponse{
30158			Header:         res.Header,
30159			HTTPStatusCode: res.StatusCode,
30160		},
30161	}
30162	target := &ret
30163	if err := gensupport.DecodeResponse(target, res); err != nil {
30164		return nil, err
30165	}
30166	return ret, nil
30167	// {
30168	//   "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.",
30169	//   "httpMethod": "POST",
30170	//   "id": "dfareporting.dynamicTargetingKeys.insert",
30171	//   "parameterOrder": [
30172	//     "profileId"
30173	//   ],
30174	//   "parameters": {
30175	//     "profileId": {
30176	//       "description": "User profile ID associated with this request.",
30177	//       "format": "int64",
30178	//       "location": "path",
30179	//       "required": true,
30180	//       "type": "string"
30181	//     }
30182	//   },
30183	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys",
30184	//   "request": {
30185	//     "$ref": "DynamicTargetingKey"
30186	//   },
30187	//   "response": {
30188	//     "$ref": "DynamicTargetingKey"
30189	//   },
30190	//   "scopes": [
30191	//     "https://www.googleapis.com/auth/dfatrafficking"
30192	//   ]
30193	// }
30194
30195}
30196
30197// method id "dfareporting.dynamicTargetingKeys.list":
30198
30199type DynamicTargetingKeysListCall struct {
30200	s            *Service
30201	profileId    int64
30202	urlParams_   gensupport.URLParams
30203	ifNoneMatch_ string
30204	ctx_         context.Context
30205	header_      http.Header
30206}
30207
30208// List: Retrieves a list of dynamic targeting keys.
30209func (r *DynamicTargetingKeysService) List(profileId int64) *DynamicTargetingKeysListCall {
30210	c := &DynamicTargetingKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30211	c.profileId = profileId
30212	return c
30213}
30214
30215// AdvertiserId sets the optional parameter "advertiserId": Select only
30216// dynamic targeting keys whose object has this advertiser ID.
30217func (c *DynamicTargetingKeysListCall) AdvertiserId(advertiserId int64) *DynamicTargetingKeysListCall {
30218	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30219	return c
30220}
30221
30222// Names sets the optional parameter "names": Select only dynamic
30223// targeting keys exactly matching these names.
30224func (c *DynamicTargetingKeysListCall) Names(names ...string) *DynamicTargetingKeysListCall {
30225	c.urlParams_.SetMulti("names", append([]string{}, names...))
30226	return c
30227}
30228
30229// ObjectId sets the optional parameter "objectId": Select only dynamic
30230// targeting keys with this object ID.
30231func (c *DynamicTargetingKeysListCall) ObjectId(objectId int64) *DynamicTargetingKeysListCall {
30232	c.urlParams_.Set("objectId", fmt.Sprint(objectId))
30233	return c
30234}
30235
30236// ObjectType sets the optional parameter "objectType": Select only
30237// dynamic targeting keys with this object type.
30238//
30239// Possible values:
30240//   "OBJECT_AD"
30241//   "OBJECT_ADVERTISER"
30242//   "OBJECT_CREATIVE"
30243//   "OBJECT_PLACEMENT"
30244func (c *DynamicTargetingKeysListCall) ObjectType(objectType string) *DynamicTargetingKeysListCall {
30245	c.urlParams_.Set("objectType", objectType)
30246	return c
30247}
30248
30249// Fields allows partial responses to be retrieved. See
30250// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30251// for more information.
30252func (c *DynamicTargetingKeysListCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysListCall {
30253	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30254	return c
30255}
30256
30257// IfNoneMatch sets the optional parameter which makes the operation
30258// fail if the object's ETag matches the given value. This is useful for
30259// getting updates only after the object has changed since the last
30260// request. Use googleapi.IsNotModified to check whether the response
30261// error from Do is the result of In-None-Match.
30262func (c *DynamicTargetingKeysListCall) IfNoneMatch(entityTag string) *DynamicTargetingKeysListCall {
30263	c.ifNoneMatch_ = entityTag
30264	return c
30265}
30266
30267// Context sets the context to be used in this call's Do method. Any
30268// pending HTTP request will be aborted if the provided context is
30269// canceled.
30270func (c *DynamicTargetingKeysListCall) Context(ctx context.Context) *DynamicTargetingKeysListCall {
30271	c.ctx_ = ctx
30272	return c
30273}
30274
30275// Header returns an http.Header that can be modified by the caller to
30276// add HTTP headers to the request.
30277func (c *DynamicTargetingKeysListCall) Header() http.Header {
30278	if c.header_ == nil {
30279		c.header_ = make(http.Header)
30280	}
30281	return c.header_
30282}
30283
30284func (c *DynamicTargetingKeysListCall) doRequest(alt string) (*http.Response, error) {
30285	reqHeaders := make(http.Header)
30286	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
30287	for k, v := range c.header_ {
30288		reqHeaders[k] = v
30289	}
30290	reqHeaders.Set("User-Agent", c.s.userAgent())
30291	if c.ifNoneMatch_ != "" {
30292		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30293	}
30294	var body io.Reader = nil
30295	c.urlParams_.Set("alt", alt)
30296	c.urlParams_.Set("prettyPrint", "false")
30297	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
30298	urls += "?" + c.urlParams_.Encode()
30299	req, err := http.NewRequest("GET", urls, body)
30300	if err != nil {
30301		return nil, err
30302	}
30303	req.Header = reqHeaders
30304	googleapi.Expand(req.URL, map[string]string{
30305		"profileId": strconv.FormatInt(c.profileId, 10),
30306	})
30307	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30308}
30309
30310// Do executes the "dfareporting.dynamicTargetingKeys.list" call.
30311// Exactly one of *DynamicTargetingKeysListResponse or error will be
30312// non-nil. Any non-2xx status code is an error. Response headers are in
30313// either *DynamicTargetingKeysListResponse.ServerResponse.Header or (if
30314// a response was returned at all) in error.(*googleapi.Error).Header.
30315// Use googleapi.IsNotModified to check whether the returned error was
30316// because http.StatusNotModified was returned.
30317func (c *DynamicTargetingKeysListCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKeysListResponse, error) {
30318	gensupport.SetOptions(c.urlParams_, opts...)
30319	res, err := c.doRequest("json")
30320	if res != nil && res.StatusCode == http.StatusNotModified {
30321		if res.Body != nil {
30322			res.Body.Close()
30323		}
30324		return nil, &googleapi.Error{
30325			Code:   res.StatusCode,
30326			Header: res.Header,
30327		}
30328	}
30329	if err != nil {
30330		return nil, err
30331	}
30332	defer googleapi.CloseBody(res)
30333	if err := googleapi.CheckResponse(res); err != nil {
30334		return nil, err
30335	}
30336	ret := &DynamicTargetingKeysListResponse{
30337		ServerResponse: googleapi.ServerResponse{
30338			Header:         res.Header,
30339			HTTPStatusCode: res.StatusCode,
30340		},
30341	}
30342	target := &ret
30343	if err := gensupport.DecodeResponse(target, res); err != nil {
30344		return nil, err
30345	}
30346	return ret, nil
30347	// {
30348	//   "description": "Retrieves a list of dynamic targeting keys.",
30349	//   "httpMethod": "GET",
30350	//   "id": "dfareporting.dynamicTargetingKeys.list",
30351	//   "parameterOrder": [
30352	//     "profileId"
30353	//   ],
30354	//   "parameters": {
30355	//     "advertiserId": {
30356	//       "description": "Select only dynamic targeting keys whose object has this advertiser ID.",
30357	//       "format": "int64",
30358	//       "location": "query",
30359	//       "type": "string"
30360	//     },
30361	//     "names": {
30362	//       "description": "Select only dynamic targeting keys exactly matching these names.",
30363	//       "location": "query",
30364	//       "repeated": true,
30365	//       "type": "string"
30366	//     },
30367	//     "objectId": {
30368	//       "description": "Select only dynamic targeting keys with this object ID.",
30369	//       "format": "int64",
30370	//       "location": "query",
30371	//       "type": "string"
30372	//     },
30373	//     "objectType": {
30374	//       "description": "Select only dynamic targeting keys with this object type.",
30375	//       "enum": [
30376	//         "OBJECT_AD",
30377	//         "OBJECT_ADVERTISER",
30378	//         "OBJECT_CREATIVE",
30379	//         "OBJECT_PLACEMENT"
30380	//       ],
30381	//       "enumDescriptions": [
30382	//         "",
30383	//         "",
30384	//         "",
30385	//         ""
30386	//       ],
30387	//       "location": "query",
30388	//       "type": "string"
30389	//     },
30390	//     "profileId": {
30391	//       "description": "User profile ID associated with this request.",
30392	//       "format": "int64",
30393	//       "location": "path",
30394	//       "required": true,
30395	//       "type": "string"
30396	//     }
30397	//   },
30398	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys",
30399	//   "response": {
30400	//     "$ref": "DynamicTargetingKeysListResponse"
30401	//   },
30402	//   "scopes": [
30403	//     "https://www.googleapis.com/auth/dfatrafficking"
30404	//   ]
30405	// }
30406
30407}
30408
30409// method id "dfareporting.eventTags.delete":
30410
30411type EventTagsDeleteCall struct {
30412	s          *Service
30413	profileId  int64
30414	id         int64
30415	urlParams_ gensupport.URLParams
30416	ctx_       context.Context
30417	header_    http.Header
30418}
30419
30420// Delete: Deletes an existing event tag.
30421func (r *EventTagsService) Delete(profileId int64, id int64) *EventTagsDeleteCall {
30422	c := &EventTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30423	c.profileId = profileId
30424	c.id = id
30425	return c
30426}
30427
30428// Fields allows partial responses to be retrieved. See
30429// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30430// for more information.
30431func (c *EventTagsDeleteCall) Fields(s ...googleapi.Field) *EventTagsDeleteCall {
30432	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30433	return c
30434}
30435
30436// Context sets the context to be used in this call's Do method. Any
30437// pending HTTP request will be aborted if the provided context is
30438// canceled.
30439func (c *EventTagsDeleteCall) Context(ctx context.Context) *EventTagsDeleteCall {
30440	c.ctx_ = ctx
30441	return c
30442}
30443
30444// Header returns an http.Header that can be modified by the caller to
30445// add HTTP headers to the request.
30446func (c *EventTagsDeleteCall) Header() http.Header {
30447	if c.header_ == nil {
30448		c.header_ = make(http.Header)
30449	}
30450	return c.header_
30451}
30452
30453func (c *EventTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
30454	reqHeaders := make(http.Header)
30455	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
30456	for k, v := range c.header_ {
30457		reqHeaders[k] = v
30458	}
30459	reqHeaders.Set("User-Agent", c.s.userAgent())
30460	var body io.Reader = nil
30461	c.urlParams_.Set("alt", alt)
30462	c.urlParams_.Set("prettyPrint", "false")
30463	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
30464	urls += "?" + c.urlParams_.Encode()
30465	req, err := http.NewRequest("DELETE", urls, body)
30466	if err != nil {
30467		return nil, err
30468	}
30469	req.Header = reqHeaders
30470	googleapi.Expand(req.URL, map[string]string{
30471		"profileId": strconv.FormatInt(c.profileId, 10),
30472		"id":        strconv.FormatInt(c.id, 10),
30473	})
30474	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30475}
30476
30477// Do executes the "dfareporting.eventTags.delete" call.
30478func (c *EventTagsDeleteCall) Do(opts ...googleapi.CallOption) error {
30479	gensupport.SetOptions(c.urlParams_, opts...)
30480	res, err := c.doRequest("json")
30481	if err != nil {
30482		return err
30483	}
30484	defer googleapi.CloseBody(res)
30485	if err := googleapi.CheckResponse(res); err != nil {
30486		return err
30487	}
30488	return nil
30489	// {
30490	//   "description": "Deletes an existing event tag.",
30491	//   "httpMethod": "DELETE",
30492	//   "id": "dfareporting.eventTags.delete",
30493	//   "parameterOrder": [
30494	//     "profileId",
30495	//     "id"
30496	//   ],
30497	//   "parameters": {
30498	//     "id": {
30499	//       "description": "Event tag ID.",
30500	//       "format": "int64",
30501	//       "location": "path",
30502	//       "required": true,
30503	//       "type": "string"
30504	//     },
30505	//     "profileId": {
30506	//       "description": "User profile ID associated with this request.",
30507	//       "format": "int64",
30508	//       "location": "path",
30509	//       "required": true,
30510	//       "type": "string"
30511	//     }
30512	//   },
30513	//   "path": "userprofiles/{profileId}/eventTags/{id}",
30514	//   "scopes": [
30515	//     "https://www.googleapis.com/auth/dfatrafficking"
30516	//   ]
30517	// }
30518
30519}
30520
30521// method id "dfareporting.eventTags.get":
30522
30523type EventTagsGetCall struct {
30524	s            *Service
30525	profileId    int64
30526	id           int64
30527	urlParams_   gensupport.URLParams
30528	ifNoneMatch_ string
30529	ctx_         context.Context
30530	header_      http.Header
30531}
30532
30533// Get: Gets one event tag by ID.
30534func (r *EventTagsService) Get(profileId int64, id int64) *EventTagsGetCall {
30535	c := &EventTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30536	c.profileId = profileId
30537	c.id = id
30538	return c
30539}
30540
30541// Fields allows partial responses to be retrieved. See
30542// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30543// for more information.
30544func (c *EventTagsGetCall) Fields(s ...googleapi.Field) *EventTagsGetCall {
30545	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30546	return c
30547}
30548
30549// IfNoneMatch sets the optional parameter which makes the operation
30550// fail if the object's ETag matches the given value. This is useful for
30551// getting updates only after the object has changed since the last
30552// request. Use googleapi.IsNotModified to check whether the response
30553// error from Do is the result of In-None-Match.
30554func (c *EventTagsGetCall) IfNoneMatch(entityTag string) *EventTagsGetCall {
30555	c.ifNoneMatch_ = entityTag
30556	return c
30557}
30558
30559// Context sets the context to be used in this call's Do method. Any
30560// pending HTTP request will be aborted if the provided context is
30561// canceled.
30562func (c *EventTagsGetCall) Context(ctx context.Context) *EventTagsGetCall {
30563	c.ctx_ = ctx
30564	return c
30565}
30566
30567// Header returns an http.Header that can be modified by the caller to
30568// add HTTP headers to the request.
30569func (c *EventTagsGetCall) Header() http.Header {
30570	if c.header_ == nil {
30571		c.header_ = make(http.Header)
30572	}
30573	return c.header_
30574}
30575
30576func (c *EventTagsGetCall) doRequest(alt string) (*http.Response, error) {
30577	reqHeaders := make(http.Header)
30578	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
30579	for k, v := range c.header_ {
30580		reqHeaders[k] = v
30581	}
30582	reqHeaders.Set("User-Agent", c.s.userAgent())
30583	if c.ifNoneMatch_ != "" {
30584		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30585	}
30586	var body io.Reader = nil
30587	c.urlParams_.Set("alt", alt)
30588	c.urlParams_.Set("prettyPrint", "false")
30589	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
30590	urls += "?" + c.urlParams_.Encode()
30591	req, err := http.NewRequest("GET", urls, body)
30592	if err != nil {
30593		return nil, err
30594	}
30595	req.Header = reqHeaders
30596	googleapi.Expand(req.URL, map[string]string{
30597		"profileId": strconv.FormatInt(c.profileId, 10),
30598		"id":        strconv.FormatInt(c.id, 10),
30599	})
30600	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30601}
30602
30603// Do executes the "dfareporting.eventTags.get" call.
30604// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
30605// code is an error. Response headers are in either
30606// *EventTag.ServerResponse.Header or (if a response was returned at
30607// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30608// to check whether the returned error was because
30609// http.StatusNotModified was returned.
30610func (c *EventTagsGetCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
30611	gensupport.SetOptions(c.urlParams_, opts...)
30612	res, err := c.doRequest("json")
30613	if res != nil && res.StatusCode == http.StatusNotModified {
30614		if res.Body != nil {
30615			res.Body.Close()
30616		}
30617		return nil, &googleapi.Error{
30618			Code:   res.StatusCode,
30619			Header: res.Header,
30620		}
30621	}
30622	if err != nil {
30623		return nil, err
30624	}
30625	defer googleapi.CloseBody(res)
30626	if err := googleapi.CheckResponse(res); err != nil {
30627		return nil, err
30628	}
30629	ret := &EventTag{
30630		ServerResponse: googleapi.ServerResponse{
30631			Header:         res.Header,
30632			HTTPStatusCode: res.StatusCode,
30633		},
30634	}
30635	target := &ret
30636	if err := gensupport.DecodeResponse(target, res); err != nil {
30637		return nil, err
30638	}
30639	return ret, nil
30640	// {
30641	//   "description": "Gets one event tag by ID.",
30642	//   "httpMethod": "GET",
30643	//   "id": "dfareporting.eventTags.get",
30644	//   "parameterOrder": [
30645	//     "profileId",
30646	//     "id"
30647	//   ],
30648	//   "parameters": {
30649	//     "id": {
30650	//       "description": "Event tag ID.",
30651	//       "format": "int64",
30652	//       "location": "path",
30653	//       "required": true,
30654	//       "type": "string"
30655	//     },
30656	//     "profileId": {
30657	//       "description": "User profile ID associated with this request.",
30658	//       "format": "int64",
30659	//       "location": "path",
30660	//       "required": true,
30661	//       "type": "string"
30662	//     }
30663	//   },
30664	//   "path": "userprofiles/{profileId}/eventTags/{id}",
30665	//   "response": {
30666	//     "$ref": "EventTag"
30667	//   },
30668	//   "scopes": [
30669	//     "https://www.googleapis.com/auth/dfatrafficking"
30670	//   ]
30671	// }
30672
30673}
30674
30675// method id "dfareporting.eventTags.insert":
30676
30677type EventTagsInsertCall struct {
30678	s          *Service
30679	profileId  int64
30680	eventtag   *EventTag
30681	urlParams_ gensupport.URLParams
30682	ctx_       context.Context
30683	header_    http.Header
30684}
30685
30686// Insert: Inserts a new event tag.
30687func (r *EventTagsService) Insert(profileId int64, eventtag *EventTag) *EventTagsInsertCall {
30688	c := &EventTagsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30689	c.profileId = profileId
30690	c.eventtag = eventtag
30691	return c
30692}
30693
30694// Fields allows partial responses to be retrieved. See
30695// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30696// for more information.
30697func (c *EventTagsInsertCall) Fields(s ...googleapi.Field) *EventTagsInsertCall {
30698	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30699	return c
30700}
30701
30702// Context sets the context to be used in this call's Do method. Any
30703// pending HTTP request will be aborted if the provided context is
30704// canceled.
30705func (c *EventTagsInsertCall) Context(ctx context.Context) *EventTagsInsertCall {
30706	c.ctx_ = ctx
30707	return c
30708}
30709
30710// Header returns an http.Header that can be modified by the caller to
30711// add HTTP headers to the request.
30712func (c *EventTagsInsertCall) Header() http.Header {
30713	if c.header_ == nil {
30714		c.header_ = make(http.Header)
30715	}
30716	return c.header_
30717}
30718
30719func (c *EventTagsInsertCall) doRequest(alt string) (*http.Response, error) {
30720	reqHeaders := make(http.Header)
30721	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
30722	for k, v := range c.header_ {
30723		reqHeaders[k] = v
30724	}
30725	reqHeaders.Set("User-Agent", c.s.userAgent())
30726	var body io.Reader = nil
30727	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
30728	if err != nil {
30729		return nil, err
30730	}
30731	reqHeaders.Set("Content-Type", "application/json")
30732	c.urlParams_.Set("alt", alt)
30733	c.urlParams_.Set("prettyPrint", "false")
30734	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
30735	urls += "?" + c.urlParams_.Encode()
30736	req, err := http.NewRequest("POST", urls, body)
30737	if err != nil {
30738		return nil, err
30739	}
30740	req.Header = reqHeaders
30741	googleapi.Expand(req.URL, map[string]string{
30742		"profileId": strconv.FormatInt(c.profileId, 10),
30743	})
30744	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30745}
30746
30747// Do executes the "dfareporting.eventTags.insert" call.
30748// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
30749// code is an error. Response headers are in either
30750// *EventTag.ServerResponse.Header or (if a response was returned at
30751// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30752// to check whether the returned error was because
30753// http.StatusNotModified was returned.
30754func (c *EventTagsInsertCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
30755	gensupport.SetOptions(c.urlParams_, opts...)
30756	res, err := c.doRequest("json")
30757	if res != nil && res.StatusCode == http.StatusNotModified {
30758		if res.Body != nil {
30759			res.Body.Close()
30760		}
30761		return nil, &googleapi.Error{
30762			Code:   res.StatusCode,
30763			Header: res.Header,
30764		}
30765	}
30766	if err != nil {
30767		return nil, err
30768	}
30769	defer googleapi.CloseBody(res)
30770	if err := googleapi.CheckResponse(res); err != nil {
30771		return nil, err
30772	}
30773	ret := &EventTag{
30774		ServerResponse: googleapi.ServerResponse{
30775			Header:         res.Header,
30776			HTTPStatusCode: res.StatusCode,
30777		},
30778	}
30779	target := &ret
30780	if err := gensupport.DecodeResponse(target, res); err != nil {
30781		return nil, err
30782	}
30783	return ret, nil
30784	// {
30785	//   "description": "Inserts a new event tag.",
30786	//   "httpMethod": "POST",
30787	//   "id": "dfareporting.eventTags.insert",
30788	//   "parameterOrder": [
30789	//     "profileId"
30790	//   ],
30791	//   "parameters": {
30792	//     "profileId": {
30793	//       "description": "User profile ID associated with this request.",
30794	//       "format": "int64",
30795	//       "location": "path",
30796	//       "required": true,
30797	//       "type": "string"
30798	//     }
30799	//   },
30800	//   "path": "userprofiles/{profileId}/eventTags",
30801	//   "request": {
30802	//     "$ref": "EventTag"
30803	//   },
30804	//   "response": {
30805	//     "$ref": "EventTag"
30806	//   },
30807	//   "scopes": [
30808	//     "https://www.googleapis.com/auth/dfatrafficking"
30809	//   ]
30810	// }
30811
30812}
30813
30814// method id "dfareporting.eventTags.list":
30815
30816type EventTagsListCall struct {
30817	s            *Service
30818	profileId    int64
30819	urlParams_   gensupport.URLParams
30820	ifNoneMatch_ string
30821	ctx_         context.Context
30822	header_      http.Header
30823}
30824
30825// List: Retrieves a list of event tags, possibly filtered.
30826func (r *EventTagsService) List(profileId int64) *EventTagsListCall {
30827	c := &EventTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30828	c.profileId = profileId
30829	return c
30830}
30831
30832// AdId sets the optional parameter "adId": Select only event tags that
30833// belong to this ad.
30834func (c *EventTagsListCall) AdId(adId int64) *EventTagsListCall {
30835	c.urlParams_.Set("adId", fmt.Sprint(adId))
30836	return c
30837}
30838
30839// AdvertiserId sets the optional parameter "advertiserId": Select only
30840// event tags that belong to this advertiser.
30841func (c *EventTagsListCall) AdvertiserId(advertiserId int64) *EventTagsListCall {
30842	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30843	return c
30844}
30845
30846// CampaignId sets the optional parameter "campaignId": Select only
30847// event tags that belong to this campaign.
30848func (c *EventTagsListCall) CampaignId(campaignId int64) *EventTagsListCall {
30849	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
30850	return c
30851}
30852
30853// DefinitionsOnly sets the optional parameter "definitionsOnly":
30854// Examine only the specified campaign or advertiser's event tags for
30855// matching selector criteria. When set to false, the parent advertiser
30856// and parent campaign of the specified ad or campaign is examined as
30857// well. In addition, when set to false, the status field is examined as
30858// well, along with the enabledByDefault field. This parameter can not
30859// be set to true when adId is specified as ads do not define their own
30860// even tags.
30861func (c *EventTagsListCall) DefinitionsOnly(definitionsOnly bool) *EventTagsListCall {
30862	c.urlParams_.Set("definitionsOnly", fmt.Sprint(definitionsOnly))
30863	return c
30864}
30865
30866// Enabled sets the optional parameter "enabled": Select only enabled
30867// event tags. What is considered enabled or disabled depends on the
30868// definitionsOnly parameter. When definitionsOnly is set to true, only
30869// the specified advertiser or campaign's event tags' enabledByDefault
30870// field is examined. When definitionsOnly is set to false, the
30871// specified ad or specified campaign's parent advertiser's or parent
30872// campaign's event tags' enabledByDefault and status fields are
30873// examined as well.
30874func (c *EventTagsListCall) Enabled(enabled bool) *EventTagsListCall {
30875	c.urlParams_.Set("enabled", fmt.Sprint(enabled))
30876	return c
30877}
30878
30879// EventTagTypes sets the optional parameter "eventTagTypes": Select
30880// only event tags with the specified event tag types. Event tag types
30881// can be used to specify whether to use a third-party pixel, a
30882// third-party JavaScript URL, or a third-party click-through URL for
30883// either impression or click tracking.
30884//
30885// Possible values:
30886//   "CLICK_THROUGH_EVENT_TAG"
30887//   "IMPRESSION_IMAGE_EVENT_TAG"
30888//   "IMPRESSION_JAVASCRIPT_EVENT_TAG"
30889func (c *EventTagsListCall) EventTagTypes(eventTagTypes ...string) *EventTagsListCall {
30890	c.urlParams_.SetMulti("eventTagTypes", append([]string{}, eventTagTypes...))
30891	return c
30892}
30893
30894// Ids sets the optional parameter "ids": Select only event tags with
30895// these IDs.
30896func (c *EventTagsListCall) Ids(ids ...int64) *EventTagsListCall {
30897	var ids_ []string
30898	for _, v := range ids {
30899		ids_ = append(ids_, fmt.Sprint(v))
30900	}
30901	c.urlParams_.SetMulti("ids", ids_)
30902	return c
30903}
30904
30905// SearchString sets the optional parameter "searchString": Allows
30906// searching for objects by name or ID. Wildcards (*) are allowed. For
30907// example, "eventtag*2015" will return objects with names like
30908// "eventtag June 2015", "eventtag April 2015", or simply "eventtag
30909// 2015". Most of the searches also add wildcards implicitly at the
30910// start and the end of the search string. For example, a search string
30911// of "eventtag" will match objects with name "my eventtag", "eventtag
30912// 2015", or simply "eventtag".
30913func (c *EventTagsListCall) SearchString(searchString string) *EventTagsListCall {
30914	c.urlParams_.Set("searchString", searchString)
30915	return c
30916}
30917
30918// SortField sets the optional parameter "sortField": Field by which to
30919// sort the list.
30920//
30921// Possible values:
30922//   "ID" (default)
30923//   "NAME"
30924func (c *EventTagsListCall) SortField(sortField string) *EventTagsListCall {
30925	c.urlParams_.Set("sortField", sortField)
30926	return c
30927}
30928
30929// SortOrder sets the optional parameter "sortOrder": Order of sorted
30930// results.
30931//
30932// Possible values:
30933//   "ASCENDING" (default)
30934//   "DESCENDING"
30935func (c *EventTagsListCall) SortOrder(sortOrder string) *EventTagsListCall {
30936	c.urlParams_.Set("sortOrder", sortOrder)
30937	return c
30938}
30939
30940// Fields allows partial responses to be retrieved. See
30941// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30942// for more information.
30943func (c *EventTagsListCall) Fields(s ...googleapi.Field) *EventTagsListCall {
30944	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30945	return c
30946}
30947
30948// IfNoneMatch sets the optional parameter which makes the operation
30949// fail if the object's ETag matches the given value. This is useful for
30950// getting updates only after the object has changed since the last
30951// request. Use googleapi.IsNotModified to check whether the response
30952// error from Do is the result of In-None-Match.
30953func (c *EventTagsListCall) IfNoneMatch(entityTag string) *EventTagsListCall {
30954	c.ifNoneMatch_ = entityTag
30955	return c
30956}
30957
30958// Context sets the context to be used in this call's Do method. Any
30959// pending HTTP request will be aborted if the provided context is
30960// canceled.
30961func (c *EventTagsListCall) Context(ctx context.Context) *EventTagsListCall {
30962	c.ctx_ = ctx
30963	return c
30964}
30965
30966// Header returns an http.Header that can be modified by the caller to
30967// add HTTP headers to the request.
30968func (c *EventTagsListCall) Header() http.Header {
30969	if c.header_ == nil {
30970		c.header_ = make(http.Header)
30971	}
30972	return c.header_
30973}
30974
30975func (c *EventTagsListCall) doRequest(alt string) (*http.Response, error) {
30976	reqHeaders := make(http.Header)
30977	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
30978	for k, v := range c.header_ {
30979		reqHeaders[k] = v
30980	}
30981	reqHeaders.Set("User-Agent", c.s.userAgent())
30982	if c.ifNoneMatch_ != "" {
30983		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30984	}
30985	var body io.Reader = nil
30986	c.urlParams_.Set("alt", alt)
30987	c.urlParams_.Set("prettyPrint", "false")
30988	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
30989	urls += "?" + c.urlParams_.Encode()
30990	req, err := http.NewRequest("GET", urls, body)
30991	if err != nil {
30992		return nil, err
30993	}
30994	req.Header = reqHeaders
30995	googleapi.Expand(req.URL, map[string]string{
30996		"profileId": strconv.FormatInt(c.profileId, 10),
30997	})
30998	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30999}
31000
31001// Do executes the "dfareporting.eventTags.list" call.
31002// Exactly one of *EventTagsListResponse or error will be non-nil. Any
31003// non-2xx status code is an error. Response headers are in either
31004// *EventTagsListResponse.ServerResponse.Header or (if a response was
31005// returned at all) in error.(*googleapi.Error).Header. Use
31006// googleapi.IsNotModified to check whether the returned error was
31007// because http.StatusNotModified was returned.
31008func (c *EventTagsListCall) Do(opts ...googleapi.CallOption) (*EventTagsListResponse, error) {
31009	gensupport.SetOptions(c.urlParams_, opts...)
31010	res, err := c.doRequest("json")
31011	if res != nil && res.StatusCode == http.StatusNotModified {
31012		if res.Body != nil {
31013			res.Body.Close()
31014		}
31015		return nil, &googleapi.Error{
31016			Code:   res.StatusCode,
31017			Header: res.Header,
31018		}
31019	}
31020	if err != nil {
31021		return nil, err
31022	}
31023	defer googleapi.CloseBody(res)
31024	if err := googleapi.CheckResponse(res); err != nil {
31025		return nil, err
31026	}
31027	ret := &EventTagsListResponse{
31028		ServerResponse: googleapi.ServerResponse{
31029			Header:         res.Header,
31030			HTTPStatusCode: res.StatusCode,
31031		},
31032	}
31033	target := &ret
31034	if err := gensupport.DecodeResponse(target, res); err != nil {
31035		return nil, err
31036	}
31037	return ret, nil
31038	// {
31039	//   "description": "Retrieves a list of event tags, possibly filtered.",
31040	//   "httpMethod": "GET",
31041	//   "id": "dfareporting.eventTags.list",
31042	//   "parameterOrder": [
31043	//     "profileId"
31044	//   ],
31045	//   "parameters": {
31046	//     "adId": {
31047	//       "description": "Select only event tags that belong to this ad.",
31048	//       "format": "int64",
31049	//       "location": "query",
31050	//       "type": "string"
31051	//     },
31052	//     "advertiserId": {
31053	//       "description": "Select only event tags that belong to this advertiser.",
31054	//       "format": "int64",
31055	//       "location": "query",
31056	//       "type": "string"
31057	//     },
31058	//     "campaignId": {
31059	//       "description": "Select only event tags that belong to this campaign.",
31060	//       "format": "int64",
31061	//       "location": "query",
31062	//       "type": "string"
31063	//     },
31064	//     "definitionsOnly": {
31065	//       "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.",
31066	//       "location": "query",
31067	//       "type": "boolean"
31068	//     },
31069	//     "enabled": {
31070	//       "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.",
31071	//       "location": "query",
31072	//       "type": "boolean"
31073	//     },
31074	//     "eventTagTypes": {
31075	//       "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.",
31076	//       "enum": [
31077	//         "CLICK_THROUGH_EVENT_TAG",
31078	//         "IMPRESSION_IMAGE_EVENT_TAG",
31079	//         "IMPRESSION_JAVASCRIPT_EVENT_TAG"
31080	//       ],
31081	//       "enumDescriptions": [
31082	//         "",
31083	//         "",
31084	//         ""
31085	//       ],
31086	//       "location": "query",
31087	//       "repeated": true,
31088	//       "type": "string"
31089	//     },
31090	//     "ids": {
31091	//       "description": "Select only event tags with these IDs.",
31092	//       "format": "int64",
31093	//       "location": "query",
31094	//       "repeated": true,
31095	//       "type": "string"
31096	//     },
31097	//     "profileId": {
31098	//       "description": "User profile ID associated with this request.",
31099	//       "format": "int64",
31100	//       "location": "path",
31101	//       "required": true,
31102	//       "type": "string"
31103	//     },
31104	//     "searchString": {
31105	//       "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\".",
31106	//       "location": "query",
31107	//       "type": "string"
31108	//     },
31109	//     "sortField": {
31110	//       "default": "ID",
31111	//       "description": "Field by which to sort the list.",
31112	//       "enum": [
31113	//         "ID",
31114	//         "NAME"
31115	//       ],
31116	//       "enumDescriptions": [
31117	//         "",
31118	//         ""
31119	//       ],
31120	//       "location": "query",
31121	//       "type": "string"
31122	//     },
31123	//     "sortOrder": {
31124	//       "default": "ASCENDING",
31125	//       "description": "Order of sorted results.",
31126	//       "enum": [
31127	//         "ASCENDING",
31128	//         "DESCENDING"
31129	//       ],
31130	//       "enumDescriptions": [
31131	//         "",
31132	//         ""
31133	//       ],
31134	//       "location": "query",
31135	//       "type": "string"
31136	//     }
31137	//   },
31138	//   "path": "userprofiles/{profileId}/eventTags",
31139	//   "response": {
31140	//     "$ref": "EventTagsListResponse"
31141	//   },
31142	//   "scopes": [
31143	//     "https://www.googleapis.com/auth/dfatrafficking"
31144	//   ]
31145	// }
31146
31147}
31148
31149// method id "dfareporting.eventTags.patch":
31150
31151type EventTagsPatchCall struct {
31152	s          *Service
31153	profileId  int64
31154	eventtag   *EventTag
31155	urlParams_ gensupport.URLParams
31156	ctx_       context.Context
31157	header_    http.Header
31158}
31159
31160// Patch: Updates an existing event tag. This method supports patch
31161// semantics.
31162func (r *EventTagsService) Patch(profileId int64, id int64, eventtag *EventTag) *EventTagsPatchCall {
31163	c := &EventTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31164	c.profileId = profileId
31165	c.urlParams_.Set("id", fmt.Sprint(id))
31166	c.eventtag = eventtag
31167	return c
31168}
31169
31170// Fields allows partial responses to be retrieved. See
31171// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31172// for more information.
31173func (c *EventTagsPatchCall) Fields(s ...googleapi.Field) *EventTagsPatchCall {
31174	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31175	return c
31176}
31177
31178// Context sets the context to be used in this call's Do method. Any
31179// pending HTTP request will be aborted if the provided context is
31180// canceled.
31181func (c *EventTagsPatchCall) Context(ctx context.Context) *EventTagsPatchCall {
31182	c.ctx_ = ctx
31183	return c
31184}
31185
31186// Header returns an http.Header that can be modified by the caller to
31187// add HTTP headers to the request.
31188func (c *EventTagsPatchCall) Header() http.Header {
31189	if c.header_ == nil {
31190		c.header_ = make(http.Header)
31191	}
31192	return c.header_
31193}
31194
31195func (c *EventTagsPatchCall) doRequest(alt string) (*http.Response, error) {
31196	reqHeaders := make(http.Header)
31197	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
31198	for k, v := range c.header_ {
31199		reqHeaders[k] = v
31200	}
31201	reqHeaders.Set("User-Agent", c.s.userAgent())
31202	var body io.Reader = nil
31203	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
31204	if err != nil {
31205		return nil, err
31206	}
31207	reqHeaders.Set("Content-Type", "application/json")
31208	c.urlParams_.Set("alt", alt)
31209	c.urlParams_.Set("prettyPrint", "false")
31210	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31211	urls += "?" + c.urlParams_.Encode()
31212	req, err := http.NewRequest("PATCH", urls, body)
31213	if err != nil {
31214		return nil, err
31215	}
31216	req.Header = reqHeaders
31217	googleapi.Expand(req.URL, map[string]string{
31218		"profileId": strconv.FormatInt(c.profileId, 10),
31219	})
31220	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31221}
31222
31223// Do executes the "dfareporting.eventTags.patch" call.
31224// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
31225// code is an error. Response headers are in either
31226// *EventTag.ServerResponse.Header or (if a response was returned at
31227// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31228// to check whether the returned error was because
31229// http.StatusNotModified was returned.
31230func (c *EventTagsPatchCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
31231	gensupport.SetOptions(c.urlParams_, opts...)
31232	res, err := c.doRequest("json")
31233	if res != nil && res.StatusCode == http.StatusNotModified {
31234		if res.Body != nil {
31235			res.Body.Close()
31236		}
31237		return nil, &googleapi.Error{
31238			Code:   res.StatusCode,
31239			Header: res.Header,
31240		}
31241	}
31242	if err != nil {
31243		return nil, err
31244	}
31245	defer googleapi.CloseBody(res)
31246	if err := googleapi.CheckResponse(res); err != nil {
31247		return nil, err
31248	}
31249	ret := &EventTag{
31250		ServerResponse: googleapi.ServerResponse{
31251			Header:         res.Header,
31252			HTTPStatusCode: res.StatusCode,
31253		},
31254	}
31255	target := &ret
31256	if err := gensupport.DecodeResponse(target, res); err != nil {
31257		return nil, err
31258	}
31259	return ret, nil
31260	// {
31261	//   "description": "Updates an existing event tag. This method supports patch semantics.",
31262	//   "httpMethod": "PATCH",
31263	//   "id": "dfareporting.eventTags.patch",
31264	//   "parameterOrder": [
31265	//     "profileId",
31266	//     "id"
31267	//   ],
31268	//   "parameters": {
31269	//     "id": {
31270	//       "description": "Event tag ID.",
31271	//       "format": "int64",
31272	//       "location": "query",
31273	//       "required": true,
31274	//       "type": "string"
31275	//     },
31276	//     "profileId": {
31277	//       "description": "User profile ID associated with this request.",
31278	//       "format": "int64",
31279	//       "location": "path",
31280	//       "required": true,
31281	//       "type": "string"
31282	//     }
31283	//   },
31284	//   "path": "userprofiles/{profileId}/eventTags",
31285	//   "request": {
31286	//     "$ref": "EventTag"
31287	//   },
31288	//   "response": {
31289	//     "$ref": "EventTag"
31290	//   },
31291	//   "scopes": [
31292	//     "https://www.googleapis.com/auth/dfatrafficking"
31293	//   ]
31294	// }
31295
31296}
31297
31298// method id "dfareporting.eventTags.update":
31299
31300type EventTagsUpdateCall struct {
31301	s          *Service
31302	profileId  int64
31303	eventtag   *EventTag
31304	urlParams_ gensupport.URLParams
31305	ctx_       context.Context
31306	header_    http.Header
31307}
31308
31309// Update: Updates an existing event tag.
31310func (r *EventTagsService) Update(profileId int64, eventtag *EventTag) *EventTagsUpdateCall {
31311	c := &EventTagsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31312	c.profileId = profileId
31313	c.eventtag = eventtag
31314	return c
31315}
31316
31317// Fields allows partial responses to be retrieved. See
31318// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31319// for more information.
31320func (c *EventTagsUpdateCall) Fields(s ...googleapi.Field) *EventTagsUpdateCall {
31321	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31322	return c
31323}
31324
31325// Context sets the context to be used in this call's Do method. Any
31326// pending HTTP request will be aborted if the provided context is
31327// canceled.
31328func (c *EventTagsUpdateCall) Context(ctx context.Context) *EventTagsUpdateCall {
31329	c.ctx_ = ctx
31330	return c
31331}
31332
31333// Header returns an http.Header that can be modified by the caller to
31334// add HTTP headers to the request.
31335func (c *EventTagsUpdateCall) Header() http.Header {
31336	if c.header_ == nil {
31337		c.header_ = make(http.Header)
31338	}
31339	return c.header_
31340}
31341
31342func (c *EventTagsUpdateCall) doRequest(alt string) (*http.Response, error) {
31343	reqHeaders := make(http.Header)
31344	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
31345	for k, v := range c.header_ {
31346		reqHeaders[k] = v
31347	}
31348	reqHeaders.Set("User-Agent", c.s.userAgent())
31349	var body io.Reader = nil
31350	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
31351	if err != nil {
31352		return nil, err
31353	}
31354	reqHeaders.Set("Content-Type", "application/json")
31355	c.urlParams_.Set("alt", alt)
31356	c.urlParams_.Set("prettyPrint", "false")
31357	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31358	urls += "?" + c.urlParams_.Encode()
31359	req, err := http.NewRequest("PUT", urls, body)
31360	if err != nil {
31361		return nil, err
31362	}
31363	req.Header = reqHeaders
31364	googleapi.Expand(req.URL, map[string]string{
31365		"profileId": strconv.FormatInt(c.profileId, 10),
31366	})
31367	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31368}
31369
31370// Do executes the "dfareporting.eventTags.update" call.
31371// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
31372// code is an error. Response headers are in either
31373// *EventTag.ServerResponse.Header or (if a response was returned at
31374// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31375// to check whether the returned error was because
31376// http.StatusNotModified was returned.
31377func (c *EventTagsUpdateCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
31378	gensupport.SetOptions(c.urlParams_, opts...)
31379	res, err := c.doRequest("json")
31380	if res != nil && res.StatusCode == http.StatusNotModified {
31381		if res.Body != nil {
31382			res.Body.Close()
31383		}
31384		return nil, &googleapi.Error{
31385			Code:   res.StatusCode,
31386			Header: res.Header,
31387		}
31388	}
31389	if err != nil {
31390		return nil, err
31391	}
31392	defer googleapi.CloseBody(res)
31393	if err := googleapi.CheckResponse(res); err != nil {
31394		return nil, err
31395	}
31396	ret := &EventTag{
31397		ServerResponse: googleapi.ServerResponse{
31398			Header:         res.Header,
31399			HTTPStatusCode: res.StatusCode,
31400		},
31401	}
31402	target := &ret
31403	if err := gensupport.DecodeResponse(target, res); err != nil {
31404		return nil, err
31405	}
31406	return ret, nil
31407	// {
31408	//   "description": "Updates an existing event tag.",
31409	//   "httpMethod": "PUT",
31410	//   "id": "dfareporting.eventTags.update",
31411	//   "parameterOrder": [
31412	//     "profileId"
31413	//   ],
31414	//   "parameters": {
31415	//     "profileId": {
31416	//       "description": "User profile ID associated with this request.",
31417	//       "format": "int64",
31418	//       "location": "path",
31419	//       "required": true,
31420	//       "type": "string"
31421	//     }
31422	//   },
31423	//   "path": "userprofiles/{profileId}/eventTags",
31424	//   "request": {
31425	//     "$ref": "EventTag"
31426	//   },
31427	//   "response": {
31428	//     "$ref": "EventTag"
31429	//   },
31430	//   "scopes": [
31431	//     "https://www.googleapis.com/auth/dfatrafficking"
31432	//   ]
31433	// }
31434
31435}
31436
31437// method id "dfareporting.files.get":
31438
31439type FilesGetCall struct {
31440	s            *Service
31441	reportId     int64
31442	fileId       int64
31443	urlParams_   gensupport.URLParams
31444	ifNoneMatch_ string
31445	ctx_         context.Context
31446	header_      http.Header
31447}
31448
31449// Get: Retrieves a report file by its report ID and file ID. This
31450// method supports media download.
31451func (r *FilesService) Get(reportId int64, fileId int64) *FilesGetCall {
31452	c := &FilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31453	c.reportId = reportId
31454	c.fileId = fileId
31455	return c
31456}
31457
31458// Fields allows partial responses to be retrieved. See
31459// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31460// for more information.
31461func (c *FilesGetCall) Fields(s ...googleapi.Field) *FilesGetCall {
31462	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31463	return c
31464}
31465
31466// IfNoneMatch sets the optional parameter which makes the operation
31467// fail if the object's ETag matches the given value. This is useful for
31468// getting updates only after the object has changed since the last
31469// request. Use googleapi.IsNotModified to check whether the response
31470// error from Do is the result of In-None-Match.
31471func (c *FilesGetCall) IfNoneMatch(entityTag string) *FilesGetCall {
31472	c.ifNoneMatch_ = entityTag
31473	return c
31474}
31475
31476// Context sets the context to be used in this call's Do and Download
31477// methods. Any pending HTTP request will be aborted if the provided
31478// context is canceled.
31479func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
31480	c.ctx_ = ctx
31481	return c
31482}
31483
31484// Header returns an http.Header that can be modified by the caller to
31485// add HTTP headers to the request.
31486func (c *FilesGetCall) Header() http.Header {
31487	if c.header_ == nil {
31488		c.header_ = make(http.Header)
31489	}
31490	return c.header_
31491}
31492
31493func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
31494	reqHeaders := make(http.Header)
31495	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
31496	for k, v := range c.header_ {
31497		reqHeaders[k] = v
31498	}
31499	reqHeaders.Set("User-Agent", c.s.userAgent())
31500	if c.ifNoneMatch_ != "" {
31501		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31502	}
31503	var body io.Reader = nil
31504	c.urlParams_.Set("alt", alt)
31505	c.urlParams_.Set("prettyPrint", "false")
31506	urls := googleapi.ResolveRelative(c.s.BasePath, "reports/{reportId}/files/{fileId}")
31507	urls += "?" + c.urlParams_.Encode()
31508	req, err := http.NewRequest("GET", urls, body)
31509	if err != nil {
31510		return nil, err
31511	}
31512	req.Header = reqHeaders
31513	googleapi.Expand(req.URL, map[string]string{
31514		"reportId": strconv.FormatInt(c.reportId, 10),
31515		"fileId":   strconv.FormatInt(c.fileId, 10),
31516	})
31517	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31518}
31519
31520// Download fetches the API endpoint's "media" value, instead of the normal
31521// API response value. If the returned error is nil, the Response is guaranteed to
31522// have a 2xx status code. Callers must close the Response.Body as usual.
31523func (c *FilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
31524	gensupport.SetOptions(c.urlParams_, opts...)
31525	res, err := c.doRequest("media")
31526	if err != nil {
31527		return nil, err
31528	}
31529	if err := googleapi.CheckMediaResponse(res); err != nil {
31530		res.Body.Close()
31531		return nil, err
31532	}
31533	return res, nil
31534}
31535
31536// Do executes the "dfareporting.files.get" call.
31537// Exactly one of *File or error will be non-nil. Any non-2xx status
31538// code is an error. Response headers are in either
31539// *File.ServerResponse.Header or (if a response was returned at all) in
31540// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
31541// whether the returned error was because http.StatusNotModified was
31542// returned.
31543func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
31544	gensupport.SetOptions(c.urlParams_, opts...)
31545	res, err := c.doRequest("json")
31546	if res != nil && res.StatusCode == http.StatusNotModified {
31547		if res.Body != nil {
31548			res.Body.Close()
31549		}
31550		return nil, &googleapi.Error{
31551			Code:   res.StatusCode,
31552			Header: res.Header,
31553		}
31554	}
31555	if err != nil {
31556		return nil, err
31557	}
31558	defer googleapi.CloseBody(res)
31559	if err := googleapi.CheckResponse(res); err != nil {
31560		return nil, err
31561	}
31562	ret := &File{
31563		ServerResponse: googleapi.ServerResponse{
31564			Header:         res.Header,
31565			HTTPStatusCode: res.StatusCode,
31566		},
31567	}
31568	target := &ret
31569	if err := gensupport.DecodeResponse(target, res); err != nil {
31570		return nil, err
31571	}
31572	return ret, nil
31573	// {
31574	//   "description": "Retrieves a report file by its report ID and file ID. This method supports media download.",
31575	//   "httpMethod": "GET",
31576	//   "id": "dfareporting.files.get",
31577	//   "parameterOrder": [
31578	//     "reportId",
31579	//     "fileId"
31580	//   ],
31581	//   "parameters": {
31582	//     "fileId": {
31583	//       "description": "The ID of the report file.",
31584	//       "format": "int64",
31585	//       "location": "path",
31586	//       "required": true,
31587	//       "type": "string"
31588	//     },
31589	//     "reportId": {
31590	//       "description": "The ID of the report.",
31591	//       "format": "int64",
31592	//       "location": "path",
31593	//       "required": true,
31594	//       "type": "string"
31595	//     }
31596	//   },
31597	//   "path": "reports/{reportId}/files/{fileId}",
31598	//   "response": {
31599	//     "$ref": "File"
31600	//   },
31601	//   "scopes": [
31602	//     "https://www.googleapis.com/auth/dfareporting"
31603	//   ],
31604	//   "supportsMediaDownload": true
31605	// }
31606
31607}
31608
31609// method id "dfareporting.files.list":
31610
31611type FilesListCall struct {
31612	s            *Service
31613	profileId    int64
31614	urlParams_   gensupport.URLParams
31615	ifNoneMatch_ string
31616	ctx_         context.Context
31617	header_      http.Header
31618}
31619
31620// List: Lists files for a user profile.
31621func (r *FilesService) List(profileId int64) *FilesListCall {
31622	c := &FilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31623	c.profileId = profileId
31624	return c
31625}
31626
31627// MaxResults sets the optional parameter "maxResults": Maximum number
31628// of results to return.
31629func (c *FilesListCall) MaxResults(maxResults int64) *FilesListCall {
31630	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
31631	return c
31632}
31633
31634// PageToken sets the optional parameter "pageToken": The value of the
31635// nextToken from the previous result page.
31636func (c *FilesListCall) PageToken(pageToken string) *FilesListCall {
31637	c.urlParams_.Set("pageToken", pageToken)
31638	return c
31639}
31640
31641// Scope sets the optional parameter "scope": The scope that defines
31642// which results are returned.
31643//
31644// Possible values:
31645//   "ALL" - All files in account.
31646//   "MINE" (default) - My files.
31647//   "SHARED_WITH_ME" - Files shared with me.
31648func (c *FilesListCall) Scope(scope string) *FilesListCall {
31649	c.urlParams_.Set("scope", scope)
31650	return c
31651}
31652
31653// SortField sets the optional parameter "sortField": The field by which
31654// to sort the list.
31655//
31656// Possible values:
31657//   "ID" - Sort by file ID.
31658//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastmodifiedAt' field.
31659func (c *FilesListCall) SortField(sortField string) *FilesListCall {
31660	c.urlParams_.Set("sortField", sortField)
31661	return c
31662}
31663
31664// SortOrder sets the optional parameter "sortOrder": Order of sorted
31665// results.
31666//
31667// Possible values:
31668//   "ASCENDING" - Ascending order.
31669//   "DESCENDING" (default) - Descending order.
31670func (c *FilesListCall) SortOrder(sortOrder string) *FilesListCall {
31671	c.urlParams_.Set("sortOrder", sortOrder)
31672	return c
31673}
31674
31675// Fields allows partial responses to be retrieved. See
31676// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31677// for more information.
31678func (c *FilesListCall) Fields(s ...googleapi.Field) *FilesListCall {
31679	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31680	return c
31681}
31682
31683// IfNoneMatch sets the optional parameter which makes the operation
31684// fail if the object's ETag matches the given value. This is useful for
31685// getting updates only after the object has changed since the last
31686// request. Use googleapi.IsNotModified to check whether the response
31687// error from Do is the result of In-None-Match.
31688func (c *FilesListCall) IfNoneMatch(entityTag string) *FilesListCall {
31689	c.ifNoneMatch_ = entityTag
31690	return c
31691}
31692
31693// Context sets the context to be used in this call's Do method. Any
31694// pending HTTP request will be aborted if the provided context is
31695// canceled.
31696func (c *FilesListCall) Context(ctx context.Context) *FilesListCall {
31697	c.ctx_ = ctx
31698	return c
31699}
31700
31701// Header returns an http.Header that can be modified by the caller to
31702// add HTTP headers to the request.
31703func (c *FilesListCall) Header() http.Header {
31704	if c.header_ == nil {
31705		c.header_ = make(http.Header)
31706	}
31707	return c.header_
31708}
31709
31710func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
31711	reqHeaders := make(http.Header)
31712	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
31713	for k, v := range c.header_ {
31714		reqHeaders[k] = v
31715	}
31716	reqHeaders.Set("User-Agent", c.s.userAgent())
31717	if c.ifNoneMatch_ != "" {
31718		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31719	}
31720	var body io.Reader = nil
31721	c.urlParams_.Set("alt", alt)
31722	c.urlParams_.Set("prettyPrint", "false")
31723	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/files")
31724	urls += "?" + c.urlParams_.Encode()
31725	req, err := http.NewRequest("GET", urls, body)
31726	if err != nil {
31727		return nil, err
31728	}
31729	req.Header = reqHeaders
31730	googleapi.Expand(req.URL, map[string]string{
31731		"profileId": strconv.FormatInt(c.profileId, 10),
31732	})
31733	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31734}
31735
31736// Do executes the "dfareporting.files.list" call.
31737// Exactly one of *FileList or error will be non-nil. Any non-2xx status
31738// code is an error. Response headers are in either
31739// *FileList.ServerResponse.Header or (if a response was returned at
31740// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31741// to check whether the returned error was because
31742// http.StatusNotModified was returned.
31743func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
31744	gensupport.SetOptions(c.urlParams_, opts...)
31745	res, err := c.doRequest("json")
31746	if res != nil && res.StatusCode == http.StatusNotModified {
31747		if res.Body != nil {
31748			res.Body.Close()
31749		}
31750		return nil, &googleapi.Error{
31751			Code:   res.StatusCode,
31752			Header: res.Header,
31753		}
31754	}
31755	if err != nil {
31756		return nil, err
31757	}
31758	defer googleapi.CloseBody(res)
31759	if err := googleapi.CheckResponse(res); err != nil {
31760		return nil, err
31761	}
31762	ret := &FileList{
31763		ServerResponse: googleapi.ServerResponse{
31764			Header:         res.Header,
31765			HTTPStatusCode: res.StatusCode,
31766		},
31767	}
31768	target := &ret
31769	if err := gensupport.DecodeResponse(target, res); err != nil {
31770		return nil, err
31771	}
31772	return ret, nil
31773	// {
31774	//   "description": "Lists files for a user profile.",
31775	//   "httpMethod": "GET",
31776	//   "id": "dfareporting.files.list",
31777	//   "parameterOrder": [
31778	//     "profileId"
31779	//   ],
31780	//   "parameters": {
31781	//     "maxResults": {
31782	//       "default": "10",
31783	//       "description": "Maximum number of results to return.",
31784	//       "format": "int32",
31785	//       "location": "query",
31786	//       "maximum": "10",
31787	//       "minimum": "0",
31788	//       "type": "integer"
31789	//     },
31790	//     "pageToken": {
31791	//       "description": "The value of the nextToken from the previous result page.",
31792	//       "location": "query",
31793	//       "type": "string"
31794	//     },
31795	//     "profileId": {
31796	//       "description": "The DFA profile ID.",
31797	//       "format": "int64",
31798	//       "location": "path",
31799	//       "required": true,
31800	//       "type": "string"
31801	//     },
31802	//     "scope": {
31803	//       "default": "MINE",
31804	//       "description": "The scope that defines which results are returned.",
31805	//       "enum": [
31806	//         "ALL",
31807	//         "MINE",
31808	//         "SHARED_WITH_ME"
31809	//       ],
31810	//       "enumDescriptions": [
31811	//         "All files in account.",
31812	//         "My files.",
31813	//         "Files shared with me."
31814	//       ],
31815	//       "location": "query",
31816	//       "type": "string"
31817	//     },
31818	//     "sortField": {
31819	//       "default": "LAST_MODIFIED_TIME",
31820	//       "description": "The field by which to sort the list.",
31821	//       "enum": [
31822	//         "ID",
31823	//         "LAST_MODIFIED_TIME"
31824	//       ],
31825	//       "enumDescriptions": [
31826	//         "Sort by file ID.",
31827	//         "Sort by 'lastmodifiedAt' field."
31828	//       ],
31829	//       "location": "query",
31830	//       "type": "string"
31831	//     },
31832	//     "sortOrder": {
31833	//       "default": "DESCENDING",
31834	//       "description": "Order of sorted results.",
31835	//       "enum": [
31836	//         "ASCENDING",
31837	//         "DESCENDING"
31838	//       ],
31839	//       "enumDescriptions": [
31840	//         "Ascending order.",
31841	//         "Descending order."
31842	//       ],
31843	//       "location": "query",
31844	//       "type": "string"
31845	//     }
31846	//   },
31847	//   "path": "userprofiles/{profileId}/files",
31848	//   "response": {
31849	//     "$ref": "FileList"
31850	//   },
31851	//   "scopes": [
31852	//     "https://www.googleapis.com/auth/dfareporting"
31853	//   ]
31854	// }
31855
31856}
31857
31858// Pages invokes f for each page of results.
31859// A non-nil error returned from f will halt the iteration.
31860// The provided context supersedes any context provided to the Context method.
31861func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
31862	c.ctx_ = ctx
31863	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
31864	for {
31865		x, err := c.Do()
31866		if err != nil {
31867			return err
31868		}
31869		if err := f(x); err != nil {
31870			return err
31871		}
31872		if x.NextPageToken == "" {
31873			return nil
31874		}
31875		c.PageToken(x.NextPageToken)
31876	}
31877}
31878
31879// method id "dfareporting.floodlightActivities.delete":
31880
31881type FloodlightActivitiesDeleteCall struct {
31882	s          *Service
31883	profileId  int64
31884	id         int64
31885	urlParams_ gensupport.URLParams
31886	ctx_       context.Context
31887	header_    http.Header
31888}
31889
31890// Delete: Deletes an existing floodlight activity.
31891func (r *FloodlightActivitiesService) Delete(profileId int64, id int64) *FloodlightActivitiesDeleteCall {
31892	c := &FloodlightActivitiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31893	c.profileId = profileId
31894	c.id = id
31895	return c
31896}
31897
31898// Fields allows partial responses to be retrieved. See
31899// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31900// for more information.
31901func (c *FloodlightActivitiesDeleteCall) Fields(s ...googleapi.Field) *FloodlightActivitiesDeleteCall {
31902	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31903	return c
31904}
31905
31906// Context sets the context to be used in this call's Do method. Any
31907// pending HTTP request will be aborted if the provided context is
31908// canceled.
31909func (c *FloodlightActivitiesDeleteCall) Context(ctx context.Context) *FloodlightActivitiesDeleteCall {
31910	c.ctx_ = ctx
31911	return c
31912}
31913
31914// Header returns an http.Header that can be modified by the caller to
31915// add HTTP headers to the request.
31916func (c *FloodlightActivitiesDeleteCall) Header() http.Header {
31917	if c.header_ == nil {
31918		c.header_ = make(http.Header)
31919	}
31920	return c.header_
31921}
31922
31923func (c *FloodlightActivitiesDeleteCall) doRequest(alt string) (*http.Response, error) {
31924	reqHeaders := make(http.Header)
31925	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
31926	for k, v := range c.header_ {
31927		reqHeaders[k] = v
31928	}
31929	reqHeaders.Set("User-Agent", c.s.userAgent())
31930	var body io.Reader = nil
31931	c.urlParams_.Set("alt", alt)
31932	c.urlParams_.Set("prettyPrint", "false")
31933	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
31934	urls += "?" + c.urlParams_.Encode()
31935	req, err := http.NewRequest("DELETE", urls, body)
31936	if err != nil {
31937		return nil, err
31938	}
31939	req.Header = reqHeaders
31940	googleapi.Expand(req.URL, map[string]string{
31941		"profileId": strconv.FormatInt(c.profileId, 10),
31942		"id":        strconv.FormatInt(c.id, 10),
31943	})
31944	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31945}
31946
31947// Do executes the "dfareporting.floodlightActivities.delete" call.
31948func (c *FloodlightActivitiesDeleteCall) Do(opts ...googleapi.CallOption) error {
31949	gensupport.SetOptions(c.urlParams_, opts...)
31950	res, err := c.doRequest("json")
31951	if err != nil {
31952		return err
31953	}
31954	defer googleapi.CloseBody(res)
31955	if err := googleapi.CheckResponse(res); err != nil {
31956		return err
31957	}
31958	return nil
31959	// {
31960	//   "description": "Deletes an existing floodlight activity.",
31961	//   "httpMethod": "DELETE",
31962	//   "id": "dfareporting.floodlightActivities.delete",
31963	//   "parameterOrder": [
31964	//     "profileId",
31965	//     "id"
31966	//   ],
31967	//   "parameters": {
31968	//     "id": {
31969	//       "description": "Floodlight activity ID.",
31970	//       "format": "int64",
31971	//       "location": "path",
31972	//       "required": true,
31973	//       "type": "string"
31974	//     },
31975	//     "profileId": {
31976	//       "description": "User profile ID associated with this request.",
31977	//       "format": "int64",
31978	//       "location": "path",
31979	//       "required": true,
31980	//       "type": "string"
31981	//     }
31982	//   },
31983	//   "path": "userprofiles/{profileId}/floodlightActivities/{id}",
31984	//   "scopes": [
31985	//     "https://www.googleapis.com/auth/dfatrafficking"
31986	//   ]
31987	// }
31988
31989}
31990
31991// method id "dfareporting.floodlightActivities.generatetag":
31992
31993type FloodlightActivitiesGeneratetagCall struct {
31994	s          *Service
31995	profileId  int64
31996	urlParams_ gensupport.URLParams
31997	ctx_       context.Context
31998	header_    http.Header
31999}
32000
32001// Generatetag: Generates a tag for a floodlight activity.
32002func (r *FloodlightActivitiesService) Generatetag(profileId int64) *FloodlightActivitiesGeneratetagCall {
32003	c := &FloodlightActivitiesGeneratetagCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32004	c.profileId = profileId
32005	return c
32006}
32007
32008// FloodlightActivityId sets the optional parameter
32009// "floodlightActivityId": Floodlight activity ID for which we want to
32010// generate a tag.
32011func (c *FloodlightActivitiesGeneratetagCall) FloodlightActivityId(floodlightActivityId int64) *FloodlightActivitiesGeneratetagCall {
32012	c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
32013	return c
32014}
32015
32016// Fields allows partial responses to be retrieved. See
32017// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32018// for more information.
32019func (c *FloodlightActivitiesGeneratetagCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGeneratetagCall {
32020	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32021	return c
32022}
32023
32024// Context sets the context to be used in this call's Do method. Any
32025// pending HTTP request will be aborted if the provided context is
32026// canceled.
32027func (c *FloodlightActivitiesGeneratetagCall) Context(ctx context.Context) *FloodlightActivitiesGeneratetagCall {
32028	c.ctx_ = ctx
32029	return c
32030}
32031
32032// Header returns an http.Header that can be modified by the caller to
32033// add HTTP headers to the request.
32034func (c *FloodlightActivitiesGeneratetagCall) Header() http.Header {
32035	if c.header_ == nil {
32036		c.header_ = make(http.Header)
32037	}
32038	return c.header_
32039}
32040
32041func (c *FloodlightActivitiesGeneratetagCall) doRequest(alt string) (*http.Response, error) {
32042	reqHeaders := make(http.Header)
32043	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
32044	for k, v := range c.header_ {
32045		reqHeaders[k] = v
32046	}
32047	reqHeaders.Set("User-Agent", c.s.userAgent())
32048	var body io.Reader = nil
32049	c.urlParams_.Set("alt", alt)
32050	c.urlParams_.Set("prettyPrint", "false")
32051	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/generatetag")
32052	urls += "?" + c.urlParams_.Encode()
32053	req, err := http.NewRequest("POST", urls, body)
32054	if err != nil {
32055		return nil, err
32056	}
32057	req.Header = reqHeaders
32058	googleapi.Expand(req.URL, map[string]string{
32059		"profileId": strconv.FormatInt(c.profileId, 10),
32060	})
32061	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32062}
32063
32064// Do executes the "dfareporting.floodlightActivities.generatetag" call.
32065// Exactly one of *FloodlightActivitiesGenerateTagResponse or error will
32066// be non-nil. Any non-2xx status code is an error. Response headers are
32067// in either
32068// *FloodlightActivitiesGenerateTagResponse.ServerResponse.Header or (if
32069// a response was returned at all) in error.(*googleapi.Error).Header.
32070// Use googleapi.IsNotModified to check whether the returned error was
32071// because http.StatusNotModified was returned.
32072func (c *FloodlightActivitiesGeneratetagCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesGenerateTagResponse, error) {
32073	gensupport.SetOptions(c.urlParams_, opts...)
32074	res, err := c.doRequest("json")
32075	if res != nil && res.StatusCode == http.StatusNotModified {
32076		if res.Body != nil {
32077			res.Body.Close()
32078		}
32079		return nil, &googleapi.Error{
32080			Code:   res.StatusCode,
32081			Header: res.Header,
32082		}
32083	}
32084	if err != nil {
32085		return nil, err
32086	}
32087	defer googleapi.CloseBody(res)
32088	if err := googleapi.CheckResponse(res); err != nil {
32089		return nil, err
32090	}
32091	ret := &FloodlightActivitiesGenerateTagResponse{
32092		ServerResponse: googleapi.ServerResponse{
32093			Header:         res.Header,
32094			HTTPStatusCode: res.StatusCode,
32095		},
32096	}
32097	target := &ret
32098	if err := gensupport.DecodeResponse(target, res); err != nil {
32099		return nil, err
32100	}
32101	return ret, nil
32102	// {
32103	//   "description": "Generates a tag for a floodlight activity.",
32104	//   "httpMethod": "POST",
32105	//   "id": "dfareporting.floodlightActivities.generatetag",
32106	//   "parameterOrder": [
32107	//     "profileId"
32108	//   ],
32109	//   "parameters": {
32110	//     "floodlightActivityId": {
32111	//       "description": "Floodlight activity ID for which we want to generate a tag.",
32112	//       "format": "int64",
32113	//       "location": "query",
32114	//       "type": "string"
32115	//     },
32116	//     "profileId": {
32117	//       "description": "User profile ID associated with this request.",
32118	//       "format": "int64",
32119	//       "location": "path",
32120	//       "required": true,
32121	//       "type": "string"
32122	//     }
32123	//   },
32124	//   "path": "userprofiles/{profileId}/floodlightActivities/generatetag",
32125	//   "response": {
32126	//     "$ref": "FloodlightActivitiesGenerateTagResponse"
32127	//   },
32128	//   "scopes": [
32129	//     "https://www.googleapis.com/auth/dfatrafficking"
32130	//   ]
32131	// }
32132
32133}
32134
32135// method id "dfareporting.floodlightActivities.get":
32136
32137type FloodlightActivitiesGetCall struct {
32138	s            *Service
32139	profileId    int64
32140	id           int64
32141	urlParams_   gensupport.URLParams
32142	ifNoneMatch_ string
32143	ctx_         context.Context
32144	header_      http.Header
32145}
32146
32147// Get: Gets one floodlight activity by ID.
32148func (r *FloodlightActivitiesService) Get(profileId int64, id int64) *FloodlightActivitiesGetCall {
32149	c := &FloodlightActivitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32150	c.profileId = profileId
32151	c.id = id
32152	return c
32153}
32154
32155// Fields allows partial responses to be retrieved. See
32156// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32157// for more information.
32158func (c *FloodlightActivitiesGetCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGetCall {
32159	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32160	return c
32161}
32162
32163// IfNoneMatch sets the optional parameter which makes the operation
32164// fail if the object's ETag matches the given value. This is useful for
32165// getting updates only after the object has changed since the last
32166// request. Use googleapi.IsNotModified to check whether the response
32167// error from Do is the result of In-None-Match.
32168func (c *FloodlightActivitiesGetCall) IfNoneMatch(entityTag string) *FloodlightActivitiesGetCall {
32169	c.ifNoneMatch_ = entityTag
32170	return c
32171}
32172
32173// Context sets the context to be used in this call's Do method. Any
32174// pending HTTP request will be aborted if the provided context is
32175// canceled.
32176func (c *FloodlightActivitiesGetCall) Context(ctx context.Context) *FloodlightActivitiesGetCall {
32177	c.ctx_ = ctx
32178	return c
32179}
32180
32181// Header returns an http.Header that can be modified by the caller to
32182// add HTTP headers to the request.
32183func (c *FloodlightActivitiesGetCall) Header() http.Header {
32184	if c.header_ == nil {
32185		c.header_ = make(http.Header)
32186	}
32187	return c.header_
32188}
32189
32190func (c *FloodlightActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
32191	reqHeaders := make(http.Header)
32192	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
32193	for k, v := range c.header_ {
32194		reqHeaders[k] = v
32195	}
32196	reqHeaders.Set("User-Agent", c.s.userAgent())
32197	if c.ifNoneMatch_ != "" {
32198		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32199	}
32200	var body io.Reader = nil
32201	c.urlParams_.Set("alt", alt)
32202	c.urlParams_.Set("prettyPrint", "false")
32203	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
32204	urls += "?" + c.urlParams_.Encode()
32205	req, err := http.NewRequest("GET", urls, body)
32206	if err != nil {
32207		return nil, err
32208	}
32209	req.Header = reqHeaders
32210	googleapi.Expand(req.URL, map[string]string{
32211		"profileId": strconv.FormatInt(c.profileId, 10),
32212		"id":        strconv.FormatInt(c.id, 10),
32213	})
32214	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32215}
32216
32217// Do executes the "dfareporting.floodlightActivities.get" call.
32218// Exactly one of *FloodlightActivity or error will be non-nil. Any
32219// non-2xx status code is an error. Response headers are in either
32220// *FloodlightActivity.ServerResponse.Header or (if a response was
32221// returned at all) in error.(*googleapi.Error).Header. Use
32222// googleapi.IsNotModified to check whether the returned error was
32223// because http.StatusNotModified was returned.
32224func (c *FloodlightActivitiesGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32225	gensupport.SetOptions(c.urlParams_, opts...)
32226	res, err := c.doRequest("json")
32227	if res != nil && res.StatusCode == http.StatusNotModified {
32228		if res.Body != nil {
32229			res.Body.Close()
32230		}
32231		return nil, &googleapi.Error{
32232			Code:   res.StatusCode,
32233			Header: res.Header,
32234		}
32235	}
32236	if err != nil {
32237		return nil, err
32238	}
32239	defer googleapi.CloseBody(res)
32240	if err := googleapi.CheckResponse(res); err != nil {
32241		return nil, err
32242	}
32243	ret := &FloodlightActivity{
32244		ServerResponse: googleapi.ServerResponse{
32245			Header:         res.Header,
32246			HTTPStatusCode: res.StatusCode,
32247		},
32248	}
32249	target := &ret
32250	if err := gensupport.DecodeResponse(target, res); err != nil {
32251		return nil, err
32252	}
32253	return ret, nil
32254	// {
32255	//   "description": "Gets one floodlight activity by ID.",
32256	//   "httpMethod": "GET",
32257	//   "id": "dfareporting.floodlightActivities.get",
32258	//   "parameterOrder": [
32259	//     "profileId",
32260	//     "id"
32261	//   ],
32262	//   "parameters": {
32263	//     "id": {
32264	//       "description": "Floodlight activity ID.",
32265	//       "format": "int64",
32266	//       "location": "path",
32267	//       "required": true,
32268	//       "type": "string"
32269	//     },
32270	//     "profileId": {
32271	//       "description": "User profile ID associated with this request.",
32272	//       "format": "int64",
32273	//       "location": "path",
32274	//       "required": true,
32275	//       "type": "string"
32276	//     }
32277	//   },
32278	//   "path": "userprofiles/{profileId}/floodlightActivities/{id}",
32279	//   "response": {
32280	//     "$ref": "FloodlightActivity"
32281	//   },
32282	//   "scopes": [
32283	//     "https://www.googleapis.com/auth/dfatrafficking"
32284	//   ]
32285	// }
32286
32287}
32288
32289// method id "dfareporting.floodlightActivities.insert":
32290
32291type FloodlightActivitiesInsertCall struct {
32292	s                  *Service
32293	profileId          int64
32294	floodlightactivity *FloodlightActivity
32295	urlParams_         gensupport.URLParams
32296	ctx_               context.Context
32297	header_            http.Header
32298}
32299
32300// Insert: Inserts a new floodlight activity.
32301func (r *FloodlightActivitiesService) Insert(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesInsertCall {
32302	c := &FloodlightActivitiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32303	c.profileId = profileId
32304	c.floodlightactivity = floodlightactivity
32305	return c
32306}
32307
32308// Fields allows partial responses to be retrieved. See
32309// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32310// for more information.
32311func (c *FloodlightActivitiesInsertCall) Fields(s ...googleapi.Field) *FloodlightActivitiesInsertCall {
32312	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32313	return c
32314}
32315
32316// Context sets the context to be used in this call's Do method. Any
32317// pending HTTP request will be aborted if the provided context is
32318// canceled.
32319func (c *FloodlightActivitiesInsertCall) Context(ctx context.Context) *FloodlightActivitiesInsertCall {
32320	c.ctx_ = ctx
32321	return c
32322}
32323
32324// Header returns an http.Header that can be modified by the caller to
32325// add HTTP headers to the request.
32326func (c *FloodlightActivitiesInsertCall) Header() http.Header {
32327	if c.header_ == nil {
32328		c.header_ = make(http.Header)
32329	}
32330	return c.header_
32331}
32332
32333func (c *FloodlightActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
32334	reqHeaders := make(http.Header)
32335	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
32336	for k, v := range c.header_ {
32337		reqHeaders[k] = v
32338	}
32339	reqHeaders.Set("User-Agent", c.s.userAgent())
32340	var body io.Reader = nil
32341	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
32342	if err != nil {
32343		return nil, err
32344	}
32345	reqHeaders.Set("Content-Type", "application/json")
32346	c.urlParams_.Set("alt", alt)
32347	c.urlParams_.Set("prettyPrint", "false")
32348	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32349	urls += "?" + c.urlParams_.Encode()
32350	req, err := http.NewRequest("POST", urls, body)
32351	if err != nil {
32352		return nil, err
32353	}
32354	req.Header = reqHeaders
32355	googleapi.Expand(req.URL, map[string]string{
32356		"profileId": strconv.FormatInt(c.profileId, 10),
32357	})
32358	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32359}
32360
32361// Do executes the "dfareporting.floodlightActivities.insert" call.
32362// Exactly one of *FloodlightActivity or error will be non-nil. Any
32363// non-2xx status code is an error. Response headers are in either
32364// *FloodlightActivity.ServerResponse.Header or (if a response was
32365// returned at all) in error.(*googleapi.Error).Header. Use
32366// googleapi.IsNotModified to check whether the returned error was
32367// because http.StatusNotModified was returned.
32368func (c *FloodlightActivitiesInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32369	gensupport.SetOptions(c.urlParams_, opts...)
32370	res, err := c.doRequest("json")
32371	if res != nil && res.StatusCode == http.StatusNotModified {
32372		if res.Body != nil {
32373			res.Body.Close()
32374		}
32375		return nil, &googleapi.Error{
32376			Code:   res.StatusCode,
32377			Header: res.Header,
32378		}
32379	}
32380	if err != nil {
32381		return nil, err
32382	}
32383	defer googleapi.CloseBody(res)
32384	if err := googleapi.CheckResponse(res); err != nil {
32385		return nil, err
32386	}
32387	ret := &FloodlightActivity{
32388		ServerResponse: googleapi.ServerResponse{
32389			Header:         res.Header,
32390			HTTPStatusCode: res.StatusCode,
32391		},
32392	}
32393	target := &ret
32394	if err := gensupport.DecodeResponse(target, res); err != nil {
32395		return nil, err
32396	}
32397	return ret, nil
32398	// {
32399	//   "description": "Inserts a new floodlight activity.",
32400	//   "httpMethod": "POST",
32401	//   "id": "dfareporting.floodlightActivities.insert",
32402	//   "parameterOrder": [
32403	//     "profileId"
32404	//   ],
32405	//   "parameters": {
32406	//     "profileId": {
32407	//       "description": "User profile ID associated with this request.",
32408	//       "format": "int64",
32409	//       "location": "path",
32410	//       "required": true,
32411	//       "type": "string"
32412	//     }
32413	//   },
32414	//   "path": "userprofiles/{profileId}/floodlightActivities",
32415	//   "request": {
32416	//     "$ref": "FloodlightActivity"
32417	//   },
32418	//   "response": {
32419	//     "$ref": "FloodlightActivity"
32420	//   },
32421	//   "scopes": [
32422	//     "https://www.googleapis.com/auth/dfatrafficking"
32423	//   ]
32424	// }
32425
32426}
32427
32428// method id "dfareporting.floodlightActivities.list":
32429
32430type FloodlightActivitiesListCall struct {
32431	s            *Service
32432	profileId    int64
32433	urlParams_   gensupport.URLParams
32434	ifNoneMatch_ string
32435	ctx_         context.Context
32436	header_      http.Header
32437}
32438
32439// List: Retrieves a list of floodlight activities, possibly filtered.
32440// This method supports paging.
32441func (r *FloodlightActivitiesService) List(profileId int64) *FloodlightActivitiesListCall {
32442	c := &FloodlightActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32443	c.profileId = profileId
32444	return c
32445}
32446
32447// AdvertiserId sets the optional parameter "advertiserId": Select only
32448// floodlight activities for the specified advertiser ID. Must specify
32449// either ids, advertiserId, or floodlightConfigurationId for a
32450// non-empty result.
32451func (c *FloodlightActivitiesListCall) AdvertiserId(advertiserId int64) *FloodlightActivitiesListCall {
32452	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32453	return c
32454}
32455
32456// FloodlightActivityGroupIds sets the optional parameter
32457// "floodlightActivityGroupIds": Select only floodlight activities with
32458// the specified floodlight activity group IDs.
32459func (c *FloodlightActivitiesListCall) FloodlightActivityGroupIds(floodlightActivityGroupIds ...int64) *FloodlightActivitiesListCall {
32460	var floodlightActivityGroupIds_ []string
32461	for _, v := range floodlightActivityGroupIds {
32462		floodlightActivityGroupIds_ = append(floodlightActivityGroupIds_, fmt.Sprint(v))
32463	}
32464	c.urlParams_.SetMulti("floodlightActivityGroupIds", floodlightActivityGroupIds_)
32465	return c
32466}
32467
32468// FloodlightActivityGroupName sets the optional parameter
32469// "floodlightActivityGroupName": Select only floodlight activities with
32470// the specified floodlight activity group name.
32471func (c *FloodlightActivitiesListCall) FloodlightActivityGroupName(floodlightActivityGroupName string) *FloodlightActivitiesListCall {
32472	c.urlParams_.Set("floodlightActivityGroupName", floodlightActivityGroupName)
32473	return c
32474}
32475
32476// FloodlightActivityGroupTagString sets the optional parameter
32477// "floodlightActivityGroupTagString": Select only floodlight activities
32478// with the specified floodlight activity group tag string.
32479func (c *FloodlightActivitiesListCall) FloodlightActivityGroupTagString(floodlightActivityGroupTagString string) *FloodlightActivitiesListCall {
32480	c.urlParams_.Set("floodlightActivityGroupTagString", floodlightActivityGroupTagString)
32481	return c
32482}
32483
32484// FloodlightActivityGroupType sets the optional parameter
32485// "floodlightActivityGroupType": Select only floodlight activities with
32486// the specified floodlight activity group type.
32487//
32488// Possible values:
32489//   "COUNTER"
32490//   "SALE"
32491func (c *FloodlightActivitiesListCall) FloodlightActivityGroupType(floodlightActivityGroupType string) *FloodlightActivitiesListCall {
32492	c.urlParams_.Set("floodlightActivityGroupType", floodlightActivityGroupType)
32493	return c
32494}
32495
32496// FloodlightConfigurationId sets the optional parameter
32497// "floodlightConfigurationId": Select only floodlight activities for
32498// the specified floodlight configuration ID. Must specify either ids,
32499// advertiserId, or floodlightConfigurationId for a non-empty result.
32500func (c *FloodlightActivitiesListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivitiesListCall {
32501	c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
32502	return c
32503}
32504
32505// Ids sets the optional parameter "ids": Select only floodlight
32506// activities with the specified IDs. Must specify either ids,
32507// advertiserId, or floodlightConfigurationId for a non-empty result.
32508func (c *FloodlightActivitiesListCall) Ids(ids ...int64) *FloodlightActivitiesListCall {
32509	var ids_ []string
32510	for _, v := range ids {
32511		ids_ = append(ids_, fmt.Sprint(v))
32512	}
32513	c.urlParams_.SetMulti("ids", ids_)
32514	return c
32515}
32516
32517// MaxResults sets the optional parameter "maxResults": Maximum number
32518// of results to return.
32519func (c *FloodlightActivitiesListCall) MaxResults(maxResults int64) *FloodlightActivitiesListCall {
32520	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
32521	return c
32522}
32523
32524// PageToken sets the optional parameter "pageToken": Value of the
32525// nextPageToken from the previous result page.
32526func (c *FloodlightActivitiesListCall) PageToken(pageToken string) *FloodlightActivitiesListCall {
32527	c.urlParams_.Set("pageToken", pageToken)
32528	return c
32529}
32530
32531// SearchString sets the optional parameter "searchString": Allows
32532// searching for objects by name or ID. Wildcards (*) are allowed. For
32533// example, "floodlightactivity*2015" will return objects with names
32534// like "floodlightactivity June 2015", "floodlightactivity April 2015",
32535// or simply "floodlightactivity 2015". Most of the searches also add
32536// wildcards implicitly at the start and the end of the search string.
32537// For example, a search string of "floodlightactivity" will match
32538// objects with name "my floodlightactivity activity",
32539// "floodlightactivity 2015", or simply "floodlightactivity".
32540func (c *FloodlightActivitiesListCall) SearchString(searchString string) *FloodlightActivitiesListCall {
32541	c.urlParams_.Set("searchString", searchString)
32542	return c
32543}
32544
32545// SortField sets the optional parameter "sortField": Field by which to
32546// sort the list.
32547//
32548// Possible values:
32549//   "ID" (default)
32550//   "NAME"
32551func (c *FloodlightActivitiesListCall) SortField(sortField string) *FloodlightActivitiesListCall {
32552	c.urlParams_.Set("sortField", sortField)
32553	return c
32554}
32555
32556// SortOrder sets the optional parameter "sortOrder": Order of sorted
32557// results.
32558//
32559// Possible values:
32560//   "ASCENDING" (default)
32561//   "DESCENDING"
32562func (c *FloodlightActivitiesListCall) SortOrder(sortOrder string) *FloodlightActivitiesListCall {
32563	c.urlParams_.Set("sortOrder", sortOrder)
32564	return c
32565}
32566
32567// TagString sets the optional parameter "tagString": Select only
32568// floodlight activities with the specified tag string.
32569func (c *FloodlightActivitiesListCall) TagString(tagString string) *FloodlightActivitiesListCall {
32570	c.urlParams_.Set("tagString", tagString)
32571	return c
32572}
32573
32574// Fields allows partial responses to be retrieved. See
32575// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32576// for more information.
32577func (c *FloodlightActivitiesListCall) Fields(s ...googleapi.Field) *FloodlightActivitiesListCall {
32578	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32579	return c
32580}
32581
32582// IfNoneMatch sets the optional parameter which makes the operation
32583// fail if the object's ETag matches the given value. This is useful for
32584// getting updates only after the object has changed since the last
32585// request. Use googleapi.IsNotModified to check whether the response
32586// error from Do is the result of In-None-Match.
32587func (c *FloodlightActivitiesListCall) IfNoneMatch(entityTag string) *FloodlightActivitiesListCall {
32588	c.ifNoneMatch_ = entityTag
32589	return c
32590}
32591
32592// Context sets the context to be used in this call's Do method. Any
32593// pending HTTP request will be aborted if the provided context is
32594// canceled.
32595func (c *FloodlightActivitiesListCall) Context(ctx context.Context) *FloodlightActivitiesListCall {
32596	c.ctx_ = ctx
32597	return c
32598}
32599
32600// Header returns an http.Header that can be modified by the caller to
32601// add HTTP headers to the request.
32602func (c *FloodlightActivitiesListCall) Header() http.Header {
32603	if c.header_ == nil {
32604		c.header_ = make(http.Header)
32605	}
32606	return c.header_
32607}
32608
32609func (c *FloodlightActivitiesListCall) doRequest(alt string) (*http.Response, error) {
32610	reqHeaders := make(http.Header)
32611	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
32612	for k, v := range c.header_ {
32613		reqHeaders[k] = v
32614	}
32615	reqHeaders.Set("User-Agent", c.s.userAgent())
32616	if c.ifNoneMatch_ != "" {
32617		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32618	}
32619	var body io.Reader = nil
32620	c.urlParams_.Set("alt", alt)
32621	c.urlParams_.Set("prettyPrint", "false")
32622	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32623	urls += "?" + c.urlParams_.Encode()
32624	req, err := http.NewRequest("GET", urls, body)
32625	if err != nil {
32626		return nil, err
32627	}
32628	req.Header = reqHeaders
32629	googleapi.Expand(req.URL, map[string]string{
32630		"profileId": strconv.FormatInt(c.profileId, 10),
32631	})
32632	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32633}
32634
32635// Do executes the "dfareporting.floodlightActivities.list" call.
32636// Exactly one of *FloodlightActivitiesListResponse or error will be
32637// non-nil. Any non-2xx status code is an error. Response headers are in
32638// either *FloodlightActivitiesListResponse.ServerResponse.Header or (if
32639// a response was returned at all) in error.(*googleapi.Error).Header.
32640// Use googleapi.IsNotModified to check whether the returned error was
32641// because http.StatusNotModified was returned.
32642func (c *FloodlightActivitiesListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesListResponse, error) {
32643	gensupport.SetOptions(c.urlParams_, opts...)
32644	res, err := c.doRequest("json")
32645	if res != nil && res.StatusCode == http.StatusNotModified {
32646		if res.Body != nil {
32647			res.Body.Close()
32648		}
32649		return nil, &googleapi.Error{
32650			Code:   res.StatusCode,
32651			Header: res.Header,
32652		}
32653	}
32654	if err != nil {
32655		return nil, err
32656	}
32657	defer googleapi.CloseBody(res)
32658	if err := googleapi.CheckResponse(res); err != nil {
32659		return nil, err
32660	}
32661	ret := &FloodlightActivitiesListResponse{
32662		ServerResponse: googleapi.ServerResponse{
32663			Header:         res.Header,
32664			HTTPStatusCode: res.StatusCode,
32665		},
32666	}
32667	target := &ret
32668	if err := gensupport.DecodeResponse(target, res); err != nil {
32669		return nil, err
32670	}
32671	return ret, nil
32672	// {
32673	//   "description": "Retrieves a list of floodlight activities, possibly filtered. This method supports paging.",
32674	//   "httpMethod": "GET",
32675	//   "id": "dfareporting.floodlightActivities.list",
32676	//   "parameterOrder": [
32677	//     "profileId"
32678	//   ],
32679	//   "parameters": {
32680	//     "advertiserId": {
32681	//       "description": "Select only floodlight activities for the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32682	//       "format": "int64",
32683	//       "location": "query",
32684	//       "type": "string"
32685	//     },
32686	//     "floodlightActivityGroupIds": {
32687	//       "description": "Select only floodlight activities with the specified floodlight activity group IDs.",
32688	//       "format": "int64",
32689	//       "location": "query",
32690	//       "repeated": true,
32691	//       "type": "string"
32692	//     },
32693	//     "floodlightActivityGroupName": {
32694	//       "description": "Select only floodlight activities with the specified floodlight activity group name.",
32695	//       "location": "query",
32696	//       "type": "string"
32697	//     },
32698	//     "floodlightActivityGroupTagString": {
32699	//       "description": "Select only floodlight activities with the specified floodlight activity group tag string.",
32700	//       "location": "query",
32701	//       "type": "string"
32702	//     },
32703	//     "floodlightActivityGroupType": {
32704	//       "description": "Select only floodlight activities with the specified floodlight activity group type.",
32705	//       "enum": [
32706	//         "COUNTER",
32707	//         "SALE"
32708	//       ],
32709	//       "enumDescriptions": [
32710	//         "",
32711	//         ""
32712	//       ],
32713	//       "location": "query",
32714	//       "type": "string"
32715	//     },
32716	//     "floodlightConfigurationId": {
32717	//       "description": "Select only floodlight activities for the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32718	//       "format": "int64",
32719	//       "location": "query",
32720	//       "type": "string"
32721	//     },
32722	//     "ids": {
32723	//       "description": "Select only floodlight activities with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32724	//       "format": "int64",
32725	//       "location": "query",
32726	//       "repeated": true,
32727	//       "type": "string"
32728	//     },
32729	//     "maxResults": {
32730	//       "default": "1000",
32731	//       "description": "Maximum number of results to return.",
32732	//       "format": "int32",
32733	//       "location": "query",
32734	//       "maximum": "1000",
32735	//       "minimum": "0",
32736	//       "type": "integer"
32737	//     },
32738	//     "pageToken": {
32739	//       "description": "Value of the nextPageToken from the previous result page.",
32740	//       "location": "query",
32741	//       "type": "string"
32742	//     },
32743	//     "profileId": {
32744	//       "description": "User profile ID associated with this request.",
32745	//       "format": "int64",
32746	//       "location": "path",
32747	//       "required": true,
32748	//       "type": "string"
32749	//     },
32750	//     "searchString": {
32751	//       "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\".",
32752	//       "location": "query",
32753	//       "type": "string"
32754	//     },
32755	//     "sortField": {
32756	//       "default": "ID",
32757	//       "description": "Field by which to sort the list.",
32758	//       "enum": [
32759	//         "ID",
32760	//         "NAME"
32761	//       ],
32762	//       "enumDescriptions": [
32763	//         "",
32764	//         ""
32765	//       ],
32766	//       "location": "query",
32767	//       "type": "string"
32768	//     },
32769	//     "sortOrder": {
32770	//       "default": "ASCENDING",
32771	//       "description": "Order of sorted results.",
32772	//       "enum": [
32773	//         "ASCENDING",
32774	//         "DESCENDING"
32775	//       ],
32776	//       "enumDescriptions": [
32777	//         "",
32778	//         ""
32779	//       ],
32780	//       "location": "query",
32781	//       "type": "string"
32782	//     },
32783	//     "tagString": {
32784	//       "description": "Select only floodlight activities with the specified tag string.",
32785	//       "location": "query",
32786	//       "type": "string"
32787	//     }
32788	//   },
32789	//   "path": "userprofiles/{profileId}/floodlightActivities",
32790	//   "response": {
32791	//     "$ref": "FloodlightActivitiesListResponse"
32792	//   },
32793	//   "scopes": [
32794	//     "https://www.googleapis.com/auth/dfatrafficking"
32795	//   ]
32796	// }
32797
32798}
32799
32800// Pages invokes f for each page of results.
32801// A non-nil error returned from f will halt the iteration.
32802// The provided context supersedes any context provided to the Context method.
32803func (c *FloodlightActivitiesListCall) Pages(ctx context.Context, f func(*FloodlightActivitiesListResponse) error) error {
32804	c.ctx_ = ctx
32805	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
32806	for {
32807		x, err := c.Do()
32808		if err != nil {
32809			return err
32810		}
32811		if err := f(x); err != nil {
32812			return err
32813		}
32814		if x.NextPageToken == "" {
32815			return nil
32816		}
32817		c.PageToken(x.NextPageToken)
32818	}
32819}
32820
32821// method id "dfareporting.floodlightActivities.patch":
32822
32823type FloodlightActivitiesPatchCall struct {
32824	s                  *Service
32825	profileId          int64
32826	floodlightactivity *FloodlightActivity
32827	urlParams_         gensupport.URLParams
32828	ctx_               context.Context
32829	header_            http.Header
32830}
32831
32832// Patch: Updates an existing floodlight activity. This method supports
32833// patch semantics.
32834func (r *FloodlightActivitiesService) Patch(profileId int64, id int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesPatchCall {
32835	c := &FloodlightActivitiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32836	c.profileId = profileId
32837	c.urlParams_.Set("id", fmt.Sprint(id))
32838	c.floodlightactivity = floodlightactivity
32839	return c
32840}
32841
32842// Fields allows partial responses to be retrieved. See
32843// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32844// for more information.
32845func (c *FloodlightActivitiesPatchCall) Fields(s ...googleapi.Field) *FloodlightActivitiesPatchCall {
32846	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32847	return c
32848}
32849
32850// Context sets the context to be used in this call's Do method. Any
32851// pending HTTP request will be aborted if the provided context is
32852// canceled.
32853func (c *FloodlightActivitiesPatchCall) Context(ctx context.Context) *FloodlightActivitiesPatchCall {
32854	c.ctx_ = ctx
32855	return c
32856}
32857
32858// Header returns an http.Header that can be modified by the caller to
32859// add HTTP headers to the request.
32860func (c *FloodlightActivitiesPatchCall) Header() http.Header {
32861	if c.header_ == nil {
32862		c.header_ = make(http.Header)
32863	}
32864	return c.header_
32865}
32866
32867func (c *FloodlightActivitiesPatchCall) doRequest(alt string) (*http.Response, error) {
32868	reqHeaders := make(http.Header)
32869	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
32870	for k, v := range c.header_ {
32871		reqHeaders[k] = v
32872	}
32873	reqHeaders.Set("User-Agent", c.s.userAgent())
32874	var body io.Reader = nil
32875	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
32876	if err != nil {
32877		return nil, err
32878	}
32879	reqHeaders.Set("Content-Type", "application/json")
32880	c.urlParams_.Set("alt", alt)
32881	c.urlParams_.Set("prettyPrint", "false")
32882	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32883	urls += "?" + c.urlParams_.Encode()
32884	req, err := http.NewRequest("PATCH", urls, body)
32885	if err != nil {
32886		return nil, err
32887	}
32888	req.Header = reqHeaders
32889	googleapi.Expand(req.URL, map[string]string{
32890		"profileId": strconv.FormatInt(c.profileId, 10),
32891	})
32892	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32893}
32894
32895// Do executes the "dfareporting.floodlightActivities.patch" call.
32896// Exactly one of *FloodlightActivity or error will be non-nil. Any
32897// non-2xx status code is an error. Response headers are in either
32898// *FloodlightActivity.ServerResponse.Header or (if a response was
32899// returned at all) in error.(*googleapi.Error).Header. Use
32900// googleapi.IsNotModified to check whether the returned error was
32901// because http.StatusNotModified was returned.
32902func (c *FloodlightActivitiesPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32903	gensupport.SetOptions(c.urlParams_, opts...)
32904	res, err := c.doRequest("json")
32905	if res != nil && res.StatusCode == http.StatusNotModified {
32906		if res.Body != nil {
32907			res.Body.Close()
32908		}
32909		return nil, &googleapi.Error{
32910			Code:   res.StatusCode,
32911			Header: res.Header,
32912		}
32913	}
32914	if err != nil {
32915		return nil, err
32916	}
32917	defer googleapi.CloseBody(res)
32918	if err := googleapi.CheckResponse(res); err != nil {
32919		return nil, err
32920	}
32921	ret := &FloodlightActivity{
32922		ServerResponse: googleapi.ServerResponse{
32923			Header:         res.Header,
32924			HTTPStatusCode: res.StatusCode,
32925		},
32926	}
32927	target := &ret
32928	if err := gensupport.DecodeResponse(target, res); err != nil {
32929		return nil, err
32930	}
32931	return ret, nil
32932	// {
32933	//   "description": "Updates an existing floodlight activity. This method supports patch semantics.",
32934	//   "httpMethod": "PATCH",
32935	//   "id": "dfareporting.floodlightActivities.patch",
32936	//   "parameterOrder": [
32937	//     "profileId",
32938	//     "id"
32939	//   ],
32940	//   "parameters": {
32941	//     "id": {
32942	//       "description": "Floodlight activity ID.",
32943	//       "format": "int64",
32944	//       "location": "query",
32945	//       "required": true,
32946	//       "type": "string"
32947	//     },
32948	//     "profileId": {
32949	//       "description": "User profile ID associated with this request.",
32950	//       "format": "int64",
32951	//       "location": "path",
32952	//       "required": true,
32953	//       "type": "string"
32954	//     }
32955	//   },
32956	//   "path": "userprofiles/{profileId}/floodlightActivities",
32957	//   "request": {
32958	//     "$ref": "FloodlightActivity"
32959	//   },
32960	//   "response": {
32961	//     "$ref": "FloodlightActivity"
32962	//   },
32963	//   "scopes": [
32964	//     "https://www.googleapis.com/auth/dfatrafficking"
32965	//   ]
32966	// }
32967
32968}
32969
32970// method id "dfareporting.floodlightActivities.update":
32971
32972type FloodlightActivitiesUpdateCall struct {
32973	s                  *Service
32974	profileId          int64
32975	floodlightactivity *FloodlightActivity
32976	urlParams_         gensupport.URLParams
32977	ctx_               context.Context
32978	header_            http.Header
32979}
32980
32981// Update: Updates an existing floodlight activity.
32982func (r *FloodlightActivitiesService) Update(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesUpdateCall {
32983	c := &FloodlightActivitiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32984	c.profileId = profileId
32985	c.floodlightactivity = floodlightactivity
32986	return c
32987}
32988
32989// Fields allows partial responses to be retrieved. See
32990// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32991// for more information.
32992func (c *FloodlightActivitiesUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivitiesUpdateCall {
32993	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32994	return c
32995}
32996
32997// Context sets the context to be used in this call's Do method. Any
32998// pending HTTP request will be aborted if the provided context is
32999// canceled.
33000func (c *FloodlightActivitiesUpdateCall) Context(ctx context.Context) *FloodlightActivitiesUpdateCall {
33001	c.ctx_ = ctx
33002	return c
33003}
33004
33005// Header returns an http.Header that can be modified by the caller to
33006// add HTTP headers to the request.
33007func (c *FloodlightActivitiesUpdateCall) Header() http.Header {
33008	if c.header_ == nil {
33009		c.header_ = make(http.Header)
33010	}
33011	return c.header_
33012}
33013
33014func (c *FloodlightActivitiesUpdateCall) doRequest(alt string) (*http.Response, error) {
33015	reqHeaders := make(http.Header)
33016	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
33017	for k, v := range c.header_ {
33018		reqHeaders[k] = v
33019	}
33020	reqHeaders.Set("User-Agent", c.s.userAgent())
33021	var body io.Reader = nil
33022	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
33023	if err != nil {
33024		return nil, err
33025	}
33026	reqHeaders.Set("Content-Type", "application/json")
33027	c.urlParams_.Set("alt", alt)
33028	c.urlParams_.Set("prettyPrint", "false")
33029	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
33030	urls += "?" + c.urlParams_.Encode()
33031	req, err := http.NewRequest("PUT", urls, body)
33032	if err != nil {
33033		return nil, err
33034	}
33035	req.Header = reqHeaders
33036	googleapi.Expand(req.URL, map[string]string{
33037		"profileId": strconv.FormatInt(c.profileId, 10),
33038	})
33039	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33040}
33041
33042// Do executes the "dfareporting.floodlightActivities.update" call.
33043// Exactly one of *FloodlightActivity or error will be non-nil. Any
33044// non-2xx status code is an error. Response headers are in either
33045// *FloodlightActivity.ServerResponse.Header or (if a response was
33046// returned at all) in error.(*googleapi.Error).Header. Use
33047// googleapi.IsNotModified to check whether the returned error was
33048// because http.StatusNotModified was returned.
33049func (c *FloodlightActivitiesUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
33050	gensupport.SetOptions(c.urlParams_, opts...)
33051	res, err := c.doRequest("json")
33052	if res != nil && res.StatusCode == http.StatusNotModified {
33053		if res.Body != nil {
33054			res.Body.Close()
33055		}
33056		return nil, &googleapi.Error{
33057			Code:   res.StatusCode,
33058			Header: res.Header,
33059		}
33060	}
33061	if err != nil {
33062		return nil, err
33063	}
33064	defer googleapi.CloseBody(res)
33065	if err := googleapi.CheckResponse(res); err != nil {
33066		return nil, err
33067	}
33068	ret := &FloodlightActivity{
33069		ServerResponse: googleapi.ServerResponse{
33070			Header:         res.Header,
33071			HTTPStatusCode: res.StatusCode,
33072		},
33073	}
33074	target := &ret
33075	if err := gensupport.DecodeResponse(target, res); err != nil {
33076		return nil, err
33077	}
33078	return ret, nil
33079	// {
33080	//   "description": "Updates an existing floodlight activity.",
33081	//   "httpMethod": "PUT",
33082	//   "id": "dfareporting.floodlightActivities.update",
33083	//   "parameterOrder": [
33084	//     "profileId"
33085	//   ],
33086	//   "parameters": {
33087	//     "profileId": {
33088	//       "description": "User profile ID associated with this request.",
33089	//       "format": "int64",
33090	//       "location": "path",
33091	//       "required": true,
33092	//       "type": "string"
33093	//     }
33094	//   },
33095	//   "path": "userprofiles/{profileId}/floodlightActivities",
33096	//   "request": {
33097	//     "$ref": "FloodlightActivity"
33098	//   },
33099	//   "response": {
33100	//     "$ref": "FloodlightActivity"
33101	//   },
33102	//   "scopes": [
33103	//     "https://www.googleapis.com/auth/dfatrafficking"
33104	//   ]
33105	// }
33106
33107}
33108
33109// method id "dfareporting.floodlightActivityGroups.get":
33110
33111type FloodlightActivityGroupsGetCall struct {
33112	s            *Service
33113	profileId    int64
33114	id           int64
33115	urlParams_   gensupport.URLParams
33116	ifNoneMatch_ string
33117	ctx_         context.Context
33118	header_      http.Header
33119}
33120
33121// Get: Gets one floodlight activity group by ID.
33122func (r *FloodlightActivityGroupsService) Get(profileId int64, id int64) *FloodlightActivityGroupsGetCall {
33123	c := &FloodlightActivityGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33124	c.profileId = profileId
33125	c.id = id
33126	return c
33127}
33128
33129// Fields allows partial responses to be retrieved. See
33130// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33131// for more information.
33132func (c *FloodlightActivityGroupsGetCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsGetCall {
33133	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33134	return c
33135}
33136
33137// IfNoneMatch sets the optional parameter which makes the operation
33138// fail if the object's ETag matches the given value. This is useful for
33139// getting updates only after the object has changed since the last
33140// request. Use googleapi.IsNotModified to check whether the response
33141// error from Do is the result of In-None-Match.
33142func (c *FloodlightActivityGroupsGetCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsGetCall {
33143	c.ifNoneMatch_ = entityTag
33144	return c
33145}
33146
33147// Context sets the context to be used in this call's Do method. Any
33148// pending HTTP request will be aborted if the provided context is
33149// canceled.
33150func (c *FloodlightActivityGroupsGetCall) Context(ctx context.Context) *FloodlightActivityGroupsGetCall {
33151	c.ctx_ = ctx
33152	return c
33153}
33154
33155// Header returns an http.Header that can be modified by the caller to
33156// add HTTP headers to the request.
33157func (c *FloodlightActivityGroupsGetCall) Header() http.Header {
33158	if c.header_ == nil {
33159		c.header_ = make(http.Header)
33160	}
33161	return c.header_
33162}
33163
33164func (c *FloodlightActivityGroupsGetCall) doRequest(alt string) (*http.Response, error) {
33165	reqHeaders := make(http.Header)
33166	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
33167	for k, v := range c.header_ {
33168		reqHeaders[k] = v
33169	}
33170	reqHeaders.Set("User-Agent", c.s.userAgent())
33171	if c.ifNoneMatch_ != "" {
33172		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33173	}
33174	var body io.Reader = nil
33175	c.urlParams_.Set("alt", alt)
33176	c.urlParams_.Set("prettyPrint", "false")
33177	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups/{id}")
33178	urls += "?" + c.urlParams_.Encode()
33179	req, err := http.NewRequest("GET", urls, body)
33180	if err != nil {
33181		return nil, err
33182	}
33183	req.Header = reqHeaders
33184	googleapi.Expand(req.URL, map[string]string{
33185		"profileId": strconv.FormatInt(c.profileId, 10),
33186		"id":        strconv.FormatInt(c.id, 10),
33187	})
33188	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33189}
33190
33191// Do executes the "dfareporting.floodlightActivityGroups.get" call.
33192// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33193// non-2xx status code is an error. Response headers are in either
33194// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33195// returned at all) in error.(*googleapi.Error).Header. Use
33196// googleapi.IsNotModified to check whether the returned error was
33197// because http.StatusNotModified was returned.
33198func (c *FloodlightActivityGroupsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33199	gensupport.SetOptions(c.urlParams_, opts...)
33200	res, err := c.doRequest("json")
33201	if res != nil && res.StatusCode == http.StatusNotModified {
33202		if res.Body != nil {
33203			res.Body.Close()
33204		}
33205		return nil, &googleapi.Error{
33206			Code:   res.StatusCode,
33207			Header: res.Header,
33208		}
33209	}
33210	if err != nil {
33211		return nil, err
33212	}
33213	defer googleapi.CloseBody(res)
33214	if err := googleapi.CheckResponse(res); err != nil {
33215		return nil, err
33216	}
33217	ret := &FloodlightActivityGroup{
33218		ServerResponse: googleapi.ServerResponse{
33219			Header:         res.Header,
33220			HTTPStatusCode: res.StatusCode,
33221		},
33222	}
33223	target := &ret
33224	if err := gensupport.DecodeResponse(target, res); err != nil {
33225		return nil, err
33226	}
33227	return ret, nil
33228	// {
33229	//   "description": "Gets one floodlight activity group by ID.",
33230	//   "httpMethod": "GET",
33231	//   "id": "dfareporting.floodlightActivityGroups.get",
33232	//   "parameterOrder": [
33233	//     "profileId",
33234	//     "id"
33235	//   ],
33236	//   "parameters": {
33237	//     "id": {
33238	//       "description": "Floodlight activity Group ID.",
33239	//       "format": "int64",
33240	//       "location": "path",
33241	//       "required": true,
33242	//       "type": "string"
33243	//     },
33244	//     "profileId": {
33245	//       "description": "User profile ID associated with this request.",
33246	//       "format": "int64",
33247	//       "location": "path",
33248	//       "required": true,
33249	//       "type": "string"
33250	//     }
33251	//   },
33252	//   "path": "userprofiles/{profileId}/floodlightActivityGroups/{id}",
33253	//   "response": {
33254	//     "$ref": "FloodlightActivityGroup"
33255	//   },
33256	//   "scopes": [
33257	//     "https://www.googleapis.com/auth/dfatrafficking"
33258	//   ]
33259	// }
33260
33261}
33262
33263// method id "dfareporting.floodlightActivityGroups.insert":
33264
33265type FloodlightActivityGroupsInsertCall struct {
33266	s                       *Service
33267	profileId               int64
33268	floodlightactivitygroup *FloodlightActivityGroup
33269	urlParams_              gensupport.URLParams
33270	ctx_                    context.Context
33271	header_                 http.Header
33272}
33273
33274// Insert: Inserts a new floodlight activity group.
33275func (r *FloodlightActivityGroupsService) Insert(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsInsertCall {
33276	c := &FloodlightActivityGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33277	c.profileId = profileId
33278	c.floodlightactivitygroup = floodlightactivitygroup
33279	return c
33280}
33281
33282// Fields allows partial responses to be retrieved. See
33283// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33284// for more information.
33285func (c *FloodlightActivityGroupsInsertCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsInsertCall {
33286	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33287	return c
33288}
33289
33290// Context sets the context to be used in this call's Do method. Any
33291// pending HTTP request will be aborted if the provided context is
33292// canceled.
33293func (c *FloodlightActivityGroupsInsertCall) Context(ctx context.Context) *FloodlightActivityGroupsInsertCall {
33294	c.ctx_ = ctx
33295	return c
33296}
33297
33298// Header returns an http.Header that can be modified by the caller to
33299// add HTTP headers to the request.
33300func (c *FloodlightActivityGroupsInsertCall) Header() http.Header {
33301	if c.header_ == nil {
33302		c.header_ = make(http.Header)
33303	}
33304	return c.header_
33305}
33306
33307func (c *FloodlightActivityGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
33308	reqHeaders := make(http.Header)
33309	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
33310	for k, v := range c.header_ {
33311		reqHeaders[k] = v
33312	}
33313	reqHeaders.Set("User-Agent", c.s.userAgent())
33314	var body io.Reader = nil
33315	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
33316	if err != nil {
33317		return nil, err
33318	}
33319	reqHeaders.Set("Content-Type", "application/json")
33320	c.urlParams_.Set("alt", alt)
33321	c.urlParams_.Set("prettyPrint", "false")
33322	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33323	urls += "?" + c.urlParams_.Encode()
33324	req, err := http.NewRequest("POST", urls, body)
33325	if err != nil {
33326		return nil, err
33327	}
33328	req.Header = reqHeaders
33329	googleapi.Expand(req.URL, map[string]string{
33330		"profileId": strconv.FormatInt(c.profileId, 10),
33331	})
33332	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33333}
33334
33335// Do executes the "dfareporting.floodlightActivityGroups.insert" call.
33336// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33337// non-2xx status code is an error. Response headers are in either
33338// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33339// returned at all) in error.(*googleapi.Error).Header. Use
33340// googleapi.IsNotModified to check whether the returned error was
33341// because http.StatusNotModified was returned.
33342func (c *FloodlightActivityGroupsInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33343	gensupport.SetOptions(c.urlParams_, opts...)
33344	res, err := c.doRequest("json")
33345	if res != nil && res.StatusCode == http.StatusNotModified {
33346		if res.Body != nil {
33347			res.Body.Close()
33348		}
33349		return nil, &googleapi.Error{
33350			Code:   res.StatusCode,
33351			Header: res.Header,
33352		}
33353	}
33354	if err != nil {
33355		return nil, err
33356	}
33357	defer googleapi.CloseBody(res)
33358	if err := googleapi.CheckResponse(res); err != nil {
33359		return nil, err
33360	}
33361	ret := &FloodlightActivityGroup{
33362		ServerResponse: googleapi.ServerResponse{
33363			Header:         res.Header,
33364			HTTPStatusCode: res.StatusCode,
33365		},
33366	}
33367	target := &ret
33368	if err := gensupport.DecodeResponse(target, res); err != nil {
33369		return nil, err
33370	}
33371	return ret, nil
33372	// {
33373	//   "description": "Inserts a new floodlight activity group.",
33374	//   "httpMethod": "POST",
33375	//   "id": "dfareporting.floodlightActivityGroups.insert",
33376	//   "parameterOrder": [
33377	//     "profileId"
33378	//   ],
33379	//   "parameters": {
33380	//     "profileId": {
33381	//       "description": "User profile ID associated with this request.",
33382	//       "format": "int64",
33383	//       "location": "path",
33384	//       "required": true,
33385	//       "type": "string"
33386	//     }
33387	//   },
33388	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
33389	//   "request": {
33390	//     "$ref": "FloodlightActivityGroup"
33391	//   },
33392	//   "response": {
33393	//     "$ref": "FloodlightActivityGroup"
33394	//   },
33395	//   "scopes": [
33396	//     "https://www.googleapis.com/auth/dfatrafficking"
33397	//   ]
33398	// }
33399
33400}
33401
33402// method id "dfareporting.floodlightActivityGroups.list":
33403
33404type FloodlightActivityGroupsListCall struct {
33405	s            *Service
33406	profileId    int64
33407	urlParams_   gensupport.URLParams
33408	ifNoneMatch_ string
33409	ctx_         context.Context
33410	header_      http.Header
33411}
33412
33413// List: Retrieves a list of floodlight activity groups, possibly
33414// filtered. This method supports paging.
33415func (r *FloodlightActivityGroupsService) List(profileId int64) *FloodlightActivityGroupsListCall {
33416	c := &FloodlightActivityGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33417	c.profileId = profileId
33418	return c
33419}
33420
33421// AdvertiserId sets the optional parameter "advertiserId": Select only
33422// floodlight activity groups with the specified advertiser ID. Must
33423// specify either advertiserId or floodlightConfigurationId for a
33424// non-empty result.
33425func (c *FloodlightActivityGroupsListCall) AdvertiserId(advertiserId int64) *FloodlightActivityGroupsListCall {
33426	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
33427	return c
33428}
33429
33430// FloodlightConfigurationId sets the optional parameter
33431// "floodlightConfigurationId": Select only floodlight activity groups
33432// with the specified floodlight configuration ID. Must specify either
33433// advertiserId, or floodlightConfigurationId for a non-empty result.
33434func (c *FloodlightActivityGroupsListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivityGroupsListCall {
33435	c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
33436	return c
33437}
33438
33439// Ids sets the optional parameter "ids": Select only floodlight
33440// activity groups with the specified IDs. Must specify either
33441// advertiserId or floodlightConfigurationId for a non-empty result.
33442func (c *FloodlightActivityGroupsListCall) Ids(ids ...int64) *FloodlightActivityGroupsListCall {
33443	var ids_ []string
33444	for _, v := range ids {
33445		ids_ = append(ids_, fmt.Sprint(v))
33446	}
33447	c.urlParams_.SetMulti("ids", ids_)
33448	return c
33449}
33450
33451// MaxResults sets the optional parameter "maxResults": Maximum number
33452// of results to return.
33453func (c *FloodlightActivityGroupsListCall) MaxResults(maxResults int64) *FloodlightActivityGroupsListCall {
33454	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
33455	return c
33456}
33457
33458// PageToken sets the optional parameter "pageToken": Value of the
33459// nextPageToken from the previous result page.
33460func (c *FloodlightActivityGroupsListCall) PageToken(pageToken string) *FloodlightActivityGroupsListCall {
33461	c.urlParams_.Set("pageToken", pageToken)
33462	return c
33463}
33464
33465// SearchString sets the optional parameter "searchString": Allows
33466// searching for objects by name or ID. Wildcards (*) are allowed. For
33467// example, "floodlightactivitygroup*2015" will return objects with
33468// names like "floodlightactivitygroup June 2015",
33469// "floodlightactivitygroup April 2015", or simply
33470// "floodlightactivitygroup 2015". Most of the searches also add
33471// wildcards implicitly at the start and the end of the search string.
33472// For example, a search string of "floodlightactivitygroup" will match
33473// objects with name "my floodlightactivitygroup activity",
33474// "floodlightactivitygroup 2015", or simply "floodlightactivitygroup".
33475func (c *FloodlightActivityGroupsListCall) SearchString(searchString string) *FloodlightActivityGroupsListCall {
33476	c.urlParams_.Set("searchString", searchString)
33477	return c
33478}
33479
33480// SortField sets the optional parameter "sortField": Field by which to
33481// sort the list.
33482//
33483// Possible values:
33484//   "ID" (default)
33485//   "NAME"
33486func (c *FloodlightActivityGroupsListCall) SortField(sortField string) *FloodlightActivityGroupsListCall {
33487	c.urlParams_.Set("sortField", sortField)
33488	return c
33489}
33490
33491// SortOrder sets the optional parameter "sortOrder": Order of sorted
33492// results.
33493//
33494// Possible values:
33495//   "ASCENDING" (default)
33496//   "DESCENDING"
33497func (c *FloodlightActivityGroupsListCall) SortOrder(sortOrder string) *FloodlightActivityGroupsListCall {
33498	c.urlParams_.Set("sortOrder", sortOrder)
33499	return c
33500}
33501
33502// Type sets the optional parameter "type": Select only floodlight
33503// activity groups with the specified floodlight activity group type.
33504//
33505// Possible values:
33506//   "COUNTER"
33507//   "SALE"
33508func (c *FloodlightActivityGroupsListCall) Type(type_ string) *FloodlightActivityGroupsListCall {
33509	c.urlParams_.Set("type", type_)
33510	return c
33511}
33512
33513// Fields allows partial responses to be retrieved. See
33514// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33515// for more information.
33516func (c *FloodlightActivityGroupsListCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsListCall {
33517	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33518	return c
33519}
33520
33521// IfNoneMatch sets the optional parameter which makes the operation
33522// fail if the object's ETag matches the given value. This is useful for
33523// getting updates only after the object has changed since the last
33524// request. Use googleapi.IsNotModified to check whether the response
33525// error from Do is the result of In-None-Match.
33526func (c *FloodlightActivityGroupsListCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsListCall {
33527	c.ifNoneMatch_ = entityTag
33528	return c
33529}
33530
33531// Context sets the context to be used in this call's Do method. Any
33532// pending HTTP request will be aborted if the provided context is
33533// canceled.
33534func (c *FloodlightActivityGroupsListCall) Context(ctx context.Context) *FloodlightActivityGroupsListCall {
33535	c.ctx_ = ctx
33536	return c
33537}
33538
33539// Header returns an http.Header that can be modified by the caller to
33540// add HTTP headers to the request.
33541func (c *FloodlightActivityGroupsListCall) Header() http.Header {
33542	if c.header_ == nil {
33543		c.header_ = make(http.Header)
33544	}
33545	return c.header_
33546}
33547
33548func (c *FloodlightActivityGroupsListCall) doRequest(alt string) (*http.Response, error) {
33549	reqHeaders := make(http.Header)
33550	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
33551	for k, v := range c.header_ {
33552		reqHeaders[k] = v
33553	}
33554	reqHeaders.Set("User-Agent", c.s.userAgent())
33555	if c.ifNoneMatch_ != "" {
33556		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33557	}
33558	var body io.Reader = nil
33559	c.urlParams_.Set("alt", alt)
33560	c.urlParams_.Set("prettyPrint", "false")
33561	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33562	urls += "?" + c.urlParams_.Encode()
33563	req, err := http.NewRequest("GET", urls, body)
33564	if err != nil {
33565		return nil, err
33566	}
33567	req.Header = reqHeaders
33568	googleapi.Expand(req.URL, map[string]string{
33569		"profileId": strconv.FormatInt(c.profileId, 10),
33570	})
33571	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33572}
33573
33574// Do executes the "dfareporting.floodlightActivityGroups.list" call.
33575// Exactly one of *FloodlightActivityGroupsListResponse or error will be
33576// non-nil. Any non-2xx status code is an error. Response headers are in
33577// either *FloodlightActivityGroupsListResponse.ServerResponse.Header or
33578// (if a response was returned at all) in
33579// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
33580// whether the returned error was because http.StatusNotModified was
33581// returned.
33582func (c *FloodlightActivityGroupsListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroupsListResponse, error) {
33583	gensupport.SetOptions(c.urlParams_, opts...)
33584	res, err := c.doRequest("json")
33585	if res != nil && res.StatusCode == http.StatusNotModified {
33586		if res.Body != nil {
33587			res.Body.Close()
33588		}
33589		return nil, &googleapi.Error{
33590			Code:   res.StatusCode,
33591			Header: res.Header,
33592		}
33593	}
33594	if err != nil {
33595		return nil, err
33596	}
33597	defer googleapi.CloseBody(res)
33598	if err := googleapi.CheckResponse(res); err != nil {
33599		return nil, err
33600	}
33601	ret := &FloodlightActivityGroupsListResponse{
33602		ServerResponse: googleapi.ServerResponse{
33603			Header:         res.Header,
33604			HTTPStatusCode: res.StatusCode,
33605		},
33606	}
33607	target := &ret
33608	if err := gensupport.DecodeResponse(target, res); err != nil {
33609		return nil, err
33610	}
33611	return ret, nil
33612	// {
33613	//   "description": "Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging.",
33614	//   "httpMethod": "GET",
33615	//   "id": "dfareporting.floodlightActivityGroups.list",
33616	//   "parameterOrder": [
33617	//     "profileId"
33618	//   ],
33619	//   "parameters": {
33620	//     "advertiserId": {
33621	//       "description": "Select only floodlight activity groups with the specified advertiser ID. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.",
33622	//       "format": "int64",
33623	//       "location": "query",
33624	//       "type": "string"
33625	//     },
33626	//     "floodlightConfigurationId": {
33627	//       "description": "Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either advertiserId, or floodlightConfigurationId for a non-empty result.",
33628	//       "format": "int64",
33629	//       "location": "query",
33630	//       "type": "string"
33631	//     },
33632	//     "ids": {
33633	//       "description": "Select only floodlight activity groups with the specified IDs. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.",
33634	//       "format": "int64",
33635	//       "location": "query",
33636	//       "repeated": true,
33637	//       "type": "string"
33638	//     },
33639	//     "maxResults": {
33640	//       "default": "1000",
33641	//       "description": "Maximum number of results to return.",
33642	//       "format": "int32",
33643	//       "location": "query",
33644	//       "maximum": "1000",
33645	//       "minimum": "0",
33646	//       "type": "integer"
33647	//     },
33648	//     "pageToken": {
33649	//       "description": "Value of the nextPageToken from the previous result page.",
33650	//       "location": "query",
33651	//       "type": "string"
33652	//     },
33653	//     "profileId": {
33654	//       "description": "User profile ID associated with this request.",
33655	//       "format": "int64",
33656	//       "location": "path",
33657	//       "required": true,
33658	//       "type": "string"
33659	//     },
33660	//     "searchString": {
33661	//       "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\".",
33662	//       "location": "query",
33663	//       "type": "string"
33664	//     },
33665	//     "sortField": {
33666	//       "default": "ID",
33667	//       "description": "Field by which to sort the list.",
33668	//       "enum": [
33669	//         "ID",
33670	//         "NAME"
33671	//       ],
33672	//       "enumDescriptions": [
33673	//         "",
33674	//         ""
33675	//       ],
33676	//       "location": "query",
33677	//       "type": "string"
33678	//     },
33679	//     "sortOrder": {
33680	//       "default": "ASCENDING",
33681	//       "description": "Order of sorted results.",
33682	//       "enum": [
33683	//         "ASCENDING",
33684	//         "DESCENDING"
33685	//       ],
33686	//       "enumDescriptions": [
33687	//         "",
33688	//         ""
33689	//       ],
33690	//       "location": "query",
33691	//       "type": "string"
33692	//     },
33693	//     "type": {
33694	//       "description": "Select only floodlight activity groups with the specified floodlight activity group type.",
33695	//       "enum": [
33696	//         "COUNTER",
33697	//         "SALE"
33698	//       ],
33699	//       "enumDescriptions": [
33700	//         "",
33701	//         ""
33702	//       ],
33703	//       "location": "query",
33704	//       "type": "string"
33705	//     }
33706	//   },
33707	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
33708	//   "response": {
33709	//     "$ref": "FloodlightActivityGroupsListResponse"
33710	//   },
33711	//   "scopes": [
33712	//     "https://www.googleapis.com/auth/dfatrafficking"
33713	//   ]
33714	// }
33715
33716}
33717
33718// Pages invokes f for each page of results.
33719// A non-nil error returned from f will halt the iteration.
33720// The provided context supersedes any context provided to the Context method.
33721func (c *FloodlightActivityGroupsListCall) Pages(ctx context.Context, f func(*FloodlightActivityGroupsListResponse) error) error {
33722	c.ctx_ = ctx
33723	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
33724	for {
33725		x, err := c.Do()
33726		if err != nil {
33727			return err
33728		}
33729		if err := f(x); err != nil {
33730			return err
33731		}
33732		if x.NextPageToken == "" {
33733			return nil
33734		}
33735		c.PageToken(x.NextPageToken)
33736	}
33737}
33738
33739// method id "dfareporting.floodlightActivityGroups.patch":
33740
33741type FloodlightActivityGroupsPatchCall struct {
33742	s                       *Service
33743	profileId               int64
33744	floodlightactivitygroup *FloodlightActivityGroup
33745	urlParams_              gensupport.URLParams
33746	ctx_                    context.Context
33747	header_                 http.Header
33748}
33749
33750// Patch: Updates an existing floodlight activity group. This method
33751// supports patch semantics.
33752func (r *FloodlightActivityGroupsService) Patch(profileId int64, id int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsPatchCall {
33753	c := &FloodlightActivityGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33754	c.profileId = profileId
33755	c.urlParams_.Set("id", fmt.Sprint(id))
33756	c.floodlightactivitygroup = floodlightactivitygroup
33757	return c
33758}
33759
33760// Fields allows partial responses to be retrieved. See
33761// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33762// for more information.
33763func (c *FloodlightActivityGroupsPatchCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsPatchCall {
33764	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33765	return c
33766}
33767
33768// Context sets the context to be used in this call's Do method. Any
33769// pending HTTP request will be aborted if the provided context is
33770// canceled.
33771func (c *FloodlightActivityGroupsPatchCall) Context(ctx context.Context) *FloodlightActivityGroupsPatchCall {
33772	c.ctx_ = ctx
33773	return c
33774}
33775
33776// Header returns an http.Header that can be modified by the caller to
33777// add HTTP headers to the request.
33778func (c *FloodlightActivityGroupsPatchCall) Header() http.Header {
33779	if c.header_ == nil {
33780		c.header_ = make(http.Header)
33781	}
33782	return c.header_
33783}
33784
33785func (c *FloodlightActivityGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
33786	reqHeaders := make(http.Header)
33787	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
33788	for k, v := range c.header_ {
33789		reqHeaders[k] = v
33790	}
33791	reqHeaders.Set("User-Agent", c.s.userAgent())
33792	var body io.Reader = nil
33793	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
33794	if err != nil {
33795		return nil, err
33796	}
33797	reqHeaders.Set("Content-Type", "application/json")
33798	c.urlParams_.Set("alt", alt)
33799	c.urlParams_.Set("prettyPrint", "false")
33800	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33801	urls += "?" + c.urlParams_.Encode()
33802	req, err := http.NewRequest("PATCH", urls, body)
33803	if err != nil {
33804		return nil, err
33805	}
33806	req.Header = reqHeaders
33807	googleapi.Expand(req.URL, map[string]string{
33808		"profileId": strconv.FormatInt(c.profileId, 10),
33809	})
33810	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33811}
33812
33813// Do executes the "dfareporting.floodlightActivityGroups.patch" call.
33814// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33815// non-2xx status code is an error. Response headers are in either
33816// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33817// returned at all) in error.(*googleapi.Error).Header. Use
33818// googleapi.IsNotModified to check whether the returned error was
33819// because http.StatusNotModified was returned.
33820func (c *FloodlightActivityGroupsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33821	gensupport.SetOptions(c.urlParams_, opts...)
33822	res, err := c.doRequest("json")
33823	if res != nil && res.StatusCode == http.StatusNotModified {
33824		if res.Body != nil {
33825			res.Body.Close()
33826		}
33827		return nil, &googleapi.Error{
33828			Code:   res.StatusCode,
33829			Header: res.Header,
33830		}
33831	}
33832	if err != nil {
33833		return nil, err
33834	}
33835	defer googleapi.CloseBody(res)
33836	if err := googleapi.CheckResponse(res); err != nil {
33837		return nil, err
33838	}
33839	ret := &FloodlightActivityGroup{
33840		ServerResponse: googleapi.ServerResponse{
33841			Header:         res.Header,
33842			HTTPStatusCode: res.StatusCode,
33843		},
33844	}
33845	target := &ret
33846	if err := gensupport.DecodeResponse(target, res); err != nil {
33847		return nil, err
33848	}
33849	return ret, nil
33850	// {
33851	//   "description": "Updates an existing floodlight activity group. This method supports patch semantics.",
33852	//   "httpMethod": "PATCH",
33853	//   "id": "dfareporting.floodlightActivityGroups.patch",
33854	//   "parameterOrder": [
33855	//     "profileId",
33856	//     "id"
33857	//   ],
33858	//   "parameters": {
33859	//     "id": {
33860	//       "description": "Floodlight activity Group ID.",
33861	//       "format": "int64",
33862	//       "location": "query",
33863	//       "required": true,
33864	//       "type": "string"
33865	//     },
33866	//     "profileId": {
33867	//       "description": "User profile ID associated with this request.",
33868	//       "format": "int64",
33869	//       "location": "path",
33870	//       "required": true,
33871	//       "type": "string"
33872	//     }
33873	//   },
33874	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
33875	//   "request": {
33876	//     "$ref": "FloodlightActivityGroup"
33877	//   },
33878	//   "response": {
33879	//     "$ref": "FloodlightActivityGroup"
33880	//   },
33881	//   "scopes": [
33882	//     "https://www.googleapis.com/auth/dfatrafficking"
33883	//   ]
33884	// }
33885
33886}
33887
33888// method id "dfareporting.floodlightActivityGroups.update":
33889
33890type FloodlightActivityGroupsUpdateCall struct {
33891	s                       *Service
33892	profileId               int64
33893	floodlightactivitygroup *FloodlightActivityGroup
33894	urlParams_              gensupport.URLParams
33895	ctx_                    context.Context
33896	header_                 http.Header
33897}
33898
33899// Update: Updates an existing floodlight activity group.
33900func (r *FloodlightActivityGroupsService) Update(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsUpdateCall {
33901	c := &FloodlightActivityGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33902	c.profileId = profileId
33903	c.floodlightactivitygroup = floodlightactivitygroup
33904	return c
33905}
33906
33907// Fields allows partial responses to be retrieved. See
33908// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33909// for more information.
33910func (c *FloodlightActivityGroupsUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsUpdateCall {
33911	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33912	return c
33913}
33914
33915// Context sets the context to be used in this call's Do method. Any
33916// pending HTTP request will be aborted if the provided context is
33917// canceled.
33918func (c *FloodlightActivityGroupsUpdateCall) Context(ctx context.Context) *FloodlightActivityGroupsUpdateCall {
33919	c.ctx_ = ctx
33920	return c
33921}
33922
33923// Header returns an http.Header that can be modified by the caller to
33924// add HTTP headers to the request.
33925func (c *FloodlightActivityGroupsUpdateCall) Header() http.Header {
33926	if c.header_ == nil {
33927		c.header_ = make(http.Header)
33928	}
33929	return c.header_
33930}
33931
33932func (c *FloodlightActivityGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
33933	reqHeaders := make(http.Header)
33934	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
33935	for k, v := range c.header_ {
33936		reqHeaders[k] = v
33937	}
33938	reqHeaders.Set("User-Agent", c.s.userAgent())
33939	var body io.Reader = nil
33940	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
33941	if err != nil {
33942		return nil, err
33943	}
33944	reqHeaders.Set("Content-Type", "application/json")
33945	c.urlParams_.Set("alt", alt)
33946	c.urlParams_.Set("prettyPrint", "false")
33947	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33948	urls += "?" + c.urlParams_.Encode()
33949	req, err := http.NewRequest("PUT", urls, body)
33950	if err != nil {
33951		return nil, err
33952	}
33953	req.Header = reqHeaders
33954	googleapi.Expand(req.URL, map[string]string{
33955		"profileId": strconv.FormatInt(c.profileId, 10),
33956	})
33957	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33958}
33959
33960// Do executes the "dfareporting.floodlightActivityGroups.update" call.
33961// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33962// non-2xx status code is an error. Response headers are in either
33963// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33964// returned at all) in error.(*googleapi.Error).Header. Use
33965// googleapi.IsNotModified to check whether the returned error was
33966// because http.StatusNotModified was returned.
33967func (c *FloodlightActivityGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33968	gensupport.SetOptions(c.urlParams_, opts...)
33969	res, err := c.doRequest("json")
33970	if res != nil && res.StatusCode == http.StatusNotModified {
33971		if res.Body != nil {
33972			res.Body.Close()
33973		}
33974		return nil, &googleapi.Error{
33975			Code:   res.StatusCode,
33976			Header: res.Header,
33977		}
33978	}
33979	if err != nil {
33980		return nil, err
33981	}
33982	defer googleapi.CloseBody(res)
33983	if err := googleapi.CheckResponse(res); err != nil {
33984		return nil, err
33985	}
33986	ret := &FloodlightActivityGroup{
33987		ServerResponse: googleapi.ServerResponse{
33988			Header:         res.Header,
33989			HTTPStatusCode: res.StatusCode,
33990		},
33991	}
33992	target := &ret
33993	if err := gensupport.DecodeResponse(target, res); err != nil {
33994		return nil, err
33995	}
33996	return ret, nil
33997	// {
33998	//   "description": "Updates an existing floodlight activity group.",
33999	//   "httpMethod": "PUT",
34000	//   "id": "dfareporting.floodlightActivityGroups.update",
34001	//   "parameterOrder": [
34002	//     "profileId"
34003	//   ],
34004	//   "parameters": {
34005	//     "profileId": {
34006	//       "description": "User profile ID associated with this request.",
34007	//       "format": "int64",
34008	//       "location": "path",
34009	//       "required": true,
34010	//       "type": "string"
34011	//     }
34012	//   },
34013	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
34014	//   "request": {
34015	//     "$ref": "FloodlightActivityGroup"
34016	//   },
34017	//   "response": {
34018	//     "$ref": "FloodlightActivityGroup"
34019	//   },
34020	//   "scopes": [
34021	//     "https://www.googleapis.com/auth/dfatrafficking"
34022	//   ]
34023	// }
34024
34025}
34026
34027// method id "dfareporting.floodlightConfigurations.get":
34028
34029type FloodlightConfigurationsGetCall struct {
34030	s            *Service
34031	profileId    int64
34032	id           int64
34033	urlParams_   gensupport.URLParams
34034	ifNoneMatch_ string
34035	ctx_         context.Context
34036	header_      http.Header
34037}
34038
34039// Get: Gets one floodlight configuration by ID.
34040func (r *FloodlightConfigurationsService) Get(profileId int64, id int64) *FloodlightConfigurationsGetCall {
34041	c := &FloodlightConfigurationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34042	c.profileId = profileId
34043	c.id = id
34044	return c
34045}
34046
34047// Fields allows partial responses to be retrieved. See
34048// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34049// for more information.
34050func (c *FloodlightConfigurationsGetCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsGetCall {
34051	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34052	return c
34053}
34054
34055// IfNoneMatch sets the optional parameter which makes the operation
34056// fail if the object's ETag matches the given value. This is useful for
34057// getting updates only after the object has changed since the last
34058// request. Use googleapi.IsNotModified to check whether the response
34059// error from Do is the result of In-None-Match.
34060func (c *FloodlightConfigurationsGetCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsGetCall {
34061	c.ifNoneMatch_ = entityTag
34062	return c
34063}
34064
34065// Context sets the context to be used in this call's Do method. Any
34066// pending HTTP request will be aborted if the provided context is
34067// canceled.
34068func (c *FloodlightConfigurationsGetCall) Context(ctx context.Context) *FloodlightConfigurationsGetCall {
34069	c.ctx_ = ctx
34070	return c
34071}
34072
34073// Header returns an http.Header that can be modified by the caller to
34074// add HTTP headers to the request.
34075func (c *FloodlightConfigurationsGetCall) Header() http.Header {
34076	if c.header_ == nil {
34077		c.header_ = make(http.Header)
34078	}
34079	return c.header_
34080}
34081
34082func (c *FloodlightConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
34083	reqHeaders := make(http.Header)
34084	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
34085	for k, v := range c.header_ {
34086		reqHeaders[k] = v
34087	}
34088	reqHeaders.Set("User-Agent", c.s.userAgent())
34089	if c.ifNoneMatch_ != "" {
34090		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34091	}
34092	var body io.Reader = nil
34093	c.urlParams_.Set("alt", alt)
34094	c.urlParams_.Set("prettyPrint", "false")
34095	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations/{id}")
34096	urls += "?" + c.urlParams_.Encode()
34097	req, err := http.NewRequest("GET", urls, body)
34098	if err != nil {
34099		return nil, err
34100	}
34101	req.Header = reqHeaders
34102	googleapi.Expand(req.URL, map[string]string{
34103		"profileId": strconv.FormatInt(c.profileId, 10),
34104		"id":        strconv.FormatInt(c.id, 10),
34105	})
34106	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34107}
34108
34109// Do executes the "dfareporting.floodlightConfigurations.get" call.
34110// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
34111// non-2xx status code is an error. Response headers are in either
34112// *FloodlightConfiguration.ServerResponse.Header or (if a response was
34113// returned at all) in error.(*googleapi.Error).Header. Use
34114// googleapi.IsNotModified to check whether the returned error was
34115// because http.StatusNotModified was returned.
34116func (c *FloodlightConfigurationsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34117	gensupport.SetOptions(c.urlParams_, opts...)
34118	res, err := c.doRequest("json")
34119	if res != nil && res.StatusCode == http.StatusNotModified {
34120		if res.Body != nil {
34121			res.Body.Close()
34122		}
34123		return nil, &googleapi.Error{
34124			Code:   res.StatusCode,
34125			Header: res.Header,
34126		}
34127	}
34128	if err != nil {
34129		return nil, err
34130	}
34131	defer googleapi.CloseBody(res)
34132	if err := googleapi.CheckResponse(res); err != nil {
34133		return nil, err
34134	}
34135	ret := &FloodlightConfiguration{
34136		ServerResponse: googleapi.ServerResponse{
34137			Header:         res.Header,
34138			HTTPStatusCode: res.StatusCode,
34139		},
34140	}
34141	target := &ret
34142	if err := gensupport.DecodeResponse(target, res); err != nil {
34143		return nil, err
34144	}
34145	return ret, nil
34146	// {
34147	//   "description": "Gets one floodlight configuration by ID.",
34148	//   "httpMethod": "GET",
34149	//   "id": "dfareporting.floodlightConfigurations.get",
34150	//   "parameterOrder": [
34151	//     "profileId",
34152	//     "id"
34153	//   ],
34154	//   "parameters": {
34155	//     "id": {
34156	//       "description": "Floodlight configuration ID.",
34157	//       "format": "int64",
34158	//       "location": "path",
34159	//       "required": true,
34160	//       "type": "string"
34161	//     },
34162	//     "profileId": {
34163	//       "description": "User profile ID associated with this request.",
34164	//       "format": "int64",
34165	//       "location": "path",
34166	//       "required": true,
34167	//       "type": "string"
34168	//     }
34169	//   },
34170	//   "path": "userprofiles/{profileId}/floodlightConfigurations/{id}",
34171	//   "response": {
34172	//     "$ref": "FloodlightConfiguration"
34173	//   },
34174	//   "scopes": [
34175	//     "https://www.googleapis.com/auth/dfatrafficking"
34176	//   ]
34177	// }
34178
34179}
34180
34181// method id "dfareporting.floodlightConfigurations.list":
34182
34183type FloodlightConfigurationsListCall struct {
34184	s            *Service
34185	profileId    int64
34186	urlParams_   gensupport.URLParams
34187	ifNoneMatch_ string
34188	ctx_         context.Context
34189	header_      http.Header
34190}
34191
34192// List: Retrieves a list of floodlight configurations, possibly
34193// filtered.
34194func (r *FloodlightConfigurationsService) List(profileId int64) *FloodlightConfigurationsListCall {
34195	c := &FloodlightConfigurationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34196	c.profileId = profileId
34197	return c
34198}
34199
34200// Ids sets the optional parameter "ids": Set of IDs of floodlight
34201// configurations to retrieve. Required field; otherwise an empty list
34202// will be returned.
34203func (c *FloodlightConfigurationsListCall) Ids(ids ...int64) *FloodlightConfigurationsListCall {
34204	var ids_ []string
34205	for _, v := range ids {
34206		ids_ = append(ids_, fmt.Sprint(v))
34207	}
34208	c.urlParams_.SetMulti("ids", ids_)
34209	return c
34210}
34211
34212// Fields allows partial responses to be retrieved. See
34213// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34214// for more information.
34215func (c *FloodlightConfigurationsListCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsListCall {
34216	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34217	return c
34218}
34219
34220// IfNoneMatch sets the optional parameter which makes the operation
34221// fail if the object's ETag matches the given value. This is useful for
34222// getting updates only after the object has changed since the last
34223// request. Use googleapi.IsNotModified to check whether the response
34224// error from Do is the result of In-None-Match.
34225func (c *FloodlightConfigurationsListCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsListCall {
34226	c.ifNoneMatch_ = entityTag
34227	return c
34228}
34229
34230// Context sets the context to be used in this call's Do method. Any
34231// pending HTTP request will be aborted if the provided context is
34232// canceled.
34233func (c *FloodlightConfigurationsListCall) Context(ctx context.Context) *FloodlightConfigurationsListCall {
34234	c.ctx_ = ctx
34235	return c
34236}
34237
34238// Header returns an http.Header that can be modified by the caller to
34239// add HTTP headers to the request.
34240func (c *FloodlightConfigurationsListCall) Header() http.Header {
34241	if c.header_ == nil {
34242		c.header_ = make(http.Header)
34243	}
34244	return c.header_
34245}
34246
34247func (c *FloodlightConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
34248	reqHeaders := make(http.Header)
34249	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
34250	for k, v := range c.header_ {
34251		reqHeaders[k] = v
34252	}
34253	reqHeaders.Set("User-Agent", c.s.userAgent())
34254	if c.ifNoneMatch_ != "" {
34255		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34256	}
34257	var body io.Reader = nil
34258	c.urlParams_.Set("alt", alt)
34259	c.urlParams_.Set("prettyPrint", "false")
34260	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34261	urls += "?" + c.urlParams_.Encode()
34262	req, err := http.NewRequest("GET", urls, body)
34263	if err != nil {
34264		return nil, err
34265	}
34266	req.Header = reqHeaders
34267	googleapi.Expand(req.URL, map[string]string{
34268		"profileId": strconv.FormatInt(c.profileId, 10),
34269	})
34270	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34271}
34272
34273// Do executes the "dfareporting.floodlightConfigurations.list" call.
34274// Exactly one of *FloodlightConfigurationsListResponse or error will be
34275// non-nil. Any non-2xx status code is an error. Response headers are in
34276// either *FloodlightConfigurationsListResponse.ServerResponse.Header or
34277// (if a response was returned at all) in
34278// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
34279// whether the returned error was because http.StatusNotModified was
34280// returned.
34281func (c *FloodlightConfigurationsListCall) Do(opts ...googleapi.CallOption) (*FloodlightConfigurationsListResponse, error) {
34282	gensupport.SetOptions(c.urlParams_, opts...)
34283	res, err := c.doRequest("json")
34284	if res != nil && res.StatusCode == http.StatusNotModified {
34285		if res.Body != nil {
34286			res.Body.Close()
34287		}
34288		return nil, &googleapi.Error{
34289			Code:   res.StatusCode,
34290			Header: res.Header,
34291		}
34292	}
34293	if err != nil {
34294		return nil, err
34295	}
34296	defer googleapi.CloseBody(res)
34297	if err := googleapi.CheckResponse(res); err != nil {
34298		return nil, err
34299	}
34300	ret := &FloodlightConfigurationsListResponse{
34301		ServerResponse: googleapi.ServerResponse{
34302			Header:         res.Header,
34303			HTTPStatusCode: res.StatusCode,
34304		},
34305	}
34306	target := &ret
34307	if err := gensupport.DecodeResponse(target, res); err != nil {
34308		return nil, err
34309	}
34310	return ret, nil
34311	// {
34312	//   "description": "Retrieves a list of floodlight configurations, possibly filtered.",
34313	//   "httpMethod": "GET",
34314	//   "id": "dfareporting.floodlightConfigurations.list",
34315	//   "parameterOrder": [
34316	//     "profileId"
34317	//   ],
34318	//   "parameters": {
34319	//     "ids": {
34320	//       "description": "Set of IDs of floodlight configurations to retrieve. Required field; otherwise an empty list will be returned.",
34321	//       "format": "int64",
34322	//       "location": "query",
34323	//       "repeated": true,
34324	//       "type": "string"
34325	//     },
34326	//     "profileId": {
34327	//       "description": "User profile ID associated with this request.",
34328	//       "format": "int64",
34329	//       "location": "path",
34330	//       "required": true,
34331	//       "type": "string"
34332	//     }
34333	//   },
34334	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34335	//   "response": {
34336	//     "$ref": "FloodlightConfigurationsListResponse"
34337	//   },
34338	//   "scopes": [
34339	//     "https://www.googleapis.com/auth/dfatrafficking"
34340	//   ]
34341	// }
34342
34343}
34344
34345// method id "dfareporting.floodlightConfigurations.patch":
34346
34347type FloodlightConfigurationsPatchCall struct {
34348	s                       *Service
34349	profileId               int64
34350	floodlightconfiguration *FloodlightConfiguration
34351	urlParams_              gensupport.URLParams
34352	ctx_                    context.Context
34353	header_                 http.Header
34354}
34355
34356// Patch: Updates an existing floodlight configuration. This method
34357// supports patch semantics.
34358func (r *FloodlightConfigurationsService) Patch(profileId int64, id int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsPatchCall {
34359	c := &FloodlightConfigurationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34360	c.profileId = profileId
34361	c.urlParams_.Set("id", fmt.Sprint(id))
34362	c.floodlightconfiguration = floodlightconfiguration
34363	return c
34364}
34365
34366// Fields allows partial responses to be retrieved. See
34367// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34368// for more information.
34369func (c *FloodlightConfigurationsPatchCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsPatchCall {
34370	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34371	return c
34372}
34373
34374// Context sets the context to be used in this call's Do method. Any
34375// pending HTTP request will be aborted if the provided context is
34376// canceled.
34377func (c *FloodlightConfigurationsPatchCall) Context(ctx context.Context) *FloodlightConfigurationsPatchCall {
34378	c.ctx_ = ctx
34379	return c
34380}
34381
34382// Header returns an http.Header that can be modified by the caller to
34383// add HTTP headers to the request.
34384func (c *FloodlightConfigurationsPatchCall) Header() http.Header {
34385	if c.header_ == nil {
34386		c.header_ = make(http.Header)
34387	}
34388	return c.header_
34389}
34390
34391func (c *FloodlightConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
34392	reqHeaders := make(http.Header)
34393	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
34394	for k, v := range c.header_ {
34395		reqHeaders[k] = v
34396	}
34397	reqHeaders.Set("User-Agent", c.s.userAgent())
34398	var body io.Reader = nil
34399	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
34400	if err != nil {
34401		return nil, err
34402	}
34403	reqHeaders.Set("Content-Type", "application/json")
34404	c.urlParams_.Set("alt", alt)
34405	c.urlParams_.Set("prettyPrint", "false")
34406	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34407	urls += "?" + c.urlParams_.Encode()
34408	req, err := http.NewRequest("PATCH", urls, body)
34409	if err != nil {
34410		return nil, err
34411	}
34412	req.Header = reqHeaders
34413	googleapi.Expand(req.URL, map[string]string{
34414		"profileId": strconv.FormatInt(c.profileId, 10),
34415	})
34416	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34417}
34418
34419// Do executes the "dfareporting.floodlightConfigurations.patch" call.
34420// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
34421// non-2xx status code is an error. Response headers are in either
34422// *FloodlightConfiguration.ServerResponse.Header or (if a response was
34423// returned at all) in error.(*googleapi.Error).Header. Use
34424// googleapi.IsNotModified to check whether the returned error was
34425// because http.StatusNotModified was returned.
34426func (c *FloodlightConfigurationsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34427	gensupport.SetOptions(c.urlParams_, opts...)
34428	res, err := c.doRequest("json")
34429	if res != nil && res.StatusCode == http.StatusNotModified {
34430		if res.Body != nil {
34431			res.Body.Close()
34432		}
34433		return nil, &googleapi.Error{
34434			Code:   res.StatusCode,
34435			Header: res.Header,
34436		}
34437	}
34438	if err != nil {
34439		return nil, err
34440	}
34441	defer googleapi.CloseBody(res)
34442	if err := googleapi.CheckResponse(res); err != nil {
34443		return nil, err
34444	}
34445	ret := &FloodlightConfiguration{
34446		ServerResponse: googleapi.ServerResponse{
34447			Header:         res.Header,
34448			HTTPStatusCode: res.StatusCode,
34449		},
34450	}
34451	target := &ret
34452	if err := gensupport.DecodeResponse(target, res); err != nil {
34453		return nil, err
34454	}
34455	return ret, nil
34456	// {
34457	//   "description": "Updates an existing floodlight configuration. This method supports patch semantics.",
34458	//   "httpMethod": "PATCH",
34459	//   "id": "dfareporting.floodlightConfigurations.patch",
34460	//   "parameterOrder": [
34461	//     "profileId",
34462	//     "id"
34463	//   ],
34464	//   "parameters": {
34465	//     "id": {
34466	//       "description": "Floodlight configuration ID.",
34467	//       "format": "int64",
34468	//       "location": "query",
34469	//       "required": true,
34470	//       "type": "string"
34471	//     },
34472	//     "profileId": {
34473	//       "description": "User profile ID associated with this request.",
34474	//       "format": "int64",
34475	//       "location": "path",
34476	//       "required": true,
34477	//       "type": "string"
34478	//     }
34479	//   },
34480	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34481	//   "request": {
34482	//     "$ref": "FloodlightConfiguration"
34483	//   },
34484	//   "response": {
34485	//     "$ref": "FloodlightConfiguration"
34486	//   },
34487	//   "scopes": [
34488	//     "https://www.googleapis.com/auth/dfatrafficking"
34489	//   ]
34490	// }
34491
34492}
34493
34494// method id "dfareporting.floodlightConfigurations.update":
34495
34496type FloodlightConfigurationsUpdateCall struct {
34497	s                       *Service
34498	profileId               int64
34499	floodlightconfiguration *FloodlightConfiguration
34500	urlParams_              gensupport.URLParams
34501	ctx_                    context.Context
34502	header_                 http.Header
34503}
34504
34505// Update: Updates an existing floodlight configuration.
34506func (r *FloodlightConfigurationsService) Update(profileId int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsUpdateCall {
34507	c := &FloodlightConfigurationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34508	c.profileId = profileId
34509	c.floodlightconfiguration = floodlightconfiguration
34510	return c
34511}
34512
34513// Fields allows partial responses to be retrieved. See
34514// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34515// for more information.
34516func (c *FloodlightConfigurationsUpdateCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsUpdateCall {
34517	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34518	return c
34519}
34520
34521// Context sets the context to be used in this call's Do method. Any
34522// pending HTTP request will be aborted if the provided context is
34523// canceled.
34524func (c *FloodlightConfigurationsUpdateCall) Context(ctx context.Context) *FloodlightConfigurationsUpdateCall {
34525	c.ctx_ = ctx
34526	return c
34527}
34528
34529// Header returns an http.Header that can be modified by the caller to
34530// add HTTP headers to the request.
34531func (c *FloodlightConfigurationsUpdateCall) Header() http.Header {
34532	if c.header_ == nil {
34533		c.header_ = make(http.Header)
34534	}
34535	return c.header_
34536}
34537
34538func (c *FloodlightConfigurationsUpdateCall) doRequest(alt string) (*http.Response, error) {
34539	reqHeaders := make(http.Header)
34540	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
34541	for k, v := range c.header_ {
34542		reqHeaders[k] = v
34543	}
34544	reqHeaders.Set("User-Agent", c.s.userAgent())
34545	var body io.Reader = nil
34546	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
34547	if err != nil {
34548		return nil, err
34549	}
34550	reqHeaders.Set("Content-Type", "application/json")
34551	c.urlParams_.Set("alt", alt)
34552	c.urlParams_.Set("prettyPrint", "false")
34553	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34554	urls += "?" + c.urlParams_.Encode()
34555	req, err := http.NewRequest("PUT", urls, body)
34556	if err != nil {
34557		return nil, err
34558	}
34559	req.Header = reqHeaders
34560	googleapi.Expand(req.URL, map[string]string{
34561		"profileId": strconv.FormatInt(c.profileId, 10),
34562	})
34563	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34564}
34565
34566// Do executes the "dfareporting.floodlightConfigurations.update" call.
34567// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
34568// non-2xx status code is an error. Response headers are in either
34569// *FloodlightConfiguration.ServerResponse.Header or (if a response was
34570// returned at all) in error.(*googleapi.Error).Header. Use
34571// googleapi.IsNotModified to check whether the returned error was
34572// because http.StatusNotModified was returned.
34573func (c *FloodlightConfigurationsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34574	gensupport.SetOptions(c.urlParams_, opts...)
34575	res, err := c.doRequest("json")
34576	if res != nil && res.StatusCode == http.StatusNotModified {
34577		if res.Body != nil {
34578			res.Body.Close()
34579		}
34580		return nil, &googleapi.Error{
34581			Code:   res.StatusCode,
34582			Header: res.Header,
34583		}
34584	}
34585	if err != nil {
34586		return nil, err
34587	}
34588	defer googleapi.CloseBody(res)
34589	if err := googleapi.CheckResponse(res); err != nil {
34590		return nil, err
34591	}
34592	ret := &FloodlightConfiguration{
34593		ServerResponse: googleapi.ServerResponse{
34594			Header:         res.Header,
34595			HTTPStatusCode: res.StatusCode,
34596		},
34597	}
34598	target := &ret
34599	if err := gensupport.DecodeResponse(target, res); err != nil {
34600		return nil, err
34601	}
34602	return ret, nil
34603	// {
34604	//   "description": "Updates an existing floodlight configuration.",
34605	//   "httpMethod": "PUT",
34606	//   "id": "dfareporting.floodlightConfigurations.update",
34607	//   "parameterOrder": [
34608	//     "profileId"
34609	//   ],
34610	//   "parameters": {
34611	//     "profileId": {
34612	//       "description": "User profile ID associated with this request.",
34613	//       "format": "int64",
34614	//       "location": "path",
34615	//       "required": true,
34616	//       "type": "string"
34617	//     }
34618	//   },
34619	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34620	//   "request": {
34621	//     "$ref": "FloodlightConfiguration"
34622	//   },
34623	//   "response": {
34624	//     "$ref": "FloodlightConfiguration"
34625	//   },
34626	//   "scopes": [
34627	//     "https://www.googleapis.com/auth/dfatrafficking"
34628	//   ]
34629	// }
34630
34631}
34632
34633// method id "dfareporting.inventoryItems.get":
34634
34635type InventoryItemsGetCall struct {
34636	s            *Service
34637	profileId    int64
34638	projectId    int64
34639	id           int64
34640	urlParams_   gensupport.URLParams
34641	ifNoneMatch_ string
34642	ctx_         context.Context
34643	header_      http.Header
34644}
34645
34646// Get: Gets one inventory item by ID.
34647func (r *InventoryItemsService) Get(profileId int64, projectId int64, id int64) *InventoryItemsGetCall {
34648	c := &InventoryItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34649	c.profileId = profileId
34650	c.projectId = projectId
34651	c.id = id
34652	return c
34653}
34654
34655// Fields allows partial responses to be retrieved. See
34656// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34657// for more information.
34658func (c *InventoryItemsGetCall) Fields(s ...googleapi.Field) *InventoryItemsGetCall {
34659	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34660	return c
34661}
34662
34663// IfNoneMatch sets the optional parameter which makes the operation
34664// fail if the object's ETag matches the given value. This is useful for
34665// getting updates only after the object has changed since the last
34666// request. Use googleapi.IsNotModified to check whether the response
34667// error from Do is the result of In-None-Match.
34668func (c *InventoryItemsGetCall) IfNoneMatch(entityTag string) *InventoryItemsGetCall {
34669	c.ifNoneMatch_ = entityTag
34670	return c
34671}
34672
34673// Context sets the context to be used in this call's Do method. Any
34674// pending HTTP request will be aborted if the provided context is
34675// canceled.
34676func (c *InventoryItemsGetCall) Context(ctx context.Context) *InventoryItemsGetCall {
34677	c.ctx_ = ctx
34678	return c
34679}
34680
34681// Header returns an http.Header that can be modified by the caller to
34682// add HTTP headers to the request.
34683func (c *InventoryItemsGetCall) Header() http.Header {
34684	if c.header_ == nil {
34685		c.header_ = make(http.Header)
34686	}
34687	return c.header_
34688}
34689
34690func (c *InventoryItemsGetCall) doRequest(alt string) (*http.Response, error) {
34691	reqHeaders := make(http.Header)
34692	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
34693	for k, v := range c.header_ {
34694		reqHeaders[k] = v
34695	}
34696	reqHeaders.Set("User-Agent", c.s.userAgent())
34697	if c.ifNoneMatch_ != "" {
34698		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34699	}
34700	var body io.Reader = nil
34701	c.urlParams_.Set("alt", alt)
34702	c.urlParams_.Set("prettyPrint", "false")
34703	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}")
34704	urls += "?" + c.urlParams_.Encode()
34705	req, err := http.NewRequest("GET", urls, body)
34706	if err != nil {
34707		return nil, err
34708	}
34709	req.Header = reqHeaders
34710	googleapi.Expand(req.URL, map[string]string{
34711		"profileId": strconv.FormatInt(c.profileId, 10),
34712		"projectId": strconv.FormatInt(c.projectId, 10),
34713		"id":        strconv.FormatInt(c.id, 10),
34714	})
34715	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34716}
34717
34718// Do executes the "dfareporting.inventoryItems.get" call.
34719// Exactly one of *InventoryItem or error will be non-nil. Any non-2xx
34720// status code is an error. Response headers are in either
34721// *InventoryItem.ServerResponse.Header or (if a response was returned
34722// at all) in error.(*googleapi.Error).Header. Use
34723// googleapi.IsNotModified to check whether the returned error was
34724// because http.StatusNotModified was returned.
34725func (c *InventoryItemsGetCall) Do(opts ...googleapi.CallOption) (*InventoryItem, error) {
34726	gensupport.SetOptions(c.urlParams_, opts...)
34727	res, err := c.doRequest("json")
34728	if res != nil && res.StatusCode == http.StatusNotModified {
34729		if res.Body != nil {
34730			res.Body.Close()
34731		}
34732		return nil, &googleapi.Error{
34733			Code:   res.StatusCode,
34734			Header: res.Header,
34735		}
34736	}
34737	if err != nil {
34738		return nil, err
34739	}
34740	defer googleapi.CloseBody(res)
34741	if err := googleapi.CheckResponse(res); err != nil {
34742		return nil, err
34743	}
34744	ret := &InventoryItem{
34745		ServerResponse: googleapi.ServerResponse{
34746			Header:         res.Header,
34747			HTTPStatusCode: res.StatusCode,
34748		},
34749	}
34750	target := &ret
34751	if err := gensupport.DecodeResponse(target, res); err != nil {
34752		return nil, err
34753	}
34754	return ret, nil
34755	// {
34756	//   "description": "Gets one inventory item by ID.",
34757	//   "httpMethod": "GET",
34758	//   "id": "dfareporting.inventoryItems.get",
34759	//   "parameterOrder": [
34760	//     "profileId",
34761	//     "projectId",
34762	//     "id"
34763	//   ],
34764	//   "parameters": {
34765	//     "id": {
34766	//       "description": "Inventory item ID.",
34767	//       "format": "int64",
34768	//       "location": "path",
34769	//       "required": true,
34770	//       "type": "string"
34771	//     },
34772	//     "profileId": {
34773	//       "description": "User profile ID associated with this request.",
34774	//       "format": "int64",
34775	//       "location": "path",
34776	//       "required": true,
34777	//       "type": "string"
34778	//     },
34779	//     "projectId": {
34780	//       "description": "Project ID for order documents.",
34781	//       "format": "int64",
34782	//       "location": "path",
34783	//       "required": true,
34784	//       "type": "string"
34785	//     }
34786	//   },
34787	//   "path": "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}",
34788	//   "response": {
34789	//     "$ref": "InventoryItem"
34790	//   },
34791	//   "scopes": [
34792	//     "https://www.googleapis.com/auth/dfatrafficking"
34793	//   ]
34794	// }
34795
34796}
34797
34798// method id "dfareporting.inventoryItems.list":
34799
34800type InventoryItemsListCall struct {
34801	s            *Service
34802	profileId    int64
34803	projectId    int64
34804	urlParams_   gensupport.URLParams
34805	ifNoneMatch_ string
34806	ctx_         context.Context
34807	header_      http.Header
34808}
34809
34810// List: Retrieves a list of inventory items, possibly filtered. This
34811// method supports paging.
34812func (r *InventoryItemsService) List(profileId int64, projectId int64) *InventoryItemsListCall {
34813	c := &InventoryItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34814	c.profileId = profileId
34815	c.projectId = projectId
34816	return c
34817}
34818
34819// Ids sets the optional parameter "ids": Select only inventory items
34820// with these IDs.
34821func (c *InventoryItemsListCall) Ids(ids ...int64) *InventoryItemsListCall {
34822	var ids_ []string
34823	for _, v := range ids {
34824		ids_ = append(ids_, fmt.Sprint(v))
34825	}
34826	c.urlParams_.SetMulti("ids", ids_)
34827	return c
34828}
34829
34830// InPlan sets the optional parameter "inPlan": Select only inventory
34831// items that are in plan.
34832func (c *InventoryItemsListCall) InPlan(inPlan bool) *InventoryItemsListCall {
34833	c.urlParams_.Set("inPlan", fmt.Sprint(inPlan))
34834	return c
34835}
34836
34837// MaxResults sets the optional parameter "maxResults": Maximum number
34838// of results to return.
34839func (c *InventoryItemsListCall) MaxResults(maxResults int64) *InventoryItemsListCall {
34840	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
34841	return c
34842}
34843
34844// OrderId sets the optional parameter "orderId": Select only inventory
34845// items that belong to specified orders.
34846func (c *InventoryItemsListCall) OrderId(orderId ...int64) *InventoryItemsListCall {
34847	var orderId_ []string
34848	for _, v := range orderId {
34849		orderId_ = append(orderId_, fmt.Sprint(v))
34850	}
34851	c.urlParams_.SetMulti("orderId", orderId_)
34852	return c
34853}
34854
34855// PageToken sets the optional parameter "pageToken": Value of the
34856// nextPageToken from the previous result page.
34857func (c *InventoryItemsListCall) PageToken(pageToken string) *InventoryItemsListCall {
34858	c.urlParams_.Set("pageToken", pageToken)
34859	return c
34860}
34861
34862// SiteId sets the optional parameter "siteId": Select only inventory
34863// items that are associated with these sites.
34864func (c *InventoryItemsListCall) SiteId(siteId ...int64) *InventoryItemsListCall {
34865	var siteId_ []string
34866	for _, v := range siteId {
34867		siteId_ = append(siteId_, fmt.Sprint(v))
34868	}
34869	c.urlParams_.SetMulti("siteId", siteId_)
34870	return c
34871}
34872
34873// SortField sets the optional parameter "sortField": Field by which to
34874// sort the list.
34875//
34876// Possible values:
34877//   "ID" (default)
34878//   "NAME"
34879func (c *InventoryItemsListCall) SortField(sortField string) *InventoryItemsListCall {
34880	c.urlParams_.Set("sortField", sortField)
34881	return c
34882}
34883
34884// SortOrder sets the optional parameter "sortOrder": Order of sorted
34885// results.
34886//
34887// Possible values:
34888//   "ASCENDING" (default)
34889//   "DESCENDING"
34890func (c *InventoryItemsListCall) SortOrder(sortOrder string) *InventoryItemsListCall {
34891	c.urlParams_.Set("sortOrder", sortOrder)
34892	return c
34893}
34894
34895// Type sets the optional parameter "type": Select only inventory items
34896// with this type.
34897//
34898// Possible values:
34899//   "PLANNING_PLACEMENT_TYPE_CREDIT"
34900//   "PLANNING_PLACEMENT_TYPE_REGULAR"
34901func (c *InventoryItemsListCall) Type(type_ string) *InventoryItemsListCall {
34902	c.urlParams_.Set("type", type_)
34903	return c
34904}
34905
34906// Fields allows partial responses to be retrieved. See
34907// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34908// for more information.
34909func (c *InventoryItemsListCall) Fields(s ...googleapi.Field) *InventoryItemsListCall {
34910	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34911	return c
34912}
34913
34914// IfNoneMatch sets the optional parameter which makes the operation
34915// fail if the object's ETag matches the given value. This is useful for
34916// getting updates only after the object has changed since the last
34917// request. Use googleapi.IsNotModified to check whether the response
34918// error from Do is the result of In-None-Match.
34919func (c *InventoryItemsListCall) IfNoneMatch(entityTag string) *InventoryItemsListCall {
34920	c.ifNoneMatch_ = entityTag
34921	return c
34922}
34923
34924// Context sets the context to be used in this call's Do method. Any
34925// pending HTTP request will be aborted if the provided context is
34926// canceled.
34927func (c *InventoryItemsListCall) Context(ctx context.Context) *InventoryItemsListCall {
34928	c.ctx_ = ctx
34929	return c
34930}
34931
34932// Header returns an http.Header that can be modified by the caller to
34933// add HTTP headers to the request.
34934func (c *InventoryItemsListCall) Header() http.Header {
34935	if c.header_ == nil {
34936		c.header_ = make(http.Header)
34937	}
34938	return c.header_
34939}
34940
34941func (c *InventoryItemsListCall) doRequest(alt string) (*http.Response, error) {
34942	reqHeaders := make(http.Header)
34943	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
34944	for k, v := range c.header_ {
34945		reqHeaders[k] = v
34946	}
34947	reqHeaders.Set("User-Agent", c.s.userAgent())
34948	if c.ifNoneMatch_ != "" {
34949		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34950	}
34951	var body io.Reader = nil
34952	c.urlParams_.Set("alt", alt)
34953	c.urlParams_.Set("prettyPrint", "false")
34954	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems")
34955	urls += "?" + c.urlParams_.Encode()
34956	req, err := http.NewRequest("GET", urls, body)
34957	if err != nil {
34958		return nil, err
34959	}
34960	req.Header = reqHeaders
34961	googleapi.Expand(req.URL, map[string]string{
34962		"profileId": strconv.FormatInt(c.profileId, 10),
34963		"projectId": strconv.FormatInt(c.projectId, 10),
34964	})
34965	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34966}
34967
34968// Do executes the "dfareporting.inventoryItems.list" call.
34969// Exactly one of *InventoryItemsListResponse or error will be non-nil.
34970// Any non-2xx status code is an error. Response headers are in either
34971// *InventoryItemsListResponse.ServerResponse.Header or (if a response
34972// was returned at all) in error.(*googleapi.Error).Header. Use
34973// googleapi.IsNotModified to check whether the returned error was
34974// because http.StatusNotModified was returned.
34975func (c *InventoryItemsListCall) Do(opts ...googleapi.CallOption) (*InventoryItemsListResponse, error) {
34976	gensupport.SetOptions(c.urlParams_, opts...)
34977	res, err := c.doRequest("json")
34978	if res != nil && res.StatusCode == http.StatusNotModified {
34979		if res.Body != nil {
34980			res.Body.Close()
34981		}
34982		return nil, &googleapi.Error{
34983			Code:   res.StatusCode,
34984			Header: res.Header,
34985		}
34986	}
34987	if err != nil {
34988		return nil, err
34989	}
34990	defer googleapi.CloseBody(res)
34991	if err := googleapi.CheckResponse(res); err != nil {
34992		return nil, err
34993	}
34994	ret := &InventoryItemsListResponse{
34995		ServerResponse: googleapi.ServerResponse{
34996			Header:         res.Header,
34997			HTTPStatusCode: res.StatusCode,
34998		},
34999	}
35000	target := &ret
35001	if err := gensupport.DecodeResponse(target, res); err != nil {
35002		return nil, err
35003	}
35004	return ret, nil
35005	// {
35006	//   "description": "Retrieves a list of inventory items, possibly filtered. This method supports paging.",
35007	//   "httpMethod": "GET",
35008	//   "id": "dfareporting.inventoryItems.list",
35009	//   "parameterOrder": [
35010	//     "profileId",
35011	//     "projectId"
35012	//   ],
35013	//   "parameters": {
35014	//     "ids": {
35015	//       "description": "Select only inventory items with these IDs.",
35016	//       "format": "int64",
35017	//       "location": "query",
35018	//       "repeated": true,
35019	//       "type": "string"
35020	//     },
35021	//     "inPlan": {
35022	//       "description": "Select only inventory items that are in plan.",
35023	//       "location": "query",
35024	//       "type": "boolean"
35025	//     },
35026	//     "maxResults": {
35027	//       "default": "1000",
35028	//       "description": "Maximum number of results to return.",
35029	//       "format": "int32",
35030	//       "location": "query",
35031	//       "maximum": "1000",
35032	//       "minimum": "0",
35033	//       "type": "integer"
35034	//     },
35035	//     "orderId": {
35036	//       "description": "Select only inventory items that belong to specified orders.",
35037	//       "format": "int64",
35038	//       "location": "query",
35039	//       "repeated": true,
35040	//       "type": "string"
35041	//     },
35042	//     "pageToken": {
35043	//       "description": "Value of the nextPageToken from the previous result page.",
35044	//       "location": "query",
35045	//       "type": "string"
35046	//     },
35047	//     "profileId": {
35048	//       "description": "User profile ID associated with this request.",
35049	//       "format": "int64",
35050	//       "location": "path",
35051	//       "required": true,
35052	//       "type": "string"
35053	//     },
35054	//     "projectId": {
35055	//       "description": "Project ID for order documents.",
35056	//       "format": "int64",
35057	//       "location": "path",
35058	//       "required": true,
35059	//       "type": "string"
35060	//     },
35061	//     "siteId": {
35062	//       "description": "Select only inventory items that are associated with these sites.",
35063	//       "format": "int64",
35064	//       "location": "query",
35065	//       "repeated": true,
35066	//       "type": "string"
35067	//     },
35068	//     "sortField": {
35069	//       "default": "ID",
35070	//       "description": "Field by which to sort the list.",
35071	//       "enum": [
35072	//         "ID",
35073	//         "NAME"
35074	//       ],
35075	//       "enumDescriptions": [
35076	//         "",
35077	//         ""
35078	//       ],
35079	//       "location": "query",
35080	//       "type": "string"
35081	//     },
35082	//     "sortOrder": {
35083	//       "default": "ASCENDING",
35084	//       "description": "Order of sorted results.",
35085	//       "enum": [
35086	//         "ASCENDING",
35087	//         "DESCENDING"
35088	//       ],
35089	//       "enumDescriptions": [
35090	//         "",
35091	//         ""
35092	//       ],
35093	//       "location": "query",
35094	//       "type": "string"
35095	//     },
35096	//     "type": {
35097	//       "description": "Select only inventory items with this type.",
35098	//       "enum": [
35099	//         "PLANNING_PLACEMENT_TYPE_CREDIT",
35100	//         "PLANNING_PLACEMENT_TYPE_REGULAR"
35101	//       ],
35102	//       "enumDescriptions": [
35103	//         "",
35104	//         ""
35105	//       ],
35106	//       "location": "query",
35107	//       "type": "string"
35108	//     }
35109	//   },
35110	//   "path": "userprofiles/{profileId}/projects/{projectId}/inventoryItems",
35111	//   "response": {
35112	//     "$ref": "InventoryItemsListResponse"
35113	//   },
35114	//   "scopes": [
35115	//     "https://www.googleapis.com/auth/dfatrafficking"
35116	//   ]
35117	// }
35118
35119}
35120
35121// Pages invokes f for each page of results.
35122// A non-nil error returned from f will halt the iteration.
35123// The provided context supersedes any context provided to the Context method.
35124func (c *InventoryItemsListCall) Pages(ctx context.Context, f func(*InventoryItemsListResponse) error) error {
35125	c.ctx_ = ctx
35126	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
35127	for {
35128		x, err := c.Do()
35129		if err != nil {
35130			return err
35131		}
35132		if err := f(x); err != nil {
35133			return err
35134		}
35135		if x.NextPageToken == "" {
35136			return nil
35137		}
35138		c.PageToken(x.NextPageToken)
35139	}
35140}
35141
35142// method id "dfareporting.languages.list":
35143
35144type LanguagesListCall struct {
35145	s            *Service
35146	profileId    int64
35147	urlParams_   gensupport.URLParams
35148	ifNoneMatch_ string
35149	ctx_         context.Context
35150	header_      http.Header
35151}
35152
35153// List: Retrieves a list of languages.
35154func (r *LanguagesService) List(profileId int64) *LanguagesListCall {
35155	c := &LanguagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35156	c.profileId = profileId
35157	return c
35158}
35159
35160// Fields allows partial responses to be retrieved. See
35161// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35162// for more information.
35163func (c *LanguagesListCall) Fields(s ...googleapi.Field) *LanguagesListCall {
35164	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35165	return c
35166}
35167
35168// IfNoneMatch sets the optional parameter which makes the operation
35169// fail if the object's ETag matches the given value. This is useful for
35170// getting updates only after the object has changed since the last
35171// request. Use googleapi.IsNotModified to check whether the response
35172// error from Do is the result of In-None-Match.
35173func (c *LanguagesListCall) IfNoneMatch(entityTag string) *LanguagesListCall {
35174	c.ifNoneMatch_ = entityTag
35175	return c
35176}
35177
35178// Context sets the context to be used in this call's Do method. Any
35179// pending HTTP request will be aborted if the provided context is
35180// canceled.
35181func (c *LanguagesListCall) Context(ctx context.Context) *LanguagesListCall {
35182	c.ctx_ = ctx
35183	return c
35184}
35185
35186// Header returns an http.Header that can be modified by the caller to
35187// add HTTP headers to the request.
35188func (c *LanguagesListCall) Header() http.Header {
35189	if c.header_ == nil {
35190		c.header_ = make(http.Header)
35191	}
35192	return c.header_
35193}
35194
35195func (c *LanguagesListCall) doRequest(alt string) (*http.Response, error) {
35196	reqHeaders := make(http.Header)
35197	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
35198	for k, v := range c.header_ {
35199		reqHeaders[k] = v
35200	}
35201	reqHeaders.Set("User-Agent", c.s.userAgent())
35202	if c.ifNoneMatch_ != "" {
35203		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35204	}
35205	var body io.Reader = nil
35206	c.urlParams_.Set("alt", alt)
35207	c.urlParams_.Set("prettyPrint", "false")
35208	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/languages")
35209	urls += "?" + c.urlParams_.Encode()
35210	req, err := http.NewRequest("GET", urls, body)
35211	if err != nil {
35212		return nil, err
35213	}
35214	req.Header = reqHeaders
35215	googleapi.Expand(req.URL, map[string]string{
35216		"profileId": strconv.FormatInt(c.profileId, 10),
35217	})
35218	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35219}
35220
35221// Do executes the "dfareporting.languages.list" call.
35222// Exactly one of *LanguagesListResponse or error will be non-nil. Any
35223// non-2xx status code is an error. Response headers are in either
35224// *LanguagesListResponse.ServerResponse.Header or (if a response was
35225// 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 *LanguagesListCall) Do(opts ...googleapi.CallOption) (*LanguagesListResponse, 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 := &LanguagesListResponse{
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 languages.",
35260	//   "httpMethod": "GET",
35261	//   "id": "dfareporting.languages.list",
35262	//   "parameterOrder": [
35263	//     "profileId"
35264	//   ],
35265	//   "parameters": {
35266	//     "profileId": {
35267	//       "description": "User profile ID associated with this request.",
35268	//       "format": "int64",
35269	//       "location": "path",
35270	//       "required": true,
35271	//       "type": "string"
35272	//     }
35273	//   },
35274	//   "path": "userprofiles/{profileId}/languages",
35275	//   "response": {
35276	//     "$ref": "LanguagesListResponse"
35277	//   },
35278	//   "scopes": [
35279	//     "https://www.googleapis.com/auth/dfatrafficking"
35280	//   ]
35281	// }
35282
35283}
35284
35285// method id "dfareporting.metros.list":
35286
35287type MetrosListCall struct {
35288	s            *Service
35289	profileId    int64
35290	urlParams_   gensupport.URLParams
35291	ifNoneMatch_ string
35292	ctx_         context.Context
35293	header_      http.Header
35294}
35295
35296// List: Retrieves a list of metros.
35297func (r *MetrosService) List(profileId int64) *MetrosListCall {
35298	c := &MetrosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35299	c.profileId = profileId
35300	return c
35301}
35302
35303// Fields allows partial responses to be retrieved. See
35304// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35305// for more information.
35306func (c *MetrosListCall) Fields(s ...googleapi.Field) *MetrosListCall {
35307	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35308	return c
35309}
35310
35311// IfNoneMatch sets the optional parameter which makes the operation
35312// fail if the object's ETag matches the given value. This is useful for
35313// getting updates only after the object has changed since the last
35314// request. Use googleapi.IsNotModified to check whether the response
35315// error from Do is the result of In-None-Match.
35316func (c *MetrosListCall) IfNoneMatch(entityTag string) *MetrosListCall {
35317	c.ifNoneMatch_ = entityTag
35318	return c
35319}
35320
35321// Context sets the context to be used in this call's Do method. Any
35322// pending HTTP request will be aborted if the provided context is
35323// canceled.
35324func (c *MetrosListCall) Context(ctx context.Context) *MetrosListCall {
35325	c.ctx_ = ctx
35326	return c
35327}
35328
35329// Header returns an http.Header that can be modified by the caller to
35330// add HTTP headers to the request.
35331func (c *MetrosListCall) Header() http.Header {
35332	if c.header_ == nil {
35333		c.header_ = make(http.Header)
35334	}
35335	return c.header_
35336}
35337
35338func (c *MetrosListCall) doRequest(alt string) (*http.Response, error) {
35339	reqHeaders := make(http.Header)
35340	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
35341	for k, v := range c.header_ {
35342		reqHeaders[k] = v
35343	}
35344	reqHeaders.Set("User-Agent", c.s.userAgent())
35345	if c.ifNoneMatch_ != "" {
35346		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35347	}
35348	var body io.Reader = nil
35349	c.urlParams_.Set("alt", alt)
35350	c.urlParams_.Set("prettyPrint", "false")
35351	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/metros")
35352	urls += "?" + c.urlParams_.Encode()
35353	req, err := http.NewRequest("GET", urls, body)
35354	if err != nil {
35355		return nil, err
35356	}
35357	req.Header = reqHeaders
35358	googleapi.Expand(req.URL, map[string]string{
35359		"profileId": strconv.FormatInt(c.profileId, 10),
35360	})
35361	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35362}
35363
35364// Do executes the "dfareporting.metros.list" call.
35365// Exactly one of *MetrosListResponse or error will be non-nil. Any
35366// non-2xx status code is an error. Response headers are in either
35367// *MetrosListResponse.ServerResponse.Header or (if a response was
35368// returned at all) in error.(*googleapi.Error).Header. Use
35369// googleapi.IsNotModified to check whether the returned error was
35370// because http.StatusNotModified was returned.
35371func (c *MetrosListCall) Do(opts ...googleapi.CallOption) (*MetrosListResponse, error) {
35372	gensupport.SetOptions(c.urlParams_, opts...)
35373	res, err := c.doRequest("json")
35374	if res != nil && res.StatusCode == http.StatusNotModified {
35375		if res.Body != nil {
35376			res.Body.Close()
35377		}
35378		return nil, &googleapi.Error{
35379			Code:   res.StatusCode,
35380			Header: res.Header,
35381		}
35382	}
35383	if err != nil {
35384		return nil, err
35385	}
35386	defer googleapi.CloseBody(res)
35387	if err := googleapi.CheckResponse(res); err != nil {
35388		return nil, err
35389	}
35390	ret := &MetrosListResponse{
35391		ServerResponse: googleapi.ServerResponse{
35392			Header:         res.Header,
35393			HTTPStatusCode: res.StatusCode,
35394		},
35395	}
35396	target := &ret
35397	if err := gensupport.DecodeResponse(target, res); err != nil {
35398		return nil, err
35399	}
35400	return ret, nil
35401	// {
35402	//   "description": "Retrieves a list of metros.",
35403	//   "httpMethod": "GET",
35404	//   "id": "dfareporting.metros.list",
35405	//   "parameterOrder": [
35406	//     "profileId"
35407	//   ],
35408	//   "parameters": {
35409	//     "profileId": {
35410	//       "description": "User profile ID associated with this request.",
35411	//       "format": "int64",
35412	//       "location": "path",
35413	//       "required": true,
35414	//       "type": "string"
35415	//     }
35416	//   },
35417	//   "path": "userprofiles/{profileId}/metros",
35418	//   "response": {
35419	//     "$ref": "MetrosListResponse"
35420	//   },
35421	//   "scopes": [
35422	//     "https://www.googleapis.com/auth/dfatrafficking"
35423	//   ]
35424	// }
35425
35426}
35427
35428// method id "dfareporting.mobileApps.get":
35429
35430type MobileAppsGetCall struct {
35431	s            *Service
35432	profileId    int64
35433	id           string
35434	urlParams_   gensupport.URLParams
35435	ifNoneMatch_ string
35436	ctx_         context.Context
35437	header_      http.Header
35438}
35439
35440// Get: Gets one mobile app by ID.
35441func (r *MobileAppsService) Get(profileId int64, id string) *MobileAppsGetCall {
35442	c := &MobileAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35443	c.profileId = profileId
35444	c.id = id
35445	return c
35446}
35447
35448// Fields allows partial responses to be retrieved. See
35449// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35450// for more information.
35451func (c *MobileAppsGetCall) Fields(s ...googleapi.Field) *MobileAppsGetCall {
35452	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35453	return c
35454}
35455
35456// IfNoneMatch sets the optional parameter which makes the operation
35457// fail if the object's ETag matches the given value. This is useful for
35458// getting updates only after the object has changed since the last
35459// request. Use googleapi.IsNotModified to check whether the response
35460// error from Do is the result of In-None-Match.
35461func (c *MobileAppsGetCall) IfNoneMatch(entityTag string) *MobileAppsGetCall {
35462	c.ifNoneMatch_ = entityTag
35463	return c
35464}
35465
35466// Context sets the context to be used in this call's Do method. Any
35467// pending HTTP request will be aborted if the provided context is
35468// canceled.
35469func (c *MobileAppsGetCall) Context(ctx context.Context) *MobileAppsGetCall {
35470	c.ctx_ = ctx
35471	return c
35472}
35473
35474// Header returns an http.Header that can be modified by the caller to
35475// add HTTP headers to the request.
35476func (c *MobileAppsGetCall) Header() http.Header {
35477	if c.header_ == nil {
35478		c.header_ = make(http.Header)
35479	}
35480	return c.header_
35481}
35482
35483func (c *MobileAppsGetCall) doRequest(alt string) (*http.Response, error) {
35484	reqHeaders := make(http.Header)
35485	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
35486	for k, v := range c.header_ {
35487		reqHeaders[k] = v
35488	}
35489	reqHeaders.Set("User-Agent", c.s.userAgent())
35490	if c.ifNoneMatch_ != "" {
35491		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35492	}
35493	var body io.Reader = nil
35494	c.urlParams_.Set("alt", alt)
35495	c.urlParams_.Set("prettyPrint", "false")
35496	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileApps/{id}")
35497	urls += "?" + c.urlParams_.Encode()
35498	req, err := http.NewRequest("GET", urls, body)
35499	if err != nil {
35500		return nil, err
35501	}
35502	req.Header = reqHeaders
35503	googleapi.Expand(req.URL, map[string]string{
35504		"profileId": strconv.FormatInt(c.profileId, 10),
35505		"id":        c.id,
35506	})
35507	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35508}
35509
35510// Do executes the "dfareporting.mobileApps.get" call.
35511// Exactly one of *MobileApp or error will be non-nil. Any non-2xx
35512// status code is an error. Response headers are in either
35513// *MobileApp.ServerResponse.Header or (if a response was returned at
35514// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
35515// to check whether the returned error was because
35516// http.StatusNotModified was returned.
35517func (c *MobileAppsGetCall) Do(opts ...googleapi.CallOption) (*MobileApp, error) {
35518	gensupport.SetOptions(c.urlParams_, opts...)
35519	res, err := c.doRequest("json")
35520	if res != nil && res.StatusCode == http.StatusNotModified {
35521		if res.Body != nil {
35522			res.Body.Close()
35523		}
35524		return nil, &googleapi.Error{
35525			Code:   res.StatusCode,
35526			Header: res.Header,
35527		}
35528	}
35529	if err != nil {
35530		return nil, err
35531	}
35532	defer googleapi.CloseBody(res)
35533	if err := googleapi.CheckResponse(res); err != nil {
35534		return nil, err
35535	}
35536	ret := &MobileApp{
35537		ServerResponse: googleapi.ServerResponse{
35538			Header:         res.Header,
35539			HTTPStatusCode: res.StatusCode,
35540		},
35541	}
35542	target := &ret
35543	if err := gensupport.DecodeResponse(target, res); err != nil {
35544		return nil, err
35545	}
35546	return ret, nil
35547	// {
35548	//   "description": "Gets one mobile app by ID.",
35549	//   "httpMethod": "GET",
35550	//   "id": "dfareporting.mobileApps.get",
35551	//   "parameterOrder": [
35552	//     "profileId",
35553	//     "id"
35554	//   ],
35555	//   "parameters": {
35556	//     "id": {
35557	//       "description": "Mobile app ID.",
35558	//       "location": "path",
35559	//       "required": true,
35560	//       "type": "string"
35561	//     },
35562	//     "profileId": {
35563	//       "description": "User profile ID associated with this request.",
35564	//       "format": "int64",
35565	//       "location": "path",
35566	//       "required": true,
35567	//       "type": "string"
35568	//     }
35569	//   },
35570	//   "path": "userprofiles/{profileId}/mobileApps/{id}",
35571	//   "response": {
35572	//     "$ref": "MobileApp"
35573	//   },
35574	//   "scopes": [
35575	//     "https://www.googleapis.com/auth/dfatrafficking"
35576	//   ]
35577	// }
35578
35579}
35580
35581// method id "dfareporting.mobileApps.list":
35582
35583type MobileAppsListCall struct {
35584	s            *Service
35585	profileId    int64
35586	urlParams_   gensupport.URLParams
35587	ifNoneMatch_ string
35588	ctx_         context.Context
35589	header_      http.Header
35590}
35591
35592// List: Retrieves list of available mobile apps.
35593func (r *MobileAppsService) List(profileId int64) *MobileAppsListCall {
35594	c := &MobileAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35595	c.profileId = profileId
35596	return c
35597}
35598
35599// Directories sets the optional parameter "directories": Select only
35600// apps from these directories.
35601//
35602// Possible values:
35603//   "APPLE_APP_STORE"
35604//   "GOOGLE_PLAY_STORE"
35605//   "UNKNOWN"
35606func (c *MobileAppsListCall) Directories(directories ...string) *MobileAppsListCall {
35607	c.urlParams_.SetMulti("directories", append([]string{}, directories...))
35608	return c
35609}
35610
35611// Ids sets the optional parameter "ids": Select only apps with these
35612// IDs.
35613func (c *MobileAppsListCall) Ids(ids ...string) *MobileAppsListCall {
35614	c.urlParams_.SetMulti("ids", append([]string{}, ids...))
35615	return c
35616}
35617
35618// MaxResults sets the optional parameter "maxResults": Maximum number
35619// of results to return.
35620func (c *MobileAppsListCall) MaxResults(maxResults int64) *MobileAppsListCall {
35621	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
35622	return c
35623}
35624
35625// PageToken sets the optional parameter "pageToken": Value of the
35626// nextPageToken from the previous result page.
35627func (c *MobileAppsListCall) PageToken(pageToken string) *MobileAppsListCall {
35628	c.urlParams_.Set("pageToken", pageToken)
35629	return c
35630}
35631
35632// SearchString sets the optional parameter "searchString": Allows
35633// searching for objects by name or ID. Wildcards (*) are allowed. For
35634// example, "app*2015" will return objects with names like "app Jan
35635// 2018", "app Jan 2018", or simply "app 2018". Most of the searches
35636// also add wildcards implicitly at the start and the end of the search
35637// string. For example, a search string of "app" will match objects with
35638// name "my app", "app 2018", or simply "app".
35639func (c *MobileAppsListCall) SearchString(searchString string) *MobileAppsListCall {
35640	c.urlParams_.Set("searchString", searchString)
35641	return c
35642}
35643
35644// Fields allows partial responses to be retrieved. See
35645// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35646// for more information.
35647func (c *MobileAppsListCall) Fields(s ...googleapi.Field) *MobileAppsListCall {
35648	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35649	return c
35650}
35651
35652// IfNoneMatch sets the optional parameter which makes the operation
35653// fail if the object's ETag matches the given value. This is useful for
35654// getting updates only after the object has changed since the last
35655// request. Use googleapi.IsNotModified to check whether the response
35656// error from Do is the result of In-None-Match.
35657func (c *MobileAppsListCall) IfNoneMatch(entityTag string) *MobileAppsListCall {
35658	c.ifNoneMatch_ = entityTag
35659	return c
35660}
35661
35662// Context sets the context to be used in this call's Do method. Any
35663// pending HTTP request will be aborted if the provided context is
35664// canceled.
35665func (c *MobileAppsListCall) Context(ctx context.Context) *MobileAppsListCall {
35666	c.ctx_ = ctx
35667	return c
35668}
35669
35670// Header returns an http.Header that can be modified by the caller to
35671// add HTTP headers to the request.
35672func (c *MobileAppsListCall) Header() http.Header {
35673	if c.header_ == nil {
35674		c.header_ = make(http.Header)
35675	}
35676	return c.header_
35677}
35678
35679func (c *MobileAppsListCall) doRequest(alt string) (*http.Response, error) {
35680	reqHeaders := make(http.Header)
35681	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
35682	for k, v := range c.header_ {
35683		reqHeaders[k] = v
35684	}
35685	reqHeaders.Set("User-Agent", c.s.userAgent())
35686	if c.ifNoneMatch_ != "" {
35687		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35688	}
35689	var body io.Reader = nil
35690	c.urlParams_.Set("alt", alt)
35691	c.urlParams_.Set("prettyPrint", "false")
35692	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileApps")
35693	urls += "?" + c.urlParams_.Encode()
35694	req, err := http.NewRequest("GET", urls, body)
35695	if err != nil {
35696		return nil, err
35697	}
35698	req.Header = reqHeaders
35699	googleapi.Expand(req.URL, map[string]string{
35700		"profileId": strconv.FormatInt(c.profileId, 10),
35701	})
35702	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35703}
35704
35705// Do executes the "dfareporting.mobileApps.list" call.
35706// Exactly one of *MobileAppsListResponse or error will be non-nil. Any
35707// non-2xx status code is an error. Response headers are in either
35708// *MobileAppsListResponse.ServerResponse.Header or (if a response was
35709// returned at all) in error.(*googleapi.Error).Header. Use
35710// googleapi.IsNotModified to check whether the returned error was
35711// because http.StatusNotModified was returned.
35712func (c *MobileAppsListCall) Do(opts ...googleapi.CallOption) (*MobileAppsListResponse, error) {
35713	gensupport.SetOptions(c.urlParams_, opts...)
35714	res, err := c.doRequest("json")
35715	if res != nil && res.StatusCode == http.StatusNotModified {
35716		if res.Body != nil {
35717			res.Body.Close()
35718		}
35719		return nil, &googleapi.Error{
35720			Code:   res.StatusCode,
35721			Header: res.Header,
35722		}
35723	}
35724	if err != nil {
35725		return nil, err
35726	}
35727	defer googleapi.CloseBody(res)
35728	if err := googleapi.CheckResponse(res); err != nil {
35729		return nil, err
35730	}
35731	ret := &MobileAppsListResponse{
35732		ServerResponse: googleapi.ServerResponse{
35733			Header:         res.Header,
35734			HTTPStatusCode: res.StatusCode,
35735		},
35736	}
35737	target := &ret
35738	if err := gensupport.DecodeResponse(target, res); err != nil {
35739		return nil, err
35740	}
35741	return ret, nil
35742	// {
35743	//   "description": "Retrieves list of available mobile apps.",
35744	//   "httpMethod": "GET",
35745	//   "id": "dfareporting.mobileApps.list",
35746	//   "parameterOrder": [
35747	//     "profileId"
35748	//   ],
35749	//   "parameters": {
35750	//     "directories": {
35751	//       "description": "Select only apps from these directories.",
35752	//       "enum": [
35753	//         "APPLE_APP_STORE",
35754	//         "GOOGLE_PLAY_STORE",
35755	//         "UNKNOWN"
35756	//       ],
35757	//       "enumDescriptions": [
35758	//         "",
35759	//         "",
35760	//         ""
35761	//       ],
35762	//       "location": "query",
35763	//       "repeated": true,
35764	//       "type": "string"
35765	//     },
35766	//     "ids": {
35767	//       "description": "Select only apps with these IDs.",
35768	//       "location": "query",
35769	//       "repeated": true,
35770	//       "type": "string"
35771	//     },
35772	//     "maxResults": {
35773	//       "default": "1000",
35774	//       "description": "Maximum number of results to return.",
35775	//       "format": "int32",
35776	//       "location": "query",
35777	//       "maximum": "1000",
35778	//       "minimum": "0",
35779	//       "type": "integer"
35780	//     },
35781	//     "pageToken": {
35782	//       "description": "Value of the nextPageToken from the previous result page.",
35783	//       "location": "query",
35784	//       "type": "string"
35785	//     },
35786	//     "profileId": {
35787	//       "description": "User profile ID associated with this request.",
35788	//       "format": "int64",
35789	//       "location": "path",
35790	//       "required": true,
35791	//       "type": "string"
35792	//     },
35793	//     "searchString": {
35794	//       "description": "Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, \"app*2015\" will return objects with names like \"app Jan 2018\", \"app Jan 2018\", or simply \"app 2018\". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of \"app\" will match objects with name \"my app\", \"app 2018\", or simply \"app\".",
35795	//       "location": "query",
35796	//       "type": "string"
35797	//     }
35798	//   },
35799	//   "path": "userprofiles/{profileId}/mobileApps",
35800	//   "response": {
35801	//     "$ref": "MobileAppsListResponse"
35802	//   },
35803	//   "scopes": [
35804	//     "https://www.googleapis.com/auth/dfatrafficking"
35805	//   ]
35806	// }
35807
35808}
35809
35810// Pages invokes f for each page of results.
35811// A non-nil error returned from f will halt the iteration.
35812// The provided context supersedes any context provided to the Context method.
35813func (c *MobileAppsListCall) Pages(ctx context.Context, f func(*MobileAppsListResponse) error) error {
35814	c.ctx_ = ctx
35815	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
35816	for {
35817		x, err := c.Do()
35818		if err != nil {
35819			return err
35820		}
35821		if err := f(x); err != nil {
35822			return err
35823		}
35824		if x.NextPageToken == "" {
35825			return nil
35826		}
35827		c.PageToken(x.NextPageToken)
35828	}
35829}
35830
35831// method id "dfareporting.mobileCarriers.get":
35832
35833type MobileCarriersGetCall struct {
35834	s            *Service
35835	profileId    int64
35836	id           int64
35837	urlParams_   gensupport.URLParams
35838	ifNoneMatch_ string
35839	ctx_         context.Context
35840	header_      http.Header
35841}
35842
35843// Get: Gets one mobile carrier by ID.
35844func (r *MobileCarriersService) Get(profileId int64, id int64) *MobileCarriersGetCall {
35845	c := &MobileCarriersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35846	c.profileId = profileId
35847	c.id = id
35848	return c
35849}
35850
35851// Fields allows partial responses to be retrieved. See
35852// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35853// for more information.
35854func (c *MobileCarriersGetCall) Fields(s ...googleapi.Field) *MobileCarriersGetCall {
35855	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35856	return c
35857}
35858
35859// IfNoneMatch sets the optional parameter which makes the operation
35860// fail if the object's ETag matches the given value. This is useful for
35861// getting updates only after the object has changed since the last
35862// request. Use googleapi.IsNotModified to check whether the response
35863// error from Do is the result of In-None-Match.
35864func (c *MobileCarriersGetCall) IfNoneMatch(entityTag string) *MobileCarriersGetCall {
35865	c.ifNoneMatch_ = entityTag
35866	return c
35867}
35868
35869// Context sets the context to be used in this call's Do method. Any
35870// pending HTTP request will be aborted if the provided context is
35871// canceled.
35872func (c *MobileCarriersGetCall) Context(ctx context.Context) *MobileCarriersGetCall {
35873	c.ctx_ = ctx
35874	return c
35875}
35876
35877// Header returns an http.Header that can be modified by the caller to
35878// add HTTP headers to the request.
35879func (c *MobileCarriersGetCall) Header() http.Header {
35880	if c.header_ == nil {
35881		c.header_ = make(http.Header)
35882	}
35883	return c.header_
35884}
35885
35886func (c *MobileCarriersGetCall) doRequest(alt string) (*http.Response, error) {
35887	reqHeaders := make(http.Header)
35888	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
35889	for k, v := range c.header_ {
35890		reqHeaders[k] = v
35891	}
35892	reqHeaders.Set("User-Agent", c.s.userAgent())
35893	if c.ifNoneMatch_ != "" {
35894		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35895	}
35896	var body io.Reader = nil
35897	c.urlParams_.Set("alt", alt)
35898	c.urlParams_.Set("prettyPrint", "false")
35899	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers/{id}")
35900	urls += "?" + c.urlParams_.Encode()
35901	req, err := http.NewRequest("GET", urls, body)
35902	if err != nil {
35903		return nil, err
35904	}
35905	req.Header = reqHeaders
35906	googleapi.Expand(req.URL, map[string]string{
35907		"profileId": strconv.FormatInt(c.profileId, 10),
35908		"id":        strconv.FormatInt(c.id, 10),
35909	})
35910	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35911}
35912
35913// Do executes the "dfareporting.mobileCarriers.get" call.
35914// Exactly one of *MobileCarrier or error will be non-nil. Any non-2xx
35915// status code is an error. Response headers are in either
35916// *MobileCarrier.ServerResponse.Header or (if a response was returned
35917// at all) in error.(*googleapi.Error).Header. Use
35918// googleapi.IsNotModified to check whether the returned error was
35919// because http.StatusNotModified was returned.
35920func (c *MobileCarriersGetCall) Do(opts ...googleapi.CallOption) (*MobileCarrier, error) {
35921	gensupport.SetOptions(c.urlParams_, opts...)
35922	res, err := c.doRequest("json")
35923	if res != nil && res.StatusCode == http.StatusNotModified {
35924		if res.Body != nil {
35925			res.Body.Close()
35926		}
35927		return nil, &googleapi.Error{
35928			Code:   res.StatusCode,
35929			Header: res.Header,
35930		}
35931	}
35932	if err != nil {
35933		return nil, err
35934	}
35935	defer googleapi.CloseBody(res)
35936	if err := googleapi.CheckResponse(res); err != nil {
35937		return nil, err
35938	}
35939	ret := &MobileCarrier{
35940		ServerResponse: googleapi.ServerResponse{
35941			Header:         res.Header,
35942			HTTPStatusCode: res.StatusCode,
35943		},
35944	}
35945	target := &ret
35946	if err := gensupport.DecodeResponse(target, res); err != nil {
35947		return nil, err
35948	}
35949	return ret, nil
35950	// {
35951	//   "description": "Gets one mobile carrier by ID.",
35952	//   "httpMethod": "GET",
35953	//   "id": "dfareporting.mobileCarriers.get",
35954	//   "parameterOrder": [
35955	//     "profileId",
35956	//     "id"
35957	//   ],
35958	//   "parameters": {
35959	//     "id": {
35960	//       "description": "Mobile carrier ID.",
35961	//       "format": "int64",
35962	//       "location": "path",
35963	//       "required": true,
35964	//       "type": "string"
35965	//     },
35966	//     "profileId": {
35967	//       "description": "User profile ID associated with this request.",
35968	//       "format": "int64",
35969	//       "location": "path",
35970	//       "required": true,
35971	//       "type": "string"
35972	//     }
35973	//   },
35974	//   "path": "userprofiles/{profileId}/mobileCarriers/{id}",
35975	//   "response": {
35976	//     "$ref": "MobileCarrier"
35977	//   },
35978	//   "scopes": [
35979	//     "https://www.googleapis.com/auth/dfatrafficking"
35980	//   ]
35981	// }
35982
35983}
35984
35985// method id "dfareporting.mobileCarriers.list":
35986
35987type MobileCarriersListCall struct {
35988	s            *Service
35989	profileId    int64
35990	urlParams_   gensupport.URLParams
35991	ifNoneMatch_ string
35992	ctx_         context.Context
35993	header_      http.Header
35994}
35995
35996// List: Retrieves a list of mobile carriers.
35997func (r *MobileCarriersService) List(profileId int64) *MobileCarriersListCall {
35998	c := &MobileCarriersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35999	c.profileId = profileId
36000	return c
36001}
36002
36003// Fields allows partial responses to be retrieved. See
36004// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36005// for more information.
36006func (c *MobileCarriersListCall) Fields(s ...googleapi.Field) *MobileCarriersListCall {
36007	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36008	return c
36009}
36010
36011// IfNoneMatch sets the optional parameter which makes the operation
36012// fail if the object's ETag matches the given value. This is useful for
36013// getting updates only after the object has changed since the last
36014// request. Use googleapi.IsNotModified to check whether the response
36015// error from Do is the result of In-None-Match.
36016func (c *MobileCarriersListCall) IfNoneMatch(entityTag string) *MobileCarriersListCall {
36017	c.ifNoneMatch_ = entityTag
36018	return c
36019}
36020
36021// Context sets the context to be used in this call's Do method. Any
36022// pending HTTP request will be aborted if the provided context is
36023// canceled.
36024func (c *MobileCarriersListCall) Context(ctx context.Context) *MobileCarriersListCall {
36025	c.ctx_ = ctx
36026	return c
36027}
36028
36029// Header returns an http.Header that can be modified by the caller to
36030// add HTTP headers to the request.
36031func (c *MobileCarriersListCall) Header() http.Header {
36032	if c.header_ == nil {
36033		c.header_ = make(http.Header)
36034	}
36035	return c.header_
36036}
36037
36038func (c *MobileCarriersListCall) doRequest(alt string) (*http.Response, error) {
36039	reqHeaders := make(http.Header)
36040	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
36041	for k, v := range c.header_ {
36042		reqHeaders[k] = v
36043	}
36044	reqHeaders.Set("User-Agent", c.s.userAgent())
36045	if c.ifNoneMatch_ != "" {
36046		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36047	}
36048	var body io.Reader = nil
36049	c.urlParams_.Set("alt", alt)
36050	c.urlParams_.Set("prettyPrint", "false")
36051	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers")
36052	urls += "?" + c.urlParams_.Encode()
36053	req, err := http.NewRequest("GET", urls, body)
36054	if err != nil {
36055		return nil, err
36056	}
36057	req.Header = reqHeaders
36058	googleapi.Expand(req.URL, map[string]string{
36059		"profileId": strconv.FormatInt(c.profileId, 10),
36060	})
36061	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36062}
36063
36064// Do executes the "dfareporting.mobileCarriers.list" call.
36065// Exactly one of *MobileCarriersListResponse or error will be non-nil.
36066// Any non-2xx status code is an error. Response headers are in either
36067// *MobileCarriersListResponse.ServerResponse.Header or (if a response
36068// was returned at all) in error.(*googleapi.Error).Header. Use
36069// googleapi.IsNotModified to check whether the returned error was
36070// because http.StatusNotModified was returned.
36071func (c *MobileCarriersListCall) Do(opts ...googleapi.CallOption) (*MobileCarriersListResponse, error) {
36072	gensupport.SetOptions(c.urlParams_, opts...)
36073	res, err := c.doRequest("json")
36074	if res != nil && res.StatusCode == http.StatusNotModified {
36075		if res.Body != nil {
36076			res.Body.Close()
36077		}
36078		return nil, &googleapi.Error{
36079			Code:   res.StatusCode,
36080			Header: res.Header,
36081		}
36082	}
36083	if err != nil {
36084		return nil, err
36085	}
36086	defer googleapi.CloseBody(res)
36087	if err := googleapi.CheckResponse(res); err != nil {
36088		return nil, err
36089	}
36090	ret := &MobileCarriersListResponse{
36091		ServerResponse: googleapi.ServerResponse{
36092			Header:         res.Header,
36093			HTTPStatusCode: res.StatusCode,
36094		},
36095	}
36096	target := &ret
36097	if err := gensupport.DecodeResponse(target, res); err != nil {
36098		return nil, err
36099	}
36100	return ret, nil
36101	// {
36102	//   "description": "Retrieves a list of mobile carriers.",
36103	//   "httpMethod": "GET",
36104	//   "id": "dfareporting.mobileCarriers.list",
36105	//   "parameterOrder": [
36106	//     "profileId"
36107	//   ],
36108	//   "parameters": {
36109	//     "profileId": {
36110	//       "description": "User profile ID associated with this request.",
36111	//       "format": "int64",
36112	//       "location": "path",
36113	//       "required": true,
36114	//       "type": "string"
36115	//     }
36116	//   },
36117	//   "path": "userprofiles/{profileId}/mobileCarriers",
36118	//   "response": {
36119	//     "$ref": "MobileCarriersListResponse"
36120	//   },
36121	//   "scopes": [
36122	//     "https://www.googleapis.com/auth/dfatrafficking"
36123	//   ]
36124	// }
36125
36126}
36127
36128// method id "dfareporting.operatingSystemVersions.get":
36129
36130type OperatingSystemVersionsGetCall struct {
36131	s            *Service
36132	profileId    int64
36133	id           int64
36134	urlParams_   gensupport.URLParams
36135	ifNoneMatch_ string
36136	ctx_         context.Context
36137	header_      http.Header
36138}
36139
36140// Get: Gets one operating system version by ID.
36141func (r *OperatingSystemVersionsService) Get(profileId int64, id int64) *OperatingSystemVersionsGetCall {
36142	c := &OperatingSystemVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36143	c.profileId = profileId
36144	c.id = id
36145	return c
36146}
36147
36148// Fields allows partial responses to be retrieved. See
36149// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36150// for more information.
36151func (c *OperatingSystemVersionsGetCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsGetCall {
36152	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36153	return c
36154}
36155
36156// IfNoneMatch sets the optional parameter which makes the operation
36157// fail if the object's ETag matches the given value. This is useful for
36158// getting updates only after the object has changed since the last
36159// request. Use googleapi.IsNotModified to check whether the response
36160// error from Do is the result of In-None-Match.
36161func (c *OperatingSystemVersionsGetCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsGetCall {
36162	c.ifNoneMatch_ = entityTag
36163	return c
36164}
36165
36166// Context sets the context to be used in this call's Do method. Any
36167// pending HTTP request will be aborted if the provided context is
36168// canceled.
36169func (c *OperatingSystemVersionsGetCall) Context(ctx context.Context) *OperatingSystemVersionsGetCall {
36170	c.ctx_ = ctx
36171	return c
36172}
36173
36174// Header returns an http.Header that can be modified by the caller to
36175// add HTTP headers to the request.
36176func (c *OperatingSystemVersionsGetCall) Header() http.Header {
36177	if c.header_ == nil {
36178		c.header_ = make(http.Header)
36179	}
36180	return c.header_
36181}
36182
36183func (c *OperatingSystemVersionsGetCall) doRequest(alt string) (*http.Response, error) {
36184	reqHeaders := make(http.Header)
36185	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
36186	for k, v := range c.header_ {
36187		reqHeaders[k] = v
36188	}
36189	reqHeaders.Set("User-Agent", c.s.userAgent())
36190	if c.ifNoneMatch_ != "" {
36191		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36192	}
36193	var body io.Reader = nil
36194	c.urlParams_.Set("alt", alt)
36195	c.urlParams_.Set("prettyPrint", "false")
36196	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions/{id}")
36197	urls += "?" + c.urlParams_.Encode()
36198	req, err := http.NewRequest("GET", urls, body)
36199	if err != nil {
36200		return nil, err
36201	}
36202	req.Header = reqHeaders
36203	googleapi.Expand(req.URL, map[string]string{
36204		"profileId": strconv.FormatInt(c.profileId, 10),
36205		"id":        strconv.FormatInt(c.id, 10),
36206	})
36207	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36208}
36209
36210// Do executes the "dfareporting.operatingSystemVersions.get" call.
36211// Exactly one of *OperatingSystemVersion or error will be non-nil. Any
36212// non-2xx status code is an error. Response headers are in either
36213// *OperatingSystemVersion.ServerResponse.Header or (if a response was
36214// returned at all) in error.(*googleapi.Error).Header. Use
36215// googleapi.IsNotModified to check whether the returned error was
36216// because http.StatusNotModified was returned.
36217func (c *OperatingSystemVersionsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersion, error) {
36218	gensupport.SetOptions(c.urlParams_, opts...)
36219	res, err := c.doRequest("json")
36220	if res != nil && res.StatusCode == http.StatusNotModified {
36221		if res.Body != nil {
36222			res.Body.Close()
36223		}
36224		return nil, &googleapi.Error{
36225			Code:   res.StatusCode,
36226			Header: res.Header,
36227		}
36228	}
36229	if err != nil {
36230		return nil, err
36231	}
36232	defer googleapi.CloseBody(res)
36233	if err := googleapi.CheckResponse(res); err != nil {
36234		return nil, err
36235	}
36236	ret := &OperatingSystemVersion{
36237		ServerResponse: googleapi.ServerResponse{
36238			Header:         res.Header,
36239			HTTPStatusCode: res.StatusCode,
36240		},
36241	}
36242	target := &ret
36243	if err := gensupport.DecodeResponse(target, res); err != nil {
36244		return nil, err
36245	}
36246	return ret, nil
36247	// {
36248	//   "description": "Gets one operating system version by ID.",
36249	//   "httpMethod": "GET",
36250	//   "id": "dfareporting.operatingSystemVersions.get",
36251	//   "parameterOrder": [
36252	//     "profileId",
36253	//     "id"
36254	//   ],
36255	//   "parameters": {
36256	//     "id": {
36257	//       "description": "Operating system version ID.",
36258	//       "format": "int64",
36259	//       "location": "path",
36260	//       "required": true,
36261	//       "type": "string"
36262	//     },
36263	//     "profileId": {
36264	//       "description": "User profile ID associated with this request.",
36265	//       "format": "int64",
36266	//       "location": "path",
36267	//       "required": true,
36268	//       "type": "string"
36269	//     }
36270	//   },
36271	//   "path": "userprofiles/{profileId}/operatingSystemVersions/{id}",
36272	//   "response": {
36273	//     "$ref": "OperatingSystemVersion"
36274	//   },
36275	//   "scopes": [
36276	//     "https://www.googleapis.com/auth/dfatrafficking"
36277	//   ]
36278	// }
36279
36280}
36281
36282// method id "dfareporting.operatingSystemVersions.list":
36283
36284type OperatingSystemVersionsListCall struct {
36285	s            *Service
36286	profileId    int64
36287	urlParams_   gensupport.URLParams
36288	ifNoneMatch_ string
36289	ctx_         context.Context
36290	header_      http.Header
36291}
36292
36293// List: Retrieves a list of operating system versions.
36294func (r *OperatingSystemVersionsService) List(profileId int64) *OperatingSystemVersionsListCall {
36295	c := &OperatingSystemVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36296	c.profileId = profileId
36297	return c
36298}
36299
36300// Fields allows partial responses to be retrieved. See
36301// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36302// for more information.
36303func (c *OperatingSystemVersionsListCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsListCall {
36304	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36305	return c
36306}
36307
36308// IfNoneMatch sets the optional parameter which makes the operation
36309// fail if the object's ETag matches the given value. This is useful for
36310// getting updates only after the object has changed since the last
36311// request. Use googleapi.IsNotModified to check whether the response
36312// error from Do is the result of In-None-Match.
36313func (c *OperatingSystemVersionsListCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsListCall {
36314	c.ifNoneMatch_ = entityTag
36315	return c
36316}
36317
36318// Context sets the context to be used in this call's Do method. Any
36319// pending HTTP request will be aborted if the provided context is
36320// canceled.
36321func (c *OperatingSystemVersionsListCall) Context(ctx context.Context) *OperatingSystemVersionsListCall {
36322	c.ctx_ = ctx
36323	return c
36324}
36325
36326// Header returns an http.Header that can be modified by the caller to
36327// add HTTP headers to the request.
36328func (c *OperatingSystemVersionsListCall) Header() http.Header {
36329	if c.header_ == nil {
36330		c.header_ = make(http.Header)
36331	}
36332	return c.header_
36333}
36334
36335func (c *OperatingSystemVersionsListCall) doRequest(alt string) (*http.Response, error) {
36336	reqHeaders := make(http.Header)
36337	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
36338	for k, v := range c.header_ {
36339		reqHeaders[k] = v
36340	}
36341	reqHeaders.Set("User-Agent", c.s.userAgent())
36342	if c.ifNoneMatch_ != "" {
36343		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36344	}
36345	var body io.Reader = nil
36346	c.urlParams_.Set("alt", alt)
36347	c.urlParams_.Set("prettyPrint", "false")
36348	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions")
36349	urls += "?" + c.urlParams_.Encode()
36350	req, err := http.NewRequest("GET", urls, body)
36351	if err != nil {
36352		return nil, err
36353	}
36354	req.Header = reqHeaders
36355	googleapi.Expand(req.URL, map[string]string{
36356		"profileId": strconv.FormatInt(c.profileId, 10),
36357	})
36358	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36359}
36360
36361// Do executes the "dfareporting.operatingSystemVersions.list" call.
36362// Exactly one of *OperatingSystemVersionsListResponse or error will be
36363// non-nil. Any non-2xx status code is an error. Response headers are in
36364// either *OperatingSystemVersionsListResponse.ServerResponse.Header or
36365// (if a response was returned at all) in
36366// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
36367// whether the returned error was because http.StatusNotModified was
36368// returned.
36369func (c *OperatingSystemVersionsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersionsListResponse, error) {
36370	gensupport.SetOptions(c.urlParams_, opts...)
36371	res, err := c.doRequest("json")
36372	if res != nil && res.StatusCode == http.StatusNotModified {
36373		if res.Body != nil {
36374			res.Body.Close()
36375		}
36376		return nil, &googleapi.Error{
36377			Code:   res.StatusCode,
36378			Header: res.Header,
36379		}
36380	}
36381	if err != nil {
36382		return nil, err
36383	}
36384	defer googleapi.CloseBody(res)
36385	if err := googleapi.CheckResponse(res); err != nil {
36386		return nil, err
36387	}
36388	ret := &OperatingSystemVersionsListResponse{
36389		ServerResponse: googleapi.ServerResponse{
36390			Header:         res.Header,
36391			HTTPStatusCode: res.StatusCode,
36392		},
36393	}
36394	target := &ret
36395	if err := gensupport.DecodeResponse(target, res); err != nil {
36396		return nil, err
36397	}
36398	return ret, nil
36399	// {
36400	//   "description": "Retrieves a list of operating system versions.",
36401	//   "httpMethod": "GET",
36402	//   "id": "dfareporting.operatingSystemVersions.list",
36403	//   "parameterOrder": [
36404	//     "profileId"
36405	//   ],
36406	//   "parameters": {
36407	//     "profileId": {
36408	//       "description": "User profile ID associated with this request.",
36409	//       "format": "int64",
36410	//       "location": "path",
36411	//       "required": true,
36412	//       "type": "string"
36413	//     }
36414	//   },
36415	//   "path": "userprofiles/{profileId}/operatingSystemVersions",
36416	//   "response": {
36417	//     "$ref": "OperatingSystemVersionsListResponse"
36418	//   },
36419	//   "scopes": [
36420	//     "https://www.googleapis.com/auth/dfatrafficking"
36421	//   ]
36422	// }
36423
36424}
36425
36426// method id "dfareporting.operatingSystems.get":
36427
36428type OperatingSystemsGetCall struct {
36429	s            *Service
36430	profileId    int64
36431	dartId       int64
36432	urlParams_   gensupport.URLParams
36433	ifNoneMatch_ string
36434	ctx_         context.Context
36435	header_      http.Header
36436}
36437
36438// Get: Gets one operating system by DART ID.
36439func (r *OperatingSystemsService) Get(profileId int64, dartId int64) *OperatingSystemsGetCall {
36440	c := &OperatingSystemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36441	c.profileId = profileId
36442	c.dartId = dartId
36443	return c
36444}
36445
36446// Fields allows partial responses to be retrieved. See
36447// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36448// for more information.
36449func (c *OperatingSystemsGetCall) Fields(s ...googleapi.Field) *OperatingSystemsGetCall {
36450	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36451	return c
36452}
36453
36454// IfNoneMatch sets the optional parameter which makes the operation
36455// fail if the object's ETag matches the given value. This is useful for
36456// getting updates only after the object has changed since the last
36457// request. Use googleapi.IsNotModified to check whether the response
36458// error from Do is the result of In-None-Match.
36459func (c *OperatingSystemsGetCall) IfNoneMatch(entityTag string) *OperatingSystemsGetCall {
36460	c.ifNoneMatch_ = entityTag
36461	return c
36462}
36463
36464// Context sets the context to be used in this call's Do method. Any
36465// pending HTTP request will be aborted if the provided context is
36466// canceled.
36467func (c *OperatingSystemsGetCall) Context(ctx context.Context) *OperatingSystemsGetCall {
36468	c.ctx_ = ctx
36469	return c
36470}
36471
36472// Header returns an http.Header that can be modified by the caller to
36473// add HTTP headers to the request.
36474func (c *OperatingSystemsGetCall) Header() http.Header {
36475	if c.header_ == nil {
36476		c.header_ = make(http.Header)
36477	}
36478	return c.header_
36479}
36480
36481func (c *OperatingSystemsGetCall) doRequest(alt string) (*http.Response, error) {
36482	reqHeaders := make(http.Header)
36483	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
36484	for k, v := range c.header_ {
36485		reqHeaders[k] = v
36486	}
36487	reqHeaders.Set("User-Agent", c.s.userAgent())
36488	if c.ifNoneMatch_ != "" {
36489		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36490	}
36491	var body io.Reader = nil
36492	c.urlParams_.Set("alt", alt)
36493	c.urlParams_.Set("prettyPrint", "false")
36494	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems/{dartId}")
36495	urls += "?" + c.urlParams_.Encode()
36496	req, err := http.NewRequest("GET", urls, body)
36497	if err != nil {
36498		return nil, err
36499	}
36500	req.Header = reqHeaders
36501	googleapi.Expand(req.URL, map[string]string{
36502		"profileId": strconv.FormatInt(c.profileId, 10),
36503		"dartId":    strconv.FormatInt(c.dartId, 10),
36504	})
36505	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36506}
36507
36508// Do executes the "dfareporting.operatingSystems.get" call.
36509// Exactly one of *OperatingSystem or error will be non-nil. Any non-2xx
36510// status code is an error. Response headers are in either
36511// *OperatingSystem.ServerResponse.Header or (if a response was returned
36512// at all) in error.(*googleapi.Error).Header. Use
36513// googleapi.IsNotModified to check whether the returned error was
36514// because http.StatusNotModified was returned.
36515func (c *OperatingSystemsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystem, error) {
36516	gensupport.SetOptions(c.urlParams_, opts...)
36517	res, err := c.doRequest("json")
36518	if res != nil && res.StatusCode == http.StatusNotModified {
36519		if res.Body != nil {
36520			res.Body.Close()
36521		}
36522		return nil, &googleapi.Error{
36523			Code:   res.StatusCode,
36524			Header: res.Header,
36525		}
36526	}
36527	if err != nil {
36528		return nil, err
36529	}
36530	defer googleapi.CloseBody(res)
36531	if err := googleapi.CheckResponse(res); err != nil {
36532		return nil, err
36533	}
36534	ret := &OperatingSystem{
36535		ServerResponse: googleapi.ServerResponse{
36536			Header:         res.Header,
36537			HTTPStatusCode: res.StatusCode,
36538		},
36539	}
36540	target := &ret
36541	if err := gensupport.DecodeResponse(target, res); err != nil {
36542		return nil, err
36543	}
36544	return ret, nil
36545	// {
36546	//   "description": "Gets one operating system by DART ID.",
36547	//   "httpMethod": "GET",
36548	//   "id": "dfareporting.operatingSystems.get",
36549	//   "parameterOrder": [
36550	//     "profileId",
36551	//     "dartId"
36552	//   ],
36553	//   "parameters": {
36554	//     "dartId": {
36555	//       "description": "Operating system DART ID.",
36556	//       "format": "int64",
36557	//       "location": "path",
36558	//       "required": true,
36559	//       "type": "string"
36560	//     },
36561	//     "profileId": {
36562	//       "description": "User profile ID associated with this request.",
36563	//       "format": "int64",
36564	//       "location": "path",
36565	//       "required": true,
36566	//       "type": "string"
36567	//     }
36568	//   },
36569	//   "path": "userprofiles/{profileId}/operatingSystems/{dartId}",
36570	//   "response": {
36571	//     "$ref": "OperatingSystem"
36572	//   },
36573	//   "scopes": [
36574	//     "https://www.googleapis.com/auth/dfatrafficking"
36575	//   ]
36576	// }
36577
36578}
36579
36580// method id "dfareporting.operatingSystems.list":
36581
36582type OperatingSystemsListCall struct {
36583	s            *Service
36584	profileId    int64
36585	urlParams_   gensupport.URLParams
36586	ifNoneMatch_ string
36587	ctx_         context.Context
36588	header_      http.Header
36589}
36590
36591// List: Retrieves a list of operating systems.
36592func (r *OperatingSystemsService) List(profileId int64) *OperatingSystemsListCall {
36593	c := &OperatingSystemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36594	c.profileId = profileId
36595	return c
36596}
36597
36598// Fields allows partial responses to be retrieved. See
36599// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36600// for more information.
36601func (c *OperatingSystemsListCall) Fields(s ...googleapi.Field) *OperatingSystemsListCall {
36602	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36603	return c
36604}
36605
36606// IfNoneMatch sets the optional parameter which makes the operation
36607// fail if the object's ETag matches the given value. This is useful for
36608// getting updates only after the object has changed since the last
36609// request. Use googleapi.IsNotModified to check whether the response
36610// error from Do is the result of In-None-Match.
36611func (c *OperatingSystemsListCall) IfNoneMatch(entityTag string) *OperatingSystemsListCall {
36612	c.ifNoneMatch_ = entityTag
36613	return c
36614}
36615
36616// Context sets the context to be used in this call's Do method. Any
36617// pending HTTP request will be aborted if the provided context is
36618// canceled.
36619func (c *OperatingSystemsListCall) Context(ctx context.Context) *OperatingSystemsListCall {
36620	c.ctx_ = ctx
36621	return c
36622}
36623
36624// Header returns an http.Header that can be modified by the caller to
36625// add HTTP headers to the request.
36626func (c *OperatingSystemsListCall) Header() http.Header {
36627	if c.header_ == nil {
36628		c.header_ = make(http.Header)
36629	}
36630	return c.header_
36631}
36632
36633func (c *OperatingSystemsListCall) doRequest(alt string) (*http.Response, error) {
36634	reqHeaders := make(http.Header)
36635	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
36636	for k, v := range c.header_ {
36637		reqHeaders[k] = v
36638	}
36639	reqHeaders.Set("User-Agent", c.s.userAgent())
36640	if c.ifNoneMatch_ != "" {
36641		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36642	}
36643	var body io.Reader = nil
36644	c.urlParams_.Set("alt", alt)
36645	c.urlParams_.Set("prettyPrint", "false")
36646	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems")
36647	urls += "?" + c.urlParams_.Encode()
36648	req, err := http.NewRequest("GET", urls, body)
36649	if err != nil {
36650		return nil, err
36651	}
36652	req.Header = reqHeaders
36653	googleapi.Expand(req.URL, map[string]string{
36654		"profileId": strconv.FormatInt(c.profileId, 10),
36655	})
36656	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36657}
36658
36659// Do executes the "dfareporting.operatingSystems.list" call.
36660// Exactly one of *OperatingSystemsListResponse or error will be
36661// non-nil. Any non-2xx status code is an error. Response headers are in
36662// either *OperatingSystemsListResponse.ServerResponse.Header or (if a
36663// response was returned at all) in error.(*googleapi.Error).Header. Use
36664// googleapi.IsNotModified to check whether the returned error was
36665// because http.StatusNotModified was returned.
36666func (c *OperatingSystemsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemsListResponse, error) {
36667	gensupport.SetOptions(c.urlParams_, opts...)
36668	res, err := c.doRequest("json")
36669	if res != nil && res.StatusCode == http.StatusNotModified {
36670		if res.Body != nil {
36671			res.Body.Close()
36672		}
36673		return nil, &googleapi.Error{
36674			Code:   res.StatusCode,
36675			Header: res.Header,
36676		}
36677	}
36678	if err != nil {
36679		return nil, err
36680	}
36681	defer googleapi.CloseBody(res)
36682	if err := googleapi.CheckResponse(res); err != nil {
36683		return nil, err
36684	}
36685	ret := &OperatingSystemsListResponse{
36686		ServerResponse: googleapi.ServerResponse{
36687			Header:         res.Header,
36688			HTTPStatusCode: res.StatusCode,
36689		},
36690	}
36691	target := &ret
36692	if err := gensupport.DecodeResponse(target, res); err != nil {
36693		return nil, err
36694	}
36695	return ret, nil
36696	// {
36697	//   "description": "Retrieves a list of operating systems.",
36698	//   "httpMethod": "GET",
36699	//   "id": "dfareporting.operatingSystems.list",
36700	//   "parameterOrder": [
36701	//     "profileId"
36702	//   ],
36703	//   "parameters": {
36704	//     "profileId": {
36705	//       "description": "User profile ID associated with this request.",
36706	//       "format": "int64",
36707	//       "location": "path",
36708	//       "required": true,
36709	//       "type": "string"
36710	//     }
36711	//   },
36712	//   "path": "userprofiles/{profileId}/operatingSystems",
36713	//   "response": {
36714	//     "$ref": "OperatingSystemsListResponse"
36715	//   },
36716	//   "scopes": [
36717	//     "https://www.googleapis.com/auth/dfatrafficking"
36718	//   ]
36719	// }
36720
36721}
36722
36723// method id "dfareporting.orderDocuments.get":
36724
36725type OrderDocumentsGetCall struct {
36726	s            *Service
36727	profileId    int64
36728	projectId    int64
36729	id           int64
36730	urlParams_   gensupport.URLParams
36731	ifNoneMatch_ string
36732	ctx_         context.Context
36733	header_      http.Header
36734}
36735
36736// Get: Gets one order document by ID.
36737func (r *OrderDocumentsService) Get(profileId int64, projectId int64, id int64) *OrderDocumentsGetCall {
36738	c := &OrderDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36739	c.profileId = profileId
36740	c.projectId = projectId
36741	c.id = id
36742	return c
36743}
36744
36745// Fields allows partial responses to be retrieved. See
36746// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36747// for more information.
36748func (c *OrderDocumentsGetCall) Fields(s ...googleapi.Field) *OrderDocumentsGetCall {
36749	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36750	return c
36751}
36752
36753// IfNoneMatch sets the optional parameter which makes the operation
36754// fail if the object's ETag matches the given value. This is useful for
36755// getting updates only after the object has changed since the last
36756// request. Use googleapi.IsNotModified to check whether the response
36757// error from Do is the result of In-None-Match.
36758func (c *OrderDocumentsGetCall) IfNoneMatch(entityTag string) *OrderDocumentsGetCall {
36759	c.ifNoneMatch_ = entityTag
36760	return c
36761}
36762
36763// Context sets the context to be used in this call's Do method. Any
36764// pending HTTP request will be aborted if the provided context is
36765// canceled.
36766func (c *OrderDocumentsGetCall) Context(ctx context.Context) *OrderDocumentsGetCall {
36767	c.ctx_ = ctx
36768	return c
36769}
36770
36771// Header returns an http.Header that can be modified by the caller to
36772// add HTTP headers to the request.
36773func (c *OrderDocumentsGetCall) Header() http.Header {
36774	if c.header_ == nil {
36775		c.header_ = make(http.Header)
36776	}
36777	return c.header_
36778}
36779
36780func (c *OrderDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
36781	reqHeaders := make(http.Header)
36782	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
36783	for k, v := range c.header_ {
36784		reqHeaders[k] = v
36785	}
36786	reqHeaders.Set("User-Agent", c.s.userAgent())
36787	if c.ifNoneMatch_ != "" {
36788		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36789	}
36790	var body io.Reader = nil
36791	c.urlParams_.Set("alt", alt)
36792	c.urlParams_.Set("prettyPrint", "false")
36793	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}")
36794	urls += "?" + c.urlParams_.Encode()
36795	req, err := http.NewRequest("GET", urls, body)
36796	if err != nil {
36797		return nil, err
36798	}
36799	req.Header = reqHeaders
36800	googleapi.Expand(req.URL, map[string]string{
36801		"profileId": strconv.FormatInt(c.profileId, 10),
36802		"projectId": strconv.FormatInt(c.projectId, 10),
36803		"id":        strconv.FormatInt(c.id, 10),
36804	})
36805	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36806}
36807
36808// Do executes the "dfareporting.orderDocuments.get" call.
36809// Exactly one of *OrderDocument or error will be non-nil. Any non-2xx
36810// status code is an error. Response headers are in either
36811// *OrderDocument.ServerResponse.Header or (if a response was returned
36812// at all) in error.(*googleapi.Error).Header. Use
36813// googleapi.IsNotModified to check whether the returned error was
36814// because http.StatusNotModified was returned.
36815func (c *OrderDocumentsGetCall) Do(opts ...googleapi.CallOption) (*OrderDocument, error) {
36816	gensupport.SetOptions(c.urlParams_, opts...)
36817	res, err := c.doRequest("json")
36818	if res != nil && res.StatusCode == http.StatusNotModified {
36819		if res.Body != nil {
36820			res.Body.Close()
36821		}
36822		return nil, &googleapi.Error{
36823			Code:   res.StatusCode,
36824			Header: res.Header,
36825		}
36826	}
36827	if err != nil {
36828		return nil, err
36829	}
36830	defer googleapi.CloseBody(res)
36831	if err := googleapi.CheckResponse(res); err != nil {
36832		return nil, err
36833	}
36834	ret := &OrderDocument{
36835		ServerResponse: googleapi.ServerResponse{
36836			Header:         res.Header,
36837			HTTPStatusCode: res.StatusCode,
36838		},
36839	}
36840	target := &ret
36841	if err := gensupport.DecodeResponse(target, res); err != nil {
36842		return nil, err
36843	}
36844	return ret, nil
36845	// {
36846	//   "description": "Gets one order document by ID.",
36847	//   "httpMethod": "GET",
36848	//   "id": "dfareporting.orderDocuments.get",
36849	//   "parameterOrder": [
36850	//     "profileId",
36851	//     "projectId",
36852	//     "id"
36853	//   ],
36854	//   "parameters": {
36855	//     "id": {
36856	//       "description": "Order document ID.",
36857	//       "format": "int64",
36858	//       "location": "path",
36859	//       "required": true,
36860	//       "type": "string"
36861	//     },
36862	//     "profileId": {
36863	//       "description": "User profile ID associated with this request.",
36864	//       "format": "int64",
36865	//       "location": "path",
36866	//       "required": true,
36867	//       "type": "string"
36868	//     },
36869	//     "projectId": {
36870	//       "description": "Project ID for order documents.",
36871	//       "format": "int64",
36872	//       "location": "path",
36873	//       "required": true,
36874	//       "type": "string"
36875	//     }
36876	//   },
36877	//   "path": "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}",
36878	//   "response": {
36879	//     "$ref": "OrderDocument"
36880	//   },
36881	//   "scopes": [
36882	//     "https://www.googleapis.com/auth/dfatrafficking"
36883	//   ]
36884	// }
36885
36886}
36887
36888// method id "dfareporting.orderDocuments.list":
36889
36890type OrderDocumentsListCall struct {
36891	s            *Service
36892	profileId    int64
36893	projectId    int64
36894	urlParams_   gensupport.URLParams
36895	ifNoneMatch_ string
36896	ctx_         context.Context
36897	header_      http.Header
36898}
36899
36900// List: Retrieves a list of order documents, possibly filtered. This
36901// method supports paging.
36902func (r *OrderDocumentsService) List(profileId int64, projectId int64) *OrderDocumentsListCall {
36903	c := &OrderDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36904	c.profileId = profileId
36905	c.projectId = projectId
36906	return c
36907}
36908
36909// Approved sets the optional parameter "approved": Select only order
36910// documents that have been approved by at least one user.
36911func (c *OrderDocumentsListCall) Approved(approved bool) *OrderDocumentsListCall {
36912	c.urlParams_.Set("approved", fmt.Sprint(approved))
36913	return c
36914}
36915
36916// Ids sets the optional parameter "ids": Select only order documents
36917// with these IDs.
36918func (c *OrderDocumentsListCall) Ids(ids ...int64) *OrderDocumentsListCall {
36919	var ids_ []string
36920	for _, v := range ids {
36921		ids_ = append(ids_, fmt.Sprint(v))
36922	}
36923	c.urlParams_.SetMulti("ids", ids_)
36924	return c
36925}
36926
36927// MaxResults sets the optional parameter "maxResults": Maximum number
36928// of results to return.
36929func (c *OrderDocumentsListCall) MaxResults(maxResults int64) *OrderDocumentsListCall {
36930	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36931	return c
36932}
36933
36934// OrderId sets the optional parameter "orderId": Select only order
36935// documents for specified orders.
36936func (c *OrderDocumentsListCall) OrderId(orderId ...int64) *OrderDocumentsListCall {
36937	var orderId_ []string
36938	for _, v := range orderId {
36939		orderId_ = append(orderId_, fmt.Sprint(v))
36940	}
36941	c.urlParams_.SetMulti("orderId", orderId_)
36942	return c
36943}
36944
36945// PageToken sets the optional parameter "pageToken": Value of the
36946// nextPageToken from the previous result page.
36947func (c *OrderDocumentsListCall) PageToken(pageToken string) *OrderDocumentsListCall {
36948	c.urlParams_.Set("pageToken", pageToken)
36949	return c
36950}
36951
36952// SearchString sets the optional parameter "searchString": Allows
36953// searching for order documents by name or ID. Wildcards (*) are
36954// allowed. For example, "orderdocument*2015" will return order
36955// documents with names like "orderdocument June 2015", "orderdocument
36956// April 2015", or simply "orderdocument 2015". Most of the searches
36957// also add wildcards implicitly at the start and the end of the search
36958// string. For example, a search string of "orderdocument" will match
36959// order documents with name "my orderdocument", "orderdocument 2015",
36960// or simply "orderdocument".
36961func (c *OrderDocumentsListCall) SearchString(searchString string) *OrderDocumentsListCall {
36962	c.urlParams_.Set("searchString", searchString)
36963	return c
36964}
36965
36966// SiteId sets the optional parameter "siteId": Select only order
36967// documents that are associated with these sites.
36968func (c *OrderDocumentsListCall) SiteId(siteId ...int64) *OrderDocumentsListCall {
36969	var siteId_ []string
36970	for _, v := range siteId {
36971		siteId_ = append(siteId_, fmt.Sprint(v))
36972	}
36973	c.urlParams_.SetMulti("siteId", siteId_)
36974	return c
36975}
36976
36977// SortField sets the optional parameter "sortField": Field by which to
36978// sort the list.
36979//
36980// Possible values:
36981//   "ID" (default)
36982//   "NAME"
36983func (c *OrderDocumentsListCall) SortField(sortField string) *OrderDocumentsListCall {
36984	c.urlParams_.Set("sortField", sortField)
36985	return c
36986}
36987
36988// SortOrder sets the optional parameter "sortOrder": Order of sorted
36989// results.
36990//
36991// Possible values:
36992//   "ASCENDING" (default)
36993//   "DESCENDING"
36994func (c *OrderDocumentsListCall) SortOrder(sortOrder string) *OrderDocumentsListCall {
36995	c.urlParams_.Set("sortOrder", sortOrder)
36996	return c
36997}
36998
36999// Fields allows partial responses to be retrieved. See
37000// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37001// for more information.
37002func (c *OrderDocumentsListCall) Fields(s ...googleapi.Field) *OrderDocumentsListCall {
37003	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37004	return c
37005}
37006
37007// IfNoneMatch sets the optional parameter which makes the operation
37008// fail if the object's ETag matches the given value. This is useful for
37009// getting updates only after the object has changed since the last
37010// request. Use googleapi.IsNotModified to check whether the response
37011// error from Do is the result of In-None-Match.
37012func (c *OrderDocumentsListCall) IfNoneMatch(entityTag string) *OrderDocumentsListCall {
37013	c.ifNoneMatch_ = entityTag
37014	return c
37015}
37016
37017// Context sets the context to be used in this call's Do method. Any
37018// pending HTTP request will be aborted if the provided context is
37019// canceled.
37020func (c *OrderDocumentsListCall) Context(ctx context.Context) *OrderDocumentsListCall {
37021	c.ctx_ = ctx
37022	return c
37023}
37024
37025// Header returns an http.Header that can be modified by the caller to
37026// add HTTP headers to the request.
37027func (c *OrderDocumentsListCall) Header() http.Header {
37028	if c.header_ == nil {
37029		c.header_ = make(http.Header)
37030	}
37031	return c.header_
37032}
37033
37034func (c *OrderDocumentsListCall) doRequest(alt string) (*http.Response, error) {
37035	reqHeaders := make(http.Header)
37036	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
37037	for k, v := range c.header_ {
37038		reqHeaders[k] = v
37039	}
37040	reqHeaders.Set("User-Agent", c.s.userAgent())
37041	if c.ifNoneMatch_ != "" {
37042		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37043	}
37044	var body io.Reader = nil
37045	c.urlParams_.Set("alt", alt)
37046	c.urlParams_.Set("prettyPrint", "false")
37047	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments")
37048	urls += "?" + c.urlParams_.Encode()
37049	req, err := http.NewRequest("GET", urls, body)
37050	if err != nil {
37051		return nil, err
37052	}
37053	req.Header = reqHeaders
37054	googleapi.Expand(req.URL, map[string]string{
37055		"profileId": strconv.FormatInt(c.profileId, 10),
37056		"projectId": strconv.FormatInt(c.projectId, 10),
37057	})
37058	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37059}
37060
37061// Do executes the "dfareporting.orderDocuments.list" call.
37062// Exactly one of *OrderDocumentsListResponse or error will be non-nil.
37063// Any non-2xx status code is an error. Response headers are in either
37064// *OrderDocumentsListResponse.ServerResponse.Header or (if a response
37065// was returned at all) in error.(*googleapi.Error).Header. Use
37066// googleapi.IsNotModified to check whether the returned error was
37067// because http.StatusNotModified was returned.
37068func (c *OrderDocumentsListCall) Do(opts ...googleapi.CallOption) (*OrderDocumentsListResponse, error) {
37069	gensupport.SetOptions(c.urlParams_, opts...)
37070	res, err := c.doRequest("json")
37071	if res != nil && res.StatusCode == http.StatusNotModified {
37072		if res.Body != nil {
37073			res.Body.Close()
37074		}
37075		return nil, &googleapi.Error{
37076			Code:   res.StatusCode,
37077			Header: res.Header,
37078		}
37079	}
37080	if err != nil {
37081		return nil, err
37082	}
37083	defer googleapi.CloseBody(res)
37084	if err := googleapi.CheckResponse(res); err != nil {
37085		return nil, err
37086	}
37087	ret := &OrderDocumentsListResponse{
37088		ServerResponse: googleapi.ServerResponse{
37089			Header:         res.Header,
37090			HTTPStatusCode: res.StatusCode,
37091		},
37092	}
37093	target := &ret
37094	if err := gensupport.DecodeResponse(target, res); err != nil {
37095		return nil, err
37096	}
37097	return ret, nil
37098	// {
37099	//   "description": "Retrieves a list of order documents, possibly filtered. This method supports paging.",
37100	//   "httpMethod": "GET",
37101	//   "id": "dfareporting.orderDocuments.list",
37102	//   "parameterOrder": [
37103	//     "profileId",
37104	//     "projectId"
37105	//   ],
37106	//   "parameters": {
37107	//     "approved": {
37108	//       "description": "Select only order documents that have been approved by at least one user.",
37109	//       "location": "query",
37110	//       "type": "boolean"
37111	//     },
37112	//     "ids": {
37113	//       "description": "Select only order documents with these IDs.",
37114	//       "format": "int64",
37115	//       "location": "query",
37116	//       "repeated": true,
37117	//       "type": "string"
37118	//     },
37119	//     "maxResults": {
37120	//       "default": "1000",
37121	//       "description": "Maximum number of results to return.",
37122	//       "format": "int32",
37123	//       "location": "query",
37124	//       "maximum": "1000",
37125	//       "minimum": "0",
37126	//       "type": "integer"
37127	//     },
37128	//     "orderId": {
37129	//       "description": "Select only order documents for specified orders.",
37130	//       "format": "int64",
37131	//       "location": "query",
37132	//       "repeated": true,
37133	//       "type": "string"
37134	//     },
37135	//     "pageToken": {
37136	//       "description": "Value of the nextPageToken from the previous result page.",
37137	//       "location": "query",
37138	//       "type": "string"
37139	//     },
37140	//     "profileId": {
37141	//       "description": "User profile ID associated with this request.",
37142	//       "format": "int64",
37143	//       "location": "path",
37144	//       "required": true,
37145	//       "type": "string"
37146	//     },
37147	//     "projectId": {
37148	//       "description": "Project ID for order documents.",
37149	//       "format": "int64",
37150	//       "location": "path",
37151	//       "required": true,
37152	//       "type": "string"
37153	//     },
37154	//     "searchString": {
37155	//       "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\".",
37156	//       "location": "query",
37157	//       "type": "string"
37158	//     },
37159	//     "siteId": {
37160	//       "description": "Select only order documents that are associated with these sites.",
37161	//       "format": "int64",
37162	//       "location": "query",
37163	//       "repeated": true,
37164	//       "type": "string"
37165	//     },
37166	//     "sortField": {
37167	//       "default": "ID",
37168	//       "description": "Field by which to sort the list.",
37169	//       "enum": [
37170	//         "ID",
37171	//         "NAME"
37172	//       ],
37173	//       "enumDescriptions": [
37174	//         "",
37175	//         ""
37176	//       ],
37177	//       "location": "query",
37178	//       "type": "string"
37179	//     },
37180	//     "sortOrder": {
37181	//       "default": "ASCENDING",
37182	//       "description": "Order of sorted results.",
37183	//       "enum": [
37184	//         "ASCENDING",
37185	//         "DESCENDING"
37186	//       ],
37187	//       "enumDescriptions": [
37188	//         "",
37189	//         ""
37190	//       ],
37191	//       "location": "query",
37192	//       "type": "string"
37193	//     }
37194	//   },
37195	//   "path": "userprofiles/{profileId}/projects/{projectId}/orderDocuments",
37196	//   "response": {
37197	//     "$ref": "OrderDocumentsListResponse"
37198	//   },
37199	//   "scopes": [
37200	//     "https://www.googleapis.com/auth/dfatrafficking"
37201	//   ]
37202	// }
37203
37204}
37205
37206// Pages invokes f for each page of results.
37207// A non-nil error returned from f will halt the iteration.
37208// The provided context supersedes any context provided to the Context method.
37209func (c *OrderDocumentsListCall) Pages(ctx context.Context, f func(*OrderDocumentsListResponse) error) error {
37210	c.ctx_ = ctx
37211	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37212	for {
37213		x, err := c.Do()
37214		if err != nil {
37215			return err
37216		}
37217		if err := f(x); err != nil {
37218			return err
37219		}
37220		if x.NextPageToken == "" {
37221			return nil
37222		}
37223		c.PageToken(x.NextPageToken)
37224	}
37225}
37226
37227// method id "dfareporting.orders.get":
37228
37229type OrdersGetCall struct {
37230	s            *Service
37231	profileId    int64
37232	projectId    int64
37233	id           int64
37234	urlParams_   gensupport.URLParams
37235	ifNoneMatch_ string
37236	ctx_         context.Context
37237	header_      http.Header
37238}
37239
37240// Get: Gets one order by ID.
37241func (r *OrdersService) Get(profileId int64, projectId int64, id int64) *OrdersGetCall {
37242	c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37243	c.profileId = profileId
37244	c.projectId = projectId
37245	c.id = id
37246	return c
37247}
37248
37249// Fields allows partial responses to be retrieved. See
37250// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37251// for more information.
37252func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall {
37253	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37254	return c
37255}
37256
37257// IfNoneMatch sets the optional parameter which makes the operation
37258// fail if the object's ETag matches the given value. This is useful for
37259// getting updates only after the object has changed since the last
37260// request. Use googleapi.IsNotModified to check whether the response
37261// error from Do is the result of In-None-Match.
37262func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall {
37263	c.ifNoneMatch_ = entityTag
37264	return c
37265}
37266
37267// Context sets the context to be used in this call's Do method. Any
37268// pending HTTP request will be aborted if the provided context is
37269// canceled.
37270func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
37271	c.ctx_ = ctx
37272	return c
37273}
37274
37275// Header returns an http.Header that can be modified by the caller to
37276// add HTTP headers to the request.
37277func (c *OrdersGetCall) Header() http.Header {
37278	if c.header_ == nil {
37279		c.header_ = make(http.Header)
37280	}
37281	return c.header_
37282}
37283
37284func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
37285	reqHeaders := make(http.Header)
37286	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
37287	for k, v := range c.header_ {
37288		reqHeaders[k] = v
37289	}
37290	reqHeaders.Set("User-Agent", c.s.userAgent())
37291	if c.ifNoneMatch_ != "" {
37292		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37293	}
37294	var body io.Reader = nil
37295	c.urlParams_.Set("alt", alt)
37296	c.urlParams_.Set("prettyPrint", "false")
37297	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders/{id}")
37298	urls += "?" + c.urlParams_.Encode()
37299	req, err := http.NewRequest("GET", urls, body)
37300	if err != nil {
37301		return nil, err
37302	}
37303	req.Header = reqHeaders
37304	googleapi.Expand(req.URL, map[string]string{
37305		"profileId": strconv.FormatInt(c.profileId, 10),
37306		"projectId": strconv.FormatInt(c.projectId, 10),
37307		"id":        strconv.FormatInt(c.id, 10),
37308	})
37309	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37310}
37311
37312// Do executes the "dfareporting.orders.get" call.
37313// Exactly one of *Order or error will be non-nil. Any non-2xx status
37314// code is an error. Response headers are in either
37315// *Order.ServerResponse.Header or (if a response was returned at all)
37316// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
37317// check whether the returned error was because http.StatusNotModified
37318// was returned.
37319func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) {
37320	gensupport.SetOptions(c.urlParams_, opts...)
37321	res, err := c.doRequest("json")
37322	if res != nil && res.StatusCode == http.StatusNotModified {
37323		if res.Body != nil {
37324			res.Body.Close()
37325		}
37326		return nil, &googleapi.Error{
37327			Code:   res.StatusCode,
37328			Header: res.Header,
37329		}
37330	}
37331	if err != nil {
37332		return nil, err
37333	}
37334	defer googleapi.CloseBody(res)
37335	if err := googleapi.CheckResponse(res); err != nil {
37336		return nil, err
37337	}
37338	ret := &Order{
37339		ServerResponse: googleapi.ServerResponse{
37340			Header:         res.Header,
37341			HTTPStatusCode: res.StatusCode,
37342		},
37343	}
37344	target := &ret
37345	if err := gensupport.DecodeResponse(target, res); err != nil {
37346		return nil, err
37347	}
37348	return ret, nil
37349	// {
37350	//   "description": "Gets one order by ID.",
37351	//   "httpMethod": "GET",
37352	//   "id": "dfareporting.orders.get",
37353	//   "parameterOrder": [
37354	//     "profileId",
37355	//     "projectId",
37356	//     "id"
37357	//   ],
37358	//   "parameters": {
37359	//     "id": {
37360	//       "description": "Order ID.",
37361	//       "format": "int64",
37362	//       "location": "path",
37363	//       "required": true,
37364	//       "type": "string"
37365	//     },
37366	//     "profileId": {
37367	//       "description": "User profile ID associated with this request.",
37368	//       "format": "int64",
37369	//       "location": "path",
37370	//       "required": true,
37371	//       "type": "string"
37372	//     },
37373	//     "projectId": {
37374	//       "description": "Project ID for orders.",
37375	//       "format": "int64",
37376	//       "location": "path",
37377	//       "required": true,
37378	//       "type": "string"
37379	//     }
37380	//   },
37381	//   "path": "userprofiles/{profileId}/projects/{projectId}/orders/{id}",
37382	//   "response": {
37383	//     "$ref": "Order"
37384	//   },
37385	//   "scopes": [
37386	//     "https://www.googleapis.com/auth/dfatrafficking"
37387	//   ]
37388	// }
37389
37390}
37391
37392// method id "dfareporting.orders.list":
37393
37394type OrdersListCall struct {
37395	s            *Service
37396	profileId    int64
37397	projectId    int64
37398	urlParams_   gensupport.URLParams
37399	ifNoneMatch_ string
37400	ctx_         context.Context
37401	header_      http.Header
37402}
37403
37404// List: Retrieves a list of orders, possibly filtered. This method
37405// supports paging.
37406func (r *OrdersService) List(profileId int64, projectId int64) *OrdersListCall {
37407	c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37408	c.profileId = profileId
37409	c.projectId = projectId
37410	return c
37411}
37412
37413// Ids sets the optional parameter "ids": Select only orders with these
37414// IDs.
37415func (c *OrdersListCall) Ids(ids ...int64) *OrdersListCall {
37416	var ids_ []string
37417	for _, v := range ids {
37418		ids_ = append(ids_, fmt.Sprint(v))
37419	}
37420	c.urlParams_.SetMulti("ids", ids_)
37421	return c
37422}
37423
37424// MaxResults sets the optional parameter "maxResults": Maximum number
37425// of results to return.
37426func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall {
37427	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37428	return c
37429}
37430
37431// PageToken sets the optional parameter "pageToken": Value of the
37432// nextPageToken from the previous result page.
37433func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall {
37434	c.urlParams_.Set("pageToken", pageToken)
37435	return c
37436}
37437
37438// SearchString sets the optional parameter "searchString": Allows
37439// searching for orders by name or ID. Wildcards (*) are allowed. For
37440// example, "order*2015" will return orders with names like "order June
37441// 2015", "order April 2015", or simply "order 2015". Most of the
37442// searches also add wildcards implicitly at the start and the end of
37443// the search string. For example, a search string of "order" will match
37444// orders with name "my order", "order 2015", or simply "order".
37445func (c *OrdersListCall) SearchString(searchString string) *OrdersListCall {
37446	c.urlParams_.Set("searchString", searchString)
37447	return c
37448}
37449
37450// SiteId sets the optional parameter "siteId": Select only orders that
37451// are associated with these site IDs.
37452func (c *OrdersListCall) SiteId(siteId ...int64) *OrdersListCall {
37453	var siteId_ []string
37454	for _, v := range siteId {
37455		siteId_ = append(siteId_, fmt.Sprint(v))
37456	}
37457	c.urlParams_.SetMulti("siteId", siteId_)
37458	return c
37459}
37460
37461// SortField sets the optional parameter "sortField": Field by which to
37462// sort the list.
37463//
37464// Possible values:
37465//   "ID" (default)
37466//   "NAME"
37467func (c *OrdersListCall) SortField(sortField string) *OrdersListCall {
37468	c.urlParams_.Set("sortField", sortField)
37469	return c
37470}
37471
37472// SortOrder sets the optional parameter "sortOrder": Order of sorted
37473// results.
37474//
37475// Possible values:
37476//   "ASCENDING" (default)
37477//   "DESCENDING"
37478func (c *OrdersListCall) SortOrder(sortOrder string) *OrdersListCall {
37479	c.urlParams_.Set("sortOrder", sortOrder)
37480	return c
37481}
37482
37483// Fields allows partial responses to be retrieved. See
37484// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37485// for more information.
37486func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall {
37487	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37488	return c
37489}
37490
37491// IfNoneMatch sets the optional parameter which makes the operation
37492// fail if the object's ETag matches the given value. This is useful for
37493// getting updates only after the object has changed since the last
37494// request. Use googleapi.IsNotModified to check whether the response
37495// error from Do is the result of In-None-Match.
37496func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall {
37497	c.ifNoneMatch_ = entityTag
37498	return c
37499}
37500
37501// Context sets the context to be used in this call's Do method. Any
37502// pending HTTP request will be aborted if the provided context is
37503// canceled.
37504func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
37505	c.ctx_ = ctx
37506	return c
37507}
37508
37509// Header returns an http.Header that can be modified by the caller to
37510// add HTTP headers to the request.
37511func (c *OrdersListCall) Header() http.Header {
37512	if c.header_ == nil {
37513		c.header_ = make(http.Header)
37514	}
37515	return c.header_
37516}
37517
37518func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
37519	reqHeaders := make(http.Header)
37520	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
37521	for k, v := range c.header_ {
37522		reqHeaders[k] = v
37523	}
37524	reqHeaders.Set("User-Agent", c.s.userAgent())
37525	if c.ifNoneMatch_ != "" {
37526		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37527	}
37528	var body io.Reader = nil
37529	c.urlParams_.Set("alt", alt)
37530	c.urlParams_.Set("prettyPrint", "false")
37531	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders")
37532	urls += "?" + c.urlParams_.Encode()
37533	req, err := http.NewRequest("GET", urls, body)
37534	if err != nil {
37535		return nil, err
37536	}
37537	req.Header = reqHeaders
37538	googleapi.Expand(req.URL, map[string]string{
37539		"profileId": strconv.FormatInt(c.profileId, 10),
37540		"projectId": strconv.FormatInt(c.projectId, 10),
37541	})
37542	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37543}
37544
37545// Do executes the "dfareporting.orders.list" call.
37546// Exactly one of *OrdersListResponse or error will be non-nil. Any
37547// non-2xx status code is an error. Response headers are in either
37548// *OrdersListResponse.ServerResponse.Header or (if a response was
37549// returned at all) in error.(*googleapi.Error).Header. Use
37550// googleapi.IsNotModified to check whether the returned error was
37551// because http.StatusNotModified was returned.
37552func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) {
37553	gensupport.SetOptions(c.urlParams_, opts...)
37554	res, err := c.doRequest("json")
37555	if res != nil && res.StatusCode == http.StatusNotModified {
37556		if res.Body != nil {
37557			res.Body.Close()
37558		}
37559		return nil, &googleapi.Error{
37560			Code:   res.StatusCode,
37561			Header: res.Header,
37562		}
37563	}
37564	if err != nil {
37565		return nil, err
37566	}
37567	defer googleapi.CloseBody(res)
37568	if err := googleapi.CheckResponse(res); err != nil {
37569		return nil, err
37570	}
37571	ret := &OrdersListResponse{
37572		ServerResponse: googleapi.ServerResponse{
37573			Header:         res.Header,
37574			HTTPStatusCode: res.StatusCode,
37575		},
37576	}
37577	target := &ret
37578	if err := gensupport.DecodeResponse(target, res); err != nil {
37579		return nil, err
37580	}
37581	return ret, nil
37582	// {
37583	//   "description": "Retrieves a list of orders, possibly filtered. This method supports paging.",
37584	//   "httpMethod": "GET",
37585	//   "id": "dfareporting.orders.list",
37586	//   "parameterOrder": [
37587	//     "profileId",
37588	//     "projectId"
37589	//   ],
37590	//   "parameters": {
37591	//     "ids": {
37592	//       "description": "Select only orders with these IDs.",
37593	//       "format": "int64",
37594	//       "location": "query",
37595	//       "repeated": true,
37596	//       "type": "string"
37597	//     },
37598	//     "maxResults": {
37599	//       "default": "1000",
37600	//       "description": "Maximum number of results to return.",
37601	//       "format": "int32",
37602	//       "location": "query",
37603	//       "maximum": "1000",
37604	//       "minimum": "0",
37605	//       "type": "integer"
37606	//     },
37607	//     "pageToken": {
37608	//       "description": "Value of the nextPageToken from the previous result page.",
37609	//       "location": "query",
37610	//       "type": "string"
37611	//     },
37612	//     "profileId": {
37613	//       "description": "User profile ID associated with this request.",
37614	//       "format": "int64",
37615	//       "location": "path",
37616	//       "required": true,
37617	//       "type": "string"
37618	//     },
37619	//     "projectId": {
37620	//       "description": "Project ID for orders.",
37621	//       "format": "int64",
37622	//       "location": "path",
37623	//       "required": true,
37624	//       "type": "string"
37625	//     },
37626	//     "searchString": {
37627	//       "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\".",
37628	//       "location": "query",
37629	//       "type": "string"
37630	//     },
37631	//     "siteId": {
37632	//       "description": "Select only orders that are associated with these site IDs.",
37633	//       "format": "int64",
37634	//       "location": "query",
37635	//       "repeated": true,
37636	//       "type": "string"
37637	//     },
37638	//     "sortField": {
37639	//       "default": "ID",
37640	//       "description": "Field by which to sort the list.",
37641	//       "enum": [
37642	//         "ID",
37643	//         "NAME"
37644	//       ],
37645	//       "enumDescriptions": [
37646	//         "",
37647	//         ""
37648	//       ],
37649	//       "location": "query",
37650	//       "type": "string"
37651	//     },
37652	//     "sortOrder": {
37653	//       "default": "ASCENDING",
37654	//       "description": "Order of sorted results.",
37655	//       "enum": [
37656	//         "ASCENDING",
37657	//         "DESCENDING"
37658	//       ],
37659	//       "enumDescriptions": [
37660	//         "",
37661	//         ""
37662	//       ],
37663	//       "location": "query",
37664	//       "type": "string"
37665	//     }
37666	//   },
37667	//   "path": "userprofiles/{profileId}/projects/{projectId}/orders",
37668	//   "response": {
37669	//     "$ref": "OrdersListResponse"
37670	//   },
37671	//   "scopes": [
37672	//     "https://www.googleapis.com/auth/dfatrafficking"
37673	//   ]
37674	// }
37675
37676}
37677
37678// Pages invokes f for each page of results.
37679// A non-nil error returned from f will halt the iteration.
37680// The provided context supersedes any context provided to the Context method.
37681func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error {
37682	c.ctx_ = ctx
37683	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37684	for {
37685		x, err := c.Do()
37686		if err != nil {
37687			return err
37688		}
37689		if err := f(x); err != nil {
37690			return err
37691		}
37692		if x.NextPageToken == "" {
37693			return nil
37694		}
37695		c.PageToken(x.NextPageToken)
37696	}
37697}
37698
37699// method id "dfareporting.placementGroups.get":
37700
37701type PlacementGroupsGetCall struct {
37702	s            *Service
37703	profileId    int64
37704	id           int64
37705	urlParams_   gensupport.URLParams
37706	ifNoneMatch_ string
37707	ctx_         context.Context
37708	header_      http.Header
37709}
37710
37711// Get: Gets one placement group by ID.
37712func (r *PlacementGroupsService) Get(profileId int64, id int64) *PlacementGroupsGetCall {
37713	c := &PlacementGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37714	c.profileId = profileId
37715	c.id = id
37716	return c
37717}
37718
37719// Fields allows partial responses to be retrieved. See
37720// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37721// for more information.
37722func (c *PlacementGroupsGetCall) Fields(s ...googleapi.Field) *PlacementGroupsGetCall {
37723	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37724	return c
37725}
37726
37727// IfNoneMatch sets the optional parameter which makes the operation
37728// fail if the object's ETag matches the given value. This is useful for
37729// getting updates only after the object has changed since the last
37730// request. Use googleapi.IsNotModified to check whether the response
37731// error from Do is the result of In-None-Match.
37732func (c *PlacementGroupsGetCall) IfNoneMatch(entityTag string) *PlacementGroupsGetCall {
37733	c.ifNoneMatch_ = entityTag
37734	return c
37735}
37736
37737// Context sets the context to be used in this call's Do method. Any
37738// pending HTTP request will be aborted if the provided context is
37739// canceled.
37740func (c *PlacementGroupsGetCall) Context(ctx context.Context) *PlacementGroupsGetCall {
37741	c.ctx_ = ctx
37742	return c
37743}
37744
37745// Header returns an http.Header that can be modified by the caller to
37746// add HTTP headers to the request.
37747func (c *PlacementGroupsGetCall) Header() http.Header {
37748	if c.header_ == nil {
37749		c.header_ = make(http.Header)
37750	}
37751	return c.header_
37752}
37753
37754func (c *PlacementGroupsGetCall) doRequest(alt string) (*http.Response, error) {
37755	reqHeaders := make(http.Header)
37756	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
37757	for k, v := range c.header_ {
37758		reqHeaders[k] = v
37759	}
37760	reqHeaders.Set("User-Agent", c.s.userAgent())
37761	if c.ifNoneMatch_ != "" {
37762		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37763	}
37764	var body io.Reader = nil
37765	c.urlParams_.Set("alt", alt)
37766	c.urlParams_.Set("prettyPrint", "false")
37767	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups/{id}")
37768	urls += "?" + c.urlParams_.Encode()
37769	req, err := http.NewRequest("GET", urls, body)
37770	if err != nil {
37771		return nil, err
37772	}
37773	req.Header = reqHeaders
37774	googleapi.Expand(req.URL, map[string]string{
37775		"profileId": strconv.FormatInt(c.profileId, 10),
37776		"id":        strconv.FormatInt(c.id, 10),
37777	})
37778	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37779}
37780
37781// Do executes the "dfareporting.placementGroups.get" call.
37782// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
37783// status code is an error. Response headers are in either
37784// *PlacementGroup.ServerResponse.Header or (if a response was returned
37785// at all) in error.(*googleapi.Error).Header. Use
37786// googleapi.IsNotModified to check whether the returned error was
37787// because http.StatusNotModified was returned.
37788func (c *PlacementGroupsGetCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
37789	gensupport.SetOptions(c.urlParams_, opts...)
37790	res, err := c.doRequest("json")
37791	if res != nil && res.StatusCode == http.StatusNotModified {
37792		if res.Body != nil {
37793			res.Body.Close()
37794		}
37795		return nil, &googleapi.Error{
37796			Code:   res.StatusCode,
37797			Header: res.Header,
37798		}
37799	}
37800	if err != nil {
37801		return nil, err
37802	}
37803	defer googleapi.CloseBody(res)
37804	if err := googleapi.CheckResponse(res); err != nil {
37805		return nil, err
37806	}
37807	ret := &PlacementGroup{
37808		ServerResponse: googleapi.ServerResponse{
37809			Header:         res.Header,
37810			HTTPStatusCode: res.StatusCode,
37811		},
37812	}
37813	target := &ret
37814	if err := gensupport.DecodeResponse(target, res); err != nil {
37815		return nil, err
37816	}
37817	return ret, nil
37818	// {
37819	//   "description": "Gets one placement group by ID.",
37820	//   "httpMethod": "GET",
37821	//   "id": "dfareporting.placementGroups.get",
37822	//   "parameterOrder": [
37823	//     "profileId",
37824	//     "id"
37825	//   ],
37826	//   "parameters": {
37827	//     "id": {
37828	//       "description": "Placement group ID.",
37829	//       "format": "int64",
37830	//       "location": "path",
37831	//       "required": true,
37832	//       "type": "string"
37833	//     },
37834	//     "profileId": {
37835	//       "description": "User profile ID associated with this request.",
37836	//       "format": "int64",
37837	//       "location": "path",
37838	//       "required": true,
37839	//       "type": "string"
37840	//     }
37841	//   },
37842	//   "path": "userprofiles/{profileId}/placementGroups/{id}",
37843	//   "response": {
37844	//     "$ref": "PlacementGroup"
37845	//   },
37846	//   "scopes": [
37847	//     "https://www.googleapis.com/auth/dfatrafficking"
37848	//   ]
37849	// }
37850
37851}
37852
37853// method id "dfareporting.placementGroups.insert":
37854
37855type PlacementGroupsInsertCall struct {
37856	s              *Service
37857	profileId      int64
37858	placementgroup *PlacementGroup
37859	urlParams_     gensupport.URLParams
37860	ctx_           context.Context
37861	header_        http.Header
37862}
37863
37864// Insert: Inserts a new placement group.
37865func (r *PlacementGroupsService) Insert(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsInsertCall {
37866	c := &PlacementGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37867	c.profileId = profileId
37868	c.placementgroup = placementgroup
37869	return c
37870}
37871
37872// Fields allows partial responses to be retrieved. See
37873// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37874// for more information.
37875func (c *PlacementGroupsInsertCall) Fields(s ...googleapi.Field) *PlacementGroupsInsertCall {
37876	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37877	return c
37878}
37879
37880// Context sets the context to be used in this call's Do method. Any
37881// pending HTTP request will be aborted if the provided context is
37882// canceled.
37883func (c *PlacementGroupsInsertCall) Context(ctx context.Context) *PlacementGroupsInsertCall {
37884	c.ctx_ = ctx
37885	return c
37886}
37887
37888// Header returns an http.Header that can be modified by the caller to
37889// add HTTP headers to the request.
37890func (c *PlacementGroupsInsertCall) Header() http.Header {
37891	if c.header_ == nil {
37892		c.header_ = make(http.Header)
37893	}
37894	return c.header_
37895}
37896
37897func (c *PlacementGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
37898	reqHeaders := make(http.Header)
37899	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
37900	for k, v := range c.header_ {
37901		reqHeaders[k] = v
37902	}
37903	reqHeaders.Set("User-Agent", c.s.userAgent())
37904	var body io.Reader = nil
37905	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
37906	if err != nil {
37907		return nil, err
37908	}
37909	reqHeaders.Set("Content-Type", "application/json")
37910	c.urlParams_.Set("alt", alt)
37911	c.urlParams_.Set("prettyPrint", "false")
37912	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
37913	urls += "?" + c.urlParams_.Encode()
37914	req, err := http.NewRequest("POST", urls, body)
37915	if err != nil {
37916		return nil, err
37917	}
37918	req.Header = reqHeaders
37919	googleapi.Expand(req.URL, map[string]string{
37920		"profileId": strconv.FormatInt(c.profileId, 10),
37921	})
37922	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37923}
37924
37925// Do executes the "dfareporting.placementGroups.insert" call.
37926// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
37927// status code is an error. Response headers are in either
37928// *PlacementGroup.ServerResponse.Header or (if a response was returned
37929// at all) in error.(*googleapi.Error).Header. Use
37930// googleapi.IsNotModified to check whether the returned error was
37931// because http.StatusNotModified was returned.
37932func (c *PlacementGroupsInsertCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
37933	gensupport.SetOptions(c.urlParams_, opts...)
37934	res, err := c.doRequest("json")
37935	if res != nil && res.StatusCode == http.StatusNotModified {
37936		if res.Body != nil {
37937			res.Body.Close()
37938		}
37939		return nil, &googleapi.Error{
37940			Code:   res.StatusCode,
37941			Header: res.Header,
37942		}
37943	}
37944	if err != nil {
37945		return nil, err
37946	}
37947	defer googleapi.CloseBody(res)
37948	if err := googleapi.CheckResponse(res); err != nil {
37949		return nil, err
37950	}
37951	ret := &PlacementGroup{
37952		ServerResponse: googleapi.ServerResponse{
37953			Header:         res.Header,
37954			HTTPStatusCode: res.StatusCode,
37955		},
37956	}
37957	target := &ret
37958	if err := gensupport.DecodeResponse(target, res); err != nil {
37959		return nil, err
37960	}
37961	return ret, nil
37962	// {
37963	//   "description": "Inserts a new placement group.",
37964	//   "httpMethod": "POST",
37965	//   "id": "dfareporting.placementGroups.insert",
37966	//   "parameterOrder": [
37967	//     "profileId"
37968	//   ],
37969	//   "parameters": {
37970	//     "profileId": {
37971	//       "description": "User profile ID associated with this request.",
37972	//       "format": "int64",
37973	//       "location": "path",
37974	//       "required": true,
37975	//       "type": "string"
37976	//     }
37977	//   },
37978	//   "path": "userprofiles/{profileId}/placementGroups",
37979	//   "request": {
37980	//     "$ref": "PlacementGroup"
37981	//   },
37982	//   "response": {
37983	//     "$ref": "PlacementGroup"
37984	//   },
37985	//   "scopes": [
37986	//     "https://www.googleapis.com/auth/dfatrafficking"
37987	//   ]
37988	// }
37989
37990}
37991
37992// method id "dfareporting.placementGroups.list":
37993
37994type PlacementGroupsListCall struct {
37995	s            *Service
37996	profileId    int64
37997	urlParams_   gensupport.URLParams
37998	ifNoneMatch_ string
37999	ctx_         context.Context
38000	header_      http.Header
38001}
38002
38003// List: Retrieves a list of placement groups, possibly filtered. This
38004// method supports paging.
38005func (r *PlacementGroupsService) List(profileId int64) *PlacementGroupsListCall {
38006	c := &PlacementGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38007	c.profileId = profileId
38008	return c
38009}
38010
38011// AdvertiserIds sets the optional parameter "advertiserIds": Select
38012// only placement groups that belong to these advertisers.
38013func (c *PlacementGroupsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementGroupsListCall {
38014	var advertiserIds_ []string
38015	for _, v := range advertiserIds {
38016		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
38017	}
38018	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
38019	return c
38020}
38021
38022// Archived sets the optional parameter "archived": Select only archived
38023// placements. Don't set this field to select both archived and
38024// non-archived placements.
38025func (c *PlacementGroupsListCall) Archived(archived bool) *PlacementGroupsListCall {
38026	c.urlParams_.Set("archived", fmt.Sprint(archived))
38027	return c
38028}
38029
38030// CampaignIds sets the optional parameter "campaignIds": Select only
38031// placement groups that belong to these campaigns.
38032func (c *PlacementGroupsListCall) CampaignIds(campaignIds ...int64) *PlacementGroupsListCall {
38033	var campaignIds_ []string
38034	for _, v := range campaignIds {
38035		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
38036	}
38037	c.urlParams_.SetMulti("campaignIds", campaignIds_)
38038	return c
38039}
38040
38041// ContentCategoryIds sets the optional parameter "contentCategoryIds":
38042// Select only placement groups that are associated with these content
38043// categories.
38044func (c *PlacementGroupsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementGroupsListCall {
38045	var contentCategoryIds_ []string
38046	for _, v := range contentCategoryIds {
38047		contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
38048	}
38049	c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
38050	return c
38051}
38052
38053// DirectorySiteIds sets the optional parameter "directorySiteIds":
38054// Select only placement groups that are associated with these directory
38055// sites.
38056func (c *PlacementGroupsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementGroupsListCall {
38057	var directorySiteIds_ []string
38058	for _, v := range directorySiteIds {
38059		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
38060	}
38061	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
38062	return c
38063}
38064
38065// Ids sets the optional parameter "ids": Select only placement groups
38066// with these IDs.
38067func (c *PlacementGroupsListCall) Ids(ids ...int64) *PlacementGroupsListCall {
38068	var ids_ []string
38069	for _, v := range ids {
38070		ids_ = append(ids_, fmt.Sprint(v))
38071	}
38072	c.urlParams_.SetMulti("ids", ids_)
38073	return c
38074}
38075
38076// MaxEndDate sets the optional parameter "maxEndDate": Select only
38077// placements or placement groups whose end date is on or before the
38078// specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
38079func (c *PlacementGroupsListCall) MaxEndDate(maxEndDate string) *PlacementGroupsListCall {
38080	c.urlParams_.Set("maxEndDate", maxEndDate)
38081	return c
38082}
38083
38084// MaxResults sets the optional parameter "maxResults": Maximum number
38085// of results to return.
38086func (c *PlacementGroupsListCall) MaxResults(maxResults int64) *PlacementGroupsListCall {
38087	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
38088	return c
38089}
38090
38091// MaxStartDate sets the optional parameter "maxStartDate": Select only
38092// placements or placement groups whose start date is on or before the
38093// specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
38094func (c *PlacementGroupsListCall) MaxStartDate(maxStartDate string) *PlacementGroupsListCall {
38095	c.urlParams_.Set("maxStartDate", maxStartDate)
38096	return c
38097}
38098
38099// MinEndDate sets the optional parameter "minEndDate": Select only
38100// placements or placement groups whose end date is on or after the
38101// specified minEndDate. The date should be formatted as "yyyy-MM-dd".
38102func (c *PlacementGroupsListCall) MinEndDate(minEndDate string) *PlacementGroupsListCall {
38103	c.urlParams_.Set("minEndDate", minEndDate)
38104	return c
38105}
38106
38107// MinStartDate sets the optional parameter "minStartDate": Select only
38108// placements or placement groups whose start date is on or after the
38109// specified minStartDate. The date should be formatted as "yyyy-MM-dd".
38110func (c *PlacementGroupsListCall) MinStartDate(minStartDate string) *PlacementGroupsListCall {
38111	c.urlParams_.Set("minStartDate", minStartDate)
38112	return c
38113}
38114
38115// PageToken sets the optional parameter "pageToken": Value of the
38116// nextPageToken from the previous result page.
38117func (c *PlacementGroupsListCall) PageToken(pageToken string) *PlacementGroupsListCall {
38118	c.urlParams_.Set("pageToken", pageToken)
38119	return c
38120}
38121
38122// PlacementGroupType sets the optional parameter "placementGroupType":
38123// Select only placement groups belonging with this group type. A
38124// package is a simple group of placements that acts as a single pricing
38125// point for a group of tags. A roadblock is a group of placements that
38126// not only acts as a single pricing point but also assumes that all the
38127// tags in it will be served at the same time. A roadblock requires one
38128// of its assigned placements to be marked as primary for reporting.
38129//
38130// Possible values:
38131//   "PLACEMENT_PACKAGE"
38132//   "PLACEMENT_ROADBLOCK"
38133func (c *PlacementGroupsListCall) PlacementGroupType(placementGroupType string) *PlacementGroupsListCall {
38134	c.urlParams_.Set("placementGroupType", placementGroupType)
38135	return c
38136}
38137
38138// PlacementStrategyIds sets the optional parameter
38139// "placementStrategyIds": Select only placement groups that are
38140// associated with these placement strategies.
38141func (c *PlacementGroupsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementGroupsListCall {
38142	var placementStrategyIds_ []string
38143	for _, v := range placementStrategyIds {
38144		placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
38145	}
38146	c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
38147	return c
38148}
38149
38150// PricingTypes sets the optional parameter "pricingTypes": Select only
38151// placement groups with these pricing types.
38152//
38153// Possible values:
38154//   "PRICING_TYPE_CPA"
38155//   "PRICING_TYPE_CPC"
38156//   "PRICING_TYPE_CPM"
38157//   "PRICING_TYPE_CPM_ACTIVEVIEW"
38158//   "PRICING_TYPE_FLAT_RATE_CLICKS"
38159//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
38160func (c *PlacementGroupsListCall) PricingTypes(pricingTypes ...string) *PlacementGroupsListCall {
38161	c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
38162	return c
38163}
38164
38165// SearchString sets the optional parameter "searchString": Allows
38166// searching for placement groups by name or ID. Wildcards (*) are
38167// allowed. For example, "placement*2015" will return placement groups
38168// with names like "placement group June 2015", "placement group May
38169// 2015", or simply "placements 2015". Most of the searches also add
38170// wildcards implicitly at the start and the end of the search string.
38171// For example, a search string of "placementgroup" will match placement
38172// groups with name "my placementgroup", "placementgroup 2015", or
38173// simply "placementgroup".
38174func (c *PlacementGroupsListCall) SearchString(searchString string) *PlacementGroupsListCall {
38175	c.urlParams_.Set("searchString", searchString)
38176	return c
38177}
38178
38179// SiteIds sets the optional parameter "siteIds": Select only placement
38180// groups that are associated with these sites.
38181func (c *PlacementGroupsListCall) SiteIds(siteIds ...int64) *PlacementGroupsListCall {
38182	var siteIds_ []string
38183	for _, v := range siteIds {
38184		siteIds_ = append(siteIds_, fmt.Sprint(v))
38185	}
38186	c.urlParams_.SetMulti("siteIds", siteIds_)
38187	return c
38188}
38189
38190// SortField sets the optional parameter "sortField": Field by which to
38191// sort the list.
38192//
38193// Possible values:
38194//   "ID" (default)
38195//   "NAME"
38196func (c *PlacementGroupsListCall) SortField(sortField string) *PlacementGroupsListCall {
38197	c.urlParams_.Set("sortField", sortField)
38198	return c
38199}
38200
38201// SortOrder sets the optional parameter "sortOrder": Order of sorted
38202// results.
38203//
38204// Possible values:
38205//   "ASCENDING" (default)
38206//   "DESCENDING"
38207func (c *PlacementGroupsListCall) SortOrder(sortOrder string) *PlacementGroupsListCall {
38208	c.urlParams_.Set("sortOrder", sortOrder)
38209	return c
38210}
38211
38212// Fields allows partial responses to be retrieved. See
38213// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38214// for more information.
38215func (c *PlacementGroupsListCall) Fields(s ...googleapi.Field) *PlacementGroupsListCall {
38216	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38217	return c
38218}
38219
38220// IfNoneMatch sets the optional parameter which makes the operation
38221// fail if the object's ETag matches the given value. This is useful for
38222// getting updates only after the object has changed since the last
38223// request. Use googleapi.IsNotModified to check whether the response
38224// error from Do is the result of In-None-Match.
38225func (c *PlacementGroupsListCall) IfNoneMatch(entityTag string) *PlacementGroupsListCall {
38226	c.ifNoneMatch_ = entityTag
38227	return c
38228}
38229
38230// Context sets the context to be used in this call's Do method. Any
38231// pending HTTP request will be aborted if the provided context is
38232// canceled.
38233func (c *PlacementGroupsListCall) Context(ctx context.Context) *PlacementGroupsListCall {
38234	c.ctx_ = ctx
38235	return c
38236}
38237
38238// Header returns an http.Header that can be modified by the caller to
38239// add HTTP headers to the request.
38240func (c *PlacementGroupsListCall) Header() http.Header {
38241	if c.header_ == nil {
38242		c.header_ = make(http.Header)
38243	}
38244	return c.header_
38245}
38246
38247func (c *PlacementGroupsListCall) doRequest(alt string) (*http.Response, error) {
38248	reqHeaders := make(http.Header)
38249	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
38250	for k, v := range c.header_ {
38251		reqHeaders[k] = v
38252	}
38253	reqHeaders.Set("User-Agent", c.s.userAgent())
38254	if c.ifNoneMatch_ != "" {
38255		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38256	}
38257	var body io.Reader = nil
38258	c.urlParams_.Set("alt", alt)
38259	c.urlParams_.Set("prettyPrint", "false")
38260	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38261	urls += "?" + c.urlParams_.Encode()
38262	req, err := http.NewRequest("GET", urls, body)
38263	if err != nil {
38264		return nil, err
38265	}
38266	req.Header = reqHeaders
38267	googleapi.Expand(req.URL, map[string]string{
38268		"profileId": strconv.FormatInt(c.profileId, 10),
38269	})
38270	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38271}
38272
38273// Do executes the "dfareporting.placementGroups.list" call.
38274// Exactly one of *PlacementGroupsListResponse or error will be non-nil.
38275// Any non-2xx status code is an error. Response headers are in either
38276// *PlacementGroupsListResponse.ServerResponse.Header or (if a response
38277// was returned at all) in error.(*googleapi.Error).Header. Use
38278// googleapi.IsNotModified to check whether the returned error was
38279// because http.StatusNotModified was returned.
38280func (c *PlacementGroupsListCall) Do(opts ...googleapi.CallOption) (*PlacementGroupsListResponse, error) {
38281	gensupport.SetOptions(c.urlParams_, opts...)
38282	res, err := c.doRequest("json")
38283	if res != nil && res.StatusCode == http.StatusNotModified {
38284		if res.Body != nil {
38285			res.Body.Close()
38286		}
38287		return nil, &googleapi.Error{
38288			Code:   res.StatusCode,
38289			Header: res.Header,
38290		}
38291	}
38292	if err != nil {
38293		return nil, err
38294	}
38295	defer googleapi.CloseBody(res)
38296	if err := googleapi.CheckResponse(res); err != nil {
38297		return nil, err
38298	}
38299	ret := &PlacementGroupsListResponse{
38300		ServerResponse: googleapi.ServerResponse{
38301			Header:         res.Header,
38302			HTTPStatusCode: res.StatusCode,
38303		},
38304	}
38305	target := &ret
38306	if err := gensupport.DecodeResponse(target, res); err != nil {
38307		return nil, err
38308	}
38309	return ret, nil
38310	// {
38311	//   "description": "Retrieves a list of placement groups, possibly filtered. This method supports paging.",
38312	//   "httpMethod": "GET",
38313	//   "id": "dfareporting.placementGroups.list",
38314	//   "parameterOrder": [
38315	//     "profileId"
38316	//   ],
38317	//   "parameters": {
38318	//     "advertiserIds": {
38319	//       "description": "Select only placement groups that belong to these advertisers.",
38320	//       "format": "int64",
38321	//       "location": "query",
38322	//       "repeated": true,
38323	//       "type": "string"
38324	//     },
38325	//     "archived": {
38326	//       "description": "Select only archived placements. Don't set this field to select both archived and non-archived placements.",
38327	//       "location": "query",
38328	//       "type": "boolean"
38329	//     },
38330	//     "campaignIds": {
38331	//       "description": "Select only placement groups that belong to these campaigns.",
38332	//       "format": "int64",
38333	//       "location": "query",
38334	//       "repeated": true,
38335	//       "type": "string"
38336	//     },
38337	//     "contentCategoryIds": {
38338	//       "description": "Select only placement groups that are associated with these content categories.",
38339	//       "format": "int64",
38340	//       "location": "query",
38341	//       "repeated": true,
38342	//       "type": "string"
38343	//     },
38344	//     "directorySiteIds": {
38345	//       "description": "Select only placement groups that are associated with these directory sites.",
38346	//       "format": "int64",
38347	//       "location": "query",
38348	//       "repeated": true,
38349	//       "type": "string"
38350	//     },
38351	//     "ids": {
38352	//       "description": "Select only placement groups with these IDs.",
38353	//       "format": "int64",
38354	//       "location": "query",
38355	//       "repeated": true,
38356	//       "type": "string"
38357	//     },
38358	//     "maxEndDate": {
38359	//       "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\".",
38360	//       "location": "query",
38361	//       "type": "string"
38362	//     },
38363	//     "maxResults": {
38364	//       "default": "800",
38365	//       "description": "Maximum number of results to return.",
38366	//       "format": "int32",
38367	//       "location": "query",
38368	//       "maximum": "800",
38369	//       "minimum": "0",
38370	//       "type": "integer"
38371	//     },
38372	//     "maxStartDate": {
38373	//       "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\".",
38374	//       "location": "query",
38375	//       "type": "string"
38376	//     },
38377	//     "minEndDate": {
38378	//       "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\".",
38379	//       "location": "query",
38380	//       "type": "string"
38381	//     },
38382	//     "minStartDate": {
38383	//       "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\".",
38384	//       "location": "query",
38385	//       "type": "string"
38386	//     },
38387	//     "pageToken": {
38388	//       "description": "Value of the nextPageToken from the previous result page.",
38389	//       "location": "query",
38390	//       "type": "string"
38391	//     },
38392	//     "placementGroupType": {
38393	//       "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.",
38394	//       "enum": [
38395	//         "PLACEMENT_PACKAGE",
38396	//         "PLACEMENT_ROADBLOCK"
38397	//       ],
38398	//       "enumDescriptions": [
38399	//         "",
38400	//         ""
38401	//       ],
38402	//       "location": "query",
38403	//       "type": "string"
38404	//     },
38405	//     "placementStrategyIds": {
38406	//       "description": "Select only placement groups that are associated with these placement strategies.",
38407	//       "format": "int64",
38408	//       "location": "query",
38409	//       "repeated": true,
38410	//       "type": "string"
38411	//     },
38412	//     "pricingTypes": {
38413	//       "description": "Select only placement groups with these pricing types.",
38414	//       "enum": [
38415	//         "PRICING_TYPE_CPA",
38416	//         "PRICING_TYPE_CPC",
38417	//         "PRICING_TYPE_CPM",
38418	//         "PRICING_TYPE_CPM_ACTIVEVIEW",
38419	//         "PRICING_TYPE_FLAT_RATE_CLICKS",
38420	//         "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
38421	//       ],
38422	//       "enumDescriptions": [
38423	//         "",
38424	//         "",
38425	//         "",
38426	//         "",
38427	//         "",
38428	//         ""
38429	//       ],
38430	//       "location": "query",
38431	//       "repeated": true,
38432	//       "type": "string"
38433	//     },
38434	//     "profileId": {
38435	//       "description": "User profile ID associated with this request.",
38436	//       "format": "int64",
38437	//       "location": "path",
38438	//       "required": true,
38439	//       "type": "string"
38440	//     },
38441	//     "searchString": {
38442	//       "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\".",
38443	//       "location": "query",
38444	//       "type": "string"
38445	//     },
38446	//     "siteIds": {
38447	//       "description": "Select only placement groups that are associated with these sites.",
38448	//       "format": "int64",
38449	//       "location": "query",
38450	//       "repeated": true,
38451	//       "type": "string"
38452	//     },
38453	//     "sortField": {
38454	//       "default": "ID",
38455	//       "description": "Field by which to sort the list.",
38456	//       "enum": [
38457	//         "ID",
38458	//         "NAME"
38459	//       ],
38460	//       "enumDescriptions": [
38461	//         "",
38462	//         ""
38463	//       ],
38464	//       "location": "query",
38465	//       "type": "string"
38466	//     },
38467	//     "sortOrder": {
38468	//       "default": "ASCENDING",
38469	//       "description": "Order of sorted results.",
38470	//       "enum": [
38471	//         "ASCENDING",
38472	//         "DESCENDING"
38473	//       ],
38474	//       "enumDescriptions": [
38475	//         "",
38476	//         ""
38477	//       ],
38478	//       "location": "query",
38479	//       "type": "string"
38480	//     }
38481	//   },
38482	//   "path": "userprofiles/{profileId}/placementGroups",
38483	//   "response": {
38484	//     "$ref": "PlacementGroupsListResponse"
38485	//   },
38486	//   "scopes": [
38487	//     "https://www.googleapis.com/auth/dfatrafficking"
38488	//   ]
38489	// }
38490
38491}
38492
38493// Pages invokes f for each page of results.
38494// A non-nil error returned from f will halt the iteration.
38495// The provided context supersedes any context provided to the Context method.
38496func (c *PlacementGroupsListCall) Pages(ctx context.Context, f func(*PlacementGroupsListResponse) error) error {
38497	c.ctx_ = ctx
38498	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
38499	for {
38500		x, err := c.Do()
38501		if err != nil {
38502			return err
38503		}
38504		if err := f(x); err != nil {
38505			return err
38506		}
38507		if x.NextPageToken == "" {
38508			return nil
38509		}
38510		c.PageToken(x.NextPageToken)
38511	}
38512}
38513
38514// method id "dfareporting.placementGroups.patch":
38515
38516type PlacementGroupsPatchCall struct {
38517	s              *Service
38518	profileId      int64
38519	placementgroup *PlacementGroup
38520	urlParams_     gensupport.URLParams
38521	ctx_           context.Context
38522	header_        http.Header
38523}
38524
38525// Patch: Updates an existing placement group. This method supports
38526// patch semantics.
38527func (r *PlacementGroupsService) Patch(profileId int64, id int64, placementgroup *PlacementGroup) *PlacementGroupsPatchCall {
38528	c := &PlacementGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38529	c.profileId = profileId
38530	c.urlParams_.Set("id", fmt.Sprint(id))
38531	c.placementgroup = placementgroup
38532	return c
38533}
38534
38535// Fields allows partial responses to be retrieved. See
38536// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38537// for more information.
38538func (c *PlacementGroupsPatchCall) Fields(s ...googleapi.Field) *PlacementGroupsPatchCall {
38539	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38540	return c
38541}
38542
38543// Context sets the context to be used in this call's Do method. Any
38544// pending HTTP request will be aborted if the provided context is
38545// canceled.
38546func (c *PlacementGroupsPatchCall) Context(ctx context.Context) *PlacementGroupsPatchCall {
38547	c.ctx_ = ctx
38548	return c
38549}
38550
38551// Header returns an http.Header that can be modified by the caller to
38552// add HTTP headers to the request.
38553func (c *PlacementGroupsPatchCall) Header() http.Header {
38554	if c.header_ == nil {
38555		c.header_ = make(http.Header)
38556	}
38557	return c.header_
38558}
38559
38560func (c *PlacementGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
38561	reqHeaders := make(http.Header)
38562	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
38563	for k, v := range c.header_ {
38564		reqHeaders[k] = v
38565	}
38566	reqHeaders.Set("User-Agent", c.s.userAgent())
38567	var body io.Reader = nil
38568	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
38569	if err != nil {
38570		return nil, err
38571	}
38572	reqHeaders.Set("Content-Type", "application/json")
38573	c.urlParams_.Set("alt", alt)
38574	c.urlParams_.Set("prettyPrint", "false")
38575	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38576	urls += "?" + c.urlParams_.Encode()
38577	req, err := http.NewRequest("PATCH", urls, body)
38578	if err != nil {
38579		return nil, err
38580	}
38581	req.Header = reqHeaders
38582	googleapi.Expand(req.URL, map[string]string{
38583		"profileId": strconv.FormatInt(c.profileId, 10),
38584	})
38585	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38586}
38587
38588// Do executes the "dfareporting.placementGroups.patch" call.
38589// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
38590// status code is an error. Response headers are in either
38591// *PlacementGroup.ServerResponse.Header or (if a response was returned
38592// at all) in error.(*googleapi.Error).Header. Use
38593// googleapi.IsNotModified to check whether the returned error was
38594// because http.StatusNotModified was returned.
38595func (c *PlacementGroupsPatchCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
38596	gensupport.SetOptions(c.urlParams_, opts...)
38597	res, err := c.doRequest("json")
38598	if res != nil && res.StatusCode == http.StatusNotModified {
38599		if res.Body != nil {
38600			res.Body.Close()
38601		}
38602		return nil, &googleapi.Error{
38603			Code:   res.StatusCode,
38604			Header: res.Header,
38605		}
38606	}
38607	if err != nil {
38608		return nil, err
38609	}
38610	defer googleapi.CloseBody(res)
38611	if err := googleapi.CheckResponse(res); err != nil {
38612		return nil, err
38613	}
38614	ret := &PlacementGroup{
38615		ServerResponse: googleapi.ServerResponse{
38616			Header:         res.Header,
38617			HTTPStatusCode: res.StatusCode,
38618		},
38619	}
38620	target := &ret
38621	if err := gensupport.DecodeResponse(target, res); err != nil {
38622		return nil, err
38623	}
38624	return ret, nil
38625	// {
38626	//   "description": "Updates an existing placement group. This method supports patch semantics.",
38627	//   "httpMethod": "PATCH",
38628	//   "id": "dfareporting.placementGroups.patch",
38629	//   "parameterOrder": [
38630	//     "profileId",
38631	//     "id"
38632	//   ],
38633	//   "parameters": {
38634	//     "id": {
38635	//       "description": "Placement group ID.",
38636	//       "format": "int64",
38637	//       "location": "query",
38638	//       "required": true,
38639	//       "type": "string"
38640	//     },
38641	//     "profileId": {
38642	//       "description": "User profile ID associated with this request.",
38643	//       "format": "int64",
38644	//       "location": "path",
38645	//       "required": true,
38646	//       "type": "string"
38647	//     }
38648	//   },
38649	//   "path": "userprofiles/{profileId}/placementGroups",
38650	//   "request": {
38651	//     "$ref": "PlacementGroup"
38652	//   },
38653	//   "response": {
38654	//     "$ref": "PlacementGroup"
38655	//   },
38656	//   "scopes": [
38657	//     "https://www.googleapis.com/auth/dfatrafficking"
38658	//   ]
38659	// }
38660
38661}
38662
38663// method id "dfareporting.placementGroups.update":
38664
38665type PlacementGroupsUpdateCall struct {
38666	s              *Service
38667	profileId      int64
38668	placementgroup *PlacementGroup
38669	urlParams_     gensupport.URLParams
38670	ctx_           context.Context
38671	header_        http.Header
38672}
38673
38674// Update: Updates an existing placement group.
38675func (r *PlacementGroupsService) Update(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsUpdateCall {
38676	c := &PlacementGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38677	c.profileId = profileId
38678	c.placementgroup = placementgroup
38679	return c
38680}
38681
38682// Fields allows partial responses to be retrieved. See
38683// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38684// for more information.
38685func (c *PlacementGroupsUpdateCall) Fields(s ...googleapi.Field) *PlacementGroupsUpdateCall {
38686	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38687	return c
38688}
38689
38690// Context sets the context to be used in this call's Do method. Any
38691// pending HTTP request will be aborted if the provided context is
38692// canceled.
38693func (c *PlacementGroupsUpdateCall) Context(ctx context.Context) *PlacementGroupsUpdateCall {
38694	c.ctx_ = ctx
38695	return c
38696}
38697
38698// Header returns an http.Header that can be modified by the caller to
38699// add HTTP headers to the request.
38700func (c *PlacementGroupsUpdateCall) Header() http.Header {
38701	if c.header_ == nil {
38702		c.header_ = make(http.Header)
38703	}
38704	return c.header_
38705}
38706
38707func (c *PlacementGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
38708	reqHeaders := make(http.Header)
38709	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
38710	for k, v := range c.header_ {
38711		reqHeaders[k] = v
38712	}
38713	reqHeaders.Set("User-Agent", c.s.userAgent())
38714	var body io.Reader = nil
38715	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
38716	if err != nil {
38717		return nil, err
38718	}
38719	reqHeaders.Set("Content-Type", "application/json")
38720	c.urlParams_.Set("alt", alt)
38721	c.urlParams_.Set("prettyPrint", "false")
38722	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38723	urls += "?" + c.urlParams_.Encode()
38724	req, err := http.NewRequest("PUT", urls, body)
38725	if err != nil {
38726		return nil, err
38727	}
38728	req.Header = reqHeaders
38729	googleapi.Expand(req.URL, map[string]string{
38730		"profileId": strconv.FormatInt(c.profileId, 10),
38731	})
38732	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38733}
38734
38735// Do executes the "dfareporting.placementGroups.update" call.
38736// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
38737// status code is an error. Response headers are in either
38738// *PlacementGroup.ServerResponse.Header or (if a response was returned
38739// at all) in error.(*googleapi.Error).Header. Use
38740// googleapi.IsNotModified to check whether the returned error was
38741// because http.StatusNotModified was returned.
38742func (c *PlacementGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
38743	gensupport.SetOptions(c.urlParams_, opts...)
38744	res, err := c.doRequest("json")
38745	if res != nil && res.StatusCode == http.StatusNotModified {
38746		if res.Body != nil {
38747			res.Body.Close()
38748		}
38749		return nil, &googleapi.Error{
38750			Code:   res.StatusCode,
38751			Header: res.Header,
38752		}
38753	}
38754	if err != nil {
38755		return nil, err
38756	}
38757	defer googleapi.CloseBody(res)
38758	if err := googleapi.CheckResponse(res); err != nil {
38759		return nil, err
38760	}
38761	ret := &PlacementGroup{
38762		ServerResponse: googleapi.ServerResponse{
38763			Header:         res.Header,
38764			HTTPStatusCode: res.StatusCode,
38765		},
38766	}
38767	target := &ret
38768	if err := gensupport.DecodeResponse(target, res); err != nil {
38769		return nil, err
38770	}
38771	return ret, nil
38772	// {
38773	//   "description": "Updates an existing placement group.",
38774	//   "httpMethod": "PUT",
38775	//   "id": "dfareporting.placementGroups.update",
38776	//   "parameterOrder": [
38777	//     "profileId"
38778	//   ],
38779	//   "parameters": {
38780	//     "profileId": {
38781	//       "description": "User profile ID associated with this request.",
38782	//       "format": "int64",
38783	//       "location": "path",
38784	//       "required": true,
38785	//       "type": "string"
38786	//     }
38787	//   },
38788	//   "path": "userprofiles/{profileId}/placementGroups",
38789	//   "request": {
38790	//     "$ref": "PlacementGroup"
38791	//   },
38792	//   "response": {
38793	//     "$ref": "PlacementGroup"
38794	//   },
38795	//   "scopes": [
38796	//     "https://www.googleapis.com/auth/dfatrafficking"
38797	//   ]
38798	// }
38799
38800}
38801
38802// method id "dfareporting.placementStrategies.delete":
38803
38804type PlacementStrategiesDeleteCall struct {
38805	s          *Service
38806	profileId  int64
38807	id         int64
38808	urlParams_ gensupport.URLParams
38809	ctx_       context.Context
38810	header_    http.Header
38811}
38812
38813// Delete: Deletes an existing placement strategy.
38814func (r *PlacementStrategiesService) Delete(profileId int64, id int64) *PlacementStrategiesDeleteCall {
38815	c := &PlacementStrategiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38816	c.profileId = profileId
38817	c.id = id
38818	return c
38819}
38820
38821// Fields allows partial responses to be retrieved. See
38822// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38823// for more information.
38824func (c *PlacementStrategiesDeleteCall) Fields(s ...googleapi.Field) *PlacementStrategiesDeleteCall {
38825	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38826	return c
38827}
38828
38829// Context sets the context to be used in this call's Do method. Any
38830// pending HTTP request will be aborted if the provided context is
38831// canceled.
38832func (c *PlacementStrategiesDeleteCall) Context(ctx context.Context) *PlacementStrategiesDeleteCall {
38833	c.ctx_ = ctx
38834	return c
38835}
38836
38837// Header returns an http.Header that can be modified by the caller to
38838// add HTTP headers to the request.
38839func (c *PlacementStrategiesDeleteCall) Header() http.Header {
38840	if c.header_ == nil {
38841		c.header_ = make(http.Header)
38842	}
38843	return c.header_
38844}
38845
38846func (c *PlacementStrategiesDeleteCall) doRequest(alt string) (*http.Response, error) {
38847	reqHeaders := make(http.Header)
38848	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
38849	for k, v := range c.header_ {
38850		reqHeaders[k] = v
38851	}
38852	reqHeaders.Set("User-Agent", c.s.userAgent())
38853	var body io.Reader = nil
38854	c.urlParams_.Set("alt", alt)
38855	c.urlParams_.Set("prettyPrint", "false")
38856	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
38857	urls += "?" + c.urlParams_.Encode()
38858	req, err := http.NewRequest("DELETE", urls, body)
38859	if err != nil {
38860		return nil, err
38861	}
38862	req.Header = reqHeaders
38863	googleapi.Expand(req.URL, map[string]string{
38864		"profileId": strconv.FormatInt(c.profileId, 10),
38865		"id":        strconv.FormatInt(c.id, 10),
38866	})
38867	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38868}
38869
38870// Do executes the "dfareporting.placementStrategies.delete" call.
38871func (c *PlacementStrategiesDeleteCall) Do(opts ...googleapi.CallOption) error {
38872	gensupport.SetOptions(c.urlParams_, opts...)
38873	res, err := c.doRequest("json")
38874	if err != nil {
38875		return err
38876	}
38877	defer googleapi.CloseBody(res)
38878	if err := googleapi.CheckResponse(res); err != nil {
38879		return err
38880	}
38881	return nil
38882	// {
38883	//   "description": "Deletes an existing placement strategy.",
38884	//   "httpMethod": "DELETE",
38885	//   "id": "dfareporting.placementStrategies.delete",
38886	//   "parameterOrder": [
38887	//     "profileId",
38888	//     "id"
38889	//   ],
38890	//   "parameters": {
38891	//     "id": {
38892	//       "description": "Placement strategy ID.",
38893	//       "format": "int64",
38894	//       "location": "path",
38895	//       "required": true,
38896	//       "type": "string"
38897	//     },
38898	//     "profileId": {
38899	//       "description": "User profile ID associated with this request.",
38900	//       "format": "int64",
38901	//       "location": "path",
38902	//       "required": true,
38903	//       "type": "string"
38904	//     }
38905	//   },
38906	//   "path": "userprofiles/{profileId}/placementStrategies/{id}",
38907	//   "scopes": [
38908	//     "https://www.googleapis.com/auth/dfatrafficking"
38909	//   ]
38910	// }
38911
38912}
38913
38914// method id "dfareporting.placementStrategies.get":
38915
38916type PlacementStrategiesGetCall struct {
38917	s            *Service
38918	profileId    int64
38919	id           int64
38920	urlParams_   gensupport.URLParams
38921	ifNoneMatch_ string
38922	ctx_         context.Context
38923	header_      http.Header
38924}
38925
38926// Get: Gets one placement strategy by ID.
38927func (r *PlacementStrategiesService) Get(profileId int64, id int64) *PlacementStrategiesGetCall {
38928	c := &PlacementStrategiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38929	c.profileId = profileId
38930	c.id = id
38931	return c
38932}
38933
38934// Fields allows partial responses to be retrieved. See
38935// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38936// for more information.
38937func (c *PlacementStrategiesGetCall) Fields(s ...googleapi.Field) *PlacementStrategiesGetCall {
38938	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38939	return c
38940}
38941
38942// IfNoneMatch sets the optional parameter which makes the operation
38943// fail if the object's ETag matches the given value. This is useful for
38944// getting updates only after the object has changed since the last
38945// request. Use googleapi.IsNotModified to check whether the response
38946// error from Do is the result of In-None-Match.
38947func (c *PlacementStrategiesGetCall) IfNoneMatch(entityTag string) *PlacementStrategiesGetCall {
38948	c.ifNoneMatch_ = entityTag
38949	return c
38950}
38951
38952// Context sets the context to be used in this call's Do method. Any
38953// pending HTTP request will be aborted if the provided context is
38954// canceled.
38955func (c *PlacementStrategiesGetCall) Context(ctx context.Context) *PlacementStrategiesGetCall {
38956	c.ctx_ = ctx
38957	return c
38958}
38959
38960// Header returns an http.Header that can be modified by the caller to
38961// add HTTP headers to the request.
38962func (c *PlacementStrategiesGetCall) Header() http.Header {
38963	if c.header_ == nil {
38964		c.header_ = make(http.Header)
38965	}
38966	return c.header_
38967}
38968
38969func (c *PlacementStrategiesGetCall) doRequest(alt string) (*http.Response, error) {
38970	reqHeaders := make(http.Header)
38971	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
38972	for k, v := range c.header_ {
38973		reqHeaders[k] = v
38974	}
38975	reqHeaders.Set("User-Agent", c.s.userAgent())
38976	if c.ifNoneMatch_ != "" {
38977		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38978	}
38979	var body io.Reader = nil
38980	c.urlParams_.Set("alt", alt)
38981	c.urlParams_.Set("prettyPrint", "false")
38982	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
38983	urls += "?" + c.urlParams_.Encode()
38984	req, err := http.NewRequest("GET", urls, body)
38985	if err != nil {
38986		return nil, err
38987	}
38988	req.Header = reqHeaders
38989	googleapi.Expand(req.URL, map[string]string{
38990		"profileId": strconv.FormatInt(c.profileId, 10),
38991		"id":        strconv.FormatInt(c.id, 10),
38992	})
38993	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38994}
38995
38996// Do executes the "dfareporting.placementStrategies.get" call.
38997// Exactly one of *PlacementStrategy or error will be non-nil. Any
38998// non-2xx status code is an error. Response headers are in either
38999// *PlacementStrategy.ServerResponse.Header or (if a response was
39000// returned at all) in error.(*googleapi.Error).Header. Use
39001// googleapi.IsNotModified to check whether the returned error was
39002// because http.StatusNotModified was returned.
39003func (c *PlacementStrategiesGetCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39004	gensupport.SetOptions(c.urlParams_, opts...)
39005	res, err := c.doRequest("json")
39006	if res != nil && res.StatusCode == http.StatusNotModified {
39007		if res.Body != nil {
39008			res.Body.Close()
39009		}
39010		return nil, &googleapi.Error{
39011			Code:   res.StatusCode,
39012			Header: res.Header,
39013		}
39014	}
39015	if err != nil {
39016		return nil, err
39017	}
39018	defer googleapi.CloseBody(res)
39019	if err := googleapi.CheckResponse(res); err != nil {
39020		return nil, err
39021	}
39022	ret := &PlacementStrategy{
39023		ServerResponse: googleapi.ServerResponse{
39024			Header:         res.Header,
39025			HTTPStatusCode: res.StatusCode,
39026		},
39027	}
39028	target := &ret
39029	if err := gensupport.DecodeResponse(target, res); err != nil {
39030		return nil, err
39031	}
39032	return ret, nil
39033	// {
39034	//   "description": "Gets one placement strategy by ID.",
39035	//   "httpMethod": "GET",
39036	//   "id": "dfareporting.placementStrategies.get",
39037	//   "parameterOrder": [
39038	//     "profileId",
39039	//     "id"
39040	//   ],
39041	//   "parameters": {
39042	//     "id": {
39043	//       "description": "Placement strategy ID.",
39044	//       "format": "int64",
39045	//       "location": "path",
39046	//       "required": true,
39047	//       "type": "string"
39048	//     },
39049	//     "profileId": {
39050	//       "description": "User profile ID associated with this request.",
39051	//       "format": "int64",
39052	//       "location": "path",
39053	//       "required": true,
39054	//       "type": "string"
39055	//     }
39056	//   },
39057	//   "path": "userprofiles/{profileId}/placementStrategies/{id}",
39058	//   "response": {
39059	//     "$ref": "PlacementStrategy"
39060	//   },
39061	//   "scopes": [
39062	//     "https://www.googleapis.com/auth/dfatrafficking"
39063	//   ]
39064	// }
39065
39066}
39067
39068// method id "dfareporting.placementStrategies.insert":
39069
39070type PlacementStrategiesInsertCall struct {
39071	s                 *Service
39072	profileId         int64
39073	placementstrategy *PlacementStrategy
39074	urlParams_        gensupport.URLParams
39075	ctx_              context.Context
39076	header_           http.Header
39077}
39078
39079// Insert: Inserts a new placement strategy.
39080func (r *PlacementStrategiesService) Insert(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesInsertCall {
39081	c := &PlacementStrategiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39082	c.profileId = profileId
39083	c.placementstrategy = placementstrategy
39084	return c
39085}
39086
39087// Fields allows partial responses to be retrieved. See
39088// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39089// for more information.
39090func (c *PlacementStrategiesInsertCall) Fields(s ...googleapi.Field) *PlacementStrategiesInsertCall {
39091	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39092	return c
39093}
39094
39095// Context sets the context to be used in this call's Do method. Any
39096// pending HTTP request will be aborted if the provided context is
39097// canceled.
39098func (c *PlacementStrategiesInsertCall) Context(ctx context.Context) *PlacementStrategiesInsertCall {
39099	c.ctx_ = ctx
39100	return c
39101}
39102
39103// Header returns an http.Header that can be modified by the caller to
39104// add HTTP headers to the request.
39105func (c *PlacementStrategiesInsertCall) Header() http.Header {
39106	if c.header_ == nil {
39107		c.header_ = make(http.Header)
39108	}
39109	return c.header_
39110}
39111
39112func (c *PlacementStrategiesInsertCall) doRequest(alt string) (*http.Response, error) {
39113	reqHeaders := make(http.Header)
39114	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
39115	for k, v := range c.header_ {
39116		reqHeaders[k] = v
39117	}
39118	reqHeaders.Set("User-Agent", c.s.userAgent())
39119	var body io.Reader = nil
39120	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39121	if err != nil {
39122		return nil, err
39123	}
39124	reqHeaders.Set("Content-Type", "application/json")
39125	c.urlParams_.Set("alt", alt)
39126	c.urlParams_.Set("prettyPrint", "false")
39127	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39128	urls += "?" + c.urlParams_.Encode()
39129	req, err := http.NewRequest("POST", urls, body)
39130	if err != nil {
39131		return nil, err
39132	}
39133	req.Header = reqHeaders
39134	googleapi.Expand(req.URL, map[string]string{
39135		"profileId": strconv.FormatInt(c.profileId, 10),
39136	})
39137	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39138}
39139
39140// Do executes the "dfareporting.placementStrategies.insert" call.
39141// Exactly one of *PlacementStrategy or error will be non-nil. Any
39142// non-2xx status code is an error. Response headers are in either
39143// *PlacementStrategy.ServerResponse.Header or (if a response was
39144// returned at all) in error.(*googleapi.Error).Header. Use
39145// googleapi.IsNotModified to check whether the returned error was
39146// because http.StatusNotModified was returned.
39147func (c *PlacementStrategiesInsertCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39148	gensupport.SetOptions(c.urlParams_, opts...)
39149	res, err := c.doRequest("json")
39150	if res != nil && res.StatusCode == http.StatusNotModified {
39151		if res.Body != nil {
39152			res.Body.Close()
39153		}
39154		return nil, &googleapi.Error{
39155			Code:   res.StatusCode,
39156			Header: res.Header,
39157		}
39158	}
39159	if err != nil {
39160		return nil, err
39161	}
39162	defer googleapi.CloseBody(res)
39163	if err := googleapi.CheckResponse(res); err != nil {
39164		return nil, err
39165	}
39166	ret := &PlacementStrategy{
39167		ServerResponse: googleapi.ServerResponse{
39168			Header:         res.Header,
39169			HTTPStatusCode: res.StatusCode,
39170		},
39171	}
39172	target := &ret
39173	if err := gensupport.DecodeResponse(target, res); err != nil {
39174		return nil, err
39175	}
39176	return ret, nil
39177	// {
39178	//   "description": "Inserts a new placement strategy.",
39179	//   "httpMethod": "POST",
39180	//   "id": "dfareporting.placementStrategies.insert",
39181	//   "parameterOrder": [
39182	//     "profileId"
39183	//   ],
39184	//   "parameters": {
39185	//     "profileId": {
39186	//       "description": "User profile ID associated with this request.",
39187	//       "format": "int64",
39188	//       "location": "path",
39189	//       "required": true,
39190	//       "type": "string"
39191	//     }
39192	//   },
39193	//   "path": "userprofiles/{profileId}/placementStrategies",
39194	//   "request": {
39195	//     "$ref": "PlacementStrategy"
39196	//   },
39197	//   "response": {
39198	//     "$ref": "PlacementStrategy"
39199	//   },
39200	//   "scopes": [
39201	//     "https://www.googleapis.com/auth/dfatrafficking"
39202	//   ]
39203	// }
39204
39205}
39206
39207// method id "dfareporting.placementStrategies.list":
39208
39209type PlacementStrategiesListCall struct {
39210	s            *Service
39211	profileId    int64
39212	urlParams_   gensupport.URLParams
39213	ifNoneMatch_ string
39214	ctx_         context.Context
39215	header_      http.Header
39216}
39217
39218// List: Retrieves a list of placement strategies, possibly filtered.
39219// This method supports paging.
39220func (r *PlacementStrategiesService) List(profileId int64) *PlacementStrategiesListCall {
39221	c := &PlacementStrategiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39222	c.profileId = profileId
39223	return c
39224}
39225
39226// Ids sets the optional parameter "ids": Select only placement
39227// strategies with these IDs.
39228func (c *PlacementStrategiesListCall) Ids(ids ...int64) *PlacementStrategiesListCall {
39229	var ids_ []string
39230	for _, v := range ids {
39231		ids_ = append(ids_, fmt.Sprint(v))
39232	}
39233	c.urlParams_.SetMulti("ids", ids_)
39234	return c
39235}
39236
39237// MaxResults sets the optional parameter "maxResults": Maximum number
39238// of results to return.
39239func (c *PlacementStrategiesListCall) MaxResults(maxResults int64) *PlacementStrategiesListCall {
39240	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
39241	return c
39242}
39243
39244// PageToken sets the optional parameter "pageToken": Value of the
39245// nextPageToken from the previous result page.
39246func (c *PlacementStrategiesListCall) PageToken(pageToken string) *PlacementStrategiesListCall {
39247	c.urlParams_.Set("pageToken", pageToken)
39248	return c
39249}
39250
39251// SearchString sets the optional parameter "searchString": Allows
39252// searching for objects by name or ID. Wildcards (*) are allowed. For
39253// example, "placementstrategy*2015" will return objects with names like
39254// "placementstrategy June 2015", "placementstrategy April 2015", or
39255// simply "placementstrategy 2015". Most of the searches also add
39256// wildcards implicitly at the start and the end of the search string.
39257// For example, a search string of "placementstrategy" will match
39258// objects with name "my placementstrategy", "placementstrategy 2015",
39259// or simply "placementstrategy".
39260func (c *PlacementStrategiesListCall) SearchString(searchString string) *PlacementStrategiesListCall {
39261	c.urlParams_.Set("searchString", searchString)
39262	return c
39263}
39264
39265// SortField sets the optional parameter "sortField": Field by which to
39266// sort the list.
39267//
39268// Possible values:
39269//   "ID" (default)
39270//   "NAME"
39271func (c *PlacementStrategiesListCall) SortField(sortField string) *PlacementStrategiesListCall {
39272	c.urlParams_.Set("sortField", sortField)
39273	return c
39274}
39275
39276// SortOrder sets the optional parameter "sortOrder": Order of sorted
39277// results.
39278//
39279// Possible values:
39280//   "ASCENDING" (default)
39281//   "DESCENDING"
39282func (c *PlacementStrategiesListCall) SortOrder(sortOrder string) *PlacementStrategiesListCall {
39283	c.urlParams_.Set("sortOrder", sortOrder)
39284	return c
39285}
39286
39287// Fields allows partial responses to be retrieved. See
39288// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39289// for more information.
39290func (c *PlacementStrategiesListCall) Fields(s ...googleapi.Field) *PlacementStrategiesListCall {
39291	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39292	return c
39293}
39294
39295// IfNoneMatch sets the optional parameter which makes the operation
39296// fail if the object's ETag matches the given value. This is useful for
39297// getting updates only after the object has changed since the last
39298// request. Use googleapi.IsNotModified to check whether the response
39299// error from Do is the result of In-None-Match.
39300func (c *PlacementStrategiesListCall) IfNoneMatch(entityTag string) *PlacementStrategiesListCall {
39301	c.ifNoneMatch_ = entityTag
39302	return c
39303}
39304
39305// Context sets the context to be used in this call's Do method. Any
39306// pending HTTP request will be aborted if the provided context is
39307// canceled.
39308func (c *PlacementStrategiesListCall) Context(ctx context.Context) *PlacementStrategiesListCall {
39309	c.ctx_ = ctx
39310	return c
39311}
39312
39313// Header returns an http.Header that can be modified by the caller to
39314// add HTTP headers to the request.
39315func (c *PlacementStrategiesListCall) Header() http.Header {
39316	if c.header_ == nil {
39317		c.header_ = make(http.Header)
39318	}
39319	return c.header_
39320}
39321
39322func (c *PlacementStrategiesListCall) doRequest(alt string) (*http.Response, error) {
39323	reqHeaders := make(http.Header)
39324	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
39325	for k, v := range c.header_ {
39326		reqHeaders[k] = v
39327	}
39328	reqHeaders.Set("User-Agent", c.s.userAgent())
39329	if c.ifNoneMatch_ != "" {
39330		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39331	}
39332	var body io.Reader = nil
39333	c.urlParams_.Set("alt", alt)
39334	c.urlParams_.Set("prettyPrint", "false")
39335	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39336	urls += "?" + c.urlParams_.Encode()
39337	req, err := http.NewRequest("GET", urls, body)
39338	if err != nil {
39339		return nil, err
39340	}
39341	req.Header = reqHeaders
39342	googleapi.Expand(req.URL, map[string]string{
39343		"profileId": strconv.FormatInt(c.profileId, 10),
39344	})
39345	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39346}
39347
39348// Do executes the "dfareporting.placementStrategies.list" call.
39349// Exactly one of *PlacementStrategiesListResponse or error will be
39350// non-nil. Any non-2xx status code is an error. Response headers are in
39351// either *PlacementStrategiesListResponse.ServerResponse.Header or (if
39352// a response was returned at all) in error.(*googleapi.Error).Header.
39353// Use googleapi.IsNotModified to check whether the returned error was
39354// because http.StatusNotModified was returned.
39355func (c *PlacementStrategiesListCall) Do(opts ...googleapi.CallOption) (*PlacementStrategiesListResponse, error) {
39356	gensupport.SetOptions(c.urlParams_, opts...)
39357	res, err := c.doRequest("json")
39358	if res != nil && res.StatusCode == http.StatusNotModified {
39359		if res.Body != nil {
39360			res.Body.Close()
39361		}
39362		return nil, &googleapi.Error{
39363			Code:   res.StatusCode,
39364			Header: res.Header,
39365		}
39366	}
39367	if err != nil {
39368		return nil, err
39369	}
39370	defer googleapi.CloseBody(res)
39371	if err := googleapi.CheckResponse(res); err != nil {
39372		return nil, err
39373	}
39374	ret := &PlacementStrategiesListResponse{
39375		ServerResponse: googleapi.ServerResponse{
39376			Header:         res.Header,
39377			HTTPStatusCode: res.StatusCode,
39378		},
39379	}
39380	target := &ret
39381	if err := gensupport.DecodeResponse(target, res); err != nil {
39382		return nil, err
39383	}
39384	return ret, nil
39385	// {
39386	//   "description": "Retrieves a list of placement strategies, possibly filtered. This method supports paging.",
39387	//   "httpMethod": "GET",
39388	//   "id": "dfareporting.placementStrategies.list",
39389	//   "parameterOrder": [
39390	//     "profileId"
39391	//   ],
39392	//   "parameters": {
39393	//     "ids": {
39394	//       "description": "Select only placement strategies with these IDs.",
39395	//       "format": "int64",
39396	//       "location": "query",
39397	//       "repeated": true,
39398	//       "type": "string"
39399	//     },
39400	//     "maxResults": {
39401	//       "default": "1000",
39402	//       "description": "Maximum number of results to return.",
39403	//       "format": "int32",
39404	//       "location": "query",
39405	//       "maximum": "1000",
39406	//       "minimum": "0",
39407	//       "type": "integer"
39408	//     },
39409	//     "pageToken": {
39410	//       "description": "Value of the nextPageToken from the previous result page.",
39411	//       "location": "query",
39412	//       "type": "string"
39413	//     },
39414	//     "profileId": {
39415	//       "description": "User profile ID associated with this request.",
39416	//       "format": "int64",
39417	//       "location": "path",
39418	//       "required": true,
39419	//       "type": "string"
39420	//     },
39421	//     "searchString": {
39422	//       "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\".",
39423	//       "location": "query",
39424	//       "type": "string"
39425	//     },
39426	//     "sortField": {
39427	//       "default": "ID",
39428	//       "description": "Field by which to sort the list.",
39429	//       "enum": [
39430	//         "ID",
39431	//         "NAME"
39432	//       ],
39433	//       "enumDescriptions": [
39434	//         "",
39435	//         ""
39436	//       ],
39437	//       "location": "query",
39438	//       "type": "string"
39439	//     },
39440	//     "sortOrder": {
39441	//       "default": "ASCENDING",
39442	//       "description": "Order of sorted results.",
39443	//       "enum": [
39444	//         "ASCENDING",
39445	//         "DESCENDING"
39446	//       ],
39447	//       "enumDescriptions": [
39448	//         "",
39449	//         ""
39450	//       ],
39451	//       "location": "query",
39452	//       "type": "string"
39453	//     }
39454	//   },
39455	//   "path": "userprofiles/{profileId}/placementStrategies",
39456	//   "response": {
39457	//     "$ref": "PlacementStrategiesListResponse"
39458	//   },
39459	//   "scopes": [
39460	//     "https://www.googleapis.com/auth/dfatrafficking"
39461	//   ]
39462	// }
39463
39464}
39465
39466// Pages invokes f for each page of results.
39467// A non-nil error returned from f will halt the iteration.
39468// The provided context supersedes any context provided to the Context method.
39469func (c *PlacementStrategiesListCall) Pages(ctx context.Context, f func(*PlacementStrategiesListResponse) error) error {
39470	c.ctx_ = ctx
39471	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
39472	for {
39473		x, err := c.Do()
39474		if err != nil {
39475			return err
39476		}
39477		if err := f(x); err != nil {
39478			return err
39479		}
39480		if x.NextPageToken == "" {
39481			return nil
39482		}
39483		c.PageToken(x.NextPageToken)
39484	}
39485}
39486
39487// method id "dfareporting.placementStrategies.patch":
39488
39489type PlacementStrategiesPatchCall struct {
39490	s                 *Service
39491	profileId         int64
39492	placementstrategy *PlacementStrategy
39493	urlParams_        gensupport.URLParams
39494	ctx_              context.Context
39495	header_           http.Header
39496}
39497
39498// Patch: Updates an existing placement strategy. This method supports
39499// patch semantics.
39500func (r *PlacementStrategiesService) Patch(profileId int64, id int64, placementstrategy *PlacementStrategy) *PlacementStrategiesPatchCall {
39501	c := &PlacementStrategiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39502	c.profileId = profileId
39503	c.urlParams_.Set("id", fmt.Sprint(id))
39504	c.placementstrategy = placementstrategy
39505	return c
39506}
39507
39508// Fields allows partial responses to be retrieved. See
39509// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39510// for more information.
39511func (c *PlacementStrategiesPatchCall) Fields(s ...googleapi.Field) *PlacementStrategiesPatchCall {
39512	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39513	return c
39514}
39515
39516// Context sets the context to be used in this call's Do method. Any
39517// pending HTTP request will be aborted if the provided context is
39518// canceled.
39519func (c *PlacementStrategiesPatchCall) Context(ctx context.Context) *PlacementStrategiesPatchCall {
39520	c.ctx_ = ctx
39521	return c
39522}
39523
39524// Header returns an http.Header that can be modified by the caller to
39525// add HTTP headers to the request.
39526func (c *PlacementStrategiesPatchCall) Header() http.Header {
39527	if c.header_ == nil {
39528		c.header_ = make(http.Header)
39529	}
39530	return c.header_
39531}
39532
39533func (c *PlacementStrategiesPatchCall) doRequest(alt string) (*http.Response, error) {
39534	reqHeaders := make(http.Header)
39535	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
39536	for k, v := range c.header_ {
39537		reqHeaders[k] = v
39538	}
39539	reqHeaders.Set("User-Agent", c.s.userAgent())
39540	var body io.Reader = nil
39541	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39542	if err != nil {
39543		return nil, err
39544	}
39545	reqHeaders.Set("Content-Type", "application/json")
39546	c.urlParams_.Set("alt", alt)
39547	c.urlParams_.Set("prettyPrint", "false")
39548	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39549	urls += "?" + c.urlParams_.Encode()
39550	req, err := http.NewRequest("PATCH", urls, body)
39551	if err != nil {
39552		return nil, err
39553	}
39554	req.Header = reqHeaders
39555	googleapi.Expand(req.URL, map[string]string{
39556		"profileId": strconv.FormatInt(c.profileId, 10),
39557	})
39558	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39559}
39560
39561// Do executes the "dfareporting.placementStrategies.patch" call.
39562// Exactly one of *PlacementStrategy or error will be non-nil. Any
39563// non-2xx status code is an error. Response headers are in either
39564// *PlacementStrategy.ServerResponse.Header or (if a response was
39565// returned at all) in error.(*googleapi.Error).Header. Use
39566// googleapi.IsNotModified to check whether the returned error was
39567// because http.StatusNotModified was returned.
39568func (c *PlacementStrategiesPatchCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39569	gensupport.SetOptions(c.urlParams_, opts...)
39570	res, err := c.doRequest("json")
39571	if res != nil && res.StatusCode == http.StatusNotModified {
39572		if res.Body != nil {
39573			res.Body.Close()
39574		}
39575		return nil, &googleapi.Error{
39576			Code:   res.StatusCode,
39577			Header: res.Header,
39578		}
39579	}
39580	if err != nil {
39581		return nil, err
39582	}
39583	defer googleapi.CloseBody(res)
39584	if err := googleapi.CheckResponse(res); err != nil {
39585		return nil, err
39586	}
39587	ret := &PlacementStrategy{
39588		ServerResponse: googleapi.ServerResponse{
39589			Header:         res.Header,
39590			HTTPStatusCode: res.StatusCode,
39591		},
39592	}
39593	target := &ret
39594	if err := gensupport.DecodeResponse(target, res); err != nil {
39595		return nil, err
39596	}
39597	return ret, nil
39598	// {
39599	//   "description": "Updates an existing placement strategy. This method supports patch semantics.",
39600	//   "httpMethod": "PATCH",
39601	//   "id": "dfareporting.placementStrategies.patch",
39602	//   "parameterOrder": [
39603	//     "profileId",
39604	//     "id"
39605	//   ],
39606	//   "parameters": {
39607	//     "id": {
39608	//       "description": "Placement strategy ID.",
39609	//       "format": "int64",
39610	//       "location": "query",
39611	//       "required": true,
39612	//       "type": "string"
39613	//     },
39614	//     "profileId": {
39615	//       "description": "User profile ID associated with this request.",
39616	//       "format": "int64",
39617	//       "location": "path",
39618	//       "required": true,
39619	//       "type": "string"
39620	//     }
39621	//   },
39622	//   "path": "userprofiles/{profileId}/placementStrategies",
39623	//   "request": {
39624	//     "$ref": "PlacementStrategy"
39625	//   },
39626	//   "response": {
39627	//     "$ref": "PlacementStrategy"
39628	//   },
39629	//   "scopes": [
39630	//     "https://www.googleapis.com/auth/dfatrafficking"
39631	//   ]
39632	// }
39633
39634}
39635
39636// method id "dfareporting.placementStrategies.update":
39637
39638type PlacementStrategiesUpdateCall struct {
39639	s                 *Service
39640	profileId         int64
39641	placementstrategy *PlacementStrategy
39642	urlParams_        gensupport.URLParams
39643	ctx_              context.Context
39644	header_           http.Header
39645}
39646
39647// Update: Updates an existing placement strategy.
39648func (r *PlacementStrategiesService) Update(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesUpdateCall {
39649	c := &PlacementStrategiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39650	c.profileId = profileId
39651	c.placementstrategy = placementstrategy
39652	return c
39653}
39654
39655// Fields allows partial responses to be retrieved. See
39656// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39657// for more information.
39658func (c *PlacementStrategiesUpdateCall) Fields(s ...googleapi.Field) *PlacementStrategiesUpdateCall {
39659	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39660	return c
39661}
39662
39663// Context sets the context to be used in this call's Do method. Any
39664// pending HTTP request will be aborted if the provided context is
39665// canceled.
39666func (c *PlacementStrategiesUpdateCall) Context(ctx context.Context) *PlacementStrategiesUpdateCall {
39667	c.ctx_ = ctx
39668	return c
39669}
39670
39671// Header returns an http.Header that can be modified by the caller to
39672// add HTTP headers to the request.
39673func (c *PlacementStrategiesUpdateCall) Header() http.Header {
39674	if c.header_ == nil {
39675		c.header_ = make(http.Header)
39676	}
39677	return c.header_
39678}
39679
39680func (c *PlacementStrategiesUpdateCall) doRequest(alt string) (*http.Response, error) {
39681	reqHeaders := make(http.Header)
39682	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
39683	for k, v := range c.header_ {
39684		reqHeaders[k] = v
39685	}
39686	reqHeaders.Set("User-Agent", c.s.userAgent())
39687	var body io.Reader = nil
39688	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39689	if err != nil {
39690		return nil, err
39691	}
39692	reqHeaders.Set("Content-Type", "application/json")
39693	c.urlParams_.Set("alt", alt)
39694	c.urlParams_.Set("prettyPrint", "false")
39695	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39696	urls += "?" + c.urlParams_.Encode()
39697	req, err := http.NewRequest("PUT", urls, body)
39698	if err != nil {
39699		return nil, err
39700	}
39701	req.Header = reqHeaders
39702	googleapi.Expand(req.URL, map[string]string{
39703		"profileId": strconv.FormatInt(c.profileId, 10),
39704	})
39705	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39706}
39707
39708// Do executes the "dfareporting.placementStrategies.update" call.
39709// Exactly one of *PlacementStrategy or error will be non-nil. Any
39710// non-2xx status code is an error. Response headers are in either
39711// *PlacementStrategy.ServerResponse.Header or (if a response was
39712// returned at all) in error.(*googleapi.Error).Header. Use
39713// googleapi.IsNotModified to check whether the returned error was
39714// because http.StatusNotModified was returned.
39715func (c *PlacementStrategiesUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39716	gensupport.SetOptions(c.urlParams_, opts...)
39717	res, err := c.doRequest("json")
39718	if res != nil && res.StatusCode == http.StatusNotModified {
39719		if res.Body != nil {
39720			res.Body.Close()
39721		}
39722		return nil, &googleapi.Error{
39723			Code:   res.StatusCode,
39724			Header: res.Header,
39725		}
39726	}
39727	if err != nil {
39728		return nil, err
39729	}
39730	defer googleapi.CloseBody(res)
39731	if err := googleapi.CheckResponse(res); err != nil {
39732		return nil, err
39733	}
39734	ret := &PlacementStrategy{
39735		ServerResponse: googleapi.ServerResponse{
39736			Header:         res.Header,
39737			HTTPStatusCode: res.StatusCode,
39738		},
39739	}
39740	target := &ret
39741	if err := gensupport.DecodeResponse(target, res); err != nil {
39742		return nil, err
39743	}
39744	return ret, nil
39745	// {
39746	//   "description": "Updates an existing placement strategy.",
39747	//   "httpMethod": "PUT",
39748	//   "id": "dfareporting.placementStrategies.update",
39749	//   "parameterOrder": [
39750	//     "profileId"
39751	//   ],
39752	//   "parameters": {
39753	//     "profileId": {
39754	//       "description": "User profile ID associated with this request.",
39755	//       "format": "int64",
39756	//       "location": "path",
39757	//       "required": true,
39758	//       "type": "string"
39759	//     }
39760	//   },
39761	//   "path": "userprofiles/{profileId}/placementStrategies",
39762	//   "request": {
39763	//     "$ref": "PlacementStrategy"
39764	//   },
39765	//   "response": {
39766	//     "$ref": "PlacementStrategy"
39767	//   },
39768	//   "scopes": [
39769	//     "https://www.googleapis.com/auth/dfatrafficking"
39770	//   ]
39771	// }
39772
39773}
39774
39775// method id "dfareporting.placements.generatetags":
39776
39777type PlacementsGeneratetagsCall struct {
39778	s          *Service
39779	profileId  int64
39780	urlParams_ gensupport.URLParams
39781	ctx_       context.Context
39782	header_    http.Header
39783}
39784
39785// Generatetags: Generates tags for a placement.
39786func (r *PlacementsService) Generatetags(profileId int64) *PlacementsGeneratetagsCall {
39787	c := &PlacementsGeneratetagsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39788	c.profileId = profileId
39789	return c
39790}
39791
39792// CampaignId sets the optional parameter "campaignId": Generate
39793// placements belonging to this campaign. This is a required field.
39794func (c *PlacementsGeneratetagsCall) CampaignId(campaignId int64) *PlacementsGeneratetagsCall {
39795	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
39796	return c
39797}
39798
39799// PlacementIds sets the optional parameter "placementIds": Generate
39800// tags for these placements.
39801func (c *PlacementsGeneratetagsCall) PlacementIds(placementIds ...int64) *PlacementsGeneratetagsCall {
39802	var placementIds_ []string
39803	for _, v := range placementIds {
39804		placementIds_ = append(placementIds_, fmt.Sprint(v))
39805	}
39806	c.urlParams_.SetMulti("placementIds", placementIds_)
39807	return c
39808}
39809
39810// TagFormats sets the optional parameter "tagFormats": Tag formats to
39811// generate for these placements.
39812//
39813// Note: PLACEMENT_TAG_STANDARD can only be generated for 1x1
39814// placements.
39815//
39816// Possible values:
39817//   "PLACEMENT_TAG_CLICK_COMMANDS"
39818//   "PLACEMENT_TAG_IFRAME_ILAYER"
39819//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
39820//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
39821//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
39822//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
39823//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
39824//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
39825//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
39826//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
39827//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
39828//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
39829//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
39830//   "PLACEMENT_TAG_JAVASCRIPT"
39831//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
39832//   "PLACEMENT_TAG_STANDARD"
39833//   "PLACEMENT_TAG_TRACKING"
39834//   "PLACEMENT_TAG_TRACKING_IFRAME"
39835//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
39836func (c *PlacementsGeneratetagsCall) TagFormats(tagFormats ...string) *PlacementsGeneratetagsCall {
39837	c.urlParams_.SetMulti("tagFormats", append([]string{}, tagFormats...))
39838	return c
39839}
39840
39841// Fields allows partial responses to be retrieved. See
39842// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39843// for more information.
39844func (c *PlacementsGeneratetagsCall) Fields(s ...googleapi.Field) *PlacementsGeneratetagsCall {
39845	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39846	return c
39847}
39848
39849// Context sets the context to be used in this call's Do method. Any
39850// pending HTTP request will be aborted if the provided context is
39851// canceled.
39852func (c *PlacementsGeneratetagsCall) Context(ctx context.Context) *PlacementsGeneratetagsCall {
39853	c.ctx_ = ctx
39854	return c
39855}
39856
39857// Header returns an http.Header that can be modified by the caller to
39858// add HTTP headers to the request.
39859func (c *PlacementsGeneratetagsCall) Header() http.Header {
39860	if c.header_ == nil {
39861		c.header_ = make(http.Header)
39862	}
39863	return c.header_
39864}
39865
39866func (c *PlacementsGeneratetagsCall) doRequest(alt string) (*http.Response, error) {
39867	reqHeaders := make(http.Header)
39868	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
39869	for k, v := range c.header_ {
39870		reqHeaders[k] = v
39871	}
39872	reqHeaders.Set("User-Agent", c.s.userAgent())
39873	var body io.Reader = nil
39874	c.urlParams_.Set("alt", alt)
39875	c.urlParams_.Set("prettyPrint", "false")
39876	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/generatetags")
39877	urls += "?" + c.urlParams_.Encode()
39878	req, err := http.NewRequest("POST", urls, body)
39879	if err != nil {
39880		return nil, err
39881	}
39882	req.Header = reqHeaders
39883	googleapi.Expand(req.URL, map[string]string{
39884		"profileId": strconv.FormatInt(c.profileId, 10),
39885	})
39886	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39887}
39888
39889// Do executes the "dfareporting.placements.generatetags" call.
39890// Exactly one of *PlacementsGenerateTagsResponse or error will be
39891// non-nil. Any non-2xx status code is an error. Response headers are in
39892// either *PlacementsGenerateTagsResponse.ServerResponse.Header or (if a
39893// response was returned at all) in error.(*googleapi.Error).Header. Use
39894// googleapi.IsNotModified to check whether the returned error was
39895// because http.StatusNotModified was returned.
39896func (c *PlacementsGeneratetagsCall) Do(opts ...googleapi.CallOption) (*PlacementsGenerateTagsResponse, error) {
39897	gensupport.SetOptions(c.urlParams_, opts...)
39898	res, err := c.doRequest("json")
39899	if res != nil && res.StatusCode == http.StatusNotModified {
39900		if res.Body != nil {
39901			res.Body.Close()
39902		}
39903		return nil, &googleapi.Error{
39904			Code:   res.StatusCode,
39905			Header: res.Header,
39906		}
39907	}
39908	if err != nil {
39909		return nil, err
39910	}
39911	defer googleapi.CloseBody(res)
39912	if err := googleapi.CheckResponse(res); err != nil {
39913		return nil, err
39914	}
39915	ret := &PlacementsGenerateTagsResponse{
39916		ServerResponse: googleapi.ServerResponse{
39917			Header:         res.Header,
39918			HTTPStatusCode: res.StatusCode,
39919		},
39920	}
39921	target := &ret
39922	if err := gensupport.DecodeResponse(target, res); err != nil {
39923		return nil, err
39924	}
39925	return ret, nil
39926	// {
39927	//   "description": "Generates tags for a placement.",
39928	//   "httpMethod": "POST",
39929	//   "id": "dfareporting.placements.generatetags",
39930	//   "parameterOrder": [
39931	//     "profileId"
39932	//   ],
39933	//   "parameters": {
39934	//     "campaignId": {
39935	//       "description": "Generate placements belonging to this campaign. This is a required field.",
39936	//       "format": "int64",
39937	//       "location": "query",
39938	//       "type": "string"
39939	//     },
39940	//     "placementIds": {
39941	//       "description": "Generate tags for these placements.",
39942	//       "format": "int64",
39943	//       "location": "query",
39944	//       "repeated": true,
39945	//       "type": "string"
39946	//     },
39947	//     "profileId": {
39948	//       "description": "User profile ID associated with this request.",
39949	//       "format": "int64",
39950	//       "location": "path",
39951	//       "required": true,
39952	//       "type": "string"
39953	//     },
39954	//     "tagFormats": {
39955	//       "description": "Tag formats to generate for these placements.\n\nNote: PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.",
39956	//       "enum": [
39957	//         "PLACEMENT_TAG_CLICK_COMMANDS",
39958	//         "PLACEMENT_TAG_IFRAME_ILAYER",
39959	//         "PLACEMENT_TAG_IFRAME_JAVASCRIPT",
39960	//         "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY",
39961	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH",
39962	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3",
39963	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4",
39964	//         "PLACEMENT_TAG_INTERNAL_REDIRECT",
39965	//         "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT",
39966	//         "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY",
39967	//         "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT",
39968	//         "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT",
39969	//         "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY",
39970	//         "PLACEMENT_TAG_JAVASCRIPT",
39971	//         "PLACEMENT_TAG_JAVASCRIPT_LEGACY",
39972	//         "PLACEMENT_TAG_STANDARD",
39973	//         "PLACEMENT_TAG_TRACKING",
39974	//         "PLACEMENT_TAG_TRACKING_IFRAME",
39975	//         "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
39976	//       ],
39977	//       "enumDescriptions": [
39978	//         "",
39979	//         "",
39980	//         "",
39981	//         "",
39982	//         "",
39983	//         "",
39984	//         "",
39985	//         "",
39986	//         "",
39987	//         "",
39988	//         "",
39989	//         "",
39990	//         "",
39991	//         "",
39992	//         "",
39993	//         "",
39994	//         "",
39995	//         "",
39996	//         ""
39997	//       ],
39998	//       "location": "query",
39999	//       "repeated": true,
40000	//       "type": "string"
40001	//     }
40002	//   },
40003	//   "path": "userprofiles/{profileId}/placements/generatetags",
40004	//   "response": {
40005	//     "$ref": "PlacementsGenerateTagsResponse"
40006	//   },
40007	//   "scopes": [
40008	//     "https://www.googleapis.com/auth/dfatrafficking"
40009	//   ]
40010	// }
40011
40012}
40013
40014// method id "dfareporting.placements.get":
40015
40016type PlacementsGetCall struct {
40017	s            *Service
40018	profileId    int64
40019	id           int64
40020	urlParams_   gensupport.URLParams
40021	ifNoneMatch_ string
40022	ctx_         context.Context
40023	header_      http.Header
40024}
40025
40026// Get: Gets one placement by ID.
40027func (r *PlacementsService) Get(profileId int64, id int64) *PlacementsGetCall {
40028	c := &PlacementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40029	c.profileId = profileId
40030	c.id = id
40031	return c
40032}
40033
40034// Fields allows partial responses to be retrieved. See
40035// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40036// for more information.
40037func (c *PlacementsGetCall) Fields(s ...googleapi.Field) *PlacementsGetCall {
40038	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40039	return c
40040}
40041
40042// IfNoneMatch sets the optional parameter which makes the operation
40043// fail if the object's ETag matches the given value. This is useful for
40044// getting updates only after the object has changed since the last
40045// request. Use googleapi.IsNotModified to check whether the response
40046// error from Do is the result of In-None-Match.
40047func (c *PlacementsGetCall) IfNoneMatch(entityTag string) *PlacementsGetCall {
40048	c.ifNoneMatch_ = entityTag
40049	return c
40050}
40051
40052// Context sets the context to be used in this call's Do method. Any
40053// pending HTTP request will be aborted if the provided context is
40054// canceled.
40055func (c *PlacementsGetCall) Context(ctx context.Context) *PlacementsGetCall {
40056	c.ctx_ = ctx
40057	return c
40058}
40059
40060// Header returns an http.Header that can be modified by the caller to
40061// add HTTP headers to the request.
40062func (c *PlacementsGetCall) Header() http.Header {
40063	if c.header_ == nil {
40064		c.header_ = make(http.Header)
40065	}
40066	return c.header_
40067}
40068
40069func (c *PlacementsGetCall) doRequest(alt string) (*http.Response, error) {
40070	reqHeaders := make(http.Header)
40071	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
40072	for k, v := range c.header_ {
40073		reqHeaders[k] = v
40074	}
40075	reqHeaders.Set("User-Agent", c.s.userAgent())
40076	if c.ifNoneMatch_ != "" {
40077		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40078	}
40079	var body io.Reader = nil
40080	c.urlParams_.Set("alt", alt)
40081	c.urlParams_.Set("prettyPrint", "false")
40082	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/{id}")
40083	urls += "?" + c.urlParams_.Encode()
40084	req, err := http.NewRequest("GET", urls, body)
40085	if err != nil {
40086		return nil, err
40087	}
40088	req.Header = reqHeaders
40089	googleapi.Expand(req.URL, map[string]string{
40090		"profileId": strconv.FormatInt(c.profileId, 10),
40091		"id":        strconv.FormatInt(c.id, 10),
40092	})
40093	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40094}
40095
40096// Do executes the "dfareporting.placements.get" call.
40097// Exactly one of *Placement or error will be non-nil. Any non-2xx
40098// status code is an error. Response headers are in either
40099// *Placement.ServerResponse.Header or (if a response was returned at
40100// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40101// to check whether the returned error was because
40102// http.StatusNotModified was returned.
40103func (c *PlacementsGetCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40104	gensupport.SetOptions(c.urlParams_, opts...)
40105	res, err := c.doRequest("json")
40106	if res != nil && res.StatusCode == http.StatusNotModified {
40107		if res.Body != nil {
40108			res.Body.Close()
40109		}
40110		return nil, &googleapi.Error{
40111			Code:   res.StatusCode,
40112			Header: res.Header,
40113		}
40114	}
40115	if err != nil {
40116		return nil, err
40117	}
40118	defer googleapi.CloseBody(res)
40119	if err := googleapi.CheckResponse(res); err != nil {
40120		return nil, err
40121	}
40122	ret := &Placement{
40123		ServerResponse: googleapi.ServerResponse{
40124			Header:         res.Header,
40125			HTTPStatusCode: res.StatusCode,
40126		},
40127	}
40128	target := &ret
40129	if err := gensupport.DecodeResponse(target, res); err != nil {
40130		return nil, err
40131	}
40132	return ret, nil
40133	// {
40134	//   "description": "Gets one placement by ID.",
40135	//   "httpMethod": "GET",
40136	//   "id": "dfareporting.placements.get",
40137	//   "parameterOrder": [
40138	//     "profileId",
40139	//     "id"
40140	//   ],
40141	//   "parameters": {
40142	//     "id": {
40143	//       "description": "Placement ID.",
40144	//       "format": "int64",
40145	//       "location": "path",
40146	//       "required": true,
40147	//       "type": "string"
40148	//     },
40149	//     "profileId": {
40150	//       "description": "User profile ID associated with this request.",
40151	//       "format": "int64",
40152	//       "location": "path",
40153	//       "required": true,
40154	//       "type": "string"
40155	//     }
40156	//   },
40157	//   "path": "userprofiles/{profileId}/placements/{id}",
40158	//   "response": {
40159	//     "$ref": "Placement"
40160	//   },
40161	//   "scopes": [
40162	//     "https://www.googleapis.com/auth/dfatrafficking"
40163	//   ]
40164	// }
40165
40166}
40167
40168// method id "dfareporting.placements.insert":
40169
40170type PlacementsInsertCall struct {
40171	s          *Service
40172	profileId  int64
40173	placement  *Placement
40174	urlParams_ gensupport.URLParams
40175	ctx_       context.Context
40176	header_    http.Header
40177}
40178
40179// Insert: Inserts a new placement.
40180func (r *PlacementsService) Insert(profileId int64, placement *Placement) *PlacementsInsertCall {
40181	c := &PlacementsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40182	c.profileId = profileId
40183	c.placement = placement
40184	return c
40185}
40186
40187// Fields allows partial responses to be retrieved. See
40188// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40189// for more information.
40190func (c *PlacementsInsertCall) Fields(s ...googleapi.Field) *PlacementsInsertCall {
40191	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40192	return c
40193}
40194
40195// Context sets the context to be used in this call's Do method. Any
40196// pending HTTP request will be aborted if the provided context is
40197// canceled.
40198func (c *PlacementsInsertCall) Context(ctx context.Context) *PlacementsInsertCall {
40199	c.ctx_ = ctx
40200	return c
40201}
40202
40203// Header returns an http.Header that can be modified by the caller to
40204// add HTTP headers to the request.
40205func (c *PlacementsInsertCall) Header() http.Header {
40206	if c.header_ == nil {
40207		c.header_ = make(http.Header)
40208	}
40209	return c.header_
40210}
40211
40212func (c *PlacementsInsertCall) doRequest(alt string) (*http.Response, error) {
40213	reqHeaders := make(http.Header)
40214	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
40215	for k, v := range c.header_ {
40216		reqHeaders[k] = v
40217	}
40218	reqHeaders.Set("User-Agent", c.s.userAgent())
40219	var body io.Reader = nil
40220	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
40221	if err != nil {
40222		return nil, err
40223	}
40224	reqHeaders.Set("Content-Type", "application/json")
40225	c.urlParams_.Set("alt", alt)
40226	c.urlParams_.Set("prettyPrint", "false")
40227	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40228	urls += "?" + c.urlParams_.Encode()
40229	req, err := http.NewRequest("POST", urls, body)
40230	if err != nil {
40231		return nil, err
40232	}
40233	req.Header = reqHeaders
40234	googleapi.Expand(req.URL, map[string]string{
40235		"profileId": strconv.FormatInt(c.profileId, 10),
40236	})
40237	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40238}
40239
40240// Do executes the "dfareporting.placements.insert" call.
40241// Exactly one of *Placement or error will be non-nil. Any non-2xx
40242// status code is an error. Response headers are in either
40243// *Placement.ServerResponse.Header or (if a response was returned at
40244// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40245// to check whether the returned error was because
40246// http.StatusNotModified was returned.
40247func (c *PlacementsInsertCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40248	gensupport.SetOptions(c.urlParams_, opts...)
40249	res, err := c.doRequest("json")
40250	if res != nil && res.StatusCode == http.StatusNotModified {
40251		if res.Body != nil {
40252			res.Body.Close()
40253		}
40254		return nil, &googleapi.Error{
40255			Code:   res.StatusCode,
40256			Header: res.Header,
40257		}
40258	}
40259	if err != nil {
40260		return nil, err
40261	}
40262	defer googleapi.CloseBody(res)
40263	if err := googleapi.CheckResponse(res); err != nil {
40264		return nil, err
40265	}
40266	ret := &Placement{
40267		ServerResponse: googleapi.ServerResponse{
40268			Header:         res.Header,
40269			HTTPStatusCode: res.StatusCode,
40270		},
40271	}
40272	target := &ret
40273	if err := gensupport.DecodeResponse(target, res); err != nil {
40274		return nil, err
40275	}
40276	return ret, nil
40277	// {
40278	//   "description": "Inserts a new placement.",
40279	//   "httpMethod": "POST",
40280	//   "id": "dfareporting.placements.insert",
40281	//   "parameterOrder": [
40282	//     "profileId"
40283	//   ],
40284	//   "parameters": {
40285	//     "profileId": {
40286	//       "description": "User profile ID associated with this request.",
40287	//       "format": "int64",
40288	//       "location": "path",
40289	//       "required": true,
40290	//       "type": "string"
40291	//     }
40292	//   },
40293	//   "path": "userprofiles/{profileId}/placements",
40294	//   "request": {
40295	//     "$ref": "Placement"
40296	//   },
40297	//   "response": {
40298	//     "$ref": "Placement"
40299	//   },
40300	//   "scopes": [
40301	//     "https://www.googleapis.com/auth/dfatrafficking"
40302	//   ]
40303	// }
40304
40305}
40306
40307// method id "dfareporting.placements.list":
40308
40309type PlacementsListCall struct {
40310	s            *Service
40311	profileId    int64
40312	urlParams_   gensupport.URLParams
40313	ifNoneMatch_ string
40314	ctx_         context.Context
40315	header_      http.Header
40316}
40317
40318// List: Retrieves a list of placements, possibly filtered. This method
40319// supports paging.
40320func (r *PlacementsService) List(profileId int64) *PlacementsListCall {
40321	c := &PlacementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40322	c.profileId = profileId
40323	return c
40324}
40325
40326// AdvertiserIds sets the optional parameter "advertiserIds": Select
40327// only placements that belong to these advertisers.
40328func (c *PlacementsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementsListCall {
40329	var advertiserIds_ []string
40330	for _, v := range advertiserIds {
40331		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
40332	}
40333	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
40334	return c
40335}
40336
40337// Archived sets the optional parameter "archived": Select only archived
40338// placements. Don't set this field to select both archived and
40339// non-archived placements.
40340func (c *PlacementsListCall) Archived(archived bool) *PlacementsListCall {
40341	c.urlParams_.Set("archived", fmt.Sprint(archived))
40342	return c
40343}
40344
40345// CampaignIds sets the optional parameter "campaignIds": Select only
40346// placements that belong to these campaigns.
40347func (c *PlacementsListCall) CampaignIds(campaignIds ...int64) *PlacementsListCall {
40348	var campaignIds_ []string
40349	for _, v := range campaignIds {
40350		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
40351	}
40352	c.urlParams_.SetMulti("campaignIds", campaignIds_)
40353	return c
40354}
40355
40356// Compatibilities sets the optional parameter "compatibilities": Select
40357// only placements that are associated with these compatibilities.
40358// DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop
40359// or on mobile devices for regular or interstitial ads respectively.
40360// APP and APP_INTERSTITIAL are for rendering in mobile apps.
40361// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
40362// with the VAST standard.
40363//
40364// Possible values:
40365//   "APP"
40366//   "APP_INTERSTITIAL"
40367//   "DISPLAY"
40368//   "DISPLAY_INTERSTITIAL"
40369//   "IN_STREAM_AUDIO"
40370//   "IN_STREAM_VIDEO"
40371func (c *PlacementsListCall) Compatibilities(compatibilities ...string) *PlacementsListCall {
40372	c.urlParams_.SetMulti("compatibilities", append([]string{}, compatibilities...))
40373	return c
40374}
40375
40376// ContentCategoryIds sets the optional parameter "contentCategoryIds":
40377// Select only placements that are associated with these content
40378// categories.
40379func (c *PlacementsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementsListCall {
40380	var contentCategoryIds_ []string
40381	for _, v := range contentCategoryIds {
40382		contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
40383	}
40384	c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
40385	return c
40386}
40387
40388// DirectorySiteIds sets the optional parameter "directorySiteIds":
40389// Select only placements that are associated with these directory
40390// sites.
40391func (c *PlacementsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementsListCall {
40392	var directorySiteIds_ []string
40393	for _, v := range directorySiteIds {
40394		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
40395	}
40396	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
40397	return c
40398}
40399
40400// GroupIds sets the optional parameter "groupIds": Select only
40401// placements that belong to these placement groups.
40402func (c *PlacementsListCall) GroupIds(groupIds ...int64) *PlacementsListCall {
40403	var groupIds_ []string
40404	for _, v := range groupIds {
40405		groupIds_ = append(groupIds_, fmt.Sprint(v))
40406	}
40407	c.urlParams_.SetMulti("groupIds", groupIds_)
40408	return c
40409}
40410
40411// Ids sets the optional parameter "ids": Select only placements with
40412// these IDs.
40413func (c *PlacementsListCall) Ids(ids ...int64) *PlacementsListCall {
40414	var ids_ []string
40415	for _, v := range ids {
40416		ids_ = append(ids_, fmt.Sprint(v))
40417	}
40418	c.urlParams_.SetMulti("ids", ids_)
40419	return c
40420}
40421
40422// MaxEndDate sets the optional parameter "maxEndDate": Select only
40423// placements or placement groups whose end date is on or before the
40424// specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
40425func (c *PlacementsListCall) MaxEndDate(maxEndDate string) *PlacementsListCall {
40426	c.urlParams_.Set("maxEndDate", maxEndDate)
40427	return c
40428}
40429
40430// MaxResults sets the optional parameter "maxResults": Maximum number
40431// of results to return.
40432func (c *PlacementsListCall) MaxResults(maxResults int64) *PlacementsListCall {
40433	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
40434	return c
40435}
40436
40437// MaxStartDate sets the optional parameter "maxStartDate": Select only
40438// placements or placement groups whose start date is on or before the
40439// specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
40440func (c *PlacementsListCall) MaxStartDate(maxStartDate string) *PlacementsListCall {
40441	c.urlParams_.Set("maxStartDate", maxStartDate)
40442	return c
40443}
40444
40445// MinEndDate sets the optional parameter "minEndDate": Select only
40446// placements or placement groups whose end date is on or after the
40447// specified minEndDate. The date should be formatted as "yyyy-MM-dd".
40448func (c *PlacementsListCall) MinEndDate(minEndDate string) *PlacementsListCall {
40449	c.urlParams_.Set("minEndDate", minEndDate)
40450	return c
40451}
40452
40453// MinStartDate sets the optional parameter "minStartDate": Select only
40454// placements or placement groups whose start date is on or after the
40455// specified minStartDate. The date should be formatted as "yyyy-MM-dd".
40456func (c *PlacementsListCall) MinStartDate(minStartDate string) *PlacementsListCall {
40457	c.urlParams_.Set("minStartDate", minStartDate)
40458	return c
40459}
40460
40461// PageToken sets the optional parameter "pageToken": Value of the
40462// nextPageToken from the previous result page.
40463func (c *PlacementsListCall) PageToken(pageToken string) *PlacementsListCall {
40464	c.urlParams_.Set("pageToken", pageToken)
40465	return c
40466}
40467
40468// PaymentSource sets the optional parameter "paymentSource": Select
40469// only placements with this payment source.
40470//
40471// Possible values:
40472//   "PLACEMENT_AGENCY_PAID"
40473//   "PLACEMENT_PUBLISHER_PAID"
40474func (c *PlacementsListCall) PaymentSource(paymentSource string) *PlacementsListCall {
40475	c.urlParams_.Set("paymentSource", paymentSource)
40476	return c
40477}
40478
40479// PlacementStrategyIds sets the optional parameter
40480// "placementStrategyIds": Select only placements that are associated
40481// with these placement strategies.
40482func (c *PlacementsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementsListCall {
40483	var placementStrategyIds_ []string
40484	for _, v := range placementStrategyIds {
40485		placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
40486	}
40487	c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
40488	return c
40489}
40490
40491// PricingTypes sets the optional parameter "pricingTypes": Select only
40492// placements with these pricing types.
40493//
40494// Possible values:
40495//   "PRICING_TYPE_CPA"
40496//   "PRICING_TYPE_CPC"
40497//   "PRICING_TYPE_CPM"
40498//   "PRICING_TYPE_CPM_ACTIVEVIEW"
40499//   "PRICING_TYPE_FLAT_RATE_CLICKS"
40500//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
40501func (c *PlacementsListCall) PricingTypes(pricingTypes ...string) *PlacementsListCall {
40502	c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
40503	return c
40504}
40505
40506// SearchString sets the optional parameter "searchString": Allows
40507// searching for placements by name or ID. Wildcards (*) are allowed.
40508// For example, "placement*2015" will return placements with names like
40509// "placement June 2015", "placement May 2015", or simply "placements
40510// 2015". Most of the searches also add wildcards implicitly at the
40511// start and the end of the search string. For example, a search string
40512// of "placement" will match placements with name "my placement",
40513// "placement 2015", or simply "placement".
40514func (c *PlacementsListCall) SearchString(searchString string) *PlacementsListCall {
40515	c.urlParams_.Set("searchString", searchString)
40516	return c
40517}
40518
40519// SiteIds sets the optional parameter "siteIds": Select only placements
40520// that are associated with these sites.
40521func (c *PlacementsListCall) SiteIds(siteIds ...int64) *PlacementsListCall {
40522	var siteIds_ []string
40523	for _, v := range siteIds {
40524		siteIds_ = append(siteIds_, fmt.Sprint(v))
40525	}
40526	c.urlParams_.SetMulti("siteIds", siteIds_)
40527	return c
40528}
40529
40530// SizeIds sets the optional parameter "sizeIds": Select only placements
40531// that are associated with these sizes.
40532func (c *PlacementsListCall) SizeIds(sizeIds ...int64) *PlacementsListCall {
40533	var sizeIds_ []string
40534	for _, v := range sizeIds {
40535		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
40536	}
40537	c.urlParams_.SetMulti("sizeIds", sizeIds_)
40538	return c
40539}
40540
40541// SortField sets the optional parameter "sortField": Field by which to
40542// sort the list.
40543//
40544// Possible values:
40545//   "ID" (default)
40546//   "NAME"
40547func (c *PlacementsListCall) SortField(sortField string) *PlacementsListCall {
40548	c.urlParams_.Set("sortField", sortField)
40549	return c
40550}
40551
40552// SortOrder sets the optional parameter "sortOrder": Order of sorted
40553// results.
40554//
40555// Possible values:
40556//   "ASCENDING" (default)
40557//   "DESCENDING"
40558func (c *PlacementsListCall) SortOrder(sortOrder string) *PlacementsListCall {
40559	c.urlParams_.Set("sortOrder", sortOrder)
40560	return c
40561}
40562
40563// Fields allows partial responses to be retrieved. See
40564// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40565// for more information.
40566func (c *PlacementsListCall) Fields(s ...googleapi.Field) *PlacementsListCall {
40567	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40568	return c
40569}
40570
40571// IfNoneMatch sets the optional parameter which makes the operation
40572// fail if the object's ETag matches the given value. This is useful for
40573// getting updates only after the object has changed since the last
40574// request. Use googleapi.IsNotModified to check whether the response
40575// error from Do is the result of In-None-Match.
40576func (c *PlacementsListCall) IfNoneMatch(entityTag string) *PlacementsListCall {
40577	c.ifNoneMatch_ = entityTag
40578	return c
40579}
40580
40581// Context sets the context to be used in this call's Do method. Any
40582// pending HTTP request will be aborted if the provided context is
40583// canceled.
40584func (c *PlacementsListCall) Context(ctx context.Context) *PlacementsListCall {
40585	c.ctx_ = ctx
40586	return c
40587}
40588
40589// Header returns an http.Header that can be modified by the caller to
40590// add HTTP headers to the request.
40591func (c *PlacementsListCall) Header() http.Header {
40592	if c.header_ == nil {
40593		c.header_ = make(http.Header)
40594	}
40595	return c.header_
40596}
40597
40598func (c *PlacementsListCall) doRequest(alt string) (*http.Response, error) {
40599	reqHeaders := make(http.Header)
40600	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
40601	for k, v := range c.header_ {
40602		reqHeaders[k] = v
40603	}
40604	reqHeaders.Set("User-Agent", c.s.userAgent())
40605	if c.ifNoneMatch_ != "" {
40606		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40607	}
40608	var body io.Reader = nil
40609	c.urlParams_.Set("alt", alt)
40610	c.urlParams_.Set("prettyPrint", "false")
40611	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40612	urls += "?" + c.urlParams_.Encode()
40613	req, err := http.NewRequest("GET", urls, body)
40614	if err != nil {
40615		return nil, err
40616	}
40617	req.Header = reqHeaders
40618	googleapi.Expand(req.URL, map[string]string{
40619		"profileId": strconv.FormatInt(c.profileId, 10),
40620	})
40621	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40622}
40623
40624// Do executes the "dfareporting.placements.list" call.
40625// Exactly one of *PlacementsListResponse or error will be non-nil. Any
40626// non-2xx status code is an error. Response headers are in either
40627// *PlacementsListResponse.ServerResponse.Header or (if a response was
40628// returned at all) in error.(*googleapi.Error).Header. Use
40629// googleapi.IsNotModified to check whether the returned error was
40630// because http.StatusNotModified was returned.
40631func (c *PlacementsListCall) Do(opts ...googleapi.CallOption) (*PlacementsListResponse, error) {
40632	gensupport.SetOptions(c.urlParams_, opts...)
40633	res, err := c.doRequest("json")
40634	if res != nil && res.StatusCode == http.StatusNotModified {
40635		if res.Body != nil {
40636			res.Body.Close()
40637		}
40638		return nil, &googleapi.Error{
40639			Code:   res.StatusCode,
40640			Header: res.Header,
40641		}
40642	}
40643	if err != nil {
40644		return nil, err
40645	}
40646	defer googleapi.CloseBody(res)
40647	if err := googleapi.CheckResponse(res); err != nil {
40648		return nil, err
40649	}
40650	ret := &PlacementsListResponse{
40651		ServerResponse: googleapi.ServerResponse{
40652			Header:         res.Header,
40653			HTTPStatusCode: res.StatusCode,
40654		},
40655	}
40656	target := &ret
40657	if err := gensupport.DecodeResponse(target, res); err != nil {
40658		return nil, err
40659	}
40660	return ret, nil
40661	// {
40662	//   "description": "Retrieves a list of placements, possibly filtered. This method supports paging.",
40663	//   "httpMethod": "GET",
40664	//   "id": "dfareporting.placements.list",
40665	//   "parameterOrder": [
40666	//     "profileId"
40667	//   ],
40668	//   "parameters": {
40669	//     "advertiserIds": {
40670	//       "description": "Select only placements that belong to these advertisers.",
40671	//       "format": "int64",
40672	//       "location": "query",
40673	//       "repeated": true,
40674	//       "type": "string"
40675	//     },
40676	//     "archived": {
40677	//       "description": "Select only archived placements. Don't set this field to select both archived and non-archived placements.",
40678	//       "location": "query",
40679	//       "type": "boolean"
40680	//     },
40681	//     "campaignIds": {
40682	//       "description": "Select only placements that belong to these campaigns.",
40683	//       "format": "int64",
40684	//       "location": "query",
40685	//       "repeated": true,
40686	//       "type": "string"
40687	//     },
40688	//     "compatibilities": {
40689	//       "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.",
40690	//       "enum": [
40691	//         "APP",
40692	//         "APP_INTERSTITIAL",
40693	//         "DISPLAY",
40694	//         "DISPLAY_INTERSTITIAL",
40695	//         "IN_STREAM_AUDIO",
40696	//         "IN_STREAM_VIDEO"
40697	//       ],
40698	//       "enumDescriptions": [
40699	//         "",
40700	//         "",
40701	//         "",
40702	//         "",
40703	//         "",
40704	//         ""
40705	//       ],
40706	//       "location": "query",
40707	//       "repeated": true,
40708	//       "type": "string"
40709	//     },
40710	//     "contentCategoryIds": {
40711	//       "description": "Select only placements that are associated with these content categories.",
40712	//       "format": "int64",
40713	//       "location": "query",
40714	//       "repeated": true,
40715	//       "type": "string"
40716	//     },
40717	//     "directorySiteIds": {
40718	//       "description": "Select only placements that are associated with these directory sites.",
40719	//       "format": "int64",
40720	//       "location": "query",
40721	//       "repeated": true,
40722	//       "type": "string"
40723	//     },
40724	//     "groupIds": {
40725	//       "description": "Select only placements that belong to these placement groups.",
40726	//       "format": "int64",
40727	//       "location": "query",
40728	//       "repeated": true,
40729	//       "type": "string"
40730	//     },
40731	//     "ids": {
40732	//       "description": "Select only placements with these IDs.",
40733	//       "format": "int64",
40734	//       "location": "query",
40735	//       "repeated": true,
40736	//       "type": "string"
40737	//     },
40738	//     "maxEndDate": {
40739	//       "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\".",
40740	//       "location": "query",
40741	//       "type": "string"
40742	//     },
40743	//     "maxResults": {
40744	//       "default": "1000",
40745	//       "description": "Maximum number of results to return.",
40746	//       "format": "int32",
40747	//       "location": "query",
40748	//       "maximum": "1000",
40749	//       "minimum": "0",
40750	//       "type": "integer"
40751	//     },
40752	//     "maxStartDate": {
40753	//       "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\".",
40754	//       "location": "query",
40755	//       "type": "string"
40756	//     },
40757	//     "minEndDate": {
40758	//       "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\".",
40759	//       "location": "query",
40760	//       "type": "string"
40761	//     },
40762	//     "minStartDate": {
40763	//       "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\".",
40764	//       "location": "query",
40765	//       "type": "string"
40766	//     },
40767	//     "pageToken": {
40768	//       "description": "Value of the nextPageToken from the previous result page.",
40769	//       "location": "query",
40770	//       "type": "string"
40771	//     },
40772	//     "paymentSource": {
40773	//       "description": "Select only placements with this payment source.",
40774	//       "enum": [
40775	//         "PLACEMENT_AGENCY_PAID",
40776	//         "PLACEMENT_PUBLISHER_PAID"
40777	//       ],
40778	//       "enumDescriptions": [
40779	//         "",
40780	//         ""
40781	//       ],
40782	//       "location": "query",
40783	//       "type": "string"
40784	//     },
40785	//     "placementStrategyIds": {
40786	//       "description": "Select only placements that are associated with these placement strategies.",
40787	//       "format": "int64",
40788	//       "location": "query",
40789	//       "repeated": true,
40790	//       "type": "string"
40791	//     },
40792	//     "pricingTypes": {
40793	//       "description": "Select only placements with these pricing types.",
40794	//       "enum": [
40795	//         "PRICING_TYPE_CPA",
40796	//         "PRICING_TYPE_CPC",
40797	//         "PRICING_TYPE_CPM",
40798	//         "PRICING_TYPE_CPM_ACTIVEVIEW",
40799	//         "PRICING_TYPE_FLAT_RATE_CLICKS",
40800	//         "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
40801	//       ],
40802	//       "enumDescriptions": [
40803	//         "",
40804	//         "",
40805	//         "",
40806	//         "",
40807	//         "",
40808	//         ""
40809	//       ],
40810	//       "location": "query",
40811	//       "repeated": true,
40812	//       "type": "string"
40813	//     },
40814	//     "profileId": {
40815	//       "description": "User profile ID associated with this request.",
40816	//       "format": "int64",
40817	//       "location": "path",
40818	//       "required": true,
40819	//       "type": "string"
40820	//     },
40821	//     "searchString": {
40822	//       "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\".",
40823	//       "location": "query",
40824	//       "type": "string"
40825	//     },
40826	//     "siteIds": {
40827	//       "description": "Select only placements that are associated with these sites.",
40828	//       "format": "int64",
40829	//       "location": "query",
40830	//       "repeated": true,
40831	//       "type": "string"
40832	//     },
40833	//     "sizeIds": {
40834	//       "description": "Select only placements that are associated with these sizes.",
40835	//       "format": "int64",
40836	//       "location": "query",
40837	//       "repeated": true,
40838	//       "type": "string"
40839	//     },
40840	//     "sortField": {
40841	//       "default": "ID",
40842	//       "description": "Field by which to sort the list.",
40843	//       "enum": [
40844	//         "ID",
40845	//         "NAME"
40846	//       ],
40847	//       "enumDescriptions": [
40848	//         "",
40849	//         ""
40850	//       ],
40851	//       "location": "query",
40852	//       "type": "string"
40853	//     },
40854	//     "sortOrder": {
40855	//       "default": "ASCENDING",
40856	//       "description": "Order of sorted results.",
40857	//       "enum": [
40858	//         "ASCENDING",
40859	//         "DESCENDING"
40860	//       ],
40861	//       "enumDescriptions": [
40862	//         "",
40863	//         ""
40864	//       ],
40865	//       "location": "query",
40866	//       "type": "string"
40867	//     }
40868	//   },
40869	//   "path": "userprofiles/{profileId}/placements",
40870	//   "response": {
40871	//     "$ref": "PlacementsListResponse"
40872	//   },
40873	//   "scopes": [
40874	//     "https://www.googleapis.com/auth/dfatrafficking"
40875	//   ]
40876	// }
40877
40878}
40879
40880// Pages invokes f for each page of results.
40881// A non-nil error returned from f will halt the iteration.
40882// The provided context supersedes any context provided to the Context method.
40883func (c *PlacementsListCall) Pages(ctx context.Context, f func(*PlacementsListResponse) error) error {
40884	c.ctx_ = ctx
40885	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
40886	for {
40887		x, err := c.Do()
40888		if err != nil {
40889			return err
40890		}
40891		if err := f(x); err != nil {
40892			return err
40893		}
40894		if x.NextPageToken == "" {
40895			return nil
40896		}
40897		c.PageToken(x.NextPageToken)
40898	}
40899}
40900
40901// method id "dfareporting.placements.patch":
40902
40903type PlacementsPatchCall struct {
40904	s          *Service
40905	profileId  int64
40906	placement  *Placement
40907	urlParams_ gensupport.URLParams
40908	ctx_       context.Context
40909	header_    http.Header
40910}
40911
40912// Patch: Updates an existing placement. This method supports patch
40913// semantics.
40914func (r *PlacementsService) Patch(profileId int64, id int64, placement *Placement) *PlacementsPatchCall {
40915	c := &PlacementsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40916	c.profileId = profileId
40917	c.urlParams_.Set("id", fmt.Sprint(id))
40918	c.placement = placement
40919	return c
40920}
40921
40922// Fields allows partial responses to be retrieved. See
40923// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40924// for more information.
40925func (c *PlacementsPatchCall) Fields(s ...googleapi.Field) *PlacementsPatchCall {
40926	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40927	return c
40928}
40929
40930// Context sets the context to be used in this call's Do method. Any
40931// pending HTTP request will be aborted if the provided context is
40932// canceled.
40933func (c *PlacementsPatchCall) Context(ctx context.Context) *PlacementsPatchCall {
40934	c.ctx_ = ctx
40935	return c
40936}
40937
40938// Header returns an http.Header that can be modified by the caller to
40939// add HTTP headers to the request.
40940func (c *PlacementsPatchCall) Header() http.Header {
40941	if c.header_ == nil {
40942		c.header_ = make(http.Header)
40943	}
40944	return c.header_
40945}
40946
40947func (c *PlacementsPatchCall) doRequest(alt string) (*http.Response, error) {
40948	reqHeaders := make(http.Header)
40949	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
40950	for k, v := range c.header_ {
40951		reqHeaders[k] = v
40952	}
40953	reqHeaders.Set("User-Agent", c.s.userAgent())
40954	var body io.Reader = nil
40955	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
40956	if err != nil {
40957		return nil, err
40958	}
40959	reqHeaders.Set("Content-Type", "application/json")
40960	c.urlParams_.Set("alt", alt)
40961	c.urlParams_.Set("prettyPrint", "false")
40962	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40963	urls += "?" + c.urlParams_.Encode()
40964	req, err := http.NewRequest("PATCH", urls, body)
40965	if err != nil {
40966		return nil, err
40967	}
40968	req.Header = reqHeaders
40969	googleapi.Expand(req.URL, map[string]string{
40970		"profileId": strconv.FormatInt(c.profileId, 10),
40971	})
40972	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40973}
40974
40975// Do executes the "dfareporting.placements.patch" call.
40976// Exactly one of *Placement or error will be non-nil. Any non-2xx
40977// status code is an error. Response headers are in either
40978// *Placement.ServerResponse.Header or (if a response was returned at
40979// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40980// to check whether the returned error was because
40981// http.StatusNotModified was returned.
40982func (c *PlacementsPatchCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40983	gensupport.SetOptions(c.urlParams_, opts...)
40984	res, err := c.doRequest("json")
40985	if res != nil && res.StatusCode == http.StatusNotModified {
40986		if res.Body != nil {
40987			res.Body.Close()
40988		}
40989		return nil, &googleapi.Error{
40990			Code:   res.StatusCode,
40991			Header: res.Header,
40992		}
40993	}
40994	if err != nil {
40995		return nil, err
40996	}
40997	defer googleapi.CloseBody(res)
40998	if err := googleapi.CheckResponse(res); err != nil {
40999		return nil, err
41000	}
41001	ret := &Placement{
41002		ServerResponse: googleapi.ServerResponse{
41003			Header:         res.Header,
41004			HTTPStatusCode: res.StatusCode,
41005		},
41006	}
41007	target := &ret
41008	if err := gensupport.DecodeResponse(target, res); err != nil {
41009		return nil, err
41010	}
41011	return ret, nil
41012	// {
41013	//   "description": "Updates an existing placement. This method supports patch semantics.",
41014	//   "httpMethod": "PATCH",
41015	//   "id": "dfareporting.placements.patch",
41016	//   "parameterOrder": [
41017	//     "profileId",
41018	//     "id"
41019	//   ],
41020	//   "parameters": {
41021	//     "id": {
41022	//       "description": "Placement ID.",
41023	//       "format": "int64",
41024	//       "location": "query",
41025	//       "required": true,
41026	//       "type": "string"
41027	//     },
41028	//     "profileId": {
41029	//       "description": "User profile ID associated with this request.",
41030	//       "format": "int64",
41031	//       "location": "path",
41032	//       "required": true,
41033	//       "type": "string"
41034	//     }
41035	//   },
41036	//   "path": "userprofiles/{profileId}/placements",
41037	//   "request": {
41038	//     "$ref": "Placement"
41039	//   },
41040	//   "response": {
41041	//     "$ref": "Placement"
41042	//   },
41043	//   "scopes": [
41044	//     "https://www.googleapis.com/auth/dfatrafficking"
41045	//   ]
41046	// }
41047
41048}
41049
41050// method id "dfareporting.placements.update":
41051
41052type PlacementsUpdateCall struct {
41053	s          *Service
41054	profileId  int64
41055	placement  *Placement
41056	urlParams_ gensupport.URLParams
41057	ctx_       context.Context
41058	header_    http.Header
41059}
41060
41061// Update: Updates an existing placement.
41062func (r *PlacementsService) Update(profileId int64, placement *Placement) *PlacementsUpdateCall {
41063	c := &PlacementsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41064	c.profileId = profileId
41065	c.placement = placement
41066	return c
41067}
41068
41069// Fields allows partial responses to be retrieved. See
41070// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41071// for more information.
41072func (c *PlacementsUpdateCall) Fields(s ...googleapi.Field) *PlacementsUpdateCall {
41073	c.urlParams_.Set("fields", googleapi.CombineFields(s))
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 *PlacementsUpdateCall) Context(ctx context.Context) *PlacementsUpdateCall {
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 *PlacementsUpdateCall) Header() http.Header {
41088	if c.header_ == nil {
41089		c.header_ = make(http.Header)
41090	}
41091	return c.header_
41092}
41093
41094func (c *PlacementsUpdateCall) doRequest(alt string) (*http.Response, error) {
41095	reqHeaders := make(http.Header)
41096	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
41097	for k, v := range c.header_ {
41098		reqHeaders[k] = v
41099	}
41100	reqHeaders.Set("User-Agent", c.s.userAgent())
41101	var body io.Reader = nil
41102	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
41103	if err != nil {
41104		return nil, err
41105	}
41106	reqHeaders.Set("Content-Type", "application/json")
41107	c.urlParams_.Set("alt", alt)
41108	c.urlParams_.Set("prettyPrint", "false")
41109	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
41110	urls += "?" + c.urlParams_.Encode()
41111	req, err := http.NewRequest("PUT", urls, body)
41112	if err != nil {
41113		return nil, err
41114	}
41115	req.Header = reqHeaders
41116	googleapi.Expand(req.URL, map[string]string{
41117		"profileId": strconv.FormatInt(c.profileId, 10),
41118	})
41119	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41120}
41121
41122// Do executes the "dfareporting.placements.update" call.
41123// Exactly one of *Placement or error will be non-nil. Any non-2xx
41124// status code is an error. Response headers are in either
41125// *Placement.ServerResponse.Header or (if a response was returned at
41126// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41127// to check whether the returned error was because
41128// http.StatusNotModified was returned.
41129func (c *PlacementsUpdateCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
41130	gensupport.SetOptions(c.urlParams_, opts...)
41131	res, err := c.doRequest("json")
41132	if res != nil && res.StatusCode == http.StatusNotModified {
41133		if res.Body != nil {
41134			res.Body.Close()
41135		}
41136		return nil, &googleapi.Error{
41137			Code:   res.StatusCode,
41138			Header: res.Header,
41139		}
41140	}
41141	if err != nil {
41142		return nil, err
41143	}
41144	defer googleapi.CloseBody(res)
41145	if err := googleapi.CheckResponse(res); err != nil {
41146		return nil, err
41147	}
41148	ret := &Placement{
41149		ServerResponse: googleapi.ServerResponse{
41150			Header:         res.Header,
41151			HTTPStatusCode: res.StatusCode,
41152		},
41153	}
41154	target := &ret
41155	if err := gensupport.DecodeResponse(target, res); err != nil {
41156		return nil, err
41157	}
41158	return ret, nil
41159	// {
41160	//   "description": "Updates an existing placement.",
41161	//   "httpMethod": "PUT",
41162	//   "id": "dfareporting.placements.update",
41163	//   "parameterOrder": [
41164	//     "profileId"
41165	//   ],
41166	//   "parameters": {
41167	//     "profileId": {
41168	//       "description": "User profile ID associated with this request.",
41169	//       "format": "int64",
41170	//       "location": "path",
41171	//       "required": true,
41172	//       "type": "string"
41173	//     }
41174	//   },
41175	//   "path": "userprofiles/{profileId}/placements",
41176	//   "request": {
41177	//     "$ref": "Placement"
41178	//   },
41179	//   "response": {
41180	//     "$ref": "Placement"
41181	//   },
41182	//   "scopes": [
41183	//     "https://www.googleapis.com/auth/dfatrafficking"
41184	//   ]
41185	// }
41186
41187}
41188
41189// method id "dfareporting.platformTypes.get":
41190
41191type PlatformTypesGetCall struct {
41192	s            *Service
41193	profileId    int64
41194	id           int64
41195	urlParams_   gensupport.URLParams
41196	ifNoneMatch_ string
41197	ctx_         context.Context
41198	header_      http.Header
41199}
41200
41201// Get: Gets one platform type by ID.
41202func (r *PlatformTypesService) Get(profileId int64, id int64) *PlatformTypesGetCall {
41203	c := &PlatformTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41204	c.profileId = profileId
41205	c.id = id
41206	return c
41207}
41208
41209// Fields allows partial responses to be retrieved. See
41210// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41211// for more information.
41212func (c *PlatformTypesGetCall) Fields(s ...googleapi.Field) *PlatformTypesGetCall {
41213	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41214	return c
41215}
41216
41217// IfNoneMatch sets the optional parameter which makes the operation
41218// fail if the object's ETag matches the given value. This is useful for
41219// getting updates only after the object has changed since the last
41220// request. Use googleapi.IsNotModified to check whether the response
41221// error from Do is the result of In-None-Match.
41222func (c *PlatformTypesGetCall) IfNoneMatch(entityTag string) *PlatformTypesGetCall {
41223	c.ifNoneMatch_ = entityTag
41224	return c
41225}
41226
41227// Context sets the context to be used in this call's Do method. Any
41228// pending HTTP request will be aborted if the provided context is
41229// canceled.
41230func (c *PlatformTypesGetCall) Context(ctx context.Context) *PlatformTypesGetCall {
41231	c.ctx_ = ctx
41232	return c
41233}
41234
41235// Header returns an http.Header that can be modified by the caller to
41236// add HTTP headers to the request.
41237func (c *PlatformTypesGetCall) Header() http.Header {
41238	if c.header_ == nil {
41239		c.header_ = make(http.Header)
41240	}
41241	return c.header_
41242}
41243
41244func (c *PlatformTypesGetCall) doRequest(alt string) (*http.Response, error) {
41245	reqHeaders := make(http.Header)
41246	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
41247	for k, v := range c.header_ {
41248		reqHeaders[k] = v
41249	}
41250	reqHeaders.Set("User-Agent", c.s.userAgent())
41251	if c.ifNoneMatch_ != "" {
41252		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41253	}
41254	var body io.Reader = nil
41255	c.urlParams_.Set("alt", alt)
41256	c.urlParams_.Set("prettyPrint", "false")
41257	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes/{id}")
41258	urls += "?" + c.urlParams_.Encode()
41259	req, err := http.NewRequest("GET", urls, body)
41260	if err != nil {
41261		return nil, err
41262	}
41263	req.Header = reqHeaders
41264	googleapi.Expand(req.URL, map[string]string{
41265		"profileId": strconv.FormatInt(c.profileId, 10),
41266		"id":        strconv.FormatInt(c.id, 10),
41267	})
41268	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41269}
41270
41271// Do executes the "dfareporting.platformTypes.get" call.
41272// Exactly one of *PlatformType or error will be non-nil. Any non-2xx
41273// status code is an error. Response headers are in either
41274// *PlatformType.ServerResponse.Header or (if a response was returned at
41275// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41276// to check whether the returned error was because
41277// http.StatusNotModified was returned.
41278func (c *PlatformTypesGetCall) Do(opts ...googleapi.CallOption) (*PlatformType, error) {
41279	gensupport.SetOptions(c.urlParams_, opts...)
41280	res, err := c.doRequest("json")
41281	if res != nil && res.StatusCode == http.StatusNotModified {
41282		if res.Body != nil {
41283			res.Body.Close()
41284		}
41285		return nil, &googleapi.Error{
41286			Code:   res.StatusCode,
41287			Header: res.Header,
41288		}
41289	}
41290	if err != nil {
41291		return nil, err
41292	}
41293	defer googleapi.CloseBody(res)
41294	if err := googleapi.CheckResponse(res); err != nil {
41295		return nil, err
41296	}
41297	ret := &PlatformType{
41298		ServerResponse: googleapi.ServerResponse{
41299			Header:         res.Header,
41300			HTTPStatusCode: res.StatusCode,
41301		},
41302	}
41303	target := &ret
41304	if err := gensupport.DecodeResponse(target, res); err != nil {
41305		return nil, err
41306	}
41307	return ret, nil
41308	// {
41309	//   "description": "Gets one platform type by ID.",
41310	//   "httpMethod": "GET",
41311	//   "id": "dfareporting.platformTypes.get",
41312	//   "parameterOrder": [
41313	//     "profileId",
41314	//     "id"
41315	//   ],
41316	//   "parameters": {
41317	//     "id": {
41318	//       "description": "Platform type ID.",
41319	//       "format": "int64",
41320	//       "location": "path",
41321	//       "required": true,
41322	//       "type": "string"
41323	//     },
41324	//     "profileId": {
41325	//       "description": "User profile ID associated with this request.",
41326	//       "format": "int64",
41327	//       "location": "path",
41328	//       "required": true,
41329	//       "type": "string"
41330	//     }
41331	//   },
41332	//   "path": "userprofiles/{profileId}/platformTypes/{id}",
41333	//   "response": {
41334	//     "$ref": "PlatformType"
41335	//   },
41336	//   "scopes": [
41337	//     "https://www.googleapis.com/auth/dfatrafficking"
41338	//   ]
41339	// }
41340
41341}
41342
41343// method id "dfareporting.platformTypes.list":
41344
41345type PlatformTypesListCall struct {
41346	s            *Service
41347	profileId    int64
41348	urlParams_   gensupport.URLParams
41349	ifNoneMatch_ string
41350	ctx_         context.Context
41351	header_      http.Header
41352}
41353
41354// List: Retrieves a list of platform types.
41355func (r *PlatformTypesService) List(profileId int64) *PlatformTypesListCall {
41356	c := &PlatformTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41357	c.profileId = profileId
41358	return c
41359}
41360
41361// Fields allows partial responses to be retrieved. See
41362// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41363// for more information.
41364func (c *PlatformTypesListCall) Fields(s ...googleapi.Field) *PlatformTypesListCall {
41365	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41366	return c
41367}
41368
41369// IfNoneMatch sets the optional parameter which makes the operation
41370// fail if the object's ETag matches the given value. This is useful for
41371// getting updates only after the object has changed since the last
41372// request. Use googleapi.IsNotModified to check whether the response
41373// error from Do is the result of In-None-Match.
41374func (c *PlatformTypesListCall) IfNoneMatch(entityTag string) *PlatformTypesListCall {
41375	c.ifNoneMatch_ = entityTag
41376	return c
41377}
41378
41379// Context sets the context to be used in this call's Do method. Any
41380// pending HTTP request will be aborted if the provided context is
41381// canceled.
41382func (c *PlatformTypesListCall) Context(ctx context.Context) *PlatformTypesListCall {
41383	c.ctx_ = ctx
41384	return c
41385}
41386
41387// Header returns an http.Header that can be modified by the caller to
41388// add HTTP headers to the request.
41389func (c *PlatformTypesListCall) Header() http.Header {
41390	if c.header_ == nil {
41391		c.header_ = make(http.Header)
41392	}
41393	return c.header_
41394}
41395
41396func (c *PlatformTypesListCall) doRequest(alt string) (*http.Response, error) {
41397	reqHeaders := make(http.Header)
41398	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
41399	for k, v := range c.header_ {
41400		reqHeaders[k] = v
41401	}
41402	reqHeaders.Set("User-Agent", c.s.userAgent())
41403	if c.ifNoneMatch_ != "" {
41404		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41405	}
41406	var body io.Reader = nil
41407	c.urlParams_.Set("alt", alt)
41408	c.urlParams_.Set("prettyPrint", "false")
41409	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes")
41410	urls += "?" + c.urlParams_.Encode()
41411	req, err := http.NewRequest("GET", urls, body)
41412	if err != nil {
41413		return nil, err
41414	}
41415	req.Header = reqHeaders
41416	googleapi.Expand(req.URL, map[string]string{
41417		"profileId": strconv.FormatInt(c.profileId, 10),
41418	})
41419	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41420}
41421
41422// Do executes the "dfareporting.platformTypes.list" call.
41423// Exactly one of *PlatformTypesListResponse or error will be non-nil.
41424// Any non-2xx status code is an error. Response headers are in either
41425// *PlatformTypesListResponse.ServerResponse.Header or (if a response
41426// was returned at all) in error.(*googleapi.Error).Header. Use
41427// googleapi.IsNotModified to check whether the returned error was
41428// because http.StatusNotModified was returned.
41429func (c *PlatformTypesListCall) Do(opts ...googleapi.CallOption) (*PlatformTypesListResponse, error) {
41430	gensupport.SetOptions(c.urlParams_, opts...)
41431	res, err := c.doRequest("json")
41432	if res != nil && res.StatusCode == http.StatusNotModified {
41433		if res.Body != nil {
41434			res.Body.Close()
41435		}
41436		return nil, &googleapi.Error{
41437			Code:   res.StatusCode,
41438			Header: res.Header,
41439		}
41440	}
41441	if err != nil {
41442		return nil, err
41443	}
41444	defer googleapi.CloseBody(res)
41445	if err := googleapi.CheckResponse(res); err != nil {
41446		return nil, err
41447	}
41448	ret := &PlatformTypesListResponse{
41449		ServerResponse: googleapi.ServerResponse{
41450			Header:         res.Header,
41451			HTTPStatusCode: res.StatusCode,
41452		},
41453	}
41454	target := &ret
41455	if err := gensupport.DecodeResponse(target, res); err != nil {
41456		return nil, err
41457	}
41458	return ret, nil
41459	// {
41460	//   "description": "Retrieves a list of platform types.",
41461	//   "httpMethod": "GET",
41462	//   "id": "dfareporting.platformTypes.list",
41463	//   "parameterOrder": [
41464	//     "profileId"
41465	//   ],
41466	//   "parameters": {
41467	//     "profileId": {
41468	//       "description": "User profile ID associated with this request.",
41469	//       "format": "int64",
41470	//       "location": "path",
41471	//       "required": true,
41472	//       "type": "string"
41473	//     }
41474	//   },
41475	//   "path": "userprofiles/{profileId}/platformTypes",
41476	//   "response": {
41477	//     "$ref": "PlatformTypesListResponse"
41478	//   },
41479	//   "scopes": [
41480	//     "https://www.googleapis.com/auth/dfatrafficking"
41481	//   ]
41482	// }
41483
41484}
41485
41486// method id "dfareporting.postalCodes.get":
41487
41488type PostalCodesGetCall struct {
41489	s            *Service
41490	profileId    int64
41491	code         string
41492	urlParams_   gensupport.URLParams
41493	ifNoneMatch_ string
41494	ctx_         context.Context
41495	header_      http.Header
41496}
41497
41498// Get: Gets one postal code by ID.
41499func (r *PostalCodesService) Get(profileId int64, code string) *PostalCodesGetCall {
41500	c := &PostalCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41501	c.profileId = profileId
41502	c.code = code
41503	return c
41504}
41505
41506// Fields allows partial responses to be retrieved. See
41507// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41508// for more information.
41509func (c *PostalCodesGetCall) Fields(s ...googleapi.Field) *PostalCodesGetCall {
41510	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41511	return c
41512}
41513
41514// IfNoneMatch sets the optional parameter which makes the operation
41515// fail if the object's ETag matches the given value. This is useful for
41516// getting updates only after the object has changed since the last
41517// request. Use googleapi.IsNotModified to check whether the response
41518// error from Do is the result of In-None-Match.
41519func (c *PostalCodesGetCall) IfNoneMatch(entityTag string) *PostalCodesGetCall {
41520	c.ifNoneMatch_ = entityTag
41521	return c
41522}
41523
41524// Context sets the context to be used in this call's Do method. Any
41525// pending HTTP request will be aborted if the provided context is
41526// canceled.
41527func (c *PostalCodesGetCall) Context(ctx context.Context) *PostalCodesGetCall {
41528	c.ctx_ = ctx
41529	return c
41530}
41531
41532// Header returns an http.Header that can be modified by the caller to
41533// add HTTP headers to the request.
41534func (c *PostalCodesGetCall) Header() http.Header {
41535	if c.header_ == nil {
41536		c.header_ = make(http.Header)
41537	}
41538	return c.header_
41539}
41540
41541func (c *PostalCodesGetCall) doRequest(alt string) (*http.Response, error) {
41542	reqHeaders := make(http.Header)
41543	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
41544	for k, v := range c.header_ {
41545		reqHeaders[k] = v
41546	}
41547	reqHeaders.Set("User-Agent", c.s.userAgent())
41548	if c.ifNoneMatch_ != "" {
41549		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41550	}
41551	var body io.Reader = nil
41552	c.urlParams_.Set("alt", alt)
41553	c.urlParams_.Set("prettyPrint", "false")
41554	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes/{code}")
41555	urls += "?" + c.urlParams_.Encode()
41556	req, err := http.NewRequest("GET", urls, body)
41557	if err != nil {
41558		return nil, err
41559	}
41560	req.Header = reqHeaders
41561	googleapi.Expand(req.URL, map[string]string{
41562		"profileId": strconv.FormatInt(c.profileId, 10),
41563		"code":      c.code,
41564	})
41565	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41566}
41567
41568// Do executes the "dfareporting.postalCodes.get" call.
41569// Exactly one of *PostalCode or error will be non-nil. Any non-2xx
41570// status code is an error. Response headers are in either
41571// *PostalCode.ServerResponse.Header or (if a response was returned at
41572// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41573// to check whether the returned error was because
41574// http.StatusNotModified was returned.
41575func (c *PostalCodesGetCall) Do(opts ...googleapi.CallOption) (*PostalCode, 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 := &PostalCode{
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": "Gets one postal code by ID.",
41607	//   "httpMethod": "GET",
41608	//   "id": "dfareporting.postalCodes.get",
41609	//   "parameterOrder": [
41610	//     "profileId",
41611	//     "code"
41612	//   ],
41613	//   "parameters": {
41614	//     "code": {
41615	//       "description": "Postal code ID.",
41616	//       "location": "path",
41617	//       "required": true,
41618	//       "type": "string"
41619	//     },
41620	//     "profileId": {
41621	//       "description": "User profile ID associated with this request.",
41622	//       "format": "int64",
41623	//       "location": "path",
41624	//       "required": true,
41625	//       "type": "string"
41626	//     }
41627	//   },
41628	//   "path": "userprofiles/{profileId}/postalCodes/{code}",
41629	//   "response": {
41630	//     "$ref": "PostalCode"
41631	//   },
41632	//   "scopes": [
41633	//     "https://www.googleapis.com/auth/dfatrafficking"
41634	//   ]
41635	// }
41636
41637}
41638
41639// method id "dfareporting.postalCodes.list":
41640
41641type PostalCodesListCall struct {
41642	s            *Service
41643	profileId    int64
41644	urlParams_   gensupport.URLParams
41645	ifNoneMatch_ string
41646	ctx_         context.Context
41647	header_      http.Header
41648}
41649
41650// List: Retrieves a list of postal codes.
41651func (r *PostalCodesService) List(profileId int64) *PostalCodesListCall {
41652	c := &PostalCodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41653	c.profileId = profileId
41654	return c
41655}
41656
41657// Fields allows partial responses to be retrieved. See
41658// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41659// for more information.
41660func (c *PostalCodesListCall) Fields(s ...googleapi.Field) *PostalCodesListCall {
41661	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41662	return c
41663}
41664
41665// IfNoneMatch sets the optional parameter which makes the operation
41666// fail if the object's ETag matches the given value. This is useful for
41667// getting updates only after the object has changed since the last
41668// request. Use googleapi.IsNotModified to check whether the response
41669// error from Do is the result of In-None-Match.
41670func (c *PostalCodesListCall) IfNoneMatch(entityTag string) *PostalCodesListCall {
41671	c.ifNoneMatch_ = entityTag
41672	return c
41673}
41674
41675// Context sets the context to be used in this call's Do method. Any
41676// pending HTTP request will be aborted if the provided context is
41677// canceled.
41678func (c *PostalCodesListCall) Context(ctx context.Context) *PostalCodesListCall {
41679	c.ctx_ = ctx
41680	return c
41681}
41682
41683// Header returns an http.Header that can be modified by the caller to
41684// add HTTP headers to the request.
41685func (c *PostalCodesListCall) Header() http.Header {
41686	if c.header_ == nil {
41687		c.header_ = make(http.Header)
41688	}
41689	return c.header_
41690}
41691
41692func (c *PostalCodesListCall) doRequest(alt string) (*http.Response, error) {
41693	reqHeaders := make(http.Header)
41694	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
41695	for k, v := range c.header_ {
41696		reqHeaders[k] = v
41697	}
41698	reqHeaders.Set("User-Agent", c.s.userAgent())
41699	if c.ifNoneMatch_ != "" {
41700		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41701	}
41702	var body io.Reader = nil
41703	c.urlParams_.Set("alt", alt)
41704	c.urlParams_.Set("prettyPrint", "false")
41705	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes")
41706	urls += "?" + c.urlParams_.Encode()
41707	req, err := http.NewRequest("GET", urls, body)
41708	if err != nil {
41709		return nil, err
41710	}
41711	req.Header = reqHeaders
41712	googleapi.Expand(req.URL, map[string]string{
41713		"profileId": strconv.FormatInt(c.profileId, 10),
41714	})
41715	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41716}
41717
41718// Do executes the "dfareporting.postalCodes.list" call.
41719// Exactly one of *PostalCodesListResponse or error will be non-nil. Any
41720// non-2xx status code is an error. Response headers are in either
41721// *PostalCodesListResponse.ServerResponse.Header or (if a response was
41722// returned at all) in error.(*googleapi.Error).Header. Use
41723// googleapi.IsNotModified to check whether the returned error was
41724// because http.StatusNotModified was returned.
41725func (c *PostalCodesListCall) Do(opts ...googleapi.CallOption) (*PostalCodesListResponse, error) {
41726	gensupport.SetOptions(c.urlParams_, opts...)
41727	res, err := c.doRequest("json")
41728	if res != nil && res.StatusCode == http.StatusNotModified {
41729		if res.Body != nil {
41730			res.Body.Close()
41731		}
41732		return nil, &googleapi.Error{
41733			Code:   res.StatusCode,
41734			Header: res.Header,
41735		}
41736	}
41737	if err != nil {
41738		return nil, err
41739	}
41740	defer googleapi.CloseBody(res)
41741	if err := googleapi.CheckResponse(res); err != nil {
41742		return nil, err
41743	}
41744	ret := &PostalCodesListResponse{
41745		ServerResponse: googleapi.ServerResponse{
41746			Header:         res.Header,
41747			HTTPStatusCode: res.StatusCode,
41748		},
41749	}
41750	target := &ret
41751	if err := gensupport.DecodeResponse(target, res); err != nil {
41752		return nil, err
41753	}
41754	return ret, nil
41755	// {
41756	//   "description": "Retrieves a list of postal codes.",
41757	//   "httpMethod": "GET",
41758	//   "id": "dfareporting.postalCodes.list",
41759	//   "parameterOrder": [
41760	//     "profileId"
41761	//   ],
41762	//   "parameters": {
41763	//     "profileId": {
41764	//       "description": "User profile ID associated with this request.",
41765	//       "format": "int64",
41766	//       "location": "path",
41767	//       "required": true,
41768	//       "type": "string"
41769	//     }
41770	//   },
41771	//   "path": "userprofiles/{profileId}/postalCodes",
41772	//   "response": {
41773	//     "$ref": "PostalCodesListResponse"
41774	//   },
41775	//   "scopes": [
41776	//     "https://www.googleapis.com/auth/dfatrafficking"
41777	//   ]
41778	// }
41779
41780}
41781
41782// method id "dfareporting.projects.get":
41783
41784type ProjectsGetCall struct {
41785	s            *Service
41786	profileId    int64
41787	id           int64
41788	urlParams_   gensupport.URLParams
41789	ifNoneMatch_ string
41790	ctx_         context.Context
41791	header_      http.Header
41792}
41793
41794// Get: Gets one project by ID.
41795func (r *ProjectsService) Get(profileId int64, id int64) *ProjectsGetCall {
41796	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41797	c.profileId = profileId
41798	c.id = id
41799	return c
41800}
41801
41802// Fields allows partial responses to be retrieved. See
41803// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41804// for more information.
41805func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
41806	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41807	return c
41808}
41809
41810// IfNoneMatch sets the optional parameter which makes the operation
41811// fail if the object's ETag matches the given value. This is useful for
41812// getting updates only after the object has changed since the last
41813// request. Use googleapi.IsNotModified to check whether the response
41814// error from Do is the result of In-None-Match.
41815func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
41816	c.ifNoneMatch_ = entityTag
41817	return c
41818}
41819
41820// Context sets the context to be used in this call's Do method. Any
41821// pending HTTP request will be aborted if the provided context is
41822// canceled.
41823func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
41824	c.ctx_ = ctx
41825	return c
41826}
41827
41828// Header returns an http.Header that can be modified by the caller to
41829// add HTTP headers to the request.
41830func (c *ProjectsGetCall) Header() http.Header {
41831	if c.header_ == nil {
41832		c.header_ = make(http.Header)
41833	}
41834	return c.header_
41835}
41836
41837func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
41838	reqHeaders := make(http.Header)
41839	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
41840	for k, v := range c.header_ {
41841		reqHeaders[k] = v
41842	}
41843	reqHeaders.Set("User-Agent", c.s.userAgent())
41844	if c.ifNoneMatch_ != "" {
41845		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41846	}
41847	var body io.Reader = nil
41848	c.urlParams_.Set("alt", alt)
41849	c.urlParams_.Set("prettyPrint", "false")
41850	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{id}")
41851	urls += "?" + c.urlParams_.Encode()
41852	req, err := http.NewRequest("GET", urls, body)
41853	if err != nil {
41854		return nil, err
41855	}
41856	req.Header = reqHeaders
41857	googleapi.Expand(req.URL, map[string]string{
41858		"profileId": strconv.FormatInt(c.profileId, 10),
41859		"id":        strconv.FormatInt(c.id, 10),
41860	})
41861	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41862}
41863
41864// Do executes the "dfareporting.projects.get" call.
41865// Exactly one of *Project or error will be non-nil. Any non-2xx status
41866// code is an error. Response headers are in either
41867// *Project.ServerResponse.Header or (if a response was returned at all)
41868// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
41869// check whether the returned error was because http.StatusNotModified
41870// was returned.
41871func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
41872	gensupport.SetOptions(c.urlParams_, opts...)
41873	res, err := c.doRequest("json")
41874	if res != nil && res.StatusCode == http.StatusNotModified {
41875		if res.Body != nil {
41876			res.Body.Close()
41877		}
41878		return nil, &googleapi.Error{
41879			Code:   res.StatusCode,
41880			Header: res.Header,
41881		}
41882	}
41883	if err != nil {
41884		return nil, err
41885	}
41886	defer googleapi.CloseBody(res)
41887	if err := googleapi.CheckResponse(res); err != nil {
41888		return nil, err
41889	}
41890	ret := &Project{
41891		ServerResponse: googleapi.ServerResponse{
41892			Header:         res.Header,
41893			HTTPStatusCode: res.StatusCode,
41894		},
41895	}
41896	target := &ret
41897	if err := gensupport.DecodeResponse(target, res); err != nil {
41898		return nil, err
41899	}
41900	return ret, nil
41901	// {
41902	//   "description": "Gets one project by ID.",
41903	//   "httpMethod": "GET",
41904	//   "id": "dfareporting.projects.get",
41905	//   "parameterOrder": [
41906	//     "profileId",
41907	//     "id"
41908	//   ],
41909	//   "parameters": {
41910	//     "id": {
41911	//       "description": "Project ID.",
41912	//       "format": "int64",
41913	//       "location": "path",
41914	//       "required": true,
41915	//       "type": "string"
41916	//     },
41917	//     "profileId": {
41918	//       "description": "User profile ID associated with this request.",
41919	//       "format": "int64",
41920	//       "location": "path",
41921	//       "required": true,
41922	//       "type": "string"
41923	//     }
41924	//   },
41925	//   "path": "userprofiles/{profileId}/projects/{id}",
41926	//   "response": {
41927	//     "$ref": "Project"
41928	//   },
41929	//   "scopes": [
41930	//     "https://www.googleapis.com/auth/dfatrafficking"
41931	//   ]
41932	// }
41933
41934}
41935
41936// method id "dfareporting.projects.list":
41937
41938type ProjectsListCall struct {
41939	s            *Service
41940	profileId    int64
41941	urlParams_   gensupport.URLParams
41942	ifNoneMatch_ string
41943	ctx_         context.Context
41944	header_      http.Header
41945}
41946
41947// List: Retrieves a list of projects, possibly filtered. This method
41948// supports paging.
41949func (r *ProjectsService) List(profileId int64) *ProjectsListCall {
41950	c := &ProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41951	c.profileId = profileId
41952	return c
41953}
41954
41955// AdvertiserIds sets the optional parameter "advertiserIds": Select
41956// only projects with these advertiser IDs.
41957func (c *ProjectsListCall) AdvertiserIds(advertiserIds ...int64) *ProjectsListCall {
41958	var advertiserIds_ []string
41959	for _, v := range advertiserIds {
41960		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
41961	}
41962	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
41963	return c
41964}
41965
41966// Ids sets the optional parameter "ids": Select only projects with
41967// these IDs.
41968func (c *ProjectsListCall) Ids(ids ...int64) *ProjectsListCall {
41969	var ids_ []string
41970	for _, v := range ids {
41971		ids_ = append(ids_, fmt.Sprint(v))
41972	}
41973	c.urlParams_.SetMulti("ids", ids_)
41974	return c
41975}
41976
41977// MaxResults sets the optional parameter "maxResults": Maximum number
41978// of results to return.
41979func (c *ProjectsListCall) MaxResults(maxResults int64) *ProjectsListCall {
41980	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
41981	return c
41982}
41983
41984// PageToken sets the optional parameter "pageToken": Value of the
41985// nextPageToken from the previous result page.
41986func (c *ProjectsListCall) PageToken(pageToken string) *ProjectsListCall {
41987	c.urlParams_.Set("pageToken", pageToken)
41988	return c
41989}
41990
41991// SearchString sets the optional parameter "searchString": Allows
41992// searching for projects by name or ID. Wildcards (*) are allowed. For
41993// example, "project*2015" will return projects with names like "project
41994// June 2015", "project April 2015", or simply "project 2015". Most of
41995// the searches also add wildcards implicitly at the start and the end
41996// of the search string. For example, a search string of "project" will
41997// match projects with name "my project", "project 2015", or simply
41998// "project".
41999func (c *ProjectsListCall) SearchString(searchString string) *ProjectsListCall {
42000	c.urlParams_.Set("searchString", searchString)
42001	return c
42002}
42003
42004// SortField sets the optional parameter "sortField": Field by which to
42005// sort the list.
42006//
42007// Possible values:
42008//   "ID" (default)
42009//   "NAME"
42010func (c *ProjectsListCall) SortField(sortField string) *ProjectsListCall {
42011	c.urlParams_.Set("sortField", sortField)
42012	return c
42013}
42014
42015// SortOrder sets the optional parameter "sortOrder": Order of sorted
42016// results.
42017//
42018// Possible values:
42019//   "ASCENDING" (default)
42020//   "DESCENDING"
42021func (c *ProjectsListCall) SortOrder(sortOrder string) *ProjectsListCall {
42022	c.urlParams_.Set("sortOrder", sortOrder)
42023	return c
42024}
42025
42026// Fields allows partial responses to be retrieved. See
42027// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42028// for more information.
42029func (c *ProjectsListCall) Fields(s ...googleapi.Field) *ProjectsListCall {
42030	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42031	return c
42032}
42033
42034// IfNoneMatch sets the optional parameter which makes the operation
42035// fail if the object's ETag matches the given value. This is useful for
42036// getting updates only after the object has changed since the last
42037// request. Use googleapi.IsNotModified to check whether the response
42038// error from Do is the result of In-None-Match.
42039func (c *ProjectsListCall) IfNoneMatch(entityTag string) *ProjectsListCall {
42040	c.ifNoneMatch_ = entityTag
42041	return c
42042}
42043
42044// Context sets the context to be used in this call's Do method. Any
42045// pending HTTP request will be aborted if the provided context is
42046// canceled.
42047func (c *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
42048	c.ctx_ = ctx
42049	return c
42050}
42051
42052// Header returns an http.Header that can be modified by the caller to
42053// add HTTP headers to the request.
42054func (c *ProjectsListCall) Header() http.Header {
42055	if c.header_ == nil {
42056		c.header_ = make(http.Header)
42057	}
42058	return c.header_
42059}
42060
42061func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
42062	reqHeaders := make(http.Header)
42063	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
42064	for k, v := range c.header_ {
42065		reqHeaders[k] = v
42066	}
42067	reqHeaders.Set("User-Agent", c.s.userAgent())
42068	if c.ifNoneMatch_ != "" {
42069		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42070	}
42071	var body io.Reader = nil
42072	c.urlParams_.Set("alt", alt)
42073	c.urlParams_.Set("prettyPrint", "false")
42074	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects")
42075	urls += "?" + c.urlParams_.Encode()
42076	req, err := http.NewRequest("GET", urls, body)
42077	if err != nil {
42078		return nil, err
42079	}
42080	req.Header = reqHeaders
42081	googleapi.Expand(req.URL, map[string]string{
42082		"profileId": strconv.FormatInt(c.profileId, 10),
42083	})
42084	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42085}
42086
42087// Do executes the "dfareporting.projects.list" call.
42088// Exactly one of *ProjectsListResponse or error will be non-nil. Any
42089// non-2xx status code is an error. Response headers are in either
42090// *ProjectsListResponse.ServerResponse.Header or (if a response was
42091// returned at all) in error.(*googleapi.Error).Header. Use
42092// googleapi.IsNotModified to check whether the returned error was
42093// because http.StatusNotModified was returned.
42094func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ProjectsListResponse, error) {
42095	gensupport.SetOptions(c.urlParams_, opts...)
42096	res, err := c.doRequest("json")
42097	if res != nil && res.StatusCode == http.StatusNotModified {
42098		if res.Body != nil {
42099			res.Body.Close()
42100		}
42101		return nil, &googleapi.Error{
42102			Code:   res.StatusCode,
42103			Header: res.Header,
42104		}
42105	}
42106	if err != nil {
42107		return nil, err
42108	}
42109	defer googleapi.CloseBody(res)
42110	if err := googleapi.CheckResponse(res); err != nil {
42111		return nil, err
42112	}
42113	ret := &ProjectsListResponse{
42114		ServerResponse: googleapi.ServerResponse{
42115			Header:         res.Header,
42116			HTTPStatusCode: res.StatusCode,
42117		},
42118	}
42119	target := &ret
42120	if err := gensupport.DecodeResponse(target, res); err != nil {
42121		return nil, err
42122	}
42123	return ret, nil
42124	// {
42125	//   "description": "Retrieves a list of projects, possibly filtered. This method supports paging.",
42126	//   "httpMethod": "GET",
42127	//   "id": "dfareporting.projects.list",
42128	//   "parameterOrder": [
42129	//     "profileId"
42130	//   ],
42131	//   "parameters": {
42132	//     "advertiserIds": {
42133	//       "description": "Select only projects with these advertiser IDs.",
42134	//       "format": "int64",
42135	//       "location": "query",
42136	//       "repeated": true,
42137	//       "type": "string"
42138	//     },
42139	//     "ids": {
42140	//       "description": "Select only projects with these IDs.",
42141	//       "format": "int64",
42142	//       "location": "query",
42143	//       "repeated": true,
42144	//       "type": "string"
42145	//     },
42146	//     "maxResults": {
42147	//       "default": "1000",
42148	//       "description": "Maximum number of results to return.",
42149	//       "format": "int32",
42150	//       "location": "query",
42151	//       "maximum": "1000",
42152	//       "minimum": "0",
42153	//       "type": "integer"
42154	//     },
42155	//     "pageToken": {
42156	//       "description": "Value of the nextPageToken from the previous result page.",
42157	//       "location": "query",
42158	//       "type": "string"
42159	//     },
42160	//     "profileId": {
42161	//       "description": "User profile ID associated with this request.",
42162	//       "format": "int64",
42163	//       "location": "path",
42164	//       "required": true,
42165	//       "type": "string"
42166	//     },
42167	//     "searchString": {
42168	//       "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\".",
42169	//       "location": "query",
42170	//       "type": "string"
42171	//     },
42172	//     "sortField": {
42173	//       "default": "ID",
42174	//       "description": "Field by which to sort the list.",
42175	//       "enum": [
42176	//         "ID",
42177	//         "NAME"
42178	//       ],
42179	//       "enumDescriptions": [
42180	//         "",
42181	//         ""
42182	//       ],
42183	//       "location": "query",
42184	//       "type": "string"
42185	//     },
42186	//     "sortOrder": {
42187	//       "default": "ASCENDING",
42188	//       "description": "Order of sorted results.",
42189	//       "enum": [
42190	//         "ASCENDING",
42191	//         "DESCENDING"
42192	//       ],
42193	//       "enumDescriptions": [
42194	//         "",
42195	//         ""
42196	//       ],
42197	//       "location": "query",
42198	//       "type": "string"
42199	//     }
42200	//   },
42201	//   "path": "userprofiles/{profileId}/projects",
42202	//   "response": {
42203	//     "$ref": "ProjectsListResponse"
42204	//   },
42205	//   "scopes": [
42206	//     "https://www.googleapis.com/auth/dfatrafficking"
42207	//   ]
42208	// }
42209
42210}
42211
42212// Pages invokes f for each page of results.
42213// A non-nil error returned from f will halt the iteration.
42214// The provided context supersedes any context provided to the Context method.
42215func (c *ProjectsListCall) Pages(ctx context.Context, f func(*ProjectsListResponse) error) error {
42216	c.ctx_ = ctx
42217	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
42218	for {
42219		x, err := c.Do()
42220		if err != nil {
42221			return err
42222		}
42223		if err := f(x); err != nil {
42224			return err
42225		}
42226		if x.NextPageToken == "" {
42227			return nil
42228		}
42229		c.PageToken(x.NextPageToken)
42230	}
42231}
42232
42233// method id "dfareporting.regions.list":
42234
42235type RegionsListCall struct {
42236	s            *Service
42237	profileId    int64
42238	urlParams_   gensupport.URLParams
42239	ifNoneMatch_ string
42240	ctx_         context.Context
42241	header_      http.Header
42242}
42243
42244// List: Retrieves a list of regions.
42245func (r *RegionsService) List(profileId int64) *RegionsListCall {
42246	c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42247	c.profileId = profileId
42248	return c
42249}
42250
42251// Fields allows partial responses to be retrieved. See
42252// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42253// for more information.
42254func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall {
42255	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42256	return c
42257}
42258
42259// IfNoneMatch sets the optional parameter which makes the operation
42260// fail if the object's ETag matches the given value. This is useful for
42261// getting updates only after the object has changed since the last
42262// request. Use googleapi.IsNotModified to check whether the response
42263// error from Do is the result of In-None-Match.
42264func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall {
42265	c.ifNoneMatch_ = entityTag
42266	return c
42267}
42268
42269// Context sets the context to be used in this call's Do method. Any
42270// pending HTTP request will be aborted if the provided context is
42271// canceled.
42272func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
42273	c.ctx_ = ctx
42274	return c
42275}
42276
42277// Header returns an http.Header that can be modified by the caller to
42278// add HTTP headers to the request.
42279func (c *RegionsListCall) Header() http.Header {
42280	if c.header_ == nil {
42281		c.header_ = make(http.Header)
42282	}
42283	return c.header_
42284}
42285
42286func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
42287	reqHeaders := make(http.Header)
42288	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
42289	for k, v := range c.header_ {
42290		reqHeaders[k] = v
42291	}
42292	reqHeaders.Set("User-Agent", c.s.userAgent())
42293	if c.ifNoneMatch_ != "" {
42294		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42295	}
42296	var body io.Reader = nil
42297	c.urlParams_.Set("alt", alt)
42298	c.urlParams_.Set("prettyPrint", "false")
42299	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/regions")
42300	urls += "?" + c.urlParams_.Encode()
42301	req, err := http.NewRequest("GET", urls, body)
42302	if err != nil {
42303		return nil, err
42304	}
42305	req.Header = reqHeaders
42306	googleapi.Expand(req.URL, map[string]string{
42307		"profileId": strconv.FormatInt(c.profileId, 10),
42308	})
42309	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42310}
42311
42312// Do executes the "dfareporting.regions.list" call.
42313// Exactly one of *RegionsListResponse or error will be non-nil. Any
42314// non-2xx status code is an error. Response headers are in either
42315// *RegionsListResponse.ServerResponse.Header or (if a response was
42316// returned at all) in error.(*googleapi.Error).Header. Use
42317// googleapi.IsNotModified to check whether the returned error was
42318// because http.StatusNotModified was returned.
42319func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionsListResponse, error) {
42320	gensupport.SetOptions(c.urlParams_, opts...)
42321	res, err := c.doRequest("json")
42322	if res != nil && res.StatusCode == http.StatusNotModified {
42323		if res.Body != nil {
42324			res.Body.Close()
42325		}
42326		return nil, &googleapi.Error{
42327			Code:   res.StatusCode,
42328			Header: res.Header,
42329		}
42330	}
42331	if err != nil {
42332		return nil, err
42333	}
42334	defer googleapi.CloseBody(res)
42335	if err := googleapi.CheckResponse(res); err != nil {
42336		return nil, err
42337	}
42338	ret := &RegionsListResponse{
42339		ServerResponse: googleapi.ServerResponse{
42340			Header:         res.Header,
42341			HTTPStatusCode: res.StatusCode,
42342		},
42343	}
42344	target := &ret
42345	if err := gensupport.DecodeResponse(target, res); err != nil {
42346		return nil, err
42347	}
42348	return ret, nil
42349	// {
42350	//   "description": "Retrieves a list of regions.",
42351	//   "httpMethod": "GET",
42352	//   "id": "dfareporting.regions.list",
42353	//   "parameterOrder": [
42354	//     "profileId"
42355	//   ],
42356	//   "parameters": {
42357	//     "profileId": {
42358	//       "description": "User profile ID associated with this request.",
42359	//       "format": "int64",
42360	//       "location": "path",
42361	//       "required": true,
42362	//       "type": "string"
42363	//     }
42364	//   },
42365	//   "path": "userprofiles/{profileId}/regions",
42366	//   "response": {
42367	//     "$ref": "RegionsListResponse"
42368	//   },
42369	//   "scopes": [
42370	//     "https://www.googleapis.com/auth/dfatrafficking"
42371	//   ]
42372	// }
42373
42374}
42375
42376// method id "dfareporting.remarketingListShares.get":
42377
42378type RemarketingListSharesGetCall struct {
42379	s                 *Service
42380	profileId         int64
42381	remarketingListId int64
42382	urlParams_        gensupport.URLParams
42383	ifNoneMatch_      string
42384	ctx_              context.Context
42385	header_           http.Header
42386}
42387
42388// Get: Gets one remarketing list share by remarketing list ID.
42389func (r *RemarketingListSharesService) Get(profileId int64, remarketingListId int64) *RemarketingListSharesGetCall {
42390	c := &RemarketingListSharesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42391	c.profileId = profileId
42392	c.remarketingListId = remarketingListId
42393	return c
42394}
42395
42396// Fields allows partial responses to be retrieved. See
42397// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42398// for more information.
42399func (c *RemarketingListSharesGetCall) Fields(s ...googleapi.Field) *RemarketingListSharesGetCall {
42400	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42401	return c
42402}
42403
42404// IfNoneMatch sets the optional parameter which makes the operation
42405// fail if the object's ETag matches the given value. This is useful for
42406// getting updates only after the object has changed since the last
42407// request. Use googleapi.IsNotModified to check whether the response
42408// error from Do is the result of In-None-Match.
42409func (c *RemarketingListSharesGetCall) IfNoneMatch(entityTag string) *RemarketingListSharesGetCall {
42410	c.ifNoneMatch_ = entityTag
42411	return c
42412}
42413
42414// Context sets the context to be used in this call's Do method. Any
42415// pending HTTP request will be aborted if the provided context is
42416// canceled.
42417func (c *RemarketingListSharesGetCall) Context(ctx context.Context) *RemarketingListSharesGetCall {
42418	c.ctx_ = ctx
42419	return c
42420}
42421
42422// Header returns an http.Header that can be modified by the caller to
42423// add HTTP headers to the request.
42424func (c *RemarketingListSharesGetCall) Header() http.Header {
42425	if c.header_ == nil {
42426		c.header_ = make(http.Header)
42427	}
42428	return c.header_
42429}
42430
42431func (c *RemarketingListSharesGetCall) doRequest(alt string) (*http.Response, error) {
42432	reqHeaders := make(http.Header)
42433	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
42434	for k, v := range c.header_ {
42435		reqHeaders[k] = v
42436	}
42437	reqHeaders.Set("User-Agent", c.s.userAgent())
42438	if c.ifNoneMatch_ != "" {
42439		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42440	}
42441	var body io.Reader = nil
42442	c.urlParams_.Set("alt", alt)
42443	c.urlParams_.Set("prettyPrint", "false")
42444	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares/{remarketingListId}")
42445	urls += "?" + c.urlParams_.Encode()
42446	req, err := http.NewRequest("GET", urls, body)
42447	if err != nil {
42448		return nil, err
42449	}
42450	req.Header = reqHeaders
42451	googleapi.Expand(req.URL, map[string]string{
42452		"profileId":         strconv.FormatInt(c.profileId, 10),
42453		"remarketingListId": strconv.FormatInt(c.remarketingListId, 10),
42454	})
42455	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42456}
42457
42458// Do executes the "dfareporting.remarketingListShares.get" call.
42459// Exactly one of *RemarketingListShare or error will be non-nil. Any
42460// non-2xx status code is an error. Response headers are in either
42461// *RemarketingListShare.ServerResponse.Header or (if a response was
42462// returned at all) in error.(*googleapi.Error).Header. Use
42463// googleapi.IsNotModified to check whether the returned error was
42464// because http.StatusNotModified was returned.
42465func (c *RemarketingListSharesGetCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42466	gensupport.SetOptions(c.urlParams_, opts...)
42467	res, err := c.doRequest("json")
42468	if res != nil && res.StatusCode == http.StatusNotModified {
42469		if res.Body != nil {
42470			res.Body.Close()
42471		}
42472		return nil, &googleapi.Error{
42473			Code:   res.StatusCode,
42474			Header: res.Header,
42475		}
42476	}
42477	if err != nil {
42478		return nil, err
42479	}
42480	defer googleapi.CloseBody(res)
42481	if err := googleapi.CheckResponse(res); err != nil {
42482		return nil, err
42483	}
42484	ret := &RemarketingListShare{
42485		ServerResponse: googleapi.ServerResponse{
42486			Header:         res.Header,
42487			HTTPStatusCode: res.StatusCode,
42488		},
42489	}
42490	target := &ret
42491	if err := gensupport.DecodeResponse(target, res); err != nil {
42492		return nil, err
42493	}
42494	return ret, nil
42495	// {
42496	//   "description": "Gets one remarketing list share by remarketing list ID.",
42497	//   "httpMethod": "GET",
42498	//   "id": "dfareporting.remarketingListShares.get",
42499	//   "parameterOrder": [
42500	//     "profileId",
42501	//     "remarketingListId"
42502	//   ],
42503	//   "parameters": {
42504	//     "profileId": {
42505	//       "description": "User profile ID associated with this request.",
42506	//       "format": "int64",
42507	//       "location": "path",
42508	//       "required": true,
42509	//       "type": "string"
42510	//     },
42511	//     "remarketingListId": {
42512	//       "description": "Remarketing list ID.",
42513	//       "format": "int64",
42514	//       "location": "path",
42515	//       "required": true,
42516	//       "type": "string"
42517	//     }
42518	//   },
42519	//   "path": "userprofiles/{profileId}/remarketingListShares/{remarketingListId}",
42520	//   "response": {
42521	//     "$ref": "RemarketingListShare"
42522	//   },
42523	//   "scopes": [
42524	//     "https://www.googleapis.com/auth/dfatrafficking"
42525	//   ]
42526	// }
42527
42528}
42529
42530// method id "dfareporting.remarketingListShares.patch":
42531
42532type RemarketingListSharesPatchCall struct {
42533	s                    *Service
42534	profileId            int64
42535	remarketinglistshare *RemarketingListShare
42536	urlParams_           gensupport.URLParams
42537	ctx_                 context.Context
42538	header_              http.Header
42539}
42540
42541// Patch: Updates an existing remarketing list share. This method
42542// supports patch semantics.
42543func (r *RemarketingListSharesService) Patch(profileId int64, remarketingListId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesPatchCall {
42544	c := &RemarketingListSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42545	c.profileId = profileId
42546	c.urlParams_.Set("remarketingListId", fmt.Sprint(remarketingListId))
42547	c.remarketinglistshare = remarketinglistshare
42548	return c
42549}
42550
42551// Fields allows partial responses to be retrieved. See
42552// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42553// for more information.
42554func (c *RemarketingListSharesPatchCall) Fields(s ...googleapi.Field) *RemarketingListSharesPatchCall {
42555	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42556	return c
42557}
42558
42559// Context sets the context to be used in this call's Do method. Any
42560// pending HTTP request will be aborted if the provided context is
42561// canceled.
42562func (c *RemarketingListSharesPatchCall) Context(ctx context.Context) *RemarketingListSharesPatchCall {
42563	c.ctx_ = ctx
42564	return c
42565}
42566
42567// Header returns an http.Header that can be modified by the caller to
42568// add HTTP headers to the request.
42569func (c *RemarketingListSharesPatchCall) Header() http.Header {
42570	if c.header_ == nil {
42571		c.header_ = make(http.Header)
42572	}
42573	return c.header_
42574}
42575
42576func (c *RemarketingListSharesPatchCall) doRequest(alt string) (*http.Response, error) {
42577	reqHeaders := make(http.Header)
42578	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
42579	for k, v := range c.header_ {
42580		reqHeaders[k] = v
42581	}
42582	reqHeaders.Set("User-Agent", c.s.userAgent())
42583	var body io.Reader = nil
42584	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
42585	if err != nil {
42586		return nil, err
42587	}
42588	reqHeaders.Set("Content-Type", "application/json")
42589	c.urlParams_.Set("alt", alt)
42590	c.urlParams_.Set("prettyPrint", "false")
42591	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
42592	urls += "?" + c.urlParams_.Encode()
42593	req, err := http.NewRequest("PATCH", urls, body)
42594	if err != nil {
42595		return nil, err
42596	}
42597	req.Header = reqHeaders
42598	googleapi.Expand(req.URL, map[string]string{
42599		"profileId": strconv.FormatInt(c.profileId, 10),
42600	})
42601	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42602}
42603
42604// Do executes the "dfareporting.remarketingListShares.patch" call.
42605// Exactly one of *RemarketingListShare or error will be non-nil. Any
42606// non-2xx status code is an error. Response headers are in either
42607// *RemarketingListShare.ServerResponse.Header or (if a response was
42608// returned at all) in error.(*googleapi.Error).Header. Use
42609// googleapi.IsNotModified to check whether the returned error was
42610// because http.StatusNotModified was returned.
42611func (c *RemarketingListSharesPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42612	gensupport.SetOptions(c.urlParams_, opts...)
42613	res, err := c.doRequest("json")
42614	if res != nil && res.StatusCode == http.StatusNotModified {
42615		if res.Body != nil {
42616			res.Body.Close()
42617		}
42618		return nil, &googleapi.Error{
42619			Code:   res.StatusCode,
42620			Header: res.Header,
42621		}
42622	}
42623	if err != nil {
42624		return nil, err
42625	}
42626	defer googleapi.CloseBody(res)
42627	if err := googleapi.CheckResponse(res); err != nil {
42628		return nil, err
42629	}
42630	ret := &RemarketingListShare{
42631		ServerResponse: googleapi.ServerResponse{
42632			Header:         res.Header,
42633			HTTPStatusCode: res.StatusCode,
42634		},
42635	}
42636	target := &ret
42637	if err := gensupport.DecodeResponse(target, res); err != nil {
42638		return nil, err
42639	}
42640	return ret, nil
42641	// {
42642	//   "description": "Updates an existing remarketing list share. This method supports patch semantics.",
42643	//   "httpMethod": "PATCH",
42644	//   "id": "dfareporting.remarketingListShares.patch",
42645	//   "parameterOrder": [
42646	//     "profileId",
42647	//     "remarketingListId"
42648	//   ],
42649	//   "parameters": {
42650	//     "profileId": {
42651	//       "description": "User profile ID associated with this request.",
42652	//       "format": "int64",
42653	//       "location": "path",
42654	//       "required": true,
42655	//       "type": "string"
42656	//     },
42657	//     "remarketingListId": {
42658	//       "description": "Remarketing list ID.",
42659	//       "format": "int64",
42660	//       "location": "query",
42661	//       "required": true,
42662	//       "type": "string"
42663	//     }
42664	//   },
42665	//   "path": "userprofiles/{profileId}/remarketingListShares",
42666	//   "request": {
42667	//     "$ref": "RemarketingListShare"
42668	//   },
42669	//   "response": {
42670	//     "$ref": "RemarketingListShare"
42671	//   },
42672	//   "scopes": [
42673	//     "https://www.googleapis.com/auth/dfatrafficking"
42674	//   ]
42675	// }
42676
42677}
42678
42679// method id "dfareporting.remarketingListShares.update":
42680
42681type RemarketingListSharesUpdateCall struct {
42682	s                    *Service
42683	profileId            int64
42684	remarketinglistshare *RemarketingListShare
42685	urlParams_           gensupport.URLParams
42686	ctx_                 context.Context
42687	header_              http.Header
42688}
42689
42690// Update: Updates an existing remarketing list share.
42691func (r *RemarketingListSharesService) Update(profileId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesUpdateCall {
42692	c := &RemarketingListSharesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42693	c.profileId = profileId
42694	c.remarketinglistshare = remarketinglistshare
42695	return c
42696}
42697
42698// Fields allows partial responses to be retrieved. See
42699// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42700// for more information.
42701func (c *RemarketingListSharesUpdateCall) Fields(s ...googleapi.Field) *RemarketingListSharesUpdateCall {
42702	c.urlParams_.Set("fields", googleapi.CombineFields(s))
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 *RemarketingListSharesUpdateCall) Context(ctx context.Context) *RemarketingListSharesUpdateCall {
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 *RemarketingListSharesUpdateCall) Header() http.Header {
42717	if c.header_ == nil {
42718		c.header_ = make(http.Header)
42719	}
42720	return c.header_
42721}
42722
42723func (c *RemarketingListSharesUpdateCall) doRequest(alt string) (*http.Response, error) {
42724	reqHeaders := make(http.Header)
42725	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
42726	for k, v := range c.header_ {
42727		reqHeaders[k] = v
42728	}
42729	reqHeaders.Set("User-Agent", c.s.userAgent())
42730	var body io.Reader = nil
42731	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
42732	if err != nil {
42733		return nil, err
42734	}
42735	reqHeaders.Set("Content-Type", "application/json")
42736	c.urlParams_.Set("alt", alt)
42737	c.urlParams_.Set("prettyPrint", "false")
42738	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
42739	urls += "?" + c.urlParams_.Encode()
42740	req, err := http.NewRequest("PUT", urls, body)
42741	if err != nil {
42742		return nil, err
42743	}
42744	req.Header = reqHeaders
42745	googleapi.Expand(req.URL, map[string]string{
42746		"profileId": strconv.FormatInt(c.profileId, 10),
42747	})
42748	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42749}
42750
42751// Do executes the "dfareporting.remarketingListShares.update" call.
42752// Exactly one of *RemarketingListShare or error will be non-nil. Any
42753// non-2xx status code is an error. Response headers are in either
42754// *RemarketingListShare.ServerResponse.Header or (if a response was
42755// returned at all) in error.(*googleapi.Error).Header. Use
42756// googleapi.IsNotModified to check whether the returned error was
42757// because http.StatusNotModified was returned.
42758func (c *RemarketingListSharesUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42759	gensupport.SetOptions(c.urlParams_, opts...)
42760	res, err := c.doRequest("json")
42761	if res != nil && res.StatusCode == http.StatusNotModified {
42762		if res.Body != nil {
42763			res.Body.Close()
42764		}
42765		return nil, &googleapi.Error{
42766			Code:   res.StatusCode,
42767			Header: res.Header,
42768		}
42769	}
42770	if err != nil {
42771		return nil, err
42772	}
42773	defer googleapi.CloseBody(res)
42774	if err := googleapi.CheckResponse(res); err != nil {
42775		return nil, err
42776	}
42777	ret := &RemarketingListShare{
42778		ServerResponse: googleapi.ServerResponse{
42779			Header:         res.Header,
42780			HTTPStatusCode: res.StatusCode,
42781		},
42782	}
42783	target := &ret
42784	if err := gensupport.DecodeResponse(target, res); err != nil {
42785		return nil, err
42786	}
42787	return ret, nil
42788	// {
42789	//   "description": "Updates an existing remarketing list share.",
42790	//   "httpMethod": "PUT",
42791	//   "id": "dfareporting.remarketingListShares.update",
42792	//   "parameterOrder": [
42793	//     "profileId"
42794	//   ],
42795	//   "parameters": {
42796	//     "profileId": {
42797	//       "description": "User profile ID associated with this request.",
42798	//       "format": "int64",
42799	//       "location": "path",
42800	//       "required": true,
42801	//       "type": "string"
42802	//     }
42803	//   },
42804	//   "path": "userprofiles/{profileId}/remarketingListShares",
42805	//   "request": {
42806	//     "$ref": "RemarketingListShare"
42807	//   },
42808	//   "response": {
42809	//     "$ref": "RemarketingListShare"
42810	//   },
42811	//   "scopes": [
42812	//     "https://www.googleapis.com/auth/dfatrafficking"
42813	//   ]
42814	// }
42815
42816}
42817
42818// method id "dfareporting.remarketingLists.get":
42819
42820type RemarketingListsGetCall struct {
42821	s            *Service
42822	profileId    int64
42823	id           int64
42824	urlParams_   gensupport.URLParams
42825	ifNoneMatch_ string
42826	ctx_         context.Context
42827	header_      http.Header
42828}
42829
42830// Get: Gets one remarketing list by ID.
42831func (r *RemarketingListsService) Get(profileId int64, id int64) *RemarketingListsGetCall {
42832	c := &RemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42833	c.profileId = profileId
42834	c.id = id
42835	return c
42836}
42837
42838// Fields allows partial responses to be retrieved. See
42839// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42840// for more information.
42841func (c *RemarketingListsGetCall) Fields(s ...googleapi.Field) *RemarketingListsGetCall {
42842	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42843	return c
42844}
42845
42846// IfNoneMatch sets the optional parameter which makes the operation
42847// fail if the object's ETag matches the given value. This is useful for
42848// getting updates only after the object has changed since the last
42849// request. Use googleapi.IsNotModified to check whether the response
42850// error from Do is the result of In-None-Match.
42851func (c *RemarketingListsGetCall) IfNoneMatch(entityTag string) *RemarketingListsGetCall {
42852	c.ifNoneMatch_ = entityTag
42853	return c
42854}
42855
42856// Context sets the context to be used in this call's Do method. Any
42857// pending HTTP request will be aborted if the provided context is
42858// canceled.
42859func (c *RemarketingListsGetCall) Context(ctx context.Context) *RemarketingListsGetCall {
42860	c.ctx_ = ctx
42861	return c
42862}
42863
42864// Header returns an http.Header that can be modified by the caller to
42865// add HTTP headers to the request.
42866func (c *RemarketingListsGetCall) Header() http.Header {
42867	if c.header_ == nil {
42868		c.header_ = make(http.Header)
42869	}
42870	return c.header_
42871}
42872
42873func (c *RemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
42874	reqHeaders := make(http.Header)
42875	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
42876	for k, v := range c.header_ {
42877		reqHeaders[k] = v
42878	}
42879	reqHeaders.Set("User-Agent", c.s.userAgent())
42880	if c.ifNoneMatch_ != "" {
42881		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42882	}
42883	var body io.Reader = nil
42884	c.urlParams_.Set("alt", alt)
42885	c.urlParams_.Set("prettyPrint", "false")
42886	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists/{id}")
42887	urls += "?" + c.urlParams_.Encode()
42888	req, err := http.NewRequest("GET", urls, body)
42889	if err != nil {
42890		return nil, err
42891	}
42892	req.Header = reqHeaders
42893	googleapi.Expand(req.URL, map[string]string{
42894		"profileId": strconv.FormatInt(c.profileId, 10),
42895		"id":        strconv.FormatInt(c.id, 10),
42896	})
42897	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42898}
42899
42900// Do executes the "dfareporting.remarketingLists.get" call.
42901// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
42902// status code is an error. Response headers are in either
42903// *RemarketingList.ServerResponse.Header or (if a response was returned
42904// at all) in error.(*googleapi.Error).Header. Use
42905// googleapi.IsNotModified to check whether the returned error was
42906// because http.StatusNotModified was returned.
42907func (c *RemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
42908	gensupport.SetOptions(c.urlParams_, opts...)
42909	res, err := c.doRequest("json")
42910	if res != nil && res.StatusCode == http.StatusNotModified {
42911		if res.Body != nil {
42912			res.Body.Close()
42913		}
42914		return nil, &googleapi.Error{
42915			Code:   res.StatusCode,
42916			Header: res.Header,
42917		}
42918	}
42919	if err != nil {
42920		return nil, err
42921	}
42922	defer googleapi.CloseBody(res)
42923	if err := googleapi.CheckResponse(res); err != nil {
42924		return nil, err
42925	}
42926	ret := &RemarketingList{
42927		ServerResponse: googleapi.ServerResponse{
42928			Header:         res.Header,
42929			HTTPStatusCode: res.StatusCode,
42930		},
42931	}
42932	target := &ret
42933	if err := gensupport.DecodeResponse(target, res); err != nil {
42934		return nil, err
42935	}
42936	return ret, nil
42937	// {
42938	//   "description": "Gets one remarketing list by ID.",
42939	//   "httpMethod": "GET",
42940	//   "id": "dfareporting.remarketingLists.get",
42941	//   "parameterOrder": [
42942	//     "profileId",
42943	//     "id"
42944	//   ],
42945	//   "parameters": {
42946	//     "id": {
42947	//       "description": "Remarketing list ID.",
42948	//       "format": "int64",
42949	//       "location": "path",
42950	//       "required": true,
42951	//       "type": "string"
42952	//     },
42953	//     "profileId": {
42954	//       "description": "User profile ID associated with this request.",
42955	//       "format": "int64",
42956	//       "location": "path",
42957	//       "required": true,
42958	//       "type": "string"
42959	//     }
42960	//   },
42961	//   "path": "userprofiles/{profileId}/remarketingLists/{id}",
42962	//   "response": {
42963	//     "$ref": "RemarketingList"
42964	//   },
42965	//   "scopes": [
42966	//     "https://www.googleapis.com/auth/dfatrafficking"
42967	//   ]
42968	// }
42969
42970}
42971
42972// method id "dfareporting.remarketingLists.insert":
42973
42974type RemarketingListsInsertCall struct {
42975	s               *Service
42976	profileId       int64
42977	remarketinglist *RemarketingList
42978	urlParams_      gensupport.URLParams
42979	ctx_            context.Context
42980	header_         http.Header
42981}
42982
42983// Insert: Inserts a new remarketing list.
42984func (r *RemarketingListsService) Insert(profileId int64, remarketinglist *RemarketingList) *RemarketingListsInsertCall {
42985	c := &RemarketingListsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42986	c.profileId = profileId
42987	c.remarketinglist = remarketinglist
42988	return c
42989}
42990
42991// Fields allows partial responses to be retrieved. See
42992// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42993// for more information.
42994func (c *RemarketingListsInsertCall) Fields(s ...googleapi.Field) *RemarketingListsInsertCall {
42995	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42996	return c
42997}
42998
42999// Context sets the context to be used in this call's Do method. Any
43000// pending HTTP request will be aborted if the provided context is
43001// canceled.
43002func (c *RemarketingListsInsertCall) Context(ctx context.Context) *RemarketingListsInsertCall {
43003	c.ctx_ = ctx
43004	return c
43005}
43006
43007// Header returns an http.Header that can be modified by the caller to
43008// add HTTP headers to the request.
43009func (c *RemarketingListsInsertCall) Header() http.Header {
43010	if c.header_ == nil {
43011		c.header_ = make(http.Header)
43012	}
43013	return c.header_
43014}
43015
43016func (c *RemarketingListsInsertCall) doRequest(alt string) (*http.Response, error) {
43017	reqHeaders := make(http.Header)
43018	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
43019	for k, v := range c.header_ {
43020		reqHeaders[k] = v
43021	}
43022	reqHeaders.Set("User-Agent", c.s.userAgent())
43023	var body io.Reader = nil
43024	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
43025	if err != nil {
43026		return nil, err
43027	}
43028	reqHeaders.Set("Content-Type", "application/json")
43029	c.urlParams_.Set("alt", alt)
43030	c.urlParams_.Set("prettyPrint", "false")
43031	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43032	urls += "?" + c.urlParams_.Encode()
43033	req, err := http.NewRequest("POST", urls, body)
43034	if err != nil {
43035		return nil, err
43036	}
43037	req.Header = reqHeaders
43038	googleapi.Expand(req.URL, map[string]string{
43039		"profileId": strconv.FormatInt(c.profileId, 10),
43040	})
43041	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43042}
43043
43044// Do executes the "dfareporting.remarketingLists.insert" call.
43045// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
43046// status code is an error. Response headers are in either
43047// *RemarketingList.ServerResponse.Header or (if a response was returned
43048// at all) in error.(*googleapi.Error).Header. Use
43049// googleapi.IsNotModified to check whether the returned error was
43050// because http.StatusNotModified was returned.
43051func (c *RemarketingListsInsertCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43052	gensupport.SetOptions(c.urlParams_, opts...)
43053	res, err := c.doRequest("json")
43054	if res != nil && res.StatusCode == http.StatusNotModified {
43055		if res.Body != nil {
43056			res.Body.Close()
43057		}
43058		return nil, &googleapi.Error{
43059			Code:   res.StatusCode,
43060			Header: res.Header,
43061		}
43062	}
43063	if err != nil {
43064		return nil, err
43065	}
43066	defer googleapi.CloseBody(res)
43067	if err := googleapi.CheckResponse(res); err != nil {
43068		return nil, err
43069	}
43070	ret := &RemarketingList{
43071		ServerResponse: googleapi.ServerResponse{
43072			Header:         res.Header,
43073			HTTPStatusCode: res.StatusCode,
43074		},
43075	}
43076	target := &ret
43077	if err := gensupport.DecodeResponse(target, res); err != nil {
43078		return nil, err
43079	}
43080	return ret, nil
43081	// {
43082	//   "description": "Inserts a new remarketing list.",
43083	//   "httpMethod": "POST",
43084	//   "id": "dfareporting.remarketingLists.insert",
43085	//   "parameterOrder": [
43086	//     "profileId"
43087	//   ],
43088	//   "parameters": {
43089	//     "profileId": {
43090	//       "description": "User profile ID associated with this request.",
43091	//       "format": "int64",
43092	//       "location": "path",
43093	//       "required": true,
43094	//       "type": "string"
43095	//     }
43096	//   },
43097	//   "path": "userprofiles/{profileId}/remarketingLists",
43098	//   "request": {
43099	//     "$ref": "RemarketingList"
43100	//   },
43101	//   "response": {
43102	//     "$ref": "RemarketingList"
43103	//   },
43104	//   "scopes": [
43105	//     "https://www.googleapis.com/auth/dfatrafficking"
43106	//   ]
43107	// }
43108
43109}
43110
43111// method id "dfareporting.remarketingLists.list":
43112
43113type RemarketingListsListCall struct {
43114	s            *Service
43115	profileId    int64
43116	urlParams_   gensupport.URLParams
43117	ifNoneMatch_ string
43118	ctx_         context.Context
43119	header_      http.Header
43120}
43121
43122// List: Retrieves a list of remarketing lists, possibly filtered. This
43123// method supports paging.
43124func (r *RemarketingListsService) List(profileId int64, advertiserId int64) *RemarketingListsListCall {
43125	c := &RemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43126	c.profileId = profileId
43127	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
43128	return c
43129}
43130
43131// Active sets the optional parameter "active": Select only active or
43132// only inactive remarketing lists.
43133func (c *RemarketingListsListCall) Active(active bool) *RemarketingListsListCall {
43134	c.urlParams_.Set("active", fmt.Sprint(active))
43135	return c
43136}
43137
43138// FloodlightActivityId sets the optional parameter
43139// "floodlightActivityId": Select only remarketing lists that have this
43140// floodlight activity ID.
43141func (c *RemarketingListsListCall) FloodlightActivityId(floodlightActivityId int64) *RemarketingListsListCall {
43142	c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
43143	return c
43144}
43145
43146// MaxResults sets the optional parameter "maxResults": Maximum number
43147// of results to return.
43148func (c *RemarketingListsListCall) MaxResults(maxResults int64) *RemarketingListsListCall {
43149	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
43150	return c
43151}
43152
43153// Name sets the optional parameter "name": Allows searching for objects
43154// by name or ID. Wildcards (*) are allowed. For example, "remarketing
43155// list*2015" will return objects with names like "remarketing list June
43156// 2015", "remarketing list April 2015", or simply "remarketing list
43157// 2015". Most of the searches also add wildcards implicitly at the
43158// start and the end of the search string. For example, a search string
43159// of "remarketing list" will match objects with name "my remarketing
43160// list", "remarketing list 2015", or simply "remarketing list".
43161func (c *RemarketingListsListCall) Name(name string) *RemarketingListsListCall {
43162	c.urlParams_.Set("name", name)
43163	return c
43164}
43165
43166// PageToken sets the optional parameter "pageToken": Value of the
43167// nextPageToken from the previous result page.
43168func (c *RemarketingListsListCall) PageToken(pageToken string) *RemarketingListsListCall {
43169	c.urlParams_.Set("pageToken", pageToken)
43170	return c
43171}
43172
43173// SortField sets the optional parameter "sortField": Field by which to
43174// sort the list.
43175//
43176// Possible values:
43177//   "ID" (default)
43178//   "NAME"
43179func (c *RemarketingListsListCall) SortField(sortField string) *RemarketingListsListCall {
43180	c.urlParams_.Set("sortField", sortField)
43181	return c
43182}
43183
43184// SortOrder sets the optional parameter "sortOrder": Order of sorted
43185// results.
43186//
43187// Possible values:
43188//   "ASCENDING" (default)
43189//   "DESCENDING"
43190func (c *RemarketingListsListCall) SortOrder(sortOrder string) *RemarketingListsListCall {
43191	c.urlParams_.Set("sortOrder", sortOrder)
43192	return c
43193}
43194
43195// Fields allows partial responses to be retrieved. See
43196// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43197// for more information.
43198func (c *RemarketingListsListCall) Fields(s ...googleapi.Field) *RemarketingListsListCall {
43199	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43200	return c
43201}
43202
43203// IfNoneMatch sets the optional parameter which makes the operation
43204// fail if the object's ETag matches the given value. This is useful for
43205// getting updates only after the object has changed since the last
43206// request. Use googleapi.IsNotModified to check whether the response
43207// error from Do is the result of In-None-Match.
43208func (c *RemarketingListsListCall) IfNoneMatch(entityTag string) *RemarketingListsListCall {
43209	c.ifNoneMatch_ = entityTag
43210	return c
43211}
43212
43213// Context sets the context to be used in this call's Do method. Any
43214// pending HTTP request will be aborted if the provided context is
43215// canceled.
43216func (c *RemarketingListsListCall) Context(ctx context.Context) *RemarketingListsListCall {
43217	c.ctx_ = ctx
43218	return c
43219}
43220
43221// Header returns an http.Header that can be modified by the caller to
43222// add HTTP headers to the request.
43223func (c *RemarketingListsListCall) Header() http.Header {
43224	if c.header_ == nil {
43225		c.header_ = make(http.Header)
43226	}
43227	return c.header_
43228}
43229
43230func (c *RemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
43231	reqHeaders := make(http.Header)
43232	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
43233	for k, v := range c.header_ {
43234		reqHeaders[k] = v
43235	}
43236	reqHeaders.Set("User-Agent", c.s.userAgent())
43237	if c.ifNoneMatch_ != "" {
43238		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43239	}
43240	var body io.Reader = nil
43241	c.urlParams_.Set("alt", alt)
43242	c.urlParams_.Set("prettyPrint", "false")
43243	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43244	urls += "?" + c.urlParams_.Encode()
43245	req, err := http.NewRequest("GET", urls, body)
43246	if err != nil {
43247		return nil, err
43248	}
43249	req.Header = reqHeaders
43250	googleapi.Expand(req.URL, map[string]string{
43251		"profileId": strconv.FormatInt(c.profileId, 10),
43252	})
43253	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43254}
43255
43256// Do executes the "dfareporting.remarketingLists.list" call.
43257// Exactly one of *RemarketingListsListResponse or error will be
43258// non-nil. Any non-2xx status code is an error. Response headers are in
43259// either *RemarketingListsListResponse.ServerResponse.Header or (if a
43260// response was returned at all) in error.(*googleapi.Error).Header. Use
43261// googleapi.IsNotModified to check whether the returned error was
43262// because http.StatusNotModified was returned.
43263func (c *RemarketingListsListCall) Do(opts ...googleapi.CallOption) (*RemarketingListsListResponse, error) {
43264	gensupport.SetOptions(c.urlParams_, opts...)
43265	res, err := c.doRequest("json")
43266	if res != nil && res.StatusCode == http.StatusNotModified {
43267		if res.Body != nil {
43268			res.Body.Close()
43269		}
43270		return nil, &googleapi.Error{
43271			Code:   res.StatusCode,
43272			Header: res.Header,
43273		}
43274	}
43275	if err != nil {
43276		return nil, err
43277	}
43278	defer googleapi.CloseBody(res)
43279	if err := googleapi.CheckResponse(res); err != nil {
43280		return nil, err
43281	}
43282	ret := &RemarketingListsListResponse{
43283		ServerResponse: googleapi.ServerResponse{
43284			Header:         res.Header,
43285			HTTPStatusCode: res.StatusCode,
43286		},
43287	}
43288	target := &ret
43289	if err := gensupport.DecodeResponse(target, res); err != nil {
43290		return nil, err
43291	}
43292	return ret, nil
43293	// {
43294	//   "description": "Retrieves a list of remarketing lists, possibly filtered. This method supports paging.",
43295	//   "httpMethod": "GET",
43296	//   "id": "dfareporting.remarketingLists.list",
43297	//   "parameterOrder": [
43298	//     "profileId",
43299	//     "advertiserId"
43300	//   ],
43301	//   "parameters": {
43302	//     "active": {
43303	//       "description": "Select only active or only inactive remarketing lists.",
43304	//       "location": "query",
43305	//       "type": "boolean"
43306	//     },
43307	//     "advertiserId": {
43308	//       "description": "Select only remarketing lists owned by this advertiser.",
43309	//       "format": "int64",
43310	//       "location": "query",
43311	//       "required": true,
43312	//       "type": "string"
43313	//     },
43314	//     "floodlightActivityId": {
43315	//       "description": "Select only remarketing lists that have this floodlight activity ID.",
43316	//       "format": "int64",
43317	//       "location": "query",
43318	//       "type": "string"
43319	//     },
43320	//     "maxResults": {
43321	//       "default": "1000",
43322	//       "description": "Maximum number of results to return.",
43323	//       "format": "int32",
43324	//       "location": "query",
43325	//       "maximum": "1000",
43326	//       "minimum": "0",
43327	//       "type": "integer"
43328	//     },
43329	//     "name": {
43330	//       "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\".",
43331	//       "location": "query",
43332	//       "type": "string"
43333	//     },
43334	//     "pageToken": {
43335	//       "description": "Value of the nextPageToken from the previous result page.",
43336	//       "location": "query",
43337	//       "type": "string"
43338	//     },
43339	//     "profileId": {
43340	//       "description": "User profile ID associated with this request.",
43341	//       "format": "int64",
43342	//       "location": "path",
43343	//       "required": true,
43344	//       "type": "string"
43345	//     },
43346	//     "sortField": {
43347	//       "default": "ID",
43348	//       "description": "Field by which to sort the list.",
43349	//       "enum": [
43350	//         "ID",
43351	//         "NAME"
43352	//       ],
43353	//       "enumDescriptions": [
43354	//         "",
43355	//         ""
43356	//       ],
43357	//       "location": "query",
43358	//       "type": "string"
43359	//     },
43360	//     "sortOrder": {
43361	//       "default": "ASCENDING",
43362	//       "description": "Order of sorted results.",
43363	//       "enum": [
43364	//         "ASCENDING",
43365	//         "DESCENDING"
43366	//       ],
43367	//       "enumDescriptions": [
43368	//         "",
43369	//         ""
43370	//       ],
43371	//       "location": "query",
43372	//       "type": "string"
43373	//     }
43374	//   },
43375	//   "path": "userprofiles/{profileId}/remarketingLists",
43376	//   "response": {
43377	//     "$ref": "RemarketingListsListResponse"
43378	//   },
43379	//   "scopes": [
43380	//     "https://www.googleapis.com/auth/dfatrafficking"
43381	//   ]
43382	// }
43383
43384}
43385
43386// Pages invokes f for each page of results.
43387// A non-nil error returned from f will halt the iteration.
43388// The provided context supersedes any context provided to the Context method.
43389func (c *RemarketingListsListCall) Pages(ctx context.Context, f func(*RemarketingListsListResponse) error) error {
43390	c.ctx_ = ctx
43391	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
43392	for {
43393		x, err := c.Do()
43394		if err != nil {
43395			return err
43396		}
43397		if err := f(x); err != nil {
43398			return err
43399		}
43400		if x.NextPageToken == "" {
43401			return nil
43402		}
43403		c.PageToken(x.NextPageToken)
43404	}
43405}
43406
43407// method id "dfareporting.remarketingLists.patch":
43408
43409type RemarketingListsPatchCall struct {
43410	s               *Service
43411	profileId       int64
43412	remarketinglist *RemarketingList
43413	urlParams_      gensupport.URLParams
43414	ctx_            context.Context
43415	header_         http.Header
43416}
43417
43418// Patch: Updates an existing remarketing list. This method supports
43419// patch semantics.
43420func (r *RemarketingListsService) Patch(profileId int64, id int64, remarketinglist *RemarketingList) *RemarketingListsPatchCall {
43421	c := &RemarketingListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43422	c.profileId = profileId
43423	c.urlParams_.Set("id", fmt.Sprint(id))
43424	c.remarketinglist = remarketinglist
43425	return c
43426}
43427
43428// Fields allows partial responses to be retrieved. See
43429// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43430// for more information.
43431func (c *RemarketingListsPatchCall) Fields(s ...googleapi.Field) *RemarketingListsPatchCall {
43432	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43433	return c
43434}
43435
43436// Context sets the context to be used in this call's Do method. Any
43437// pending HTTP request will be aborted if the provided context is
43438// canceled.
43439func (c *RemarketingListsPatchCall) Context(ctx context.Context) *RemarketingListsPatchCall {
43440	c.ctx_ = ctx
43441	return c
43442}
43443
43444// Header returns an http.Header that can be modified by the caller to
43445// add HTTP headers to the request.
43446func (c *RemarketingListsPatchCall) Header() http.Header {
43447	if c.header_ == nil {
43448		c.header_ = make(http.Header)
43449	}
43450	return c.header_
43451}
43452
43453func (c *RemarketingListsPatchCall) doRequest(alt string) (*http.Response, error) {
43454	reqHeaders := make(http.Header)
43455	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
43456	for k, v := range c.header_ {
43457		reqHeaders[k] = v
43458	}
43459	reqHeaders.Set("User-Agent", c.s.userAgent())
43460	var body io.Reader = nil
43461	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
43462	if err != nil {
43463		return nil, err
43464	}
43465	reqHeaders.Set("Content-Type", "application/json")
43466	c.urlParams_.Set("alt", alt)
43467	c.urlParams_.Set("prettyPrint", "false")
43468	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43469	urls += "?" + c.urlParams_.Encode()
43470	req, err := http.NewRequest("PATCH", urls, body)
43471	if err != nil {
43472		return nil, err
43473	}
43474	req.Header = reqHeaders
43475	googleapi.Expand(req.URL, map[string]string{
43476		"profileId": strconv.FormatInt(c.profileId, 10),
43477	})
43478	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43479}
43480
43481// Do executes the "dfareporting.remarketingLists.patch" call.
43482// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
43483// status code is an error. Response headers are in either
43484// *RemarketingList.ServerResponse.Header or (if a response was returned
43485// at all) in error.(*googleapi.Error).Header. Use
43486// googleapi.IsNotModified to check whether the returned error was
43487// because http.StatusNotModified was returned.
43488func (c *RemarketingListsPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43489	gensupport.SetOptions(c.urlParams_, opts...)
43490	res, err := c.doRequest("json")
43491	if res != nil && res.StatusCode == http.StatusNotModified {
43492		if res.Body != nil {
43493			res.Body.Close()
43494		}
43495		return nil, &googleapi.Error{
43496			Code:   res.StatusCode,
43497			Header: res.Header,
43498		}
43499	}
43500	if err != nil {
43501		return nil, err
43502	}
43503	defer googleapi.CloseBody(res)
43504	if err := googleapi.CheckResponse(res); err != nil {
43505		return nil, err
43506	}
43507	ret := &RemarketingList{
43508		ServerResponse: googleapi.ServerResponse{
43509			Header:         res.Header,
43510			HTTPStatusCode: res.StatusCode,
43511		},
43512	}
43513	target := &ret
43514	if err := gensupport.DecodeResponse(target, res); err != nil {
43515		return nil, err
43516	}
43517	return ret, nil
43518	// {
43519	//   "description": "Updates an existing remarketing list. This method supports patch semantics.",
43520	//   "httpMethod": "PATCH",
43521	//   "id": "dfareporting.remarketingLists.patch",
43522	//   "parameterOrder": [
43523	//     "profileId",
43524	//     "id"
43525	//   ],
43526	//   "parameters": {
43527	//     "id": {
43528	//       "description": "Remarketing list ID.",
43529	//       "format": "int64",
43530	//       "location": "query",
43531	//       "required": true,
43532	//       "type": "string"
43533	//     },
43534	//     "profileId": {
43535	//       "description": "User profile ID associated with this request.",
43536	//       "format": "int64",
43537	//       "location": "path",
43538	//       "required": true,
43539	//       "type": "string"
43540	//     }
43541	//   },
43542	//   "path": "userprofiles/{profileId}/remarketingLists",
43543	//   "request": {
43544	//     "$ref": "RemarketingList"
43545	//   },
43546	//   "response": {
43547	//     "$ref": "RemarketingList"
43548	//   },
43549	//   "scopes": [
43550	//     "https://www.googleapis.com/auth/dfatrafficking"
43551	//   ]
43552	// }
43553
43554}
43555
43556// method id "dfareporting.remarketingLists.update":
43557
43558type RemarketingListsUpdateCall struct {
43559	s               *Service
43560	profileId       int64
43561	remarketinglist *RemarketingList
43562	urlParams_      gensupport.URLParams
43563	ctx_            context.Context
43564	header_         http.Header
43565}
43566
43567// Update: Updates an existing remarketing list.
43568func (r *RemarketingListsService) Update(profileId int64, remarketinglist *RemarketingList) *RemarketingListsUpdateCall {
43569	c := &RemarketingListsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43570	c.profileId = profileId
43571	c.remarketinglist = remarketinglist
43572	return c
43573}
43574
43575// Fields allows partial responses to be retrieved. See
43576// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43577// for more information.
43578func (c *RemarketingListsUpdateCall) Fields(s ...googleapi.Field) *RemarketingListsUpdateCall {
43579	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43580	return c
43581}
43582
43583// Context sets the context to be used in this call's Do method. Any
43584// pending HTTP request will be aborted if the provided context is
43585// canceled.
43586func (c *RemarketingListsUpdateCall) Context(ctx context.Context) *RemarketingListsUpdateCall {
43587	c.ctx_ = ctx
43588	return c
43589}
43590
43591// Header returns an http.Header that can be modified by the caller to
43592// add HTTP headers to the request.
43593func (c *RemarketingListsUpdateCall) Header() http.Header {
43594	if c.header_ == nil {
43595		c.header_ = make(http.Header)
43596	}
43597	return c.header_
43598}
43599
43600func (c *RemarketingListsUpdateCall) doRequest(alt string) (*http.Response, error) {
43601	reqHeaders := make(http.Header)
43602	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
43603	for k, v := range c.header_ {
43604		reqHeaders[k] = v
43605	}
43606	reqHeaders.Set("User-Agent", c.s.userAgent())
43607	var body io.Reader = nil
43608	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
43609	if err != nil {
43610		return nil, err
43611	}
43612	reqHeaders.Set("Content-Type", "application/json")
43613	c.urlParams_.Set("alt", alt)
43614	c.urlParams_.Set("prettyPrint", "false")
43615	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43616	urls += "?" + c.urlParams_.Encode()
43617	req, err := http.NewRequest("PUT", urls, body)
43618	if err != nil {
43619		return nil, err
43620	}
43621	req.Header = reqHeaders
43622	googleapi.Expand(req.URL, map[string]string{
43623		"profileId": strconv.FormatInt(c.profileId, 10),
43624	})
43625	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43626}
43627
43628// Do executes the "dfareporting.remarketingLists.update" call.
43629// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
43630// status code is an error. Response headers are in either
43631// *RemarketingList.ServerResponse.Header or (if a response was returned
43632// at all) in error.(*googleapi.Error).Header. Use
43633// googleapi.IsNotModified to check whether the returned error was
43634// because http.StatusNotModified was returned.
43635func (c *RemarketingListsUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43636	gensupport.SetOptions(c.urlParams_, opts...)
43637	res, err := c.doRequest("json")
43638	if res != nil && res.StatusCode == http.StatusNotModified {
43639		if res.Body != nil {
43640			res.Body.Close()
43641		}
43642		return nil, &googleapi.Error{
43643			Code:   res.StatusCode,
43644			Header: res.Header,
43645		}
43646	}
43647	if err != nil {
43648		return nil, err
43649	}
43650	defer googleapi.CloseBody(res)
43651	if err := googleapi.CheckResponse(res); err != nil {
43652		return nil, err
43653	}
43654	ret := &RemarketingList{
43655		ServerResponse: googleapi.ServerResponse{
43656			Header:         res.Header,
43657			HTTPStatusCode: res.StatusCode,
43658		},
43659	}
43660	target := &ret
43661	if err := gensupport.DecodeResponse(target, res); err != nil {
43662		return nil, err
43663	}
43664	return ret, nil
43665	// {
43666	//   "description": "Updates an existing remarketing list.",
43667	//   "httpMethod": "PUT",
43668	//   "id": "dfareporting.remarketingLists.update",
43669	//   "parameterOrder": [
43670	//     "profileId"
43671	//   ],
43672	//   "parameters": {
43673	//     "profileId": {
43674	//       "description": "User profile ID associated with this request.",
43675	//       "format": "int64",
43676	//       "location": "path",
43677	//       "required": true,
43678	//       "type": "string"
43679	//     }
43680	//   },
43681	//   "path": "userprofiles/{profileId}/remarketingLists",
43682	//   "request": {
43683	//     "$ref": "RemarketingList"
43684	//   },
43685	//   "response": {
43686	//     "$ref": "RemarketingList"
43687	//   },
43688	//   "scopes": [
43689	//     "https://www.googleapis.com/auth/dfatrafficking"
43690	//   ]
43691	// }
43692
43693}
43694
43695// method id "dfareporting.reports.delete":
43696
43697type ReportsDeleteCall struct {
43698	s          *Service
43699	profileId  int64
43700	reportId   int64
43701	urlParams_ gensupport.URLParams
43702	ctx_       context.Context
43703	header_    http.Header
43704}
43705
43706// Delete: Deletes a report by its ID.
43707func (r *ReportsService) Delete(profileId int64, reportId int64) *ReportsDeleteCall {
43708	c := &ReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43709	c.profileId = profileId
43710	c.reportId = reportId
43711	return c
43712}
43713
43714// Fields allows partial responses to be retrieved. See
43715// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43716// for more information.
43717func (c *ReportsDeleteCall) Fields(s ...googleapi.Field) *ReportsDeleteCall {
43718	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43719	return c
43720}
43721
43722// Context sets the context to be used in this call's Do method. Any
43723// pending HTTP request will be aborted if the provided context is
43724// canceled.
43725func (c *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
43726	c.ctx_ = ctx
43727	return c
43728}
43729
43730// Header returns an http.Header that can be modified by the caller to
43731// add HTTP headers to the request.
43732func (c *ReportsDeleteCall) Header() http.Header {
43733	if c.header_ == nil {
43734		c.header_ = make(http.Header)
43735	}
43736	return c.header_
43737}
43738
43739func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
43740	reqHeaders := make(http.Header)
43741	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
43742	for k, v := range c.header_ {
43743		reqHeaders[k] = v
43744	}
43745	reqHeaders.Set("User-Agent", c.s.userAgent())
43746	var body io.Reader = nil
43747	c.urlParams_.Set("alt", alt)
43748	c.urlParams_.Set("prettyPrint", "false")
43749	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
43750	urls += "?" + c.urlParams_.Encode()
43751	req, err := http.NewRequest("DELETE", urls, body)
43752	if err != nil {
43753		return nil, err
43754	}
43755	req.Header = reqHeaders
43756	googleapi.Expand(req.URL, map[string]string{
43757		"profileId": strconv.FormatInt(c.profileId, 10),
43758		"reportId":  strconv.FormatInt(c.reportId, 10),
43759	})
43760	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43761}
43762
43763// Do executes the "dfareporting.reports.delete" call.
43764func (c *ReportsDeleteCall) Do(opts ...googleapi.CallOption) error {
43765	gensupport.SetOptions(c.urlParams_, opts...)
43766	res, err := c.doRequest("json")
43767	if err != nil {
43768		return err
43769	}
43770	defer googleapi.CloseBody(res)
43771	if err := googleapi.CheckResponse(res); err != nil {
43772		return err
43773	}
43774	return nil
43775	// {
43776	//   "description": "Deletes a report by its ID.",
43777	//   "httpMethod": "DELETE",
43778	//   "id": "dfareporting.reports.delete",
43779	//   "parameterOrder": [
43780	//     "profileId",
43781	//     "reportId"
43782	//   ],
43783	//   "parameters": {
43784	//     "profileId": {
43785	//       "description": "The DFA user profile ID.",
43786	//       "format": "int64",
43787	//       "location": "path",
43788	//       "required": true,
43789	//       "type": "string"
43790	//     },
43791	//     "reportId": {
43792	//       "description": "The ID of the report.",
43793	//       "format": "int64",
43794	//       "location": "path",
43795	//       "required": true,
43796	//       "type": "string"
43797	//     }
43798	//   },
43799	//   "path": "userprofiles/{profileId}/reports/{reportId}",
43800	//   "scopes": [
43801	//     "https://www.googleapis.com/auth/dfareporting"
43802	//   ]
43803	// }
43804
43805}
43806
43807// method id "dfareporting.reports.get":
43808
43809type ReportsGetCall struct {
43810	s            *Service
43811	profileId    int64
43812	reportId     int64
43813	urlParams_   gensupport.URLParams
43814	ifNoneMatch_ string
43815	ctx_         context.Context
43816	header_      http.Header
43817}
43818
43819// Get: Retrieves a report by its ID.
43820func (r *ReportsService) Get(profileId int64, reportId int64) *ReportsGetCall {
43821	c := &ReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43822	c.profileId = profileId
43823	c.reportId = reportId
43824	return c
43825}
43826
43827// Fields allows partial responses to be retrieved. See
43828// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43829// for more information.
43830func (c *ReportsGetCall) Fields(s ...googleapi.Field) *ReportsGetCall {
43831	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43832	return c
43833}
43834
43835// IfNoneMatch sets the optional parameter which makes the operation
43836// fail if the object's ETag matches the given value. This is useful for
43837// getting updates only after the object has changed since the last
43838// request. Use googleapi.IsNotModified to check whether the response
43839// error from Do is the result of In-None-Match.
43840func (c *ReportsGetCall) IfNoneMatch(entityTag string) *ReportsGetCall {
43841	c.ifNoneMatch_ = entityTag
43842	return c
43843}
43844
43845// Context sets the context to be used in this call's Do method. Any
43846// pending HTTP request will be aborted if the provided context is
43847// canceled.
43848func (c *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
43849	c.ctx_ = ctx
43850	return c
43851}
43852
43853// Header returns an http.Header that can be modified by the caller to
43854// add HTTP headers to the request.
43855func (c *ReportsGetCall) Header() http.Header {
43856	if c.header_ == nil {
43857		c.header_ = make(http.Header)
43858	}
43859	return c.header_
43860}
43861
43862func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
43863	reqHeaders := make(http.Header)
43864	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
43865	for k, v := range c.header_ {
43866		reqHeaders[k] = v
43867	}
43868	reqHeaders.Set("User-Agent", c.s.userAgent())
43869	if c.ifNoneMatch_ != "" {
43870		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43871	}
43872	var body io.Reader = nil
43873	c.urlParams_.Set("alt", alt)
43874	c.urlParams_.Set("prettyPrint", "false")
43875	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
43876	urls += "?" + c.urlParams_.Encode()
43877	req, err := http.NewRequest("GET", urls, body)
43878	if err != nil {
43879		return nil, err
43880	}
43881	req.Header = reqHeaders
43882	googleapi.Expand(req.URL, map[string]string{
43883		"profileId": strconv.FormatInt(c.profileId, 10),
43884		"reportId":  strconv.FormatInt(c.reportId, 10),
43885	})
43886	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43887}
43888
43889// Do executes the "dfareporting.reports.get" call.
43890// Exactly one of *Report or error will be non-nil. Any non-2xx status
43891// code is an error. Response headers are in either
43892// *Report.ServerResponse.Header or (if a response was returned at all)
43893// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
43894// check whether the returned error was because http.StatusNotModified
43895// was returned.
43896func (c *ReportsGetCall) Do(opts ...googleapi.CallOption) (*Report, error) {
43897	gensupport.SetOptions(c.urlParams_, opts...)
43898	res, err := c.doRequest("json")
43899	if res != nil && res.StatusCode == http.StatusNotModified {
43900		if res.Body != nil {
43901			res.Body.Close()
43902		}
43903		return nil, &googleapi.Error{
43904			Code:   res.StatusCode,
43905			Header: res.Header,
43906		}
43907	}
43908	if err != nil {
43909		return nil, err
43910	}
43911	defer googleapi.CloseBody(res)
43912	if err := googleapi.CheckResponse(res); err != nil {
43913		return nil, err
43914	}
43915	ret := &Report{
43916		ServerResponse: googleapi.ServerResponse{
43917			Header:         res.Header,
43918			HTTPStatusCode: res.StatusCode,
43919		},
43920	}
43921	target := &ret
43922	if err := gensupport.DecodeResponse(target, res); err != nil {
43923		return nil, err
43924	}
43925	return ret, nil
43926	// {
43927	//   "description": "Retrieves a report by its ID.",
43928	//   "httpMethod": "GET",
43929	//   "id": "dfareporting.reports.get",
43930	//   "parameterOrder": [
43931	//     "profileId",
43932	//     "reportId"
43933	//   ],
43934	//   "parameters": {
43935	//     "profileId": {
43936	//       "description": "The DFA user profile ID.",
43937	//       "format": "int64",
43938	//       "location": "path",
43939	//       "required": true,
43940	//       "type": "string"
43941	//     },
43942	//     "reportId": {
43943	//       "description": "The ID of the report.",
43944	//       "format": "int64",
43945	//       "location": "path",
43946	//       "required": true,
43947	//       "type": "string"
43948	//     }
43949	//   },
43950	//   "path": "userprofiles/{profileId}/reports/{reportId}",
43951	//   "response": {
43952	//     "$ref": "Report"
43953	//   },
43954	//   "scopes": [
43955	//     "https://www.googleapis.com/auth/dfareporting"
43956	//   ]
43957	// }
43958
43959}
43960
43961// method id "dfareporting.reports.insert":
43962
43963type ReportsInsertCall struct {
43964	s          *Service
43965	profileId  int64
43966	report     *Report
43967	urlParams_ gensupport.URLParams
43968	ctx_       context.Context
43969	header_    http.Header
43970}
43971
43972// Insert: Creates a report.
43973func (r *ReportsService) Insert(profileId int64, report *Report) *ReportsInsertCall {
43974	c := &ReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43975	c.profileId = profileId
43976	c.report = report
43977	return c
43978}
43979
43980// Fields allows partial responses to be retrieved. See
43981// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43982// for more information.
43983func (c *ReportsInsertCall) Fields(s ...googleapi.Field) *ReportsInsertCall {
43984	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43985	return c
43986}
43987
43988// Context sets the context to be used in this call's Do method. Any
43989// pending HTTP request will be aborted if the provided context is
43990// canceled.
43991func (c *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
43992	c.ctx_ = ctx
43993	return c
43994}
43995
43996// Header returns an http.Header that can be modified by the caller to
43997// add HTTP headers to the request.
43998func (c *ReportsInsertCall) Header() http.Header {
43999	if c.header_ == nil {
44000		c.header_ = make(http.Header)
44001	}
44002	return c.header_
44003}
44004
44005func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
44006	reqHeaders := make(http.Header)
44007	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
44008	for k, v := range c.header_ {
44009		reqHeaders[k] = v
44010	}
44011	reqHeaders.Set("User-Agent", c.s.userAgent())
44012	var body io.Reader = nil
44013	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44014	if err != nil {
44015		return nil, err
44016	}
44017	reqHeaders.Set("Content-Type", "application/json")
44018	c.urlParams_.Set("alt", alt)
44019	c.urlParams_.Set("prettyPrint", "false")
44020	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
44021	urls += "?" + c.urlParams_.Encode()
44022	req, err := http.NewRequest("POST", urls, body)
44023	if err != nil {
44024		return nil, err
44025	}
44026	req.Header = reqHeaders
44027	googleapi.Expand(req.URL, map[string]string{
44028		"profileId": strconv.FormatInt(c.profileId, 10),
44029	})
44030	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44031}
44032
44033// Do executes the "dfareporting.reports.insert" call.
44034// Exactly one of *Report or error will be non-nil. Any non-2xx status
44035// code is an error. Response headers are in either
44036// *Report.ServerResponse.Header or (if a response was returned at all)
44037// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
44038// check whether the returned error was because http.StatusNotModified
44039// was returned.
44040func (c *ReportsInsertCall) Do(opts ...googleapi.CallOption) (*Report, error) {
44041	gensupport.SetOptions(c.urlParams_, opts...)
44042	res, err := c.doRequest("json")
44043	if res != nil && res.StatusCode == http.StatusNotModified {
44044		if res.Body != nil {
44045			res.Body.Close()
44046		}
44047		return nil, &googleapi.Error{
44048			Code:   res.StatusCode,
44049			Header: res.Header,
44050		}
44051	}
44052	if err != nil {
44053		return nil, err
44054	}
44055	defer googleapi.CloseBody(res)
44056	if err := googleapi.CheckResponse(res); err != nil {
44057		return nil, err
44058	}
44059	ret := &Report{
44060		ServerResponse: googleapi.ServerResponse{
44061			Header:         res.Header,
44062			HTTPStatusCode: res.StatusCode,
44063		},
44064	}
44065	target := &ret
44066	if err := gensupport.DecodeResponse(target, res); err != nil {
44067		return nil, err
44068	}
44069	return ret, nil
44070	// {
44071	//   "description": "Creates a report.",
44072	//   "httpMethod": "POST",
44073	//   "id": "dfareporting.reports.insert",
44074	//   "parameterOrder": [
44075	//     "profileId"
44076	//   ],
44077	//   "parameters": {
44078	//     "profileId": {
44079	//       "description": "The DFA user profile ID.",
44080	//       "format": "int64",
44081	//       "location": "path",
44082	//       "required": true,
44083	//       "type": "string"
44084	//     }
44085	//   },
44086	//   "path": "userprofiles/{profileId}/reports",
44087	//   "request": {
44088	//     "$ref": "Report"
44089	//   },
44090	//   "response": {
44091	//     "$ref": "Report"
44092	//   },
44093	//   "scopes": [
44094	//     "https://www.googleapis.com/auth/dfareporting"
44095	//   ]
44096	// }
44097
44098}
44099
44100// method id "dfareporting.reports.list":
44101
44102type ReportsListCall struct {
44103	s            *Service
44104	profileId    int64
44105	urlParams_   gensupport.URLParams
44106	ifNoneMatch_ string
44107	ctx_         context.Context
44108	header_      http.Header
44109}
44110
44111// List: Retrieves list of reports.
44112func (r *ReportsService) List(profileId int64) *ReportsListCall {
44113	c := &ReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44114	c.profileId = profileId
44115	return c
44116}
44117
44118// MaxResults sets the optional parameter "maxResults": Maximum number
44119// of results to return.
44120func (c *ReportsListCall) MaxResults(maxResults int64) *ReportsListCall {
44121	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
44122	return c
44123}
44124
44125// PageToken sets the optional parameter "pageToken": The value of the
44126// nextToken from the previous result page.
44127func (c *ReportsListCall) PageToken(pageToken string) *ReportsListCall {
44128	c.urlParams_.Set("pageToken", pageToken)
44129	return c
44130}
44131
44132// Scope sets the optional parameter "scope": The scope that defines
44133// which results are returned.
44134//
44135// Possible values:
44136//   "ALL" - All reports in account.
44137//   "MINE" (default) - My reports.
44138func (c *ReportsListCall) Scope(scope string) *ReportsListCall {
44139	c.urlParams_.Set("scope", scope)
44140	return c
44141}
44142
44143// SortField sets the optional parameter "sortField": The field by which
44144// to sort the list.
44145//
44146// Possible values:
44147//   "ID" - Sort by report ID.
44148//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastModifiedTime' field.
44149//   "NAME" - Sort by name of reports.
44150func (c *ReportsListCall) SortField(sortField string) *ReportsListCall {
44151	c.urlParams_.Set("sortField", sortField)
44152	return c
44153}
44154
44155// SortOrder sets the optional parameter "sortOrder": Order of sorted
44156// results.
44157//
44158// Possible values:
44159//   "ASCENDING" - Ascending order.
44160//   "DESCENDING" (default) - Descending order.
44161func (c *ReportsListCall) SortOrder(sortOrder string) *ReportsListCall {
44162	c.urlParams_.Set("sortOrder", sortOrder)
44163	return c
44164}
44165
44166// Fields allows partial responses to be retrieved. See
44167// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44168// for more information.
44169func (c *ReportsListCall) Fields(s ...googleapi.Field) *ReportsListCall {
44170	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44171	return c
44172}
44173
44174// IfNoneMatch sets the optional parameter which makes the operation
44175// fail if the object's ETag matches the given value. This is useful for
44176// getting updates only after the object has changed since the last
44177// request. Use googleapi.IsNotModified to check whether the response
44178// error from Do is the result of In-None-Match.
44179func (c *ReportsListCall) IfNoneMatch(entityTag string) *ReportsListCall {
44180	c.ifNoneMatch_ = entityTag
44181	return c
44182}
44183
44184// Context sets the context to be used in this call's Do method. Any
44185// pending HTTP request will be aborted if the provided context is
44186// canceled.
44187func (c *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
44188	c.ctx_ = ctx
44189	return c
44190}
44191
44192// Header returns an http.Header that can be modified by the caller to
44193// add HTTP headers to the request.
44194func (c *ReportsListCall) Header() http.Header {
44195	if c.header_ == nil {
44196		c.header_ = make(http.Header)
44197	}
44198	return c.header_
44199}
44200
44201func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
44202	reqHeaders := make(http.Header)
44203	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
44204	for k, v := range c.header_ {
44205		reqHeaders[k] = v
44206	}
44207	reqHeaders.Set("User-Agent", c.s.userAgent())
44208	if c.ifNoneMatch_ != "" {
44209		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44210	}
44211	var body io.Reader = nil
44212	c.urlParams_.Set("alt", alt)
44213	c.urlParams_.Set("prettyPrint", "false")
44214	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
44215	urls += "?" + c.urlParams_.Encode()
44216	req, err := http.NewRequest("GET", urls, body)
44217	if err != nil {
44218		return nil, err
44219	}
44220	req.Header = reqHeaders
44221	googleapi.Expand(req.URL, map[string]string{
44222		"profileId": strconv.FormatInt(c.profileId, 10),
44223	})
44224	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44225}
44226
44227// Do executes the "dfareporting.reports.list" call.
44228// Exactly one of *ReportList or error will be non-nil. Any non-2xx
44229// status code is an error. Response headers are in either
44230// *ReportList.ServerResponse.Header or (if a response was returned at
44231// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
44232// to check whether the returned error was because
44233// http.StatusNotModified was returned.
44234func (c *ReportsListCall) Do(opts ...googleapi.CallOption) (*ReportList, error) {
44235	gensupport.SetOptions(c.urlParams_, opts...)
44236	res, err := c.doRequest("json")
44237	if res != nil && res.StatusCode == http.StatusNotModified {
44238		if res.Body != nil {
44239			res.Body.Close()
44240		}
44241		return nil, &googleapi.Error{
44242			Code:   res.StatusCode,
44243			Header: res.Header,
44244		}
44245	}
44246	if err != nil {
44247		return nil, err
44248	}
44249	defer googleapi.CloseBody(res)
44250	if err := googleapi.CheckResponse(res); err != nil {
44251		return nil, err
44252	}
44253	ret := &ReportList{
44254		ServerResponse: googleapi.ServerResponse{
44255			Header:         res.Header,
44256			HTTPStatusCode: res.StatusCode,
44257		},
44258	}
44259	target := &ret
44260	if err := gensupport.DecodeResponse(target, res); err != nil {
44261		return nil, err
44262	}
44263	return ret, nil
44264	// {
44265	//   "description": "Retrieves list of reports.",
44266	//   "httpMethod": "GET",
44267	//   "id": "dfareporting.reports.list",
44268	//   "parameterOrder": [
44269	//     "profileId"
44270	//   ],
44271	//   "parameters": {
44272	//     "maxResults": {
44273	//       "default": "10",
44274	//       "description": "Maximum number of results to return.",
44275	//       "format": "int32",
44276	//       "location": "query",
44277	//       "maximum": "10",
44278	//       "minimum": "0",
44279	//       "type": "integer"
44280	//     },
44281	//     "pageToken": {
44282	//       "description": "The value of the nextToken from the previous result page.",
44283	//       "location": "query",
44284	//       "type": "string"
44285	//     },
44286	//     "profileId": {
44287	//       "description": "The DFA user profile ID.",
44288	//       "format": "int64",
44289	//       "location": "path",
44290	//       "required": true,
44291	//       "type": "string"
44292	//     },
44293	//     "scope": {
44294	//       "default": "MINE",
44295	//       "description": "The scope that defines which results are returned.",
44296	//       "enum": [
44297	//         "ALL",
44298	//         "MINE"
44299	//       ],
44300	//       "enumDescriptions": [
44301	//         "All reports in account.",
44302	//         "My reports."
44303	//       ],
44304	//       "location": "query",
44305	//       "type": "string"
44306	//     },
44307	//     "sortField": {
44308	//       "default": "LAST_MODIFIED_TIME",
44309	//       "description": "The field by which to sort the list.",
44310	//       "enum": [
44311	//         "ID",
44312	//         "LAST_MODIFIED_TIME",
44313	//         "NAME"
44314	//       ],
44315	//       "enumDescriptions": [
44316	//         "Sort by report ID.",
44317	//         "Sort by 'lastModifiedTime' field.",
44318	//         "Sort by name of reports."
44319	//       ],
44320	//       "location": "query",
44321	//       "type": "string"
44322	//     },
44323	//     "sortOrder": {
44324	//       "default": "DESCENDING",
44325	//       "description": "Order of sorted results.",
44326	//       "enum": [
44327	//         "ASCENDING",
44328	//         "DESCENDING"
44329	//       ],
44330	//       "enumDescriptions": [
44331	//         "Ascending order.",
44332	//         "Descending order."
44333	//       ],
44334	//       "location": "query",
44335	//       "type": "string"
44336	//     }
44337	//   },
44338	//   "path": "userprofiles/{profileId}/reports",
44339	//   "response": {
44340	//     "$ref": "ReportList"
44341	//   },
44342	//   "scopes": [
44343	//     "https://www.googleapis.com/auth/dfareporting"
44344	//   ]
44345	// }
44346
44347}
44348
44349// Pages invokes f for each page of results.
44350// A non-nil error returned from f will halt the iteration.
44351// The provided context supersedes any context provided to the Context method.
44352func (c *ReportsListCall) Pages(ctx context.Context, f func(*ReportList) error) error {
44353	c.ctx_ = ctx
44354	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
44355	for {
44356		x, err := c.Do()
44357		if err != nil {
44358			return err
44359		}
44360		if err := f(x); err != nil {
44361			return err
44362		}
44363		if x.NextPageToken == "" {
44364			return nil
44365		}
44366		c.PageToken(x.NextPageToken)
44367	}
44368}
44369
44370// method id "dfareporting.reports.patch":
44371
44372type ReportsPatchCall struct {
44373	s          *Service
44374	profileId  int64
44375	reportId   int64
44376	report     *Report
44377	urlParams_ gensupport.URLParams
44378	ctx_       context.Context
44379	header_    http.Header
44380}
44381
44382// Patch: Updates a report. This method supports patch semantics.
44383func (r *ReportsService) Patch(profileId int64, reportId int64, report *Report) *ReportsPatchCall {
44384	c := &ReportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44385	c.profileId = profileId
44386	c.reportId = reportId
44387	c.report = report
44388	return c
44389}
44390
44391// Fields allows partial responses to be retrieved. See
44392// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44393// for more information.
44394func (c *ReportsPatchCall) Fields(s ...googleapi.Field) *ReportsPatchCall {
44395	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44396	return c
44397}
44398
44399// Context sets the context to be used in this call's Do method. Any
44400// pending HTTP request will be aborted if the provided context is
44401// canceled.
44402func (c *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
44403	c.ctx_ = ctx
44404	return c
44405}
44406
44407// Header returns an http.Header that can be modified by the caller to
44408// add HTTP headers to the request.
44409func (c *ReportsPatchCall) Header() http.Header {
44410	if c.header_ == nil {
44411		c.header_ = make(http.Header)
44412	}
44413	return c.header_
44414}
44415
44416func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
44417	reqHeaders := make(http.Header)
44418	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
44419	for k, v := range c.header_ {
44420		reqHeaders[k] = v
44421	}
44422	reqHeaders.Set("User-Agent", c.s.userAgent())
44423	var body io.Reader = nil
44424	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44425	if err != nil {
44426		return nil, err
44427	}
44428	reqHeaders.Set("Content-Type", "application/json")
44429	c.urlParams_.Set("alt", alt)
44430	c.urlParams_.Set("prettyPrint", "false")
44431	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
44432	urls += "?" + c.urlParams_.Encode()
44433	req, err := http.NewRequest("PATCH", 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.patch" call.
44446// Exactly one of *Report or error will be non-nil. Any non-2xx status
44447// code is an error. Response headers are in either
44448// *Report.ServerResponse.Header or (if a response was returned at all)
44449// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
44450// check whether the returned error was because http.StatusNotModified
44451// was returned.
44452func (c *ReportsPatchCall) Do(opts ...googleapi.CallOption) (*Report, 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 := &Report{
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": "Updates a report. This method supports patch semantics.",
44484	//   "httpMethod": "PATCH",
44485	//   "id": "dfareporting.reports.patch",
44486	//   "parameterOrder": [
44487	//     "profileId",
44488	//     "reportId"
44489	//   ],
44490	//   "parameters": {
44491	//     "profileId": {
44492	//       "description": "The DFA user 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	//   },
44506	//   "path": "userprofiles/{profileId}/reports/{reportId}",
44507	//   "request": {
44508	//     "$ref": "Report"
44509	//   },
44510	//   "response": {
44511	//     "$ref": "Report"
44512	//   },
44513	//   "scopes": [
44514	//     "https://www.googleapis.com/auth/dfareporting"
44515	//   ]
44516	// }
44517
44518}
44519
44520// method id "dfareporting.reports.run":
44521
44522type ReportsRunCall struct {
44523	s          *Service
44524	profileId  int64
44525	reportId   int64
44526	urlParams_ gensupport.URLParams
44527	ctx_       context.Context
44528	header_    http.Header
44529}
44530
44531// Run: Runs a report.
44532func (r *ReportsService) Run(profileId int64, reportId int64) *ReportsRunCall {
44533	c := &ReportsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44534	c.profileId = profileId
44535	c.reportId = reportId
44536	return c
44537}
44538
44539// Synchronous sets the optional parameter "synchronous": If set and
44540// true, tries to run the report synchronously.
44541func (c *ReportsRunCall) Synchronous(synchronous bool) *ReportsRunCall {
44542	c.urlParams_.Set("synchronous", fmt.Sprint(synchronous))
44543	return c
44544}
44545
44546// Fields allows partial responses to be retrieved. See
44547// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44548// for more information.
44549func (c *ReportsRunCall) Fields(s ...googleapi.Field) *ReportsRunCall {
44550	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44551	return c
44552}
44553
44554// Context sets the context to be used in this call's Do method. Any
44555// pending HTTP request will be aborted if the provided context is
44556// canceled.
44557func (c *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
44558	c.ctx_ = ctx
44559	return c
44560}
44561
44562// Header returns an http.Header that can be modified by the caller to
44563// add HTTP headers to the request.
44564func (c *ReportsRunCall) Header() http.Header {
44565	if c.header_ == nil {
44566		c.header_ = make(http.Header)
44567	}
44568	return c.header_
44569}
44570
44571func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
44572	reqHeaders := make(http.Header)
44573	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
44574	for k, v := range c.header_ {
44575		reqHeaders[k] = v
44576	}
44577	reqHeaders.Set("User-Agent", c.s.userAgent())
44578	var body io.Reader = nil
44579	c.urlParams_.Set("alt", alt)
44580	c.urlParams_.Set("prettyPrint", "false")
44581	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/run")
44582	urls += "?" + c.urlParams_.Encode()
44583	req, err := http.NewRequest("POST", urls, body)
44584	if err != nil {
44585		return nil, err
44586	}
44587	req.Header = reqHeaders
44588	googleapi.Expand(req.URL, map[string]string{
44589		"profileId": strconv.FormatInt(c.profileId, 10),
44590		"reportId":  strconv.FormatInt(c.reportId, 10),
44591	})
44592	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44593}
44594
44595// Do executes the "dfareporting.reports.run" call.
44596// Exactly one of *File or error will be non-nil. Any non-2xx status
44597// code is an error. Response headers are in either
44598// *File.ServerResponse.Header or (if a response was returned at all) in
44599// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
44600// whether the returned error was because http.StatusNotModified was
44601// returned.
44602func (c *ReportsRunCall) Do(opts ...googleapi.CallOption) (*File, error) {
44603	gensupport.SetOptions(c.urlParams_, opts...)
44604	res, err := c.doRequest("json")
44605	if res != nil && res.StatusCode == http.StatusNotModified {
44606		if res.Body != nil {
44607			res.Body.Close()
44608		}
44609		return nil, &googleapi.Error{
44610			Code:   res.StatusCode,
44611			Header: res.Header,
44612		}
44613	}
44614	if err != nil {
44615		return nil, err
44616	}
44617	defer googleapi.CloseBody(res)
44618	if err := googleapi.CheckResponse(res); err != nil {
44619		return nil, err
44620	}
44621	ret := &File{
44622		ServerResponse: googleapi.ServerResponse{
44623			Header:         res.Header,
44624			HTTPStatusCode: res.StatusCode,
44625		},
44626	}
44627	target := &ret
44628	if err := gensupport.DecodeResponse(target, res); err != nil {
44629		return nil, err
44630	}
44631	return ret, nil
44632	// {
44633	//   "description": "Runs a report.",
44634	//   "httpMethod": "POST",
44635	//   "id": "dfareporting.reports.run",
44636	//   "parameterOrder": [
44637	//     "profileId",
44638	//     "reportId"
44639	//   ],
44640	//   "parameters": {
44641	//     "profileId": {
44642	//       "description": "The DFA profile ID.",
44643	//       "format": "int64",
44644	//       "location": "path",
44645	//       "required": true,
44646	//       "type": "string"
44647	//     },
44648	//     "reportId": {
44649	//       "description": "The ID of the report.",
44650	//       "format": "int64",
44651	//       "location": "path",
44652	//       "required": true,
44653	//       "type": "string"
44654	//     },
44655	//     "synchronous": {
44656	//       "default": "false",
44657	//       "description": "If set and true, tries to run the report synchronously.",
44658	//       "location": "query",
44659	//       "type": "boolean"
44660	//     }
44661	//   },
44662	//   "path": "userprofiles/{profileId}/reports/{reportId}/run",
44663	//   "response": {
44664	//     "$ref": "File"
44665	//   },
44666	//   "scopes": [
44667	//     "https://www.googleapis.com/auth/dfareporting"
44668	//   ]
44669	// }
44670
44671}
44672
44673// method id "dfareporting.reports.update":
44674
44675type ReportsUpdateCall struct {
44676	s          *Service
44677	profileId  int64
44678	reportId   int64
44679	report     *Report
44680	urlParams_ gensupport.URLParams
44681	ctx_       context.Context
44682	header_    http.Header
44683}
44684
44685// Update: Updates a report.
44686func (r *ReportsService) Update(profileId int64, reportId int64, report *Report) *ReportsUpdateCall {
44687	c := &ReportsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44688	c.profileId = profileId
44689	c.reportId = reportId
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 *ReportsUpdateCall) Fields(s ...googleapi.Field) *ReportsUpdateCall {
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 *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
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 *ReportsUpdateCall) Header() http.Header {
44713	if c.header_ == nil {
44714		c.header_ = make(http.Header)
44715	}
44716	return c.header_
44717}
44718
44719func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
44720	reqHeaders := make(http.Header)
44721	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
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/{reportId}")
44735	urls += "?" + c.urlParams_.Encode()
44736	req, err := http.NewRequest("PUT", 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		"reportId":  strconv.FormatInt(c.reportId, 10),
44744	})
44745	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44746}
44747
44748// Do executes the "dfareporting.reports.update" call.
44749// Exactly one of *Report or error will be non-nil. Any non-2xx status
44750// code is an error. Response headers are in either
44751// *Report.ServerResponse.Header or (if a response was returned at all)
44752// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
44753// check whether the returned error was because http.StatusNotModified
44754// was returned.
44755func (c *ReportsUpdateCall) Do(opts ...googleapi.CallOption) (*Report, error) {
44756	gensupport.SetOptions(c.urlParams_, opts...)
44757	res, err := c.doRequest("json")
44758	if res != nil && res.StatusCode == http.StatusNotModified {
44759		if res.Body != nil {
44760			res.Body.Close()
44761		}
44762		return nil, &googleapi.Error{
44763			Code:   res.StatusCode,
44764			Header: res.Header,
44765		}
44766	}
44767	if err != nil {
44768		return nil, err
44769	}
44770	defer googleapi.CloseBody(res)
44771	if err := googleapi.CheckResponse(res); err != nil {
44772		return nil, err
44773	}
44774	ret := &Report{
44775		ServerResponse: googleapi.ServerResponse{
44776			Header:         res.Header,
44777			HTTPStatusCode: res.StatusCode,
44778		},
44779	}
44780	target := &ret
44781	if err := gensupport.DecodeResponse(target, res); err != nil {
44782		return nil, err
44783	}
44784	return ret, nil
44785	// {
44786	//   "description": "Updates a report.",
44787	//   "httpMethod": "PUT",
44788	//   "id": "dfareporting.reports.update",
44789	//   "parameterOrder": [
44790	//     "profileId",
44791	//     "reportId"
44792	//   ],
44793	//   "parameters": {
44794	//     "profileId": {
44795	//       "description": "The DFA user profile ID.",
44796	//       "format": "int64",
44797	//       "location": "path",
44798	//       "required": true,
44799	//       "type": "string"
44800	//     },
44801	//     "reportId": {
44802	//       "description": "The ID of the report.",
44803	//       "format": "int64",
44804	//       "location": "path",
44805	//       "required": true,
44806	//       "type": "string"
44807	//     }
44808	//   },
44809	//   "path": "userprofiles/{profileId}/reports/{reportId}",
44810	//   "request": {
44811	//     "$ref": "Report"
44812	//   },
44813	//   "response": {
44814	//     "$ref": "Report"
44815	//   },
44816	//   "scopes": [
44817	//     "https://www.googleapis.com/auth/dfareporting"
44818	//   ]
44819	// }
44820
44821}
44822
44823// method id "dfareporting.reports.compatibleFields.query":
44824
44825type ReportsCompatibleFieldsQueryCall struct {
44826	s          *Service
44827	profileId  int64
44828	report     *Report
44829	urlParams_ gensupport.URLParams
44830	ctx_       context.Context
44831	header_    http.Header
44832}
44833
44834// Query: Returns the fields that are compatible to be selected in the
44835// respective sections of a report criteria, given the fields already
44836// selected in the input report and user permissions.
44837func (r *ReportsCompatibleFieldsService) Query(profileId int64, report *Report) *ReportsCompatibleFieldsQueryCall {
44838	c := &ReportsCompatibleFieldsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44839	c.profileId = profileId
44840	c.report = report
44841	return c
44842}
44843
44844// Fields allows partial responses to be retrieved. See
44845// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44846// for more information.
44847func (c *ReportsCompatibleFieldsQueryCall) Fields(s ...googleapi.Field) *ReportsCompatibleFieldsQueryCall {
44848	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44849	return c
44850}
44851
44852// Context sets the context to be used in this call's Do method. Any
44853// pending HTTP request will be aborted if the provided context is
44854// canceled.
44855func (c *ReportsCompatibleFieldsQueryCall) Context(ctx context.Context) *ReportsCompatibleFieldsQueryCall {
44856	c.ctx_ = ctx
44857	return c
44858}
44859
44860// Header returns an http.Header that can be modified by the caller to
44861// add HTTP headers to the request.
44862func (c *ReportsCompatibleFieldsQueryCall) Header() http.Header {
44863	if c.header_ == nil {
44864		c.header_ = make(http.Header)
44865	}
44866	return c.header_
44867}
44868
44869func (c *ReportsCompatibleFieldsQueryCall) doRequest(alt string) (*http.Response, error) {
44870	reqHeaders := make(http.Header)
44871	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
44872	for k, v := range c.header_ {
44873		reqHeaders[k] = v
44874	}
44875	reqHeaders.Set("User-Agent", c.s.userAgent())
44876	var body io.Reader = nil
44877	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44878	if err != nil {
44879		return nil, err
44880	}
44881	reqHeaders.Set("Content-Type", "application/json")
44882	c.urlParams_.Set("alt", alt)
44883	c.urlParams_.Set("prettyPrint", "false")
44884	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/compatiblefields/query")
44885	urls += "?" + c.urlParams_.Encode()
44886	req, err := http.NewRequest("POST", 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	})
44894	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44895}
44896
44897// Do executes the "dfareporting.reports.compatibleFields.query" call.
44898// Exactly one of *CompatibleFields or error will be non-nil. Any
44899// non-2xx status code is an error. Response headers are in either
44900// *CompatibleFields.ServerResponse.Header or (if a response was
44901// returned at all) in error.(*googleapi.Error).Header. Use
44902// googleapi.IsNotModified to check whether the returned error was
44903// because http.StatusNotModified was returned.
44904func (c *ReportsCompatibleFieldsQueryCall) Do(opts ...googleapi.CallOption) (*CompatibleFields, error) {
44905	gensupport.SetOptions(c.urlParams_, opts...)
44906	res, err := c.doRequest("json")
44907	if res != nil && res.StatusCode == http.StatusNotModified {
44908		if res.Body != nil {
44909			res.Body.Close()
44910		}
44911		return nil, &googleapi.Error{
44912			Code:   res.StatusCode,
44913			Header: res.Header,
44914		}
44915	}
44916	if err != nil {
44917		return nil, err
44918	}
44919	defer googleapi.CloseBody(res)
44920	if err := googleapi.CheckResponse(res); err != nil {
44921		return nil, err
44922	}
44923	ret := &CompatibleFields{
44924		ServerResponse: googleapi.ServerResponse{
44925			Header:         res.Header,
44926			HTTPStatusCode: res.StatusCode,
44927		},
44928	}
44929	target := &ret
44930	if err := gensupport.DecodeResponse(target, res); err != nil {
44931		return nil, err
44932	}
44933	return ret, nil
44934	// {
44935	//   "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.",
44936	//   "httpMethod": "POST",
44937	//   "id": "dfareporting.reports.compatibleFields.query",
44938	//   "parameterOrder": [
44939	//     "profileId"
44940	//   ],
44941	//   "parameters": {
44942	//     "profileId": {
44943	//       "description": "The DFA user profile ID.",
44944	//       "format": "int64",
44945	//       "location": "path",
44946	//       "required": true,
44947	//       "type": "string"
44948	//     }
44949	//   },
44950	//   "path": "userprofiles/{profileId}/reports/compatiblefields/query",
44951	//   "request": {
44952	//     "$ref": "Report"
44953	//   },
44954	//   "response": {
44955	//     "$ref": "CompatibleFields"
44956	//   },
44957	//   "scopes": [
44958	//     "https://www.googleapis.com/auth/dfareporting"
44959	//   ]
44960	// }
44961
44962}
44963
44964// method id "dfareporting.reports.files.get":
44965
44966type ReportsFilesGetCall struct {
44967	s            *Service
44968	profileId    int64
44969	reportId     int64
44970	fileId       int64
44971	urlParams_   gensupport.URLParams
44972	ifNoneMatch_ string
44973	ctx_         context.Context
44974	header_      http.Header
44975}
44976
44977// Get: Retrieves a report file. This method supports media download.
44978func (r *ReportsFilesService) Get(profileId int64, reportId int64, fileId int64) *ReportsFilesGetCall {
44979	c := &ReportsFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44980	c.profileId = profileId
44981	c.reportId = reportId
44982	c.fileId = fileId
44983	return c
44984}
44985
44986// Fields allows partial responses to be retrieved. See
44987// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44988// for more information.
44989func (c *ReportsFilesGetCall) Fields(s ...googleapi.Field) *ReportsFilesGetCall {
44990	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44991	return c
44992}
44993
44994// IfNoneMatch sets the optional parameter which makes the operation
44995// fail if the object's ETag matches the given value. This is useful for
44996// getting updates only after the object has changed since the last
44997// request. Use googleapi.IsNotModified to check whether the response
44998// error from Do is the result of In-None-Match.
44999func (c *ReportsFilesGetCall) IfNoneMatch(entityTag string) *ReportsFilesGetCall {
45000	c.ifNoneMatch_ = entityTag
45001	return c
45002}
45003
45004// Context sets the context to be used in this call's Do and Download
45005// methods. Any pending HTTP request will be aborted if the provided
45006// context is canceled.
45007func (c *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
45008	c.ctx_ = ctx
45009	return c
45010}
45011
45012// Header returns an http.Header that can be modified by the caller to
45013// add HTTP headers to the request.
45014func (c *ReportsFilesGetCall) Header() http.Header {
45015	if c.header_ == nil {
45016		c.header_ = make(http.Header)
45017	}
45018	return c.header_
45019}
45020
45021func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
45022	reqHeaders := make(http.Header)
45023	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
45024	for k, v := range c.header_ {
45025		reqHeaders[k] = v
45026	}
45027	reqHeaders.Set("User-Agent", c.s.userAgent())
45028	if c.ifNoneMatch_ != "" {
45029		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45030	}
45031	var body io.Reader = nil
45032	c.urlParams_.Set("alt", alt)
45033	c.urlParams_.Set("prettyPrint", "false")
45034	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files/{fileId}")
45035	urls += "?" + c.urlParams_.Encode()
45036	req, err := http.NewRequest("GET", urls, body)
45037	if err != nil {
45038		return nil, err
45039	}
45040	req.Header = reqHeaders
45041	googleapi.Expand(req.URL, map[string]string{
45042		"profileId": strconv.FormatInt(c.profileId, 10),
45043		"reportId":  strconv.FormatInt(c.reportId, 10),
45044		"fileId":    strconv.FormatInt(c.fileId, 10),
45045	})
45046	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45047}
45048
45049// Download fetches the API endpoint's "media" value, instead of the normal
45050// API response value. If the returned error is nil, the Response is guaranteed to
45051// have a 2xx status code. Callers must close the Response.Body as usual.
45052func (c *ReportsFilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
45053	gensupport.SetOptions(c.urlParams_, opts...)
45054	res, err := c.doRequest("media")
45055	if err != nil {
45056		return nil, err
45057	}
45058	if err := googleapi.CheckMediaResponse(res); err != nil {
45059		res.Body.Close()
45060		return nil, err
45061	}
45062	return res, nil
45063}
45064
45065// Do executes the "dfareporting.reports.files.get" call.
45066// Exactly one of *File or error will be non-nil. Any non-2xx status
45067// code is an error. Response headers are in either
45068// *File.ServerResponse.Header or (if a response was returned at all) in
45069// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45070// whether the returned error was because http.StatusNotModified was
45071// returned.
45072func (c *ReportsFilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
45073	gensupport.SetOptions(c.urlParams_, opts...)
45074	res, err := c.doRequest("json")
45075	if res != nil && res.StatusCode == http.StatusNotModified {
45076		if res.Body != nil {
45077			res.Body.Close()
45078		}
45079		return nil, &googleapi.Error{
45080			Code:   res.StatusCode,
45081			Header: res.Header,
45082		}
45083	}
45084	if err != nil {
45085		return nil, err
45086	}
45087	defer googleapi.CloseBody(res)
45088	if err := googleapi.CheckResponse(res); err != nil {
45089		return nil, err
45090	}
45091	ret := &File{
45092		ServerResponse: googleapi.ServerResponse{
45093			Header:         res.Header,
45094			HTTPStatusCode: res.StatusCode,
45095		},
45096	}
45097	target := &ret
45098	if err := gensupport.DecodeResponse(target, res); err != nil {
45099		return nil, err
45100	}
45101	return ret, nil
45102	// {
45103	//   "description": "Retrieves a report file. This method supports media download.",
45104	//   "httpMethod": "GET",
45105	//   "id": "dfareporting.reports.files.get",
45106	//   "parameterOrder": [
45107	//     "profileId",
45108	//     "reportId",
45109	//     "fileId"
45110	//   ],
45111	//   "parameters": {
45112	//     "fileId": {
45113	//       "description": "The ID of the report file.",
45114	//       "format": "int64",
45115	//       "location": "path",
45116	//       "required": true,
45117	//       "type": "string"
45118	//     },
45119	//     "profileId": {
45120	//       "description": "The DFA profile ID.",
45121	//       "format": "int64",
45122	//       "location": "path",
45123	//       "required": true,
45124	//       "type": "string"
45125	//     },
45126	//     "reportId": {
45127	//       "description": "The ID of the report.",
45128	//       "format": "int64",
45129	//       "location": "path",
45130	//       "required": true,
45131	//       "type": "string"
45132	//     }
45133	//   },
45134	//   "path": "userprofiles/{profileId}/reports/{reportId}/files/{fileId}",
45135	//   "response": {
45136	//     "$ref": "File"
45137	//   },
45138	//   "scopes": [
45139	//     "https://www.googleapis.com/auth/dfareporting"
45140	//   ],
45141	//   "supportsMediaDownload": true
45142	// }
45143
45144}
45145
45146// method id "dfareporting.reports.files.list":
45147
45148type ReportsFilesListCall struct {
45149	s            *Service
45150	profileId    int64
45151	reportId     int64
45152	urlParams_   gensupport.URLParams
45153	ifNoneMatch_ string
45154	ctx_         context.Context
45155	header_      http.Header
45156}
45157
45158// List: Lists files for a report.
45159func (r *ReportsFilesService) List(profileId int64, reportId int64) *ReportsFilesListCall {
45160	c := &ReportsFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45161	c.profileId = profileId
45162	c.reportId = reportId
45163	return c
45164}
45165
45166// MaxResults sets the optional parameter "maxResults": Maximum number
45167// of results to return.
45168func (c *ReportsFilesListCall) MaxResults(maxResults int64) *ReportsFilesListCall {
45169	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
45170	return c
45171}
45172
45173// PageToken sets the optional parameter "pageToken": The value of the
45174// nextToken from the previous result page.
45175func (c *ReportsFilesListCall) PageToken(pageToken string) *ReportsFilesListCall {
45176	c.urlParams_.Set("pageToken", pageToken)
45177	return c
45178}
45179
45180// SortField sets the optional parameter "sortField": The field by which
45181// to sort the list.
45182//
45183// Possible values:
45184//   "ID" - Sort by file ID.
45185//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastmodifiedAt' field.
45186func (c *ReportsFilesListCall) SortField(sortField string) *ReportsFilesListCall {
45187	c.urlParams_.Set("sortField", sortField)
45188	return c
45189}
45190
45191// SortOrder sets the optional parameter "sortOrder": Order of sorted
45192// results.
45193//
45194// Possible values:
45195//   "ASCENDING" - Ascending order.
45196//   "DESCENDING" (default) - Descending order.
45197func (c *ReportsFilesListCall) SortOrder(sortOrder string) *ReportsFilesListCall {
45198	c.urlParams_.Set("sortOrder", sortOrder)
45199	return c
45200}
45201
45202// Fields allows partial responses to be retrieved. See
45203// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45204// for more information.
45205func (c *ReportsFilesListCall) Fields(s ...googleapi.Field) *ReportsFilesListCall {
45206	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45207	return c
45208}
45209
45210// IfNoneMatch sets the optional parameter which makes the operation
45211// fail if the object's ETag matches the given value. This is useful for
45212// getting updates only after the object has changed since the last
45213// request. Use googleapi.IsNotModified to check whether the response
45214// error from Do is the result of In-None-Match.
45215func (c *ReportsFilesListCall) IfNoneMatch(entityTag string) *ReportsFilesListCall {
45216	c.ifNoneMatch_ = entityTag
45217	return c
45218}
45219
45220// Context sets the context to be used in this call's Do method. Any
45221// pending HTTP request will be aborted if the provided context is
45222// canceled.
45223func (c *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
45224	c.ctx_ = ctx
45225	return c
45226}
45227
45228// Header returns an http.Header that can be modified by the caller to
45229// add HTTP headers to the request.
45230func (c *ReportsFilesListCall) Header() http.Header {
45231	if c.header_ == nil {
45232		c.header_ = make(http.Header)
45233	}
45234	return c.header_
45235}
45236
45237func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
45238	reqHeaders := make(http.Header)
45239	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
45240	for k, v := range c.header_ {
45241		reqHeaders[k] = v
45242	}
45243	reqHeaders.Set("User-Agent", c.s.userAgent())
45244	if c.ifNoneMatch_ != "" {
45245		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45246	}
45247	var body io.Reader = nil
45248	c.urlParams_.Set("alt", alt)
45249	c.urlParams_.Set("prettyPrint", "false")
45250	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files")
45251	urls += "?" + c.urlParams_.Encode()
45252	req, err := http.NewRequest("GET", urls, body)
45253	if err != nil {
45254		return nil, err
45255	}
45256	req.Header = reqHeaders
45257	googleapi.Expand(req.URL, map[string]string{
45258		"profileId": strconv.FormatInt(c.profileId, 10),
45259		"reportId":  strconv.FormatInt(c.reportId, 10),
45260	})
45261	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45262}
45263
45264// Do executes the "dfareporting.reports.files.list" call.
45265// Exactly one of *FileList or error will be non-nil. Any non-2xx status
45266// code is an error. Response headers are in either
45267// *FileList.ServerResponse.Header or (if a response was returned at
45268// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
45269// to check whether the returned error was because
45270// http.StatusNotModified was returned.
45271func (c *ReportsFilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
45272	gensupport.SetOptions(c.urlParams_, opts...)
45273	res, err := c.doRequest("json")
45274	if res != nil && res.StatusCode == http.StatusNotModified {
45275		if res.Body != nil {
45276			res.Body.Close()
45277		}
45278		return nil, &googleapi.Error{
45279			Code:   res.StatusCode,
45280			Header: res.Header,
45281		}
45282	}
45283	if err != nil {
45284		return nil, err
45285	}
45286	defer googleapi.CloseBody(res)
45287	if err := googleapi.CheckResponse(res); err != nil {
45288		return nil, err
45289	}
45290	ret := &FileList{
45291		ServerResponse: googleapi.ServerResponse{
45292			Header:         res.Header,
45293			HTTPStatusCode: res.StatusCode,
45294		},
45295	}
45296	target := &ret
45297	if err := gensupport.DecodeResponse(target, res); err != nil {
45298		return nil, err
45299	}
45300	return ret, nil
45301	// {
45302	//   "description": "Lists files for a report.",
45303	//   "httpMethod": "GET",
45304	//   "id": "dfareporting.reports.files.list",
45305	//   "parameterOrder": [
45306	//     "profileId",
45307	//     "reportId"
45308	//   ],
45309	//   "parameters": {
45310	//     "maxResults": {
45311	//       "default": "10",
45312	//       "description": "Maximum number of results to return.",
45313	//       "format": "int32",
45314	//       "location": "query",
45315	//       "maximum": "10",
45316	//       "minimum": "0",
45317	//       "type": "integer"
45318	//     },
45319	//     "pageToken": {
45320	//       "description": "The value of the nextToken from the previous result page.",
45321	//       "location": "query",
45322	//       "type": "string"
45323	//     },
45324	//     "profileId": {
45325	//       "description": "The DFA profile ID.",
45326	//       "format": "int64",
45327	//       "location": "path",
45328	//       "required": true,
45329	//       "type": "string"
45330	//     },
45331	//     "reportId": {
45332	//       "description": "The ID of the parent report.",
45333	//       "format": "int64",
45334	//       "location": "path",
45335	//       "required": true,
45336	//       "type": "string"
45337	//     },
45338	//     "sortField": {
45339	//       "default": "LAST_MODIFIED_TIME",
45340	//       "description": "The field by which to sort the list.",
45341	//       "enum": [
45342	//         "ID",
45343	//         "LAST_MODIFIED_TIME"
45344	//       ],
45345	//       "enumDescriptions": [
45346	//         "Sort by file ID.",
45347	//         "Sort by 'lastmodifiedAt' field."
45348	//       ],
45349	//       "location": "query",
45350	//       "type": "string"
45351	//     },
45352	//     "sortOrder": {
45353	//       "default": "DESCENDING",
45354	//       "description": "Order of sorted results.",
45355	//       "enum": [
45356	//         "ASCENDING",
45357	//         "DESCENDING"
45358	//       ],
45359	//       "enumDescriptions": [
45360	//         "Ascending order.",
45361	//         "Descending order."
45362	//       ],
45363	//       "location": "query",
45364	//       "type": "string"
45365	//     }
45366	//   },
45367	//   "path": "userprofiles/{profileId}/reports/{reportId}/files",
45368	//   "response": {
45369	//     "$ref": "FileList"
45370	//   },
45371	//   "scopes": [
45372	//     "https://www.googleapis.com/auth/dfareporting"
45373	//   ]
45374	// }
45375
45376}
45377
45378// Pages invokes f for each page of results.
45379// A non-nil error returned from f will halt the iteration.
45380// The provided context supersedes any context provided to the Context method.
45381func (c *ReportsFilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
45382	c.ctx_ = ctx
45383	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45384	for {
45385		x, err := c.Do()
45386		if err != nil {
45387			return err
45388		}
45389		if err := f(x); err != nil {
45390			return err
45391		}
45392		if x.NextPageToken == "" {
45393			return nil
45394		}
45395		c.PageToken(x.NextPageToken)
45396	}
45397}
45398
45399// method id "dfareporting.sites.get":
45400
45401type SitesGetCall struct {
45402	s            *Service
45403	profileId    int64
45404	id           int64
45405	urlParams_   gensupport.URLParams
45406	ifNoneMatch_ string
45407	ctx_         context.Context
45408	header_      http.Header
45409}
45410
45411// Get: Gets one site by ID.
45412func (r *SitesService) Get(profileId int64, id int64) *SitesGetCall {
45413	c := &SitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45414	c.profileId = profileId
45415	c.id = id
45416	return c
45417}
45418
45419// Fields allows partial responses to be retrieved. See
45420// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45421// for more information.
45422func (c *SitesGetCall) Fields(s ...googleapi.Field) *SitesGetCall {
45423	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45424	return c
45425}
45426
45427// IfNoneMatch sets the optional parameter which makes the operation
45428// fail if the object's ETag matches the given value. This is useful for
45429// getting updates only after the object has changed since the last
45430// request. Use googleapi.IsNotModified to check whether the response
45431// error from Do is the result of In-None-Match.
45432func (c *SitesGetCall) IfNoneMatch(entityTag string) *SitesGetCall {
45433	c.ifNoneMatch_ = entityTag
45434	return c
45435}
45436
45437// Context sets the context to be used in this call's Do method. Any
45438// pending HTTP request will be aborted if the provided context is
45439// canceled.
45440func (c *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
45441	c.ctx_ = ctx
45442	return c
45443}
45444
45445// Header returns an http.Header that can be modified by the caller to
45446// add HTTP headers to the request.
45447func (c *SitesGetCall) Header() http.Header {
45448	if c.header_ == nil {
45449		c.header_ = make(http.Header)
45450	}
45451	return c.header_
45452}
45453
45454func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
45455	reqHeaders := make(http.Header)
45456	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
45457	for k, v := range c.header_ {
45458		reqHeaders[k] = v
45459	}
45460	reqHeaders.Set("User-Agent", c.s.userAgent())
45461	if c.ifNoneMatch_ != "" {
45462		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45463	}
45464	var body io.Reader = nil
45465	c.urlParams_.Set("alt", alt)
45466	c.urlParams_.Set("prettyPrint", "false")
45467	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites/{id}")
45468	urls += "?" + c.urlParams_.Encode()
45469	req, err := http.NewRequest("GET", urls, body)
45470	if err != nil {
45471		return nil, err
45472	}
45473	req.Header = reqHeaders
45474	googleapi.Expand(req.URL, map[string]string{
45475		"profileId": strconv.FormatInt(c.profileId, 10),
45476		"id":        strconv.FormatInt(c.id, 10),
45477	})
45478	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45479}
45480
45481// Do executes the "dfareporting.sites.get" call.
45482// Exactly one of *Site or error will be non-nil. Any non-2xx status
45483// code is an error. Response headers are in either
45484// *Site.ServerResponse.Header or (if a response was returned at all) in
45485// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45486// whether the returned error was because http.StatusNotModified was
45487// returned.
45488func (c *SitesGetCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45489	gensupport.SetOptions(c.urlParams_, opts...)
45490	res, err := c.doRequest("json")
45491	if res != nil && res.StatusCode == http.StatusNotModified {
45492		if res.Body != nil {
45493			res.Body.Close()
45494		}
45495		return nil, &googleapi.Error{
45496			Code:   res.StatusCode,
45497			Header: res.Header,
45498		}
45499	}
45500	if err != nil {
45501		return nil, err
45502	}
45503	defer googleapi.CloseBody(res)
45504	if err := googleapi.CheckResponse(res); err != nil {
45505		return nil, err
45506	}
45507	ret := &Site{
45508		ServerResponse: googleapi.ServerResponse{
45509			Header:         res.Header,
45510			HTTPStatusCode: res.StatusCode,
45511		},
45512	}
45513	target := &ret
45514	if err := gensupport.DecodeResponse(target, res); err != nil {
45515		return nil, err
45516	}
45517	return ret, nil
45518	// {
45519	//   "description": "Gets one site by ID.",
45520	//   "httpMethod": "GET",
45521	//   "id": "dfareporting.sites.get",
45522	//   "parameterOrder": [
45523	//     "profileId",
45524	//     "id"
45525	//   ],
45526	//   "parameters": {
45527	//     "id": {
45528	//       "description": "Site ID.",
45529	//       "format": "int64",
45530	//       "location": "path",
45531	//       "required": true,
45532	//       "type": "string"
45533	//     },
45534	//     "profileId": {
45535	//       "description": "User profile ID associated with this request.",
45536	//       "format": "int64",
45537	//       "location": "path",
45538	//       "required": true,
45539	//       "type": "string"
45540	//     }
45541	//   },
45542	//   "path": "userprofiles/{profileId}/sites/{id}",
45543	//   "response": {
45544	//     "$ref": "Site"
45545	//   },
45546	//   "scopes": [
45547	//     "https://www.googleapis.com/auth/dfatrafficking"
45548	//   ]
45549	// }
45550
45551}
45552
45553// method id "dfareporting.sites.insert":
45554
45555type SitesInsertCall struct {
45556	s          *Service
45557	profileId  int64
45558	site       *Site
45559	urlParams_ gensupport.URLParams
45560	ctx_       context.Context
45561	header_    http.Header
45562}
45563
45564// Insert: Inserts a new site.
45565func (r *SitesService) Insert(profileId int64, site *Site) *SitesInsertCall {
45566	c := &SitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45567	c.profileId = profileId
45568	c.site = site
45569	return c
45570}
45571
45572// Fields allows partial responses to be retrieved. See
45573// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45574// for more information.
45575func (c *SitesInsertCall) Fields(s ...googleapi.Field) *SitesInsertCall {
45576	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45577	return c
45578}
45579
45580// Context sets the context to be used in this call's Do method. Any
45581// pending HTTP request will be aborted if the provided context is
45582// canceled.
45583func (c *SitesInsertCall) Context(ctx context.Context) *SitesInsertCall {
45584	c.ctx_ = ctx
45585	return c
45586}
45587
45588// Header returns an http.Header that can be modified by the caller to
45589// add HTTP headers to the request.
45590func (c *SitesInsertCall) Header() http.Header {
45591	if c.header_ == nil {
45592		c.header_ = make(http.Header)
45593	}
45594	return c.header_
45595}
45596
45597func (c *SitesInsertCall) doRequest(alt string) (*http.Response, error) {
45598	reqHeaders := make(http.Header)
45599	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
45600	for k, v := range c.header_ {
45601		reqHeaders[k] = v
45602	}
45603	reqHeaders.Set("User-Agent", c.s.userAgent())
45604	var body io.Reader = nil
45605	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
45606	if err != nil {
45607		return nil, err
45608	}
45609	reqHeaders.Set("Content-Type", "application/json")
45610	c.urlParams_.Set("alt", alt)
45611	c.urlParams_.Set("prettyPrint", "false")
45612	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45613	urls += "?" + c.urlParams_.Encode()
45614	req, err := http.NewRequest("POST", urls, body)
45615	if err != nil {
45616		return nil, err
45617	}
45618	req.Header = reqHeaders
45619	googleapi.Expand(req.URL, map[string]string{
45620		"profileId": strconv.FormatInt(c.profileId, 10),
45621	})
45622	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45623}
45624
45625// Do executes the "dfareporting.sites.insert" call.
45626// Exactly one of *Site or error will be non-nil. Any non-2xx status
45627// code is an error. Response headers are in either
45628// *Site.ServerResponse.Header or (if a response was returned at all) in
45629// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45630// whether the returned error was because http.StatusNotModified was
45631// returned.
45632func (c *SitesInsertCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45633	gensupport.SetOptions(c.urlParams_, opts...)
45634	res, err := c.doRequest("json")
45635	if res != nil && res.StatusCode == http.StatusNotModified {
45636		if res.Body != nil {
45637			res.Body.Close()
45638		}
45639		return nil, &googleapi.Error{
45640			Code:   res.StatusCode,
45641			Header: res.Header,
45642		}
45643	}
45644	if err != nil {
45645		return nil, err
45646	}
45647	defer googleapi.CloseBody(res)
45648	if err := googleapi.CheckResponse(res); err != nil {
45649		return nil, err
45650	}
45651	ret := &Site{
45652		ServerResponse: googleapi.ServerResponse{
45653			Header:         res.Header,
45654			HTTPStatusCode: res.StatusCode,
45655		},
45656	}
45657	target := &ret
45658	if err := gensupport.DecodeResponse(target, res); err != nil {
45659		return nil, err
45660	}
45661	return ret, nil
45662	// {
45663	//   "description": "Inserts a new site.",
45664	//   "httpMethod": "POST",
45665	//   "id": "dfareporting.sites.insert",
45666	//   "parameterOrder": [
45667	//     "profileId"
45668	//   ],
45669	//   "parameters": {
45670	//     "profileId": {
45671	//       "description": "User profile ID associated with this request.",
45672	//       "format": "int64",
45673	//       "location": "path",
45674	//       "required": true,
45675	//       "type": "string"
45676	//     }
45677	//   },
45678	//   "path": "userprofiles/{profileId}/sites",
45679	//   "request": {
45680	//     "$ref": "Site"
45681	//   },
45682	//   "response": {
45683	//     "$ref": "Site"
45684	//   },
45685	//   "scopes": [
45686	//     "https://www.googleapis.com/auth/dfatrafficking"
45687	//   ]
45688	// }
45689
45690}
45691
45692// method id "dfareporting.sites.list":
45693
45694type SitesListCall struct {
45695	s            *Service
45696	profileId    int64
45697	urlParams_   gensupport.URLParams
45698	ifNoneMatch_ string
45699	ctx_         context.Context
45700	header_      http.Header
45701}
45702
45703// List: Retrieves a list of sites, possibly filtered. This method
45704// supports paging.
45705func (r *SitesService) List(profileId int64) *SitesListCall {
45706	c := &SitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45707	c.profileId = profileId
45708	return c
45709}
45710
45711// AcceptsInStreamVideoPlacements sets the optional parameter
45712// "acceptsInStreamVideoPlacements": This search filter is no longer
45713// supported and will have no effect on the results returned.
45714func (c *SitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *SitesListCall {
45715	c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
45716	return c
45717}
45718
45719// AcceptsInterstitialPlacements sets the optional parameter
45720// "acceptsInterstitialPlacements": This search filter is no longer
45721// supported and will have no effect on the results returned.
45722func (c *SitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *SitesListCall {
45723	c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
45724	return c
45725}
45726
45727// AcceptsPublisherPaidPlacements sets the optional parameter
45728// "acceptsPublisherPaidPlacements": Select only sites that accept
45729// publisher paid placements.
45730func (c *SitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *SitesListCall {
45731	c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
45732	return c
45733}
45734
45735// AdWordsSite sets the optional parameter "adWordsSite": Select only
45736// AdWords sites.
45737func (c *SitesListCall) AdWordsSite(adWordsSite bool) *SitesListCall {
45738	c.urlParams_.Set("adWordsSite", fmt.Sprint(adWordsSite))
45739	return c
45740}
45741
45742// Approved sets the optional parameter "approved": Select only approved
45743// sites.
45744func (c *SitesListCall) Approved(approved bool) *SitesListCall {
45745	c.urlParams_.Set("approved", fmt.Sprint(approved))
45746	return c
45747}
45748
45749// CampaignIds sets the optional parameter "campaignIds": Select only
45750// sites with these campaign IDs.
45751func (c *SitesListCall) CampaignIds(campaignIds ...int64) *SitesListCall {
45752	var campaignIds_ []string
45753	for _, v := range campaignIds {
45754		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
45755	}
45756	c.urlParams_.SetMulti("campaignIds", campaignIds_)
45757	return c
45758}
45759
45760// DirectorySiteIds sets the optional parameter "directorySiteIds":
45761// Select only sites with these directory site IDs.
45762func (c *SitesListCall) DirectorySiteIds(directorySiteIds ...int64) *SitesListCall {
45763	var directorySiteIds_ []string
45764	for _, v := range directorySiteIds {
45765		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
45766	}
45767	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
45768	return c
45769}
45770
45771// Ids sets the optional parameter "ids": Select only sites with these
45772// IDs.
45773func (c *SitesListCall) Ids(ids ...int64) *SitesListCall {
45774	var ids_ []string
45775	for _, v := range ids {
45776		ids_ = append(ids_, fmt.Sprint(v))
45777	}
45778	c.urlParams_.SetMulti("ids", ids_)
45779	return c
45780}
45781
45782// MaxResults sets the optional parameter "maxResults": Maximum number
45783// of results to return.
45784func (c *SitesListCall) MaxResults(maxResults int64) *SitesListCall {
45785	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
45786	return c
45787}
45788
45789// PageToken sets the optional parameter "pageToken": Value of the
45790// nextPageToken from the previous result page.
45791func (c *SitesListCall) PageToken(pageToken string) *SitesListCall {
45792	c.urlParams_.Set("pageToken", pageToken)
45793	return c
45794}
45795
45796// SearchString sets the optional parameter "searchString": Allows
45797// searching for objects by name, ID or keyName. Wildcards (*) are
45798// allowed. For example, "site*2015" will return objects with names like
45799// "site June 2015", "site April 2015", or simply "site 2015". Most of
45800// the searches also add wildcards implicitly at the start and the end
45801// of the search string. For example, a search string of "site" will
45802// match objects with name "my site", "site 2015", or simply "site".
45803func (c *SitesListCall) SearchString(searchString string) *SitesListCall {
45804	c.urlParams_.Set("searchString", searchString)
45805	return c
45806}
45807
45808// SortField sets the optional parameter "sortField": Field by which to
45809// sort the list.
45810//
45811// Possible values:
45812//   "ID" (default)
45813//   "NAME"
45814func (c *SitesListCall) SortField(sortField string) *SitesListCall {
45815	c.urlParams_.Set("sortField", sortField)
45816	return c
45817}
45818
45819// SortOrder sets the optional parameter "sortOrder": Order of sorted
45820// results.
45821//
45822// Possible values:
45823//   "ASCENDING" (default)
45824//   "DESCENDING"
45825func (c *SitesListCall) SortOrder(sortOrder string) *SitesListCall {
45826	c.urlParams_.Set("sortOrder", sortOrder)
45827	return c
45828}
45829
45830// SubaccountId sets the optional parameter "subaccountId": Select only
45831// sites with this subaccount ID.
45832func (c *SitesListCall) SubaccountId(subaccountId int64) *SitesListCall {
45833	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
45834	return c
45835}
45836
45837// UnmappedSite sets the optional parameter "unmappedSite": Select only
45838// sites that have not been mapped to a directory site.
45839func (c *SitesListCall) UnmappedSite(unmappedSite bool) *SitesListCall {
45840	c.urlParams_.Set("unmappedSite", fmt.Sprint(unmappedSite))
45841	return c
45842}
45843
45844// Fields allows partial responses to be retrieved. See
45845// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45846// for more information.
45847func (c *SitesListCall) Fields(s ...googleapi.Field) *SitesListCall {
45848	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45849	return c
45850}
45851
45852// IfNoneMatch sets the optional parameter which makes the operation
45853// fail if the object's ETag matches the given value. This is useful for
45854// getting updates only after the object has changed since the last
45855// request. Use googleapi.IsNotModified to check whether the response
45856// error from Do is the result of In-None-Match.
45857func (c *SitesListCall) IfNoneMatch(entityTag string) *SitesListCall {
45858	c.ifNoneMatch_ = entityTag
45859	return c
45860}
45861
45862// Context sets the context to be used in this call's Do method. Any
45863// pending HTTP request will be aborted if the provided context is
45864// canceled.
45865func (c *SitesListCall) Context(ctx context.Context) *SitesListCall {
45866	c.ctx_ = ctx
45867	return c
45868}
45869
45870// Header returns an http.Header that can be modified by the caller to
45871// add HTTP headers to the request.
45872func (c *SitesListCall) Header() http.Header {
45873	if c.header_ == nil {
45874		c.header_ = make(http.Header)
45875	}
45876	return c.header_
45877}
45878
45879func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
45880	reqHeaders := make(http.Header)
45881	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
45882	for k, v := range c.header_ {
45883		reqHeaders[k] = v
45884	}
45885	reqHeaders.Set("User-Agent", c.s.userAgent())
45886	if c.ifNoneMatch_ != "" {
45887		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45888	}
45889	var body io.Reader = nil
45890	c.urlParams_.Set("alt", alt)
45891	c.urlParams_.Set("prettyPrint", "false")
45892	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45893	urls += "?" + c.urlParams_.Encode()
45894	req, err := http.NewRequest("GET", urls, body)
45895	if err != nil {
45896		return nil, err
45897	}
45898	req.Header = reqHeaders
45899	googleapi.Expand(req.URL, map[string]string{
45900		"profileId": strconv.FormatInt(c.profileId, 10),
45901	})
45902	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45903}
45904
45905// Do executes the "dfareporting.sites.list" call.
45906// Exactly one of *SitesListResponse or error will be non-nil. Any
45907// non-2xx status code is an error. Response headers are in either
45908// *SitesListResponse.ServerResponse.Header or (if a response was
45909// returned at all) in error.(*googleapi.Error).Header. Use
45910// googleapi.IsNotModified to check whether the returned error was
45911// because http.StatusNotModified was returned.
45912func (c *SitesListCall) Do(opts ...googleapi.CallOption) (*SitesListResponse, error) {
45913	gensupport.SetOptions(c.urlParams_, opts...)
45914	res, err := c.doRequest("json")
45915	if res != nil && res.StatusCode == http.StatusNotModified {
45916		if res.Body != nil {
45917			res.Body.Close()
45918		}
45919		return nil, &googleapi.Error{
45920			Code:   res.StatusCode,
45921			Header: res.Header,
45922		}
45923	}
45924	if err != nil {
45925		return nil, err
45926	}
45927	defer googleapi.CloseBody(res)
45928	if err := googleapi.CheckResponse(res); err != nil {
45929		return nil, err
45930	}
45931	ret := &SitesListResponse{
45932		ServerResponse: googleapi.ServerResponse{
45933			Header:         res.Header,
45934			HTTPStatusCode: res.StatusCode,
45935		},
45936	}
45937	target := &ret
45938	if err := gensupport.DecodeResponse(target, res); err != nil {
45939		return nil, err
45940	}
45941	return ret, nil
45942	// {
45943	//   "description": "Retrieves a list of sites, possibly filtered. This method supports paging.",
45944	//   "httpMethod": "GET",
45945	//   "id": "dfareporting.sites.list",
45946	//   "parameterOrder": [
45947	//     "profileId"
45948	//   ],
45949	//   "parameters": {
45950	//     "acceptsInStreamVideoPlacements": {
45951	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
45952	//       "location": "query",
45953	//       "type": "boolean"
45954	//     },
45955	//     "acceptsInterstitialPlacements": {
45956	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
45957	//       "location": "query",
45958	//       "type": "boolean"
45959	//     },
45960	//     "acceptsPublisherPaidPlacements": {
45961	//       "description": "Select only sites that accept publisher paid placements.",
45962	//       "location": "query",
45963	//       "type": "boolean"
45964	//     },
45965	//     "adWordsSite": {
45966	//       "description": "Select only AdWords sites.",
45967	//       "location": "query",
45968	//       "type": "boolean"
45969	//     },
45970	//     "approved": {
45971	//       "description": "Select only approved sites.",
45972	//       "location": "query",
45973	//       "type": "boolean"
45974	//     },
45975	//     "campaignIds": {
45976	//       "description": "Select only sites with these campaign IDs.",
45977	//       "format": "int64",
45978	//       "location": "query",
45979	//       "repeated": true,
45980	//       "type": "string"
45981	//     },
45982	//     "directorySiteIds": {
45983	//       "description": "Select only sites with these directory site IDs.",
45984	//       "format": "int64",
45985	//       "location": "query",
45986	//       "repeated": true,
45987	//       "type": "string"
45988	//     },
45989	//     "ids": {
45990	//       "description": "Select only sites with these IDs.",
45991	//       "format": "int64",
45992	//       "location": "query",
45993	//       "repeated": true,
45994	//       "type": "string"
45995	//     },
45996	//     "maxResults": {
45997	//       "default": "1000",
45998	//       "description": "Maximum number of results to return.",
45999	//       "format": "int32",
46000	//       "location": "query",
46001	//       "maximum": "1000",
46002	//       "minimum": "0",
46003	//       "type": "integer"
46004	//     },
46005	//     "pageToken": {
46006	//       "description": "Value of the nextPageToken from the previous result page.",
46007	//       "location": "query",
46008	//       "type": "string"
46009	//     },
46010	//     "profileId": {
46011	//       "description": "User profile ID associated with this request.",
46012	//       "format": "int64",
46013	//       "location": "path",
46014	//       "required": true,
46015	//       "type": "string"
46016	//     },
46017	//     "searchString": {
46018	//       "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\".",
46019	//       "location": "query",
46020	//       "type": "string"
46021	//     },
46022	//     "sortField": {
46023	//       "default": "ID",
46024	//       "description": "Field by which to sort the list.",
46025	//       "enum": [
46026	//         "ID",
46027	//         "NAME"
46028	//       ],
46029	//       "enumDescriptions": [
46030	//         "",
46031	//         ""
46032	//       ],
46033	//       "location": "query",
46034	//       "type": "string"
46035	//     },
46036	//     "sortOrder": {
46037	//       "default": "ASCENDING",
46038	//       "description": "Order of sorted results.",
46039	//       "enum": [
46040	//         "ASCENDING",
46041	//         "DESCENDING"
46042	//       ],
46043	//       "enumDescriptions": [
46044	//         "",
46045	//         ""
46046	//       ],
46047	//       "location": "query",
46048	//       "type": "string"
46049	//     },
46050	//     "subaccountId": {
46051	//       "description": "Select only sites with this subaccount ID.",
46052	//       "format": "int64",
46053	//       "location": "query",
46054	//       "type": "string"
46055	//     },
46056	//     "unmappedSite": {
46057	//       "description": "Select only sites that have not been mapped to a directory site.",
46058	//       "location": "query",
46059	//       "type": "boolean"
46060	//     }
46061	//   },
46062	//   "path": "userprofiles/{profileId}/sites",
46063	//   "response": {
46064	//     "$ref": "SitesListResponse"
46065	//   },
46066	//   "scopes": [
46067	//     "https://www.googleapis.com/auth/dfatrafficking"
46068	//   ]
46069	// }
46070
46071}
46072
46073// Pages invokes f for each page of results.
46074// A non-nil error returned from f will halt the iteration.
46075// The provided context supersedes any context provided to the Context method.
46076func (c *SitesListCall) Pages(ctx context.Context, f func(*SitesListResponse) error) error {
46077	c.ctx_ = ctx
46078	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
46079	for {
46080		x, err := c.Do()
46081		if err != nil {
46082			return err
46083		}
46084		if err := f(x); err != nil {
46085			return err
46086		}
46087		if x.NextPageToken == "" {
46088			return nil
46089		}
46090		c.PageToken(x.NextPageToken)
46091	}
46092}
46093
46094// method id "dfareporting.sites.patch":
46095
46096type SitesPatchCall struct {
46097	s          *Service
46098	profileId  int64
46099	site       *Site
46100	urlParams_ gensupport.URLParams
46101	ctx_       context.Context
46102	header_    http.Header
46103}
46104
46105// Patch: Updates an existing site. This method supports patch
46106// semantics.
46107func (r *SitesService) Patch(profileId int64, id int64, site *Site) *SitesPatchCall {
46108	c := &SitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46109	c.profileId = profileId
46110	c.urlParams_.Set("id", fmt.Sprint(id))
46111	c.site = site
46112	return c
46113}
46114
46115// Fields allows partial responses to be retrieved. See
46116// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46117// for more information.
46118func (c *SitesPatchCall) Fields(s ...googleapi.Field) *SitesPatchCall {
46119	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46120	return c
46121}
46122
46123// Context sets the context to be used in this call's Do method. Any
46124// pending HTTP request will be aborted if the provided context is
46125// canceled.
46126func (c *SitesPatchCall) Context(ctx context.Context) *SitesPatchCall {
46127	c.ctx_ = ctx
46128	return c
46129}
46130
46131// Header returns an http.Header that can be modified by the caller to
46132// add HTTP headers to the request.
46133func (c *SitesPatchCall) Header() http.Header {
46134	if c.header_ == nil {
46135		c.header_ = make(http.Header)
46136	}
46137	return c.header_
46138}
46139
46140func (c *SitesPatchCall) doRequest(alt string) (*http.Response, error) {
46141	reqHeaders := make(http.Header)
46142	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
46143	for k, v := range c.header_ {
46144		reqHeaders[k] = v
46145	}
46146	reqHeaders.Set("User-Agent", c.s.userAgent())
46147	var body io.Reader = nil
46148	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
46149	if err != nil {
46150		return nil, err
46151	}
46152	reqHeaders.Set("Content-Type", "application/json")
46153	c.urlParams_.Set("alt", alt)
46154	c.urlParams_.Set("prettyPrint", "false")
46155	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
46156	urls += "?" + c.urlParams_.Encode()
46157	req, err := http.NewRequest("PATCH", urls, body)
46158	if err != nil {
46159		return nil, err
46160	}
46161	req.Header = reqHeaders
46162	googleapi.Expand(req.URL, map[string]string{
46163		"profileId": strconv.FormatInt(c.profileId, 10),
46164	})
46165	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46166}
46167
46168// Do executes the "dfareporting.sites.patch" call.
46169// Exactly one of *Site or error will be non-nil. Any non-2xx status
46170// code is an error. Response headers are in either
46171// *Site.ServerResponse.Header or (if a response was returned at all) in
46172// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46173// whether the returned error was because http.StatusNotModified was
46174// returned.
46175func (c *SitesPatchCall) Do(opts ...googleapi.CallOption) (*Site, error) {
46176	gensupport.SetOptions(c.urlParams_, opts...)
46177	res, err := c.doRequest("json")
46178	if res != nil && res.StatusCode == http.StatusNotModified {
46179		if res.Body != nil {
46180			res.Body.Close()
46181		}
46182		return nil, &googleapi.Error{
46183			Code:   res.StatusCode,
46184			Header: res.Header,
46185		}
46186	}
46187	if err != nil {
46188		return nil, err
46189	}
46190	defer googleapi.CloseBody(res)
46191	if err := googleapi.CheckResponse(res); err != nil {
46192		return nil, err
46193	}
46194	ret := &Site{
46195		ServerResponse: googleapi.ServerResponse{
46196			Header:         res.Header,
46197			HTTPStatusCode: res.StatusCode,
46198		},
46199	}
46200	target := &ret
46201	if err := gensupport.DecodeResponse(target, res); err != nil {
46202		return nil, err
46203	}
46204	return ret, nil
46205	// {
46206	//   "description": "Updates an existing site. This method supports patch semantics.",
46207	//   "httpMethod": "PATCH",
46208	//   "id": "dfareporting.sites.patch",
46209	//   "parameterOrder": [
46210	//     "profileId",
46211	//     "id"
46212	//   ],
46213	//   "parameters": {
46214	//     "id": {
46215	//       "description": "Site ID.",
46216	//       "format": "int64",
46217	//       "location": "query",
46218	//       "required": true,
46219	//       "type": "string"
46220	//     },
46221	//     "profileId": {
46222	//       "description": "User profile ID associated with this request.",
46223	//       "format": "int64",
46224	//       "location": "path",
46225	//       "required": true,
46226	//       "type": "string"
46227	//     }
46228	//   },
46229	//   "path": "userprofiles/{profileId}/sites",
46230	//   "request": {
46231	//     "$ref": "Site"
46232	//   },
46233	//   "response": {
46234	//     "$ref": "Site"
46235	//   },
46236	//   "scopes": [
46237	//     "https://www.googleapis.com/auth/dfatrafficking"
46238	//   ]
46239	// }
46240
46241}
46242
46243// method id "dfareporting.sites.update":
46244
46245type SitesUpdateCall struct {
46246	s          *Service
46247	profileId  int64
46248	site       *Site
46249	urlParams_ gensupport.URLParams
46250	ctx_       context.Context
46251	header_    http.Header
46252}
46253
46254// Update: Updates an existing site.
46255func (r *SitesService) Update(profileId int64, site *Site) *SitesUpdateCall {
46256	c := &SitesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46257	c.profileId = profileId
46258	c.site = site
46259	return c
46260}
46261
46262// Fields allows partial responses to be retrieved. See
46263// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46264// for more information.
46265func (c *SitesUpdateCall) Fields(s ...googleapi.Field) *SitesUpdateCall {
46266	c.urlParams_.Set("fields", googleapi.CombineFields(s))
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 *SitesUpdateCall) Context(ctx context.Context) *SitesUpdateCall {
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 *SitesUpdateCall) Header() http.Header {
46281	if c.header_ == nil {
46282		c.header_ = make(http.Header)
46283	}
46284	return c.header_
46285}
46286
46287func (c *SitesUpdateCall) doRequest(alt string) (*http.Response, error) {
46288	reqHeaders := make(http.Header)
46289	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
46290	for k, v := range c.header_ {
46291		reqHeaders[k] = v
46292	}
46293	reqHeaders.Set("User-Agent", c.s.userAgent())
46294	var body io.Reader = nil
46295	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
46296	if err != nil {
46297		return nil, err
46298	}
46299	reqHeaders.Set("Content-Type", "application/json")
46300	c.urlParams_.Set("alt", alt)
46301	c.urlParams_.Set("prettyPrint", "false")
46302	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
46303	urls += "?" + c.urlParams_.Encode()
46304	req, err := http.NewRequest("PUT", urls, body)
46305	if err != nil {
46306		return nil, err
46307	}
46308	req.Header = reqHeaders
46309	googleapi.Expand(req.URL, map[string]string{
46310		"profileId": strconv.FormatInt(c.profileId, 10),
46311	})
46312	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46313}
46314
46315// Do executes the "dfareporting.sites.update" call.
46316// Exactly one of *Site or error will be non-nil. Any non-2xx status
46317// code is an error. Response headers are in either
46318// *Site.ServerResponse.Header or (if a response was returned at all) in
46319// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46320// whether the returned error was because http.StatusNotModified was
46321// returned.
46322func (c *SitesUpdateCall) Do(opts ...googleapi.CallOption) (*Site, error) {
46323	gensupport.SetOptions(c.urlParams_, opts...)
46324	res, err := c.doRequest("json")
46325	if res != nil && res.StatusCode == http.StatusNotModified {
46326		if res.Body != nil {
46327			res.Body.Close()
46328		}
46329		return nil, &googleapi.Error{
46330			Code:   res.StatusCode,
46331			Header: res.Header,
46332		}
46333	}
46334	if err != nil {
46335		return nil, err
46336	}
46337	defer googleapi.CloseBody(res)
46338	if err := googleapi.CheckResponse(res); err != nil {
46339		return nil, err
46340	}
46341	ret := &Site{
46342		ServerResponse: googleapi.ServerResponse{
46343			Header:         res.Header,
46344			HTTPStatusCode: res.StatusCode,
46345		},
46346	}
46347	target := &ret
46348	if err := gensupport.DecodeResponse(target, res); err != nil {
46349		return nil, err
46350	}
46351	return ret, nil
46352	// {
46353	//   "description": "Updates an existing site.",
46354	//   "httpMethod": "PUT",
46355	//   "id": "dfareporting.sites.update",
46356	//   "parameterOrder": [
46357	//     "profileId"
46358	//   ],
46359	//   "parameters": {
46360	//     "profileId": {
46361	//       "description": "User profile ID associated with this request.",
46362	//       "format": "int64",
46363	//       "location": "path",
46364	//       "required": true,
46365	//       "type": "string"
46366	//     }
46367	//   },
46368	//   "path": "userprofiles/{profileId}/sites",
46369	//   "request": {
46370	//     "$ref": "Site"
46371	//   },
46372	//   "response": {
46373	//     "$ref": "Site"
46374	//   },
46375	//   "scopes": [
46376	//     "https://www.googleapis.com/auth/dfatrafficking"
46377	//   ]
46378	// }
46379
46380}
46381
46382// method id "dfareporting.sizes.get":
46383
46384type SizesGetCall struct {
46385	s            *Service
46386	profileId    int64
46387	id           int64
46388	urlParams_   gensupport.URLParams
46389	ifNoneMatch_ string
46390	ctx_         context.Context
46391	header_      http.Header
46392}
46393
46394// Get: Gets one size by ID.
46395func (r *SizesService) Get(profileId int64, id int64) *SizesGetCall {
46396	c := &SizesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46397	c.profileId = profileId
46398	c.id = id
46399	return c
46400}
46401
46402// Fields allows partial responses to be retrieved. See
46403// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46404// for more information.
46405func (c *SizesGetCall) Fields(s ...googleapi.Field) *SizesGetCall {
46406	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46407	return c
46408}
46409
46410// IfNoneMatch sets the optional parameter which makes the operation
46411// fail if the object's ETag matches the given value. This is useful for
46412// getting updates only after the object has changed since the last
46413// request. Use googleapi.IsNotModified to check whether the response
46414// error from Do is the result of In-None-Match.
46415func (c *SizesGetCall) IfNoneMatch(entityTag string) *SizesGetCall {
46416	c.ifNoneMatch_ = entityTag
46417	return c
46418}
46419
46420// Context sets the context to be used in this call's Do method. Any
46421// pending HTTP request will be aborted if the provided context is
46422// canceled.
46423func (c *SizesGetCall) Context(ctx context.Context) *SizesGetCall {
46424	c.ctx_ = ctx
46425	return c
46426}
46427
46428// Header returns an http.Header that can be modified by the caller to
46429// add HTTP headers to the request.
46430func (c *SizesGetCall) Header() http.Header {
46431	if c.header_ == nil {
46432		c.header_ = make(http.Header)
46433	}
46434	return c.header_
46435}
46436
46437func (c *SizesGetCall) doRequest(alt string) (*http.Response, error) {
46438	reqHeaders := make(http.Header)
46439	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
46440	for k, v := range c.header_ {
46441		reqHeaders[k] = v
46442	}
46443	reqHeaders.Set("User-Agent", c.s.userAgent())
46444	if c.ifNoneMatch_ != "" {
46445		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46446	}
46447	var body io.Reader = nil
46448	c.urlParams_.Set("alt", alt)
46449	c.urlParams_.Set("prettyPrint", "false")
46450	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes/{id}")
46451	urls += "?" + c.urlParams_.Encode()
46452	req, err := http.NewRequest("GET", urls, body)
46453	if err != nil {
46454		return nil, err
46455	}
46456	req.Header = reqHeaders
46457	googleapi.Expand(req.URL, map[string]string{
46458		"profileId": strconv.FormatInt(c.profileId, 10),
46459		"id":        strconv.FormatInt(c.id, 10),
46460	})
46461	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46462}
46463
46464// Do executes the "dfareporting.sizes.get" call.
46465// Exactly one of *Size or error will be non-nil. Any non-2xx status
46466// code is an error. Response headers are in either
46467// *Size.ServerResponse.Header or (if a response was returned at all) in
46468// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46469// whether the returned error was because http.StatusNotModified was
46470// returned.
46471func (c *SizesGetCall) Do(opts ...googleapi.CallOption) (*Size, error) {
46472	gensupport.SetOptions(c.urlParams_, opts...)
46473	res, err := c.doRequest("json")
46474	if res != nil && res.StatusCode == http.StatusNotModified {
46475		if res.Body != nil {
46476			res.Body.Close()
46477		}
46478		return nil, &googleapi.Error{
46479			Code:   res.StatusCode,
46480			Header: res.Header,
46481		}
46482	}
46483	if err != nil {
46484		return nil, err
46485	}
46486	defer googleapi.CloseBody(res)
46487	if err := googleapi.CheckResponse(res); err != nil {
46488		return nil, err
46489	}
46490	ret := &Size{
46491		ServerResponse: googleapi.ServerResponse{
46492			Header:         res.Header,
46493			HTTPStatusCode: res.StatusCode,
46494		},
46495	}
46496	target := &ret
46497	if err := gensupport.DecodeResponse(target, res); err != nil {
46498		return nil, err
46499	}
46500	return ret, nil
46501	// {
46502	//   "description": "Gets one size by ID.",
46503	//   "httpMethod": "GET",
46504	//   "id": "dfareporting.sizes.get",
46505	//   "parameterOrder": [
46506	//     "profileId",
46507	//     "id"
46508	//   ],
46509	//   "parameters": {
46510	//     "id": {
46511	//       "description": "Size ID.",
46512	//       "format": "int64",
46513	//       "location": "path",
46514	//       "required": true,
46515	//       "type": "string"
46516	//     },
46517	//     "profileId": {
46518	//       "description": "User profile ID associated with this request.",
46519	//       "format": "int64",
46520	//       "location": "path",
46521	//       "required": true,
46522	//       "type": "string"
46523	//     }
46524	//   },
46525	//   "path": "userprofiles/{profileId}/sizes/{id}",
46526	//   "response": {
46527	//     "$ref": "Size"
46528	//   },
46529	//   "scopes": [
46530	//     "https://www.googleapis.com/auth/dfatrafficking"
46531	//   ]
46532	// }
46533
46534}
46535
46536// method id "dfareporting.sizes.insert":
46537
46538type SizesInsertCall struct {
46539	s          *Service
46540	profileId  int64
46541	size       *Size
46542	urlParams_ gensupport.URLParams
46543	ctx_       context.Context
46544	header_    http.Header
46545}
46546
46547// Insert: Inserts a new size.
46548func (r *SizesService) Insert(profileId int64, size *Size) *SizesInsertCall {
46549	c := &SizesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46550	c.profileId = profileId
46551	c.size = size
46552	return c
46553}
46554
46555// Fields allows partial responses to be retrieved. See
46556// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46557// for more information.
46558func (c *SizesInsertCall) Fields(s ...googleapi.Field) *SizesInsertCall {
46559	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46560	return c
46561}
46562
46563// Context sets the context to be used in this call's Do method. Any
46564// pending HTTP request will be aborted if the provided context is
46565// canceled.
46566func (c *SizesInsertCall) Context(ctx context.Context) *SizesInsertCall {
46567	c.ctx_ = ctx
46568	return c
46569}
46570
46571// Header returns an http.Header that can be modified by the caller to
46572// add HTTP headers to the request.
46573func (c *SizesInsertCall) Header() http.Header {
46574	if c.header_ == nil {
46575		c.header_ = make(http.Header)
46576	}
46577	return c.header_
46578}
46579
46580func (c *SizesInsertCall) doRequest(alt string) (*http.Response, error) {
46581	reqHeaders := make(http.Header)
46582	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
46583	for k, v := range c.header_ {
46584		reqHeaders[k] = v
46585	}
46586	reqHeaders.Set("User-Agent", c.s.userAgent())
46587	var body io.Reader = nil
46588	body, err := googleapi.WithoutDataWrapper.JSONReader(c.size)
46589	if err != nil {
46590		return nil, err
46591	}
46592	reqHeaders.Set("Content-Type", "application/json")
46593	c.urlParams_.Set("alt", alt)
46594	c.urlParams_.Set("prettyPrint", "false")
46595	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
46596	urls += "?" + c.urlParams_.Encode()
46597	req, err := http.NewRequest("POST", urls, body)
46598	if err != nil {
46599		return nil, err
46600	}
46601	req.Header = reqHeaders
46602	googleapi.Expand(req.URL, map[string]string{
46603		"profileId": strconv.FormatInt(c.profileId, 10),
46604	})
46605	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46606}
46607
46608// Do executes the "dfareporting.sizes.insert" call.
46609// Exactly one of *Size or error will be non-nil. Any non-2xx status
46610// code is an error. Response headers are in either
46611// *Size.ServerResponse.Header or (if a response was returned at all) in
46612// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46613// whether the returned error was because http.StatusNotModified was
46614// returned.
46615func (c *SizesInsertCall) Do(opts ...googleapi.CallOption) (*Size, error) {
46616	gensupport.SetOptions(c.urlParams_, opts...)
46617	res, err := c.doRequest("json")
46618	if res != nil && res.StatusCode == http.StatusNotModified {
46619		if res.Body != nil {
46620			res.Body.Close()
46621		}
46622		return nil, &googleapi.Error{
46623			Code:   res.StatusCode,
46624			Header: res.Header,
46625		}
46626	}
46627	if err != nil {
46628		return nil, err
46629	}
46630	defer googleapi.CloseBody(res)
46631	if err := googleapi.CheckResponse(res); err != nil {
46632		return nil, err
46633	}
46634	ret := &Size{
46635		ServerResponse: googleapi.ServerResponse{
46636			Header:         res.Header,
46637			HTTPStatusCode: res.StatusCode,
46638		},
46639	}
46640	target := &ret
46641	if err := gensupport.DecodeResponse(target, res); err != nil {
46642		return nil, err
46643	}
46644	return ret, nil
46645	// {
46646	//   "description": "Inserts a new size.",
46647	//   "httpMethod": "POST",
46648	//   "id": "dfareporting.sizes.insert",
46649	//   "parameterOrder": [
46650	//     "profileId"
46651	//   ],
46652	//   "parameters": {
46653	//     "profileId": {
46654	//       "description": "User profile ID associated with this request.",
46655	//       "format": "int64",
46656	//       "location": "path",
46657	//       "required": true,
46658	//       "type": "string"
46659	//     }
46660	//   },
46661	//   "path": "userprofiles/{profileId}/sizes",
46662	//   "request": {
46663	//     "$ref": "Size"
46664	//   },
46665	//   "response": {
46666	//     "$ref": "Size"
46667	//   },
46668	//   "scopes": [
46669	//     "https://www.googleapis.com/auth/dfatrafficking"
46670	//   ]
46671	// }
46672
46673}
46674
46675// method id "dfareporting.sizes.list":
46676
46677type SizesListCall struct {
46678	s            *Service
46679	profileId    int64
46680	urlParams_   gensupport.URLParams
46681	ifNoneMatch_ string
46682	ctx_         context.Context
46683	header_      http.Header
46684}
46685
46686// List: Retrieves a list of sizes, possibly filtered. Retrieved sizes
46687// are globally unique and may include values not currently in use by
46688// your account. Due to this, the list of sizes returned by this method
46689// may differ from the list seen in the Trafficking UI.
46690func (r *SizesService) List(profileId int64) *SizesListCall {
46691	c := &SizesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46692	c.profileId = profileId
46693	return c
46694}
46695
46696// Height sets the optional parameter "height": Select only sizes with
46697// this height.
46698func (c *SizesListCall) Height(height int64) *SizesListCall {
46699	c.urlParams_.Set("height", fmt.Sprint(height))
46700	return c
46701}
46702
46703// IabStandard sets the optional parameter "iabStandard": Select only
46704// IAB standard sizes.
46705func (c *SizesListCall) IabStandard(iabStandard bool) *SizesListCall {
46706	c.urlParams_.Set("iabStandard", fmt.Sprint(iabStandard))
46707	return c
46708}
46709
46710// Ids sets the optional parameter "ids": Select only sizes with these
46711// IDs.
46712func (c *SizesListCall) Ids(ids ...int64) *SizesListCall {
46713	var ids_ []string
46714	for _, v := range ids {
46715		ids_ = append(ids_, fmt.Sprint(v))
46716	}
46717	c.urlParams_.SetMulti("ids", ids_)
46718	return c
46719}
46720
46721// Width sets the optional parameter "width": Select only sizes with
46722// this width.
46723func (c *SizesListCall) Width(width int64) *SizesListCall {
46724	c.urlParams_.Set("width", fmt.Sprint(width))
46725	return c
46726}
46727
46728// Fields allows partial responses to be retrieved. See
46729// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46730// for more information.
46731func (c *SizesListCall) Fields(s ...googleapi.Field) *SizesListCall {
46732	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46733	return c
46734}
46735
46736// IfNoneMatch sets the optional parameter which makes the operation
46737// fail if the object's ETag matches the given value. This is useful for
46738// getting updates only after the object has changed since the last
46739// request. Use googleapi.IsNotModified to check whether the response
46740// error from Do is the result of In-None-Match.
46741func (c *SizesListCall) IfNoneMatch(entityTag string) *SizesListCall {
46742	c.ifNoneMatch_ = entityTag
46743	return c
46744}
46745
46746// Context sets the context to be used in this call's Do method. Any
46747// pending HTTP request will be aborted if the provided context is
46748// canceled.
46749func (c *SizesListCall) Context(ctx context.Context) *SizesListCall {
46750	c.ctx_ = ctx
46751	return c
46752}
46753
46754// Header returns an http.Header that can be modified by the caller to
46755// add HTTP headers to the request.
46756func (c *SizesListCall) Header() http.Header {
46757	if c.header_ == nil {
46758		c.header_ = make(http.Header)
46759	}
46760	return c.header_
46761}
46762
46763func (c *SizesListCall) doRequest(alt string) (*http.Response, error) {
46764	reqHeaders := make(http.Header)
46765	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
46766	for k, v := range c.header_ {
46767		reqHeaders[k] = v
46768	}
46769	reqHeaders.Set("User-Agent", c.s.userAgent())
46770	if c.ifNoneMatch_ != "" {
46771		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46772	}
46773	var body io.Reader = nil
46774	c.urlParams_.Set("alt", alt)
46775	c.urlParams_.Set("prettyPrint", "false")
46776	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
46777	urls += "?" + c.urlParams_.Encode()
46778	req, err := http.NewRequest("GET", urls, body)
46779	if err != nil {
46780		return nil, err
46781	}
46782	req.Header = reqHeaders
46783	googleapi.Expand(req.URL, map[string]string{
46784		"profileId": strconv.FormatInt(c.profileId, 10),
46785	})
46786	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46787}
46788
46789// Do executes the "dfareporting.sizes.list" call.
46790// Exactly one of *SizesListResponse or error will be non-nil. Any
46791// non-2xx status code is an error. Response headers are in either
46792// *SizesListResponse.ServerResponse.Header or (if a response was
46793// returned at all) in error.(*googleapi.Error).Header. Use
46794// googleapi.IsNotModified to check whether the returned error was
46795// because http.StatusNotModified was returned.
46796func (c *SizesListCall) Do(opts ...googleapi.CallOption) (*SizesListResponse, error) {
46797	gensupport.SetOptions(c.urlParams_, opts...)
46798	res, err := c.doRequest("json")
46799	if res != nil && res.StatusCode == http.StatusNotModified {
46800		if res.Body != nil {
46801			res.Body.Close()
46802		}
46803		return nil, &googleapi.Error{
46804			Code:   res.StatusCode,
46805			Header: res.Header,
46806		}
46807	}
46808	if err != nil {
46809		return nil, err
46810	}
46811	defer googleapi.CloseBody(res)
46812	if err := googleapi.CheckResponse(res); err != nil {
46813		return nil, err
46814	}
46815	ret := &SizesListResponse{
46816		ServerResponse: googleapi.ServerResponse{
46817			Header:         res.Header,
46818			HTTPStatusCode: res.StatusCode,
46819		},
46820	}
46821	target := &ret
46822	if err := gensupport.DecodeResponse(target, res); err != nil {
46823		return nil, err
46824	}
46825	return ret, nil
46826	// {
46827	//   "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.",
46828	//   "httpMethod": "GET",
46829	//   "id": "dfareporting.sizes.list",
46830	//   "parameterOrder": [
46831	//     "profileId"
46832	//   ],
46833	//   "parameters": {
46834	//     "height": {
46835	//       "description": "Select only sizes with this height.",
46836	//       "format": "int32",
46837	//       "location": "query",
46838	//       "maximum": "32767",
46839	//       "minimum": "0",
46840	//       "type": "integer"
46841	//     },
46842	//     "iabStandard": {
46843	//       "description": "Select only IAB standard sizes.",
46844	//       "location": "query",
46845	//       "type": "boolean"
46846	//     },
46847	//     "ids": {
46848	//       "description": "Select only sizes with these IDs.",
46849	//       "format": "int64",
46850	//       "location": "query",
46851	//       "repeated": true,
46852	//       "type": "string"
46853	//     },
46854	//     "profileId": {
46855	//       "description": "User profile ID associated with this request.",
46856	//       "format": "int64",
46857	//       "location": "path",
46858	//       "required": true,
46859	//       "type": "string"
46860	//     },
46861	//     "width": {
46862	//       "description": "Select only sizes with this width.",
46863	//       "format": "int32",
46864	//       "location": "query",
46865	//       "maximum": "32767",
46866	//       "minimum": "0",
46867	//       "type": "integer"
46868	//     }
46869	//   },
46870	//   "path": "userprofiles/{profileId}/sizes",
46871	//   "response": {
46872	//     "$ref": "SizesListResponse"
46873	//   },
46874	//   "scopes": [
46875	//     "https://www.googleapis.com/auth/dfatrafficking"
46876	//   ]
46877	// }
46878
46879}
46880
46881// method id "dfareporting.subaccounts.get":
46882
46883type SubaccountsGetCall struct {
46884	s            *Service
46885	profileId    int64
46886	id           int64
46887	urlParams_   gensupport.URLParams
46888	ifNoneMatch_ string
46889	ctx_         context.Context
46890	header_      http.Header
46891}
46892
46893// Get: Gets one subaccount by ID.
46894func (r *SubaccountsService) Get(profileId int64, id int64) *SubaccountsGetCall {
46895	c := &SubaccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46896	c.profileId = profileId
46897	c.id = id
46898	return c
46899}
46900
46901// Fields allows partial responses to be retrieved. See
46902// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46903// for more information.
46904func (c *SubaccountsGetCall) Fields(s ...googleapi.Field) *SubaccountsGetCall {
46905	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46906	return c
46907}
46908
46909// IfNoneMatch sets the optional parameter which makes the operation
46910// fail if the object's ETag matches the given value. This is useful for
46911// getting updates only after the object has changed since the last
46912// request. Use googleapi.IsNotModified to check whether the response
46913// error from Do is the result of In-None-Match.
46914func (c *SubaccountsGetCall) IfNoneMatch(entityTag string) *SubaccountsGetCall {
46915	c.ifNoneMatch_ = entityTag
46916	return c
46917}
46918
46919// Context sets the context to be used in this call's Do method. Any
46920// pending HTTP request will be aborted if the provided context is
46921// canceled.
46922func (c *SubaccountsGetCall) Context(ctx context.Context) *SubaccountsGetCall {
46923	c.ctx_ = ctx
46924	return c
46925}
46926
46927// Header returns an http.Header that can be modified by the caller to
46928// add HTTP headers to the request.
46929func (c *SubaccountsGetCall) Header() http.Header {
46930	if c.header_ == nil {
46931		c.header_ = make(http.Header)
46932	}
46933	return c.header_
46934}
46935
46936func (c *SubaccountsGetCall) doRequest(alt string) (*http.Response, error) {
46937	reqHeaders := make(http.Header)
46938	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
46939	for k, v := range c.header_ {
46940		reqHeaders[k] = v
46941	}
46942	reqHeaders.Set("User-Agent", c.s.userAgent())
46943	if c.ifNoneMatch_ != "" {
46944		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46945	}
46946	var body io.Reader = nil
46947	c.urlParams_.Set("alt", alt)
46948	c.urlParams_.Set("prettyPrint", "false")
46949	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts/{id}")
46950	urls += "?" + c.urlParams_.Encode()
46951	req, err := http.NewRequest("GET", urls, body)
46952	if err != nil {
46953		return nil, err
46954	}
46955	req.Header = reqHeaders
46956	googleapi.Expand(req.URL, map[string]string{
46957		"profileId": strconv.FormatInt(c.profileId, 10),
46958		"id":        strconv.FormatInt(c.id, 10),
46959	})
46960	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46961}
46962
46963// Do executes the "dfareporting.subaccounts.get" call.
46964// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
46965// status code is an error. Response headers are in either
46966// *Subaccount.ServerResponse.Header or (if a response was returned at
46967// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46968// to check whether the returned error was because
46969// http.StatusNotModified was returned.
46970func (c *SubaccountsGetCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
46971	gensupport.SetOptions(c.urlParams_, opts...)
46972	res, err := c.doRequest("json")
46973	if res != nil && res.StatusCode == http.StatusNotModified {
46974		if res.Body != nil {
46975			res.Body.Close()
46976		}
46977		return nil, &googleapi.Error{
46978			Code:   res.StatusCode,
46979			Header: res.Header,
46980		}
46981	}
46982	if err != nil {
46983		return nil, err
46984	}
46985	defer googleapi.CloseBody(res)
46986	if err := googleapi.CheckResponse(res); err != nil {
46987		return nil, err
46988	}
46989	ret := &Subaccount{
46990		ServerResponse: googleapi.ServerResponse{
46991			Header:         res.Header,
46992			HTTPStatusCode: res.StatusCode,
46993		},
46994	}
46995	target := &ret
46996	if err := gensupport.DecodeResponse(target, res); err != nil {
46997		return nil, err
46998	}
46999	return ret, nil
47000	// {
47001	//   "description": "Gets one subaccount by ID.",
47002	//   "httpMethod": "GET",
47003	//   "id": "dfareporting.subaccounts.get",
47004	//   "parameterOrder": [
47005	//     "profileId",
47006	//     "id"
47007	//   ],
47008	//   "parameters": {
47009	//     "id": {
47010	//       "description": "Subaccount ID.",
47011	//       "format": "int64",
47012	//       "location": "path",
47013	//       "required": true,
47014	//       "type": "string"
47015	//     },
47016	//     "profileId": {
47017	//       "description": "User profile ID associated with this request.",
47018	//       "format": "int64",
47019	//       "location": "path",
47020	//       "required": true,
47021	//       "type": "string"
47022	//     }
47023	//   },
47024	//   "path": "userprofiles/{profileId}/subaccounts/{id}",
47025	//   "response": {
47026	//     "$ref": "Subaccount"
47027	//   },
47028	//   "scopes": [
47029	//     "https://www.googleapis.com/auth/dfatrafficking"
47030	//   ]
47031	// }
47032
47033}
47034
47035// method id "dfareporting.subaccounts.insert":
47036
47037type SubaccountsInsertCall struct {
47038	s          *Service
47039	profileId  int64
47040	subaccount *Subaccount
47041	urlParams_ gensupport.URLParams
47042	ctx_       context.Context
47043	header_    http.Header
47044}
47045
47046// Insert: Inserts a new subaccount.
47047func (r *SubaccountsService) Insert(profileId int64, subaccount *Subaccount) *SubaccountsInsertCall {
47048	c := &SubaccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47049	c.profileId = profileId
47050	c.subaccount = subaccount
47051	return c
47052}
47053
47054// Fields allows partial responses to be retrieved. See
47055// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47056// for more information.
47057func (c *SubaccountsInsertCall) Fields(s ...googleapi.Field) *SubaccountsInsertCall {
47058	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47059	return c
47060}
47061
47062// Context sets the context to be used in this call's Do method. Any
47063// pending HTTP request will be aborted if the provided context is
47064// canceled.
47065func (c *SubaccountsInsertCall) Context(ctx context.Context) *SubaccountsInsertCall {
47066	c.ctx_ = ctx
47067	return c
47068}
47069
47070// Header returns an http.Header that can be modified by the caller to
47071// add HTTP headers to the request.
47072func (c *SubaccountsInsertCall) Header() http.Header {
47073	if c.header_ == nil {
47074		c.header_ = make(http.Header)
47075	}
47076	return c.header_
47077}
47078
47079func (c *SubaccountsInsertCall) doRequest(alt string) (*http.Response, error) {
47080	reqHeaders := make(http.Header)
47081	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
47082	for k, v := range c.header_ {
47083		reqHeaders[k] = v
47084	}
47085	reqHeaders.Set("User-Agent", c.s.userAgent())
47086	var body io.Reader = nil
47087	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
47088	if err != nil {
47089		return nil, err
47090	}
47091	reqHeaders.Set("Content-Type", "application/json")
47092	c.urlParams_.Set("alt", alt)
47093	c.urlParams_.Set("prettyPrint", "false")
47094	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47095	urls += "?" + c.urlParams_.Encode()
47096	req, err := http.NewRequest("POST", urls, body)
47097	if err != nil {
47098		return nil, err
47099	}
47100	req.Header = reqHeaders
47101	googleapi.Expand(req.URL, map[string]string{
47102		"profileId": strconv.FormatInt(c.profileId, 10),
47103	})
47104	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47105}
47106
47107// Do executes the "dfareporting.subaccounts.insert" call.
47108// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
47109// status code is an error. Response headers are in either
47110// *Subaccount.ServerResponse.Header or (if a response was returned at
47111// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47112// to check whether the returned error was because
47113// http.StatusNotModified was returned.
47114func (c *SubaccountsInsertCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
47115	gensupport.SetOptions(c.urlParams_, opts...)
47116	res, err := c.doRequest("json")
47117	if res != nil && res.StatusCode == http.StatusNotModified {
47118		if res.Body != nil {
47119			res.Body.Close()
47120		}
47121		return nil, &googleapi.Error{
47122			Code:   res.StatusCode,
47123			Header: res.Header,
47124		}
47125	}
47126	if err != nil {
47127		return nil, err
47128	}
47129	defer googleapi.CloseBody(res)
47130	if err := googleapi.CheckResponse(res); err != nil {
47131		return nil, err
47132	}
47133	ret := &Subaccount{
47134		ServerResponse: googleapi.ServerResponse{
47135			Header:         res.Header,
47136			HTTPStatusCode: res.StatusCode,
47137		},
47138	}
47139	target := &ret
47140	if err := gensupport.DecodeResponse(target, res); err != nil {
47141		return nil, err
47142	}
47143	return ret, nil
47144	// {
47145	//   "description": "Inserts a new subaccount.",
47146	//   "httpMethod": "POST",
47147	//   "id": "dfareporting.subaccounts.insert",
47148	//   "parameterOrder": [
47149	//     "profileId"
47150	//   ],
47151	//   "parameters": {
47152	//     "profileId": {
47153	//       "description": "User profile ID associated with this request.",
47154	//       "format": "int64",
47155	//       "location": "path",
47156	//       "required": true,
47157	//       "type": "string"
47158	//     }
47159	//   },
47160	//   "path": "userprofiles/{profileId}/subaccounts",
47161	//   "request": {
47162	//     "$ref": "Subaccount"
47163	//   },
47164	//   "response": {
47165	//     "$ref": "Subaccount"
47166	//   },
47167	//   "scopes": [
47168	//     "https://www.googleapis.com/auth/dfatrafficking"
47169	//   ]
47170	// }
47171
47172}
47173
47174// method id "dfareporting.subaccounts.list":
47175
47176type SubaccountsListCall struct {
47177	s            *Service
47178	profileId    int64
47179	urlParams_   gensupport.URLParams
47180	ifNoneMatch_ string
47181	ctx_         context.Context
47182	header_      http.Header
47183}
47184
47185// List: Gets a list of subaccounts, possibly filtered. This method
47186// supports paging.
47187func (r *SubaccountsService) List(profileId int64) *SubaccountsListCall {
47188	c := &SubaccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47189	c.profileId = profileId
47190	return c
47191}
47192
47193// Ids sets the optional parameter "ids": Select only subaccounts with
47194// these IDs.
47195func (c *SubaccountsListCall) Ids(ids ...int64) *SubaccountsListCall {
47196	var ids_ []string
47197	for _, v := range ids {
47198		ids_ = append(ids_, fmt.Sprint(v))
47199	}
47200	c.urlParams_.SetMulti("ids", ids_)
47201	return c
47202}
47203
47204// MaxResults sets the optional parameter "maxResults": Maximum number
47205// of results to return.
47206func (c *SubaccountsListCall) MaxResults(maxResults int64) *SubaccountsListCall {
47207	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
47208	return c
47209}
47210
47211// PageToken sets the optional parameter "pageToken": Value of the
47212// nextPageToken from the previous result page.
47213func (c *SubaccountsListCall) PageToken(pageToken string) *SubaccountsListCall {
47214	c.urlParams_.Set("pageToken", pageToken)
47215	return c
47216}
47217
47218// SearchString sets the optional parameter "searchString": Allows
47219// searching for objects by name or ID. Wildcards (*) are allowed. For
47220// example, "subaccount*2015" will return objects with names like
47221// "subaccount June 2015", "subaccount April 2015", or simply
47222// "subaccount 2015". Most of the searches also add wildcards implicitly
47223// at the start and the end of the search string. For example, a search
47224// string of "subaccount" will match objects with name "my subaccount",
47225// "subaccount 2015", or simply "subaccount".
47226func (c *SubaccountsListCall) SearchString(searchString string) *SubaccountsListCall {
47227	c.urlParams_.Set("searchString", searchString)
47228	return c
47229}
47230
47231// SortField sets the optional parameter "sortField": Field by which to
47232// sort the list.
47233//
47234// Possible values:
47235//   "ID" (default)
47236//   "NAME"
47237func (c *SubaccountsListCall) SortField(sortField string) *SubaccountsListCall {
47238	c.urlParams_.Set("sortField", sortField)
47239	return c
47240}
47241
47242// SortOrder sets the optional parameter "sortOrder": Order of sorted
47243// results.
47244//
47245// Possible values:
47246//   "ASCENDING" (default)
47247//   "DESCENDING"
47248func (c *SubaccountsListCall) SortOrder(sortOrder string) *SubaccountsListCall {
47249	c.urlParams_.Set("sortOrder", sortOrder)
47250	return c
47251}
47252
47253// Fields allows partial responses to be retrieved. See
47254// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47255// for more information.
47256func (c *SubaccountsListCall) Fields(s ...googleapi.Field) *SubaccountsListCall {
47257	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47258	return c
47259}
47260
47261// IfNoneMatch sets the optional parameter which makes the operation
47262// fail if the object's ETag matches the given value. This is useful for
47263// getting updates only after the object has changed since the last
47264// request. Use googleapi.IsNotModified to check whether the response
47265// error from Do is the result of In-None-Match.
47266func (c *SubaccountsListCall) IfNoneMatch(entityTag string) *SubaccountsListCall {
47267	c.ifNoneMatch_ = entityTag
47268	return c
47269}
47270
47271// Context sets the context to be used in this call's Do method. Any
47272// pending HTTP request will be aborted if the provided context is
47273// canceled.
47274func (c *SubaccountsListCall) Context(ctx context.Context) *SubaccountsListCall {
47275	c.ctx_ = ctx
47276	return c
47277}
47278
47279// Header returns an http.Header that can be modified by the caller to
47280// add HTTP headers to the request.
47281func (c *SubaccountsListCall) Header() http.Header {
47282	if c.header_ == nil {
47283		c.header_ = make(http.Header)
47284	}
47285	return c.header_
47286}
47287
47288func (c *SubaccountsListCall) doRequest(alt string) (*http.Response, error) {
47289	reqHeaders := make(http.Header)
47290	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
47291	for k, v := range c.header_ {
47292		reqHeaders[k] = v
47293	}
47294	reqHeaders.Set("User-Agent", c.s.userAgent())
47295	if c.ifNoneMatch_ != "" {
47296		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47297	}
47298	var body io.Reader = nil
47299	c.urlParams_.Set("alt", alt)
47300	c.urlParams_.Set("prettyPrint", "false")
47301	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47302	urls += "?" + c.urlParams_.Encode()
47303	req, err := http.NewRequest("GET", urls, body)
47304	if err != nil {
47305		return nil, err
47306	}
47307	req.Header = reqHeaders
47308	googleapi.Expand(req.URL, map[string]string{
47309		"profileId": strconv.FormatInt(c.profileId, 10),
47310	})
47311	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47312}
47313
47314// Do executes the "dfareporting.subaccounts.list" call.
47315// Exactly one of *SubaccountsListResponse or error will be non-nil. Any
47316// non-2xx status code is an error. Response headers are in either
47317// *SubaccountsListResponse.ServerResponse.Header or (if a response was
47318// returned at all) in error.(*googleapi.Error).Header. Use
47319// googleapi.IsNotModified to check whether the returned error was
47320// because http.StatusNotModified was returned.
47321func (c *SubaccountsListCall) Do(opts ...googleapi.CallOption) (*SubaccountsListResponse, error) {
47322	gensupport.SetOptions(c.urlParams_, opts...)
47323	res, err := c.doRequest("json")
47324	if res != nil && res.StatusCode == http.StatusNotModified {
47325		if res.Body != nil {
47326			res.Body.Close()
47327		}
47328		return nil, &googleapi.Error{
47329			Code:   res.StatusCode,
47330			Header: res.Header,
47331		}
47332	}
47333	if err != nil {
47334		return nil, err
47335	}
47336	defer googleapi.CloseBody(res)
47337	if err := googleapi.CheckResponse(res); err != nil {
47338		return nil, err
47339	}
47340	ret := &SubaccountsListResponse{
47341		ServerResponse: googleapi.ServerResponse{
47342			Header:         res.Header,
47343			HTTPStatusCode: res.StatusCode,
47344		},
47345	}
47346	target := &ret
47347	if err := gensupport.DecodeResponse(target, res); err != nil {
47348		return nil, err
47349	}
47350	return ret, nil
47351	// {
47352	//   "description": "Gets a list of subaccounts, possibly filtered. This method supports paging.",
47353	//   "httpMethod": "GET",
47354	//   "id": "dfareporting.subaccounts.list",
47355	//   "parameterOrder": [
47356	//     "profileId"
47357	//   ],
47358	//   "parameters": {
47359	//     "ids": {
47360	//       "description": "Select only subaccounts with these IDs.",
47361	//       "format": "int64",
47362	//       "location": "query",
47363	//       "repeated": true,
47364	//       "type": "string"
47365	//     },
47366	//     "maxResults": {
47367	//       "default": "1000",
47368	//       "description": "Maximum number of results to return.",
47369	//       "format": "int32",
47370	//       "location": "query",
47371	//       "maximum": "1000",
47372	//       "minimum": "0",
47373	//       "type": "integer"
47374	//     },
47375	//     "pageToken": {
47376	//       "description": "Value of the nextPageToken from the previous result page.",
47377	//       "location": "query",
47378	//       "type": "string"
47379	//     },
47380	//     "profileId": {
47381	//       "description": "User profile ID associated with this request.",
47382	//       "format": "int64",
47383	//       "location": "path",
47384	//       "required": true,
47385	//       "type": "string"
47386	//     },
47387	//     "searchString": {
47388	//       "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\".",
47389	//       "location": "query",
47390	//       "type": "string"
47391	//     },
47392	//     "sortField": {
47393	//       "default": "ID",
47394	//       "description": "Field by which to sort the list.",
47395	//       "enum": [
47396	//         "ID",
47397	//         "NAME"
47398	//       ],
47399	//       "enumDescriptions": [
47400	//         "",
47401	//         ""
47402	//       ],
47403	//       "location": "query",
47404	//       "type": "string"
47405	//     },
47406	//     "sortOrder": {
47407	//       "default": "ASCENDING",
47408	//       "description": "Order of sorted results.",
47409	//       "enum": [
47410	//         "ASCENDING",
47411	//         "DESCENDING"
47412	//       ],
47413	//       "enumDescriptions": [
47414	//         "",
47415	//         ""
47416	//       ],
47417	//       "location": "query",
47418	//       "type": "string"
47419	//     }
47420	//   },
47421	//   "path": "userprofiles/{profileId}/subaccounts",
47422	//   "response": {
47423	//     "$ref": "SubaccountsListResponse"
47424	//   },
47425	//   "scopes": [
47426	//     "https://www.googleapis.com/auth/dfatrafficking"
47427	//   ]
47428	// }
47429
47430}
47431
47432// Pages invokes f for each page of results.
47433// A non-nil error returned from f will halt the iteration.
47434// The provided context supersedes any context provided to the Context method.
47435func (c *SubaccountsListCall) Pages(ctx context.Context, f func(*SubaccountsListResponse) error) error {
47436	c.ctx_ = ctx
47437	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
47438	for {
47439		x, err := c.Do()
47440		if err != nil {
47441			return err
47442		}
47443		if err := f(x); err != nil {
47444			return err
47445		}
47446		if x.NextPageToken == "" {
47447			return nil
47448		}
47449		c.PageToken(x.NextPageToken)
47450	}
47451}
47452
47453// method id "dfareporting.subaccounts.patch":
47454
47455type SubaccountsPatchCall struct {
47456	s          *Service
47457	profileId  int64
47458	subaccount *Subaccount
47459	urlParams_ gensupport.URLParams
47460	ctx_       context.Context
47461	header_    http.Header
47462}
47463
47464// Patch: Updates an existing subaccount. This method supports patch
47465// semantics.
47466func (r *SubaccountsService) Patch(profileId int64, id int64, subaccount *Subaccount) *SubaccountsPatchCall {
47467	c := &SubaccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47468	c.profileId = profileId
47469	c.urlParams_.Set("id", fmt.Sprint(id))
47470	c.subaccount = subaccount
47471	return c
47472}
47473
47474// Fields allows partial responses to be retrieved. See
47475// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47476// for more information.
47477func (c *SubaccountsPatchCall) Fields(s ...googleapi.Field) *SubaccountsPatchCall {
47478	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47479	return c
47480}
47481
47482// Context sets the context to be used in this call's Do method. Any
47483// pending HTTP request will be aborted if the provided context is
47484// canceled.
47485func (c *SubaccountsPatchCall) Context(ctx context.Context) *SubaccountsPatchCall {
47486	c.ctx_ = ctx
47487	return c
47488}
47489
47490// Header returns an http.Header that can be modified by the caller to
47491// add HTTP headers to the request.
47492func (c *SubaccountsPatchCall) Header() http.Header {
47493	if c.header_ == nil {
47494		c.header_ = make(http.Header)
47495	}
47496	return c.header_
47497}
47498
47499func (c *SubaccountsPatchCall) doRequest(alt string) (*http.Response, error) {
47500	reqHeaders := make(http.Header)
47501	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
47502	for k, v := range c.header_ {
47503		reqHeaders[k] = v
47504	}
47505	reqHeaders.Set("User-Agent", c.s.userAgent())
47506	var body io.Reader = nil
47507	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
47508	if err != nil {
47509		return nil, err
47510	}
47511	reqHeaders.Set("Content-Type", "application/json")
47512	c.urlParams_.Set("alt", alt)
47513	c.urlParams_.Set("prettyPrint", "false")
47514	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47515	urls += "?" + c.urlParams_.Encode()
47516	req, err := http.NewRequest("PATCH", urls, body)
47517	if err != nil {
47518		return nil, err
47519	}
47520	req.Header = reqHeaders
47521	googleapi.Expand(req.URL, map[string]string{
47522		"profileId": strconv.FormatInt(c.profileId, 10),
47523	})
47524	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47525}
47526
47527// Do executes the "dfareporting.subaccounts.patch" call.
47528// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
47529// status code is an error. Response headers are in either
47530// *Subaccount.ServerResponse.Header or (if a response was returned at
47531// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47532// to check whether the returned error was because
47533// http.StatusNotModified was returned.
47534func (c *SubaccountsPatchCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
47535	gensupport.SetOptions(c.urlParams_, opts...)
47536	res, err := c.doRequest("json")
47537	if res != nil && res.StatusCode == http.StatusNotModified {
47538		if res.Body != nil {
47539			res.Body.Close()
47540		}
47541		return nil, &googleapi.Error{
47542			Code:   res.StatusCode,
47543			Header: res.Header,
47544		}
47545	}
47546	if err != nil {
47547		return nil, err
47548	}
47549	defer googleapi.CloseBody(res)
47550	if err := googleapi.CheckResponse(res); err != nil {
47551		return nil, err
47552	}
47553	ret := &Subaccount{
47554		ServerResponse: googleapi.ServerResponse{
47555			Header:         res.Header,
47556			HTTPStatusCode: res.StatusCode,
47557		},
47558	}
47559	target := &ret
47560	if err := gensupport.DecodeResponse(target, res); err != nil {
47561		return nil, err
47562	}
47563	return ret, nil
47564	// {
47565	//   "description": "Updates an existing subaccount. This method supports patch semantics.",
47566	//   "httpMethod": "PATCH",
47567	//   "id": "dfareporting.subaccounts.patch",
47568	//   "parameterOrder": [
47569	//     "profileId",
47570	//     "id"
47571	//   ],
47572	//   "parameters": {
47573	//     "id": {
47574	//       "description": "Subaccount ID.",
47575	//       "format": "int64",
47576	//       "location": "query",
47577	//       "required": true,
47578	//       "type": "string"
47579	//     },
47580	//     "profileId": {
47581	//       "description": "User profile ID associated with this request.",
47582	//       "format": "int64",
47583	//       "location": "path",
47584	//       "required": true,
47585	//       "type": "string"
47586	//     }
47587	//   },
47588	//   "path": "userprofiles/{profileId}/subaccounts",
47589	//   "request": {
47590	//     "$ref": "Subaccount"
47591	//   },
47592	//   "response": {
47593	//     "$ref": "Subaccount"
47594	//   },
47595	//   "scopes": [
47596	//     "https://www.googleapis.com/auth/dfatrafficking"
47597	//   ]
47598	// }
47599
47600}
47601
47602// method id "dfareporting.subaccounts.update":
47603
47604type SubaccountsUpdateCall struct {
47605	s          *Service
47606	profileId  int64
47607	subaccount *Subaccount
47608	urlParams_ gensupport.URLParams
47609	ctx_       context.Context
47610	header_    http.Header
47611}
47612
47613// Update: Updates an existing subaccount.
47614func (r *SubaccountsService) Update(profileId int64, subaccount *Subaccount) *SubaccountsUpdateCall {
47615	c := &SubaccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47616	c.profileId = profileId
47617	c.subaccount = subaccount
47618	return c
47619}
47620
47621// Fields allows partial responses to be retrieved. See
47622// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47623// for more information.
47624func (c *SubaccountsUpdateCall) Fields(s ...googleapi.Field) *SubaccountsUpdateCall {
47625	c.urlParams_.Set("fields", googleapi.CombineFields(s))
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 *SubaccountsUpdateCall) Context(ctx context.Context) *SubaccountsUpdateCall {
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 *SubaccountsUpdateCall) Header() http.Header {
47640	if c.header_ == nil {
47641		c.header_ = make(http.Header)
47642	}
47643	return c.header_
47644}
47645
47646func (c *SubaccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
47647	reqHeaders := make(http.Header)
47648	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
47649	for k, v := range c.header_ {
47650		reqHeaders[k] = v
47651	}
47652	reqHeaders.Set("User-Agent", c.s.userAgent())
47653	var body io.Reader = nil
47654	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
47655	if err != nil {
47656		return nil, err
47657	}
47658	reqHeaders.Set("Content-Type", "application/json")
47659	c.urlParams_.Set("alt", alt)
47660	c.urlParams_.Set("prettyPrint", "false")
47661	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47662	urls += "?" + c.urlParams_.Encode()
47663	req, err := http.NewRequest("PUT", urls, body)
47664	if err != nil {
47665		return nil, err
47666	}
47667	req.Header = reqHeaders
47668	googleapi.Expand(req.URL, map[string]string{
47669		"profileId": strconv.FormatInt(c.profileId, 10),
47670	})
47671	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47672}
47673
47674// Do executes the "dfareporting.subaccounts.update" call.
47675// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
47676// status code is an error. Response headers are in either
47677// *Subaccount.ServerResponse.Header or (if a response was returned at
47678// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47679// to check whether the returned error was because
47680// http.StatusNotModified was returned.
47681func (c *SubaccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
47682	gensupport.SetOptions(c.urlParams_, opts...)
47683	res, err := c.doRequest("json")
47684	if res != nil && res.StatusCode == http.StatusNotModified {
47685		if res.Body != nil {
47686			res.Body.Close()
47687		}
47688		return nil, &googleapi.Error{
47689			Code:   res.StatusCode,
47690			Header: res.Header,
47691		}
47692	}
47693	if err != nil {
47694		return nil, err
47695	}
47696	defer googleapi.CloseBody(res)
47697	if err := googleapi.CheckResponse(res); err != nil {
47698		return nil, err
47699	}
47700	ret := &Subaccount{
47701		ServerResponse: googleapi.ServerResponse{
47702			Header:         res.Header,
47703			HTTPStatusCode: res.StatusCode,
47704		},
47705	}
47706	target := &ret
47707	if err := gensupport.DecodeResponse(target, res); err != nil {
47708		return nil, err
47709	}
47710	return ret, nil
47711	// {
47712	//   "description": "Updates an existing subaccount.",
47713	//   "httpMethod": "PUT",
47714	//   "id": "dfareporting.subaccounts.update",
47715	//   "parameterOrder": [
47716	//     "profileId"
47717	//   ],
47718	//   "parameters": {
47719	//     "profileId": {
47720	//       "description": "User profile ID associated with this request.",
47721	//       "format": "int64",
47722	//       "location": "path",
47723	//       "required": true,
47724	//       "type": "string"
47725	//     }
47726	//   },
47727	//   "path": "userprofiles/{profileId}/subaccounts",
47728	//   "request": {
47729	//     "$ref": "Subaccount"
47730	//   },
47731	//   "response": {
47732	//     "$ref": "Subaccount"
47733	//   },
47734	//   "scopes": [
47735	//     "https://www.googleapis.com/auth/dfatrafficking"
47736	//   ]
47737	// }
47738
47739}
47740
47741// method id "dfareporting.targetableRemarketingLists.get":
47742
47743type TargetableRemarketingListsGetCall struct {
47744	s            *Service
47745	profileId    int64
47746	id           int64
47747	urlParams_   gensupport.URLParams
47748	ifNoneMatch_ string
47749	ctx_         context.Context
47750	header_      http.Header
47751}
47752
47753// Get: Gets one remarketing list by ID.
47754func (r *TargetableRemarketingListsService) Get(profileId int64, id int64) *TargetableRemarketingListsGetCall {
47755	c := &TargetableRemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47756	c.profileId = profileId
47757	c.id = id
47758	return c
47759}
47760
47761// Fields allows partial responses to be retrieved. See
47762// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47763// for more information.
47764func (c *TargetableRemarketingListsGetCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsGetCall {
47765	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47766	return c
47767}
47768
47769// IfNoneMatch sets the optional parameter which makes the operation
47770// fail if the object's ETag matches the given value. This is useful for
47771// getting updates only after the object has changed since the last
47772// request. Use googleapi.IsNotModified to check whether the response
47773// error from Do is the result of In-None-Match.
47774func (c *TargetableRemarketingListsGetCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsGetCall {
47775	c.ifNoneMatch_ = entityTag
47776	return c
47777}
47778
47779// Context sets the context to be used in this call's Do method. Any
47780// pending HTTP request will be aborted if the provided context is
47781// canceled.
47782func (c *TargetableRemarketingListsGetCall) Context(ctx context.Context) *TargetableRemarketingListsGetCall {
47783	c.ctx_ = ctx
47784	return c
47785}
47786
47787// Header returns an http.Header that can be modified by the caller to
47788// add HTTP headers to the request.
47789func (c *TargetableRemarketingListsGetCall) Header() http.Header {
47790	if c.header_ == nil {
47791		c.header_ = make(http.Header)
47792	}
47793	return c.header_
47794}
47795
47796func (c *TargetableRemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
47797	reqHeaders := make(http.Header)
47798	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
47799	for k, v := range c.header_ {
47800		reqHeaders[k] = v
47801	}
47802	reqHeaders.Set("User-Agent", c.s.userAgent())
47803	if c.ifNoneMatch_ != "" {
47804		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47805	}
47806	var body io.Reader = nil
47807	c.urlParams_.Set("alt", alt)
47808	c.urlParams_.Set("prettyPrint", "false")
47809	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists/{id}")
47810	urls += "?" + c.urlParams_.Encode()
47811	req, err := http.NewRequest("GET", urls, body)
47812	if err != nil {
47813		return nil, err
47814	}
47815	req.Header = reqHeaders
47816	googleapi.Expand(req.URL, map[string]string{
47817		"profileId": strconv.FormatInt(c.profileId, 10),
47818		"id":        strconv.FormatInt(c.id, 10),
47819	})
47820	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47821}
47822
47823// Do executes the "dfareporting.targetableRemarketingLists.get" call.
47824// Exactly one of *TargetableRemarketingList or error will be non-nil.
47825// Any non-2xx status code is an error. Response headers are in either
47826// *TargetableRemarketingList.ServerResponse.Header or (if a response
47827// was returned at all) in error.(*googleapi.Error).Header. Use
47828// googleapi.IsNotModified to check whether the returned error was
47829// because http.StatusNotModified was returned.
47830func (c *TargetableRemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingList, error) {
47831	gensupport.SetOptions(c.urlParams_, opts...)
47832	res, err := c.doRequest("json")
47833	if res != nil && res.StatusCode == http.StatusNotModified {
47834		if res.Body != nil {
47835			res.Body.Close()
47836		}
47837		return nil, &googleapi.Error{
47838			Code:   res.StatusCode,
47839			Header: res.Header,
47840		}
47841	}
47842	if err != nil {
47843		return nil, err
47844	}
47845	defer googleapi.CloseBody(res)
47846	if err := googleapi.CheckResponse(res); err != nil {
47847		return nil, err
47848	}
47849	ret := &TargetableRemarketingList{
47850		ServerResponse: googleapi.ServerResponse{
47851			Header:         res.Header,
47852			HTTPStatusCode: res.StatusCode,
47853		},
47854	}
47855	target := &ret
47856	if err := gensupport.DecodeResponse(target, res); err != nil {
47857		return nil, err
47858	}
47859	return ret, nil
47860	// {
47861	//   "description": "Gets one remarketing list by ID.",
47862	//   "httpMethod": "GET",
47863	//   "id": "dfareporting.targetableRemarketingLists.get",
47864	//   "parameterOrder": [
47865	//     "profileId",
47866	//     "id"
47867	//   ],
47868	//   "parameters": {
47869	//     "id": {
47870	//       "description": "Remarketing list ID.",
47871	//       "format": "int64",
47872	//       "location": "path",
47873	//       "required": true,
47874	//       "type": "string"
47875	//     },
47876	//     "profileId": {
47877	//       "description": "User profile ID associated with this request.",
47878	//       "format": "int64",
47879	//       "location": "path",
47880	//       "required": true,
47881	//       "type": "string"
47882	//     }
47883	//   },
47884	//   "path": "userprofiles/{profileId}/targetableRemarketingLists/{id}",
47885	//   "response": {
47886	//     "$ref": "TargetableRemarketingList"
47887	//   },
47888	//   "scopes": [
47889	//     "https://www.googleapis.com/auth/dfatrafficking"
47890	//   ]
47891	// }
47892
47893}
47894
47895// method id "dfareporting.targetableRemarketingLists.list":
47896
47897type TargetableRemarketingListsListCall struct {
47898	s            *Service
47899	profileId    int64
47900	urlParams_   gensupport.URLParams
47901	ifNoneMatch_ string
47902	ctx_         context.Context
47903	header_      http.Header
47904}
47905
47906// List: Retrieves a list of targetable remarketing lists, possibly
47907// filtered. This method supports paging.
47908func (r *TargetableRemarketingListsService) List(profileId int64, advertiserId int64) *TargetableRemarketingListsListCall {
47909	c := &TargetableRemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47910	c.profileId = profileId
47911	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
47912	return c
47913}
47914
47915// Active sets the optional parameter "active": Select only active or
47916// only inactive targetable remarketing lists.
47917func (c *TargetableRemarketingListsListCall) Active(active bool) *TargetableRemarketingListsListCall {
47918	c.urlParams_.Set("active", fmt.Sprint(active))
47919	return c
47920}
47921
47922// MaxResults sets the optional parameter "maxResults": Maximum number
47923// of results to return.
47924func (c *TargetableRemarketingListsListCall) MaxResults(maxResults int64) *TargetableRemarketingListsListCall {
47925	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
47926	return c
47927}
47928
47929// Name sets the optional parameter "name": Allows searching for objects
47930// by name or ID. Wildcards (*) are allowed. For example, "remarketing
47931// list*2015" will return objects with names like "remarketing list June
47932// 2015", "remarketing list April 2015", or simply "remarketing list
47933// 2015". Most of the searches also add wildcards implicitly at the
47934// start and the end of the search string. For example, a search string
47935// of "remarketing list" will match objects with name "my remarketing
47936// list", "remarketing list 2015", or simply "remarketing list".
47937func (c *TargetableRemarketingListsListCall) Name(name string) *TargetableRemarketingListsListCall {
47938	c.urlParams_.Set("name", name)
47939	return c
47940}
47941
47942// PageToken sets the optional parameter "pageToken": Value of the
47943// nextPageToken from the previous result page.
47944func (c *TargetableRemarketingListsListCall) PageToken(pageToken string) *TargetableRemarketingListsListCall {
47945	c.urlParams_.Set("pageToken", pageToken)
47946	return c
47947}
47948
47949// SortField sets the optional parameter "sortField": Field by which to
47950// sort the list.
47951//
47952// Possible values:
47953//   "ID" (default)
47954//   "NAME"
47955func (c *TargetableRemarketingListsListCall) SortField(sortField string) *TargetableRemarketingListsListCall {
47956	c.urlParams_.Set("sortField", sortField)
47957	return c
47958}
47959
47960// SortOrder sets the optional parameter "sortOrder": Order of sorted
47961// results.
47962//
47963// Possible values:
47964//   "ASCENDING" (default)
47965//   "DESCENDING"
47966func (c *TargetableRemarketingListsListCall) SortOrder(sortOrder string) *TargetableRemarketingListsListCall {
47967	c.urlParams_.Set("sortOrder", sortOrder)
47968	return c
47969}
47970
47971// Fields allows partial responses to be retrieved. See
47972// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47973// for more information.
47974func (c *TargetableRemarketingListsListCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsListCall {
47975	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47976	return c
47977}
47978
47979// IfNoneMatch sets the optional parameter which makes the operation
47980// fail if the object's ETag matches the given value. This is useful for
47981// getting updates only after the object has changed since the last
47982// request. Use googleapi.IsNotModified to check whether the response
47983// error from Do is the result of In-None-Match.
47984func (c *TargetableRemarketingListsListCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsListCall {
47985	c.ifNoneMatch_ = entityTag
47986	return c
47987}
47988
47989// Context sets the context to be used in this call's Do method. Any
47990// pending HTTP request will be aborted if the provided context is
47991// canceled.
47992func (c *TargetableRemarketingListsListCall) Context(ctx context.Context) *TargetableRemarketingListsListCall {
47993	c.ctx_ = ctx
47994	return c
47995}
47996
47997// Header returns an http.Header that can be modified by the caller to
47998// add HTTP headers to the request.
47999func (c *TargetableRemarketingListsListCall) Header() http.Header {
48000	if c.header_ == nil {
48001		c.header_ = make(http.Header)
48002	}
48003	return c.header_
48004}
48005
48006func (c *TargetableRemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
48007	reqHeaders := make(http.Header)
48008	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
48009	for k, v := range c.header_ {
48010		reqHeaders[k] = v
48011	}
48012	reqHeaders.Set("User-Agent", c.s.userAgent())
48013	if c.ifNoneMatch_ != "" {
48014		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48015	}
48016	var body io.Reader = nil
48017	c.urlParams_.Set("alt", alt)
48018	c.urlParams_.Set("prettyPrint", "false")
48019	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists")
48020	urls += "?" + c.urlParams_.Encode()
48021	req, err := http.NewRequest("GET", urls, body)
48022	if err != nil {
48023		return nil, err
48024	}
48025	req.Header = reqHeaders
48026	googleapi.Expand(req.URL, map[string]string{
48027		"profileId": strconv.FormatInt(c.profileId, 10),
48028	})
48029	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48030}
48031
48032// Do executes the "dfareporting.targetableRemarketingLists.list" call.
48033// Exactly one of *TargetableRemarketingListsListResponse or error will
48034// be non-nil. Any non-2xx status code is an error. Response headers are
48035// in either
48036// *TargetableRemarketingListsListResponse.ServerResponse.Header or (if
48037// a response was returned at all) in error.(*googleapi.Error).Header.
48038// Use googleapi.IsNotModified to check whether the returned error was
48039// because http.StatusNotModified was returned.
48040func (c *TargetableRemarketingListsListCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingListsListResponse, error) {
48041	gensupport.SetOptions(c.urlParams_, opts...)
48042	res, err := c.doRequest("json")
48043	if res != nil && res.StatusCode == http.StatusNotModified {
48044		if res.Body != nil {
48045			res.Body.Close()
48046		}
48047		return nil, &googleapi.Error{
48048			Code:   res.StatusCode,
48049			Header: res.Header,
48050		}
48051	}
48052	if err != nil {
48053		return nil, err
48054	}
48055	defer googleapi.CloseBody(res)
48056	if err := googleapi.CheckResponse(res); err != nil {
48057		return nil, err
48058	}
48059	ret := &TargetableRemarketingListsListResponse{
48060		ServerResponse: googleapi.ServerResponse{
48061			Header:         res.Header,
48062			HTTPStatusCode: res.StatusCode,
48063		},
48064	}
48065	target := &ret
48066	if err := gensupport.DecodeResponse(target, res); err != nil {
48067		return nil, err
48068	}
48069	return ret, nil
48070	// {
48071	//   "description": "Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging.",
48072	//   "httpMethod": "GET",
48073	//   "id": "dfareporting.targetableRemarketingLists.list",
48074	//   "parameterOrder": [
48075	//     "profileId",
48076	//     "advertiserId"
48077	//   ],
48078	//   "parameters": {
48079	//     "active": {
48080	//       "description": "Select only active or only inactive targetable remarketing lists.",
48081	//       "location": "query",
48082	//       "type": "boolean"
48083	//     },
48084	//     "advertiserId": {
48085	//       "description": "Select only targetable remarketing lists targetable by these advertisers.",
48086	//       "format": "int64",
48087	//       "location": "query",
48088	//       "required": true,
48089	//       "type": "string"
48090	//     },
48091	//     "maxResults": {
48092	//       "default": "1000",
48093	//       "description": "Maximum number of results to return.",
48094	//       "format": "int32",
48095	//       "location": "query",
48096	//       "maximum": "1000",
48097	//       "minimum": "0",
48098	//       "type": "integer"
48099	//     },
48100	//     "name": {
48101	//       "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\".",
48102	//       "location": "query",
48103	//       "type": "string"
48104	//     },
48105	//     "pageToken": {
48106	//       "description": "Value of the nextPageToken from the previous result page.",
48107	//       "location": "query",
48108	//       "type": "string"
48109	//     },
48110	//     "profileId": {
48111	//       "description": "User profile ID associated with this request.",
48112	//       "format": "int64",
48113	//       "location": "path",
48114	//       "required": true,
48115	//       "type": "string"
48116	//     },
48117	//     "sortField": {
48118	//       "default": "ID",
48119	//       "description": "Field by which to sort the list.",
48120	//       "enum": [
48121	//         "ID",
48122	//         "NAME"
48123	//       ],
48124	//       "enumDescriptions": [
48125	//         "",
48126	//         ""
48127	//       ],
48128	//       "location": "query",
48129	//       "type": "string"
48130	//     },
48131	//     "sortOrder": {
48132	//       "default": "ASCENDING",
48133	//       "description": "Order of sorted results.",
48134	//       "enum": [
48135	//         "ASCENDING",
48136	//         "DESCENDING"
48137	//       ],
48138	//       "enumDescriptions": [
48139	//         "",
48140	//         ""
48141	//       ],
48142	//       "location": "query",
48143	//       "type": "string"
48144	//     }
48145	//   },
48146	//   "path": "userprofiles/{profileId}/targetableRemarketingLists",
48147	//   "response": {
48148	//     "$ref": "TargetableRemarketingListsListResponse"
48149	//   },
48150	//   "scopes": [
48151	//     "https://www.googleapis.com/auth/dfatrafficking"
48152	//   ]
48153	// }
48154
48155}
48156
48157// Pages invokes f for each page of results.
48158// A non-nil error returned from f will halt the iteration.
48159// The provided context supersedes any context provided to the Context method.
48160func (c *TargetableRemarketingListsListCall) Pages(ctx context.Context, f func(*TargetableRemarketingListsListResponse) error) error {
48161	c.ctx_ = ctx
48162	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
48163	for {
48164		x, err := c.Do()
48165		if err != nil {
48166			return err
48167		}
48168		if err := f(x); err != nil {
48169			return err
48170		}
48171		if x.NextPageToken == "" {
48172			return nil
48173		}
48174		c.PageToken(x.NextPageToken)
48175	}
48176}
48177
48178// method id "dfareporting.targetingTemplates.get":
48179
48180type TargetingTemplatesGetCall struct {
48181	s            *Service
48182	profileId    int64
48183	id           int64
48184	urlParams_   gensupport.URLParams
48185	ifNoneMatch_ string
48186	ctx_         context.Context
48187	header_      http.Header
48188}
48189
48190// Get: Gets one targeting template by ID.
48191func (r *TargetingTemplatesService) Get(profileId int64, id int64) *TargetingTemplatesGetCall {
48192	c := &TargetingTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48193	c.profileId = profileId
48194	c.id = id
48195	return c
48196}
48197
48198// Fields allows partial responses to be retrieved. See
48199// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48200// for more information.
48201func (c *TargetingTemplatesGetCall) Fields(s ...googleapi.Field) *TargetingTemplatesGetCall {
48202	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48203	return c
48204}
48205
48206// IfNoneMatch sets the optional parameter which makes the operation
48207// fail if the object's ETag matches the given value. This is useful for
48208// getting updates only after the object has changed since the last
48209// request. Use googleapi.IsNotModified to check whether the response
48210// error from Do is the result of In-None-Match.
48211func (c *TargetingTemplatesGetCall) IfNoneMatch(entityTag string) *TargetingTemplatesGetCall {
48212	c.ifNoneMatch_ = entityTag
48213	return c
48214}
48215
48216// Context sets the context to be used in this call's Do method. Any
48217// pending HTTP request will be aborted if the provided context is
48218// canceled.
48219func (c *TargetingTemplatesGetCall) Context(ctx context.Context) *TargetingTemplatesGetCall {
48220	c.ctx_ = ctx
48221	return c
48222}
48223
48224// Header returns an http.Header that can be modified by the caller to
48225// add HTTP headers to the request.
48226func (c *TargetingTemplatesGetCall) Header() http.Header {
48227	if c.header_ == nil {
48228		c.header_ = make(http.Header)
48229	}
48230	return c.header_
48231}
48232
48233func (c *TargetingTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
48234	reqHeaders := make(http.Header)
48235	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
48236	for k, v := range c.header_ {
48237		reqHeaders[k] = v
48238	}
48239	reqHeaders.Set("User-Agent", c.s.userAgent())
48240	if c.ifNoneMatch_ != "" {
48241		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48242	}
48243	var body io.Reader = nil
48244	c.urlParams_.Set("alt", alt)
48245	c.urlParams_.Set("prettyPrint", "false")
48246	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates/{id}")
48247	urls += "?" + c.urlParams_.Encode()
48248	req, err := http.NewRequest("GET", urls, body)
48249	if err != nil {
48250		return nil, err
48251	}
48252	req.Header = reqHeaders
48253	googleapi.Expand(req.URL, map[string]string{
48254		"profileId": strconv.FormatInt(c.profileId, 10),
48255		"id":        strconv.FormatInt(c.id, 10),
48256	})
48257	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48258}
48259
48260// Do executes the "dfareporting.targetingTemplates.get" call.
48261// Exactly one of *TargetingTemplate or error will be non-nil. Any
48262// non-2xx status code is an error. Response headers are in either
48263// *TargetingTemplate.ServerResponse.Header or (if a response was
48264// returned at all) in error.(*googleapi.Error).Header. Use
48265// googleapi.IsNotModified to check whether the returned error was
48266// because http.StatusNotModified was returned.
48267func (c *TargetingTemplatesGetCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48268	gensupport.SetOptions(c.urlParams_, opts...)
48269	res, err := c.doRequest("json")
48270	if res != nil && res.StatusCode == http.StatusNotModified {
48271		if res.Body != nil {
48272			res.Body.Close()
48273		}
48274		return nil, &googleapi.Error{
48275			Code:   res.StatusCode,
48276			Header: res.Header,
48277		}
48278	}
48279	if err != nil {
48280		return nil, err
48281	}
48282	defer googleapi.CloseBody(res)
48283	if err := googleapi.CheckResponse(res); err != nil {
48284		return nil, err
48285	}
48286	ret := &TargetingTemplate{
48287		ServerResponse: googleapi.ServerResponse{
48288			Header:         res.Header,
48289			HTTPStatusCode: res.StatusCode,
48290		},
48291	}
48292	target := &ret
48293	if err := gensupport.DecodeResponse(target, res); err != nil {
48294		return nil, err
48295	}
48296	return ret, nil
48297	// {
48298	//   "description": "Gets one targeting template by ID.",
48299	//   "httpMethod": "GET",
48300	//   "id": "dfareporting.targetingTemplates.get",
48301	//   "parameterOrder": [
48302	//     "profileId",
48303	//     "id"
48304	//   ],
48305	//   "parameters": {
48306	//     "id": {
48307	//       "description": "Targeting template ID.",
48308	//       "format": "int64",
48309	//       "location": "path",
48310	//       "required": true,
48311	//       "type": "string"
48312	//     },
48313	//     "profileId": {
48314	//       "description": "User profile ID associated with this request.",
48315	//       "format": "int64",
48316	//       "location": "path",
48317	//       "required": true,
48318	//       "type": "string"
48319	//     }
48320	//   },
48321	//   "path": "userprofiles/{profileId}/targetingTemplates/{id}",
48322	//   "response": {
48323	//     "$ref": "TargetingTemplate"
48324	//   },
48325	//   "scopes": [
48326	//     "https://www.googleapis.com/auth/dfatrafficking"
48327	//   ]
48328	// }
48329
48330}
48331
48332// method id "dfareporting.targetingTemplates.insert":
48333
48334type TargetingTemplatesInsertCall struct {
48335	s                 *Service
48336	profileId         int64
48337	targetingtemplate *TargetingTemplate
48338	urlParams_        gensupport.URLParams
48339	ctx_              context.Context
48340	header_           http.Header
48341}
48342
48343// Insert: Inserts a new targeting template.
48344func (r *TargetingTemplatesService) Insert(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesInsertCall {
48345	c := &TargetingTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48346	c.profileId = profileId
48347	c.targetingtemplate = targetingtemplate
48348	return c
48349}
48350
48351// Fields allows partial responses to be retrieved. See
48352// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48353// for more information.
48354func (c *TargetingTemplatesInsertCall) Fields(s ...googleapi.Field) *TargetingTemplatesInsertCall {
48355	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48356	return c
48357}
48358
48359// Context sets the context to be used in this call's Do method. Any
48360// pending HTTP request will be aborted if the provided context is
48361// canceled.
48362func (c *TargetingTemplatesInsertCall) Context(ctx context.Context) *TargetingTemplatesInsertCall {
48363	c.ctx_ = ctx
48364	return c
48365}
48366
48367// Header returns an http.Header that can be modified by the caller to
48368// add HTTP headers to the request.
48369func (c *TargetingTemplatesInsertCall) Header() http.Header {
48370	if c.header_ == nil {
48371		c.header_ = make(http.Header)
48372	}
48373	return c.header_
48374}
48375
48376func (c *TargetingTemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
48377	reqHeaders := make(http.Header)
48378	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
48379	for k, v := range c.header_ {
48380		reqHeaders[k] = v
48381	}
48382	reqHeaders.Set("User-Agent", c.s.userAgent())
48383	var body io.Reader = nil
48384	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48385	if err != nil {
48386		return nil, err
48387	}
48388	reqHeaders.Set("Content-Type", "application/json")
48389	c.urlParams_.Set("alt", alt)
48390	c.urlParams_.Set("prettyPrint", "false")
48391	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48392	urls += "?" + c.urlParams_.Encode()
48393	req, err := http.NewRequest("POST", urls, body)
48394	if err != nil {
48395		return nil, err
48396	}
48397	req.Header = reqHeaders
48398	googleapi.Expand(req.URL, map[string]string{
48399		"profileId": strconv.FormatInt(c.profileId, 10),
48400	})
48401	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48402}
48403
48404// Do executes the "dfareporting.targetingTemplates.insert" call.
48405// Exactly one of *TargetingTemplate or error will be non-nil. Any
48406// non-2xx status code is an error. Response headers are in either
48407// *TargetingTemplate.ServerResponse.Header or (if a response was
48408// returned at all) in error.(*googleapi.Error).Header. Use
48409// googleapi.IsNotModified to check whether the returned error was
48410// because http.StatusNotModified was returned.
48411func (c *TargetingTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48412	gensupport.SetOptions(c.urlParams_, opts...)
48413	res, err := c.doRequest("json")
48414	if res != nil && res.StatusCode == http.StatusNotModified {
48415		if res.Body != nil {
48416			res.Body.Close()
48417		}
48418		return nil, &googleapi.Error{
48419			Code:   res.StatusCode,
48420			Header: res.Header,
48421		}
48422	}
48423	if err != nil {
48424		return nil, err
48425	}
48426	defer googleapi.CloseBody(res)
48427	if err := googleapi.CheckResponse(res); err != nil {
48428		return nil, err
48429	}
48430	ret := &TargetingTemplate{
48431		ServerResponse: googleapi.ServerResponse{
48432			Header:         res.Header,
48433			HTTPStatusCode: res.StatusCode,
48434		},
48435	}
48436	target := &ret
48437	if err := gensupport.DecodeResponse(target, res); err != nil {
48438		return nil, err
48439	}
48440	return ret, nil
48441	// {
48442	//   "description": "Inserts a new targeting template.",
48443	//   "httpMethod": "POST",
48444	//   "id": "dfareporting.targetingTemplates.insert",
48445	//   "parameterOrder": [
48446	//     "profileId"
48447	//   ],
48448	//   "parameters": {
48449	//     "profileId": {
48450	//       "description": "User profile ID associated with this request.",
48451	//       "format": "int64",
48452	//       "location": "path",
48453	//       "required": true,
48454	//       "type": "string"
48455	//     }
48456	//   },
48457	//   "path": "userprofiles/{profileId}/targetingTemplates",
48458	//   "request": {
48459	//     "$ref": "TargetingTemplate"
48460	//   },
48461	//   "response": {
48462	//     "$ref": "TargetingTemplate"
48463	//   },
48464	//   "scopes": [
48465	//     "https://www.googleapis.com/auth/dfatrafficking"
48466	//   ]
48467	// }
48468
48469}
48470
48471// method id "dfareporting.targetingTemplates.list":
48472
48473type TargetingTemplatesListCall struct {
48474	s            *Service
48475	profileId    int64
48476	urlParams_   gensupport.URLParams
48477	ifNoneMatch_ string
48478	ctx_         context.Context
48479	header_      http.Header
48480}
48481
48482// List: Retrieves a list of targeting templates, optionally filtered.
48483// This method supports paging.
48484func (r *TargetingTemplatesService) List(profileId int64) *TargetingTemplatesListCall {
48485	c := &TargetingTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48486	c.profileId = profileId
48487	return c
48488}
48489
48490// AdvertiserId sets the optional parameter "advertiserId": Select only
48491// targeting templates with this advertiser ID.
48492func (c *TargetingTemplatesListCall) AdvertiserId(advertiserId int64) *TargetingTemplatesListCall {
48493	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
48494	return c
48495}
48496
48497// Ids sets the optional parameter "ids": Select only targeting
48498// templates with these IDs.
48499func (c *TargetingTemplatesListCall) Ids(ids ...int64) *TargetingTemplatesListCall {
48500	var ids_ []string
48501	for _, v := range ids {
48502		ids_ = append(ids_, fmt.Sprint(v))
48503	}
48504	c.urlParams_.SetMulti("ids", ids_)
48505	return c
48506}
48507
48508// MaxResults sets the optional parameter "maxResults": Maximum number
48509// of results to return.
48510func (c *TargetingTemplatesListCall) MaxResults(maxResults int64) *TargetingTemplatesListCall {
48511	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
48512	return c
48513}
48514
48515// PageToken sets the optional parameter "pageToken": Value of the
48516// nextPageToken from the previous result page.
48517func (c *TargetingTemplatesListCall) PageToken(pageToken string) *TargetingTemplatesListCall {
48518	c.urlParams_.Set("pageToken", pageToken)
48519	return c
48520}
48521
48522// SearchString sets the optional parameter "searchString": Allows
48523// searching for objects by name or ID. Wildcards (*) are allowed. For
48524// example, "template*2015" will return objects with names like
48525// "template June 2015", "template April 2015", or simply "template
48526// 2015". Most of the searches also add wildcards implicitly at the
48527// start and the end of the search string. For example, a search string
48528// of "template" will match objects with name "my template", "template
48529// 2015", or simply "template".
48530func (c *TargetingTemplatesListCall) SearchString(searchString string) *TargetingTemplatesListCall {
48531	c.urlParams_.Set("searchString", searchString)
48532	return c
48533}
48534
48535// SortField sets the optional parameter "sortField": Field by which to
48536// sort the list.
48537//
48538// Possible values:
48539//   "ID" (default)
48540//   "NAME"
48541func (c *TargetingTemplatesListCall) SortField(sortField string) *TargetingTemplatesListCall {
48542	c.urlParams_.Set("sortField", sortField)
48543	return c
48544}
48545
48546// SortOrder sets the optional parameter "sortOrder": Order of sorted
48547// results.
48548//
48549// Possible values:
48550//   "ASCENDING" (default)
48551//   "DESCENDING"
48552func (c *TargetingTemplatesListCall) SortOrder(sortOrder string) *TargetingTemplatesListCall {
48553	c.urlParams_.Set("sortOrder", sortOrder)
48554	return c
48555}
48556
48557// Fields allows partial responses to be retrieved. See
48558// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48559// for more information.
48560func (c *TargetingTemplatesListCall) Fields(s ...googleapi.Field) *TargetingTemplatesListCall {
48561	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48562	return c
48563}
48564
48565// IfNoneMatch sets the optional parameter which makes the operation
48566// fail if the object's ETag matches the given value. This is useful for
48567// getting updates only after the object has changed since the last
48568// request. Use googleapi.IsNotModified to check whether the response
48569// error from Do is the result of In-None-Match.
48570func (c *TargetingTemplatesListCall) IfNoneMatch(entityTag string) *TargetingTemplatesListCall {
48571	c.ifNoneMatch_ = entityTag
48572	return c
48573}
48574
48575// Context sets the context to be used in this call's Do method. Any
48576// pending HTTP request will be aborted if the provided context is
48577// canceled.
48578func (c *TargetingTemplatesListCall) Context(ctx context.Context) *TargetingTemplatesListCall {
48579	c.ctx_ = ctx
48580	return c
48581}
48582
48583// Header returns an http.Header that can be modified by the caller to
48584// add HTTP headers to the request.
48585func (c *TargetingTemplatesListCall) Header() http.Header {
48586	if c.header_ == nil {
48587		c.header_ = make(http.Header)
48588	}
48589	return c.header_
48590}
48591
48592func (c *TargetingTemplatesListCall) doRequest(alt string) (*http.Response, error) {
48593	reqHeaders := make(http.Header)
48594	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
48595	for k, v := range c.header_ {
48596		reqHeaders[k] = v
48597	}
48598	reqHeaders.Set("User-Agent", c.s.userAgent())
48599	if c.ifNoneMatch_ != "" {
48600		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48601	}
48602	var body io.Reader = nil
48603	c.urlParams_.Set("alt", alt)
48604	c.urlParams_.Set("prettyPrint", "false")
48605	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48606	urls += "?" + c.urlParams_.Encode()
48607	req, err := http.NewRequest("GET", urls, body)
48608	if err != nil {
48609		return nil, err
48610	}
48611	req.Header = reqHeaders
48612	googleapi.Expand(req.URL, map[string]string{
48613		"profileId": strconv.FormatInt(c.profileId, 10),
48614	})
48615	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48616}
48617
48618// Do executes the "dfareporting.targetingTemplates.list" call.
48619// Exactly one of *TargetingTemplatesListResponse or error will be
48620// non-nil. Any non-2xx status code is an error. Response headers are in
48621// either *TargetingTemplatesListResponse.ServerResponse.Header or (if a
48622// response was returned at all) in error.(*googleapi.Error).Header. Use
48623// googleapi.IsNotModified to check whether the returned error was
48624// because http.StatusNotModified was returned.
48625func (c *TargetingTemplatesListCall) Do(opts ...googleapi.CallOption) (*TargetingTemplatesListResponse, error) {
48626	gensupport.SetOptions(c.urlParams_, opts...)
48627	res, err := c.doRequest("json")
48628	if res != nil && res.StatusCode == http.StatusNotModified {
48629		if res.Body != nil {
48630			res.Body.Close()
48631		}
48632		return nil, &googleapi.Error{
48633			Code:   res.StatusCode,
48634			Header: res.Header,
48635		}
48636	}
48637	if err != nil {
48638		return nil, err
48639	}
48640	defer googleapi.CloseBody(res)
48641	if err := googleapi.CheckResponse(res); err != nil {
48642		return nil, err
48643	}
48644	ret := &TargetingTemplatesListResponse{
48645		ServerResponse: googleapi.ServerResponse{
48646			Header:         res.Header,
48647			HTTPStatusCode: res.StatusCode,
48648		},
48649	}
48650	target := &ret
48651	if err := gensupport.DecodeResponse(target, res); err != nil {
48652		return nil, err
48653	}
48654	return ret, nil
48655	// {
48656	//   "description": "Retrieves a list of targeting templates, optionally filtered. This method supports paging.",
48657	//   "httpMethod": "GET",
48658	//   "id": "dfareporting.targetingTemplates.list",
48659	//   "parameterOrder": [
48660	//     "profileId"
48661	//   ],
48662	//   "parameters": {
48663	//     "advertiserId": {
48664	//       "description": "Select only targeting templates with this advertiser ID.",
48665	//       "format": "int64",
48666	//       "location": "query",
48667	//       "type": "string"
48668	//     },
48669	//     "ids": {
48670	//       "description": "Select only targeting templates with these IDs.",
48671	//       "format": "int64",
48672	//       "location": "query",
48673	//       "repeated": true,
48674	//       "type": "string"
48675	//     },
48676	//     "maxResults": {
48677	//       "default": "1000",
48678	//       "description": "Maximum number of results to return.",
48679	//       "format": "int32",
48680	//       "location": "query",
48681	//       "maximum": "1000",
48682	//       "minimum": "0",
48683	//       "type": "integer"
48684	//     },
48685	//     "pageToken": {
48686	//       "description": "Value of the nextPageToken from the previous result page.",
48687	//       "location": "query",
48688	//       "type": "string"
48689	//     },
48690	//     "profileId": {
48691	//       "description": "User profile ID associated with this request.",
48692	//       "format": "int64",
48693	//       "location": "path",
48694	//       "required": true,
48695	//       "type": "string"
48696	//     },
48697	//     "searchString": {
48698	//       "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\".",
48699	//       "location": "query",
48700	//       "type": "string"
48701	//     },
48702	//     "sortField": {
48703	//       "default": "ID",
48704	//       "description": "Field by which to sort the list.",
48705	//       "enum": [
48706	//         "ID",
48707	//         "NAME"
48708	//       ],
48709	//       "enumDescriptions": [
48710	//         "",
48711	//         ""
48712	//       ],
48713	//       "location": "query",
48714	//       "type": "string"
48715	//     },
48716	//     "sortOrder": {
48717	//       "default": "ASCENDING",
48718	//       "description": "Order of sorted results.",
48719	//       "enum": [
48720	//         "ASCENDING",
48721	//         "DESCENDING"
48722	//       ],
48723	//       "enumDescriptions": [
48724	//         "",
48725	//         ""
48726	//       ],
48727	//       "location": "query",
48728	//       "type": "string"
48729	//     }
48730	//   },
48731	//   "path": "userprofiles/{profileId}/targetingTemplates",
48732	//   "response": {
48733	//     "$ref": "TargetingTemplatesListResponse"
48734	//   },
48735	//   "scopes": [
48736	//     "https://www.googleapis.com/auth/dfatrafficking"
48737	//   ]
48738	// }
48739
48740}
48741
48742// Pages invokes f for each page of results.
48743// A non-nil error returned from f will halt the iteration.
48744// The provided context supersedes any context provided to the Context method.
48745func (c *TargetingTemplatesListCall) Pages(ctx context.Context, f func(*TargetingTemplatesListResponse) error) error {
48746	c.ctx_ = ctx
48747	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
48748	for {
48749		x, err := c.Do()
48750		if err != nil {
48751			return err
48752		}
48753		if err := f(x); err != nil {
48754			return err
48755		}
48756		if x.NextPageToken == "" {
48757			return nil
48758		}
48759		c.PageToken(x.NextPageToken)
48760	}
48761}
48762
48763// method id "dfareporting.targetingTemplates.patch":
48764
48765type TargetingTemplatesPatchCall struct {
48766	s                 *Service
48767	profileId         int64
48768	targetingtemplate *TargetingTemplate
48769	urlParams_        gensupport.URLParams
48770	ctx_              context.Context
48771	header_           http.Header
48772}
48773
48774// Patch: Updates an existing targeting template. This method supports
48775// patch semantics.
48776func (r *TargetingTemplatesService) Patch(profileId int64, id int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesPatchCall {
48777	c := &TargetingTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48778	c.profileId = profileId
48779	c.urlParams_.Set("id", fmt.Sprint(id))
48780	c.targetingtemplate = targetingtemplate
48781	return c
48782}
48783
48784// Fields allows partial responses to be retrieved. See
48785// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48786// for more information.
48787func (c *TargetingTemplatesPatchCall) Fields(s ...googleapi.Field) *TargetingTemplatesPatchCall {
48788	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48789	return c
48790}
48791
48792// Context sets the context to be used in this call's Do method. Any
48793// pending HTTP request will be aborted if the provided context is
48794// canceled.
48795func (c *TargetingTemplatesPatchCall) Context(ctx context.Context) *TargetingTemplatesPatchCall {
48796	c.ctx_ = ctx
48797	return c
48798}
48799
48800// Header returns an http.Header that can be modified by the caller to
48801// add HTTP headers to the request.
48802func (c *TargetingTemplatesPatchCall) Header() http.Header {
48803	if c.header_ == nil {
48804		c.header_ = make(http.Header)
48805	}
48806	return c.header_
48807}
48808
48809func (c *TargetingTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
48810	reqHeaders := make(http.Header)
48811	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
48812	for k, v := range c.header_ {
48813		reqHeaders[k] = v
48814	}
48815	reqHeaders.Set("User-Agent", c.s.userAgent())
48816	var body io.Reader = nil
48817	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48818	if err != nil {
48819		return nil, err
48820	}
48821	reqHeaders.Set("Content-Type", "application/json")
48822	c.urlParams_.Set("alt", alt)
48823	c.urlParams_.Set("prettyPrint", "false")
48824	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48825	urls += "?" + c.urlParams_.Encode()
48826	req, err := http.NewRequest("PATCH", urls, body)
48827	if err != nil {
48828		return nil, err
48829	}
48830	req.Header = reqHeaders
48831	googleapi.Expand(req.URL, map[string]string{
48832		"profileId": strconv.FormatInt(c.profileId, 10),
48833	})
48834	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48835}
48836
48837// Do executes the "dfareporting.targetingTemplates.patch" call.
48838// Exactly one of *TargetingTemplate or error will be non-nil. Any
48839// non-2xx status code is an error. Response headers are in either
48840// *TargetingTemplate.ServerResponse.Header or (if a response was
48841// returned at all) in error.(*googleapi.Error).Header. Use
48842// googleapi.IsNotModified to check whether the returned error was
48843// because http.StatusNotModified was returned.
48844func (c *TargetingTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48845	gensupport.SetOptions(c.urlParams_, opts...)
48846	res, err := c.doRequest("json")
48847	if res != nil && res.StatusCode == http.StatusNotModified {
48848		if res.Body != nil {
48849			res.Body.Close()
48850		}
48851		return nil, &googleapi.Error{
48852			Code:   res.StatusCode,
48853			Header: res.Header,
48854		}
48855	}
48856	if err != nil {
48857		return nil, err
48858	}
48859	defer googleapi.CloseBody(res)
48860	if err := googleapi.CheckResponse(res); err != nil {
48861		return nil, err
48862	}
48863	ret := &TargetingTemplate{
48864		ServerResponse: googleapi.ServerResponse{
48865			Header:         res.Header,
48866			HTTPStatusCode: res.StatusCode,
48867		},
48868	}
48869	target := &ret
48870	if err := gensupport.DecodeResponse(target, res); err != nil {
48871		return nil, err
48872	}
48873	return ret, nil
48874	// {
48875	//   "description": "Updates an existing targeting template. This method supports patch semantics.",
48876	//   "httpMethod": "PATCH",
48877	//   "id": "dfareporting.targetingTemplates.patch",
48878	//   "parameterOrder": [
48879	//     "profileId",
48880	//     "id"
48881	//   ],
48882	//   "parameters": {
48883	//     "id": {
48884	//       "description": "Targeting template ID.",
48885	//       "format": "int64",
48886	//       "location": "query",
48887	//       "required": true,
48888	//       "type": "string"
48889	//     },
48890	//     "profileId": {
48891	//       "description": "User profile ID associated with this request.",
48892	//       "format": "int64",
48893	//       "location": "path",
48894	//       "required": true,
48895	//       "type": "string"
48896	//     }
48897	//   },
48898	//   "path": "userprofiles/{profileId}/targetingTemplates",
48899	//   "request": {
48900	//     "$ref": "TargetingTemplate"
48901	//   },
48902	//   "response": {
48903	//     "$ref": "TargetingTemplate"
48904	//   },
48905	//   "scopes": [
48906	//     "https://www.googleapis.com/auth/dfatrafficking"
48907	//   ]
48908	// }
48909
48910}
48911
48912// method id "dfareporting.targetingTemplates.update":
48913
48914type TargetingTemplatesUpdateCall struct {
48915	s                 *Service
48916	profileId         int64
48917	targetingtemplate *TargetingTemplate
48918	urlParams_        gensupport.URLParams
48919	ctx_              context.Context
48920	header_           http.Header
48921}
48922
48923// Update: Updates an existing targeting template.
48924func (r *TargetingTemplatesService) Update(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesUpdateCall {
48925	c := &TargetingTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48926	c.profileId = profileId
48927	c.targetingtemplate = targetingtemplate
48928	return c
48929}
48930
48931// Fields allows partial responses to be retrieved. See
48932// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48933// for more information.
48934func (c *TargetingTemplatesUpdateCall) Fields(s ...googleapi.Field) *TargetingTemplatesUpdateCall {
48935	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48936	return c
48937}
48938
48939// Context sets the context to be used in this call's Do method. Any
48940// pending HTTP request will be aborted if the provided context is
48941// canceled.
48942func (c *TargetingTemplatesUpdateCall) Context(ctx context.Context) *TargetingTemplatesUpdateCall {
48943	c.ctx_ = ctx
48944	return c
48945}
48946
48947// Header returns an http.Header that can be modified by the caller to
48948// add HTTP headers to the request.
48949func (c *TargetingTemplatesUpdateCall) Header() http.Header {
48950	if c.header_ == nil {
48951		c.header_ = make(http.Header)
48952	}
48953	return c.header_
48954}
48955
48956func (c *TargetingTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
48957	reqHeaders := make(http.Header)
48958	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
48959	for k, v := range c.header_ {
48960		reqHeaders[k] = v
48961	}
48962	reqHeaders.Set("User-Agent", c.s.userAgent())
48963	var body io.Reader = nil
48964	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48965	if err != nil {
48966		return nil, err
48967	}
48968	reqHeaders.Set("Content-Type", "application/json")
48969	c.urlParams_.Set("alt", alt)
48970	c.urlParams_.Set("prettyPrint", "false")
48971	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48972	urls += "?" + c.urlParams_.Encode()
48973	req, err := http.NewRequest("PUT", urls, body)
48974	if err != nil {
48975		return nil, err
48976	}
48977	req.Header = reqHeaders
48978	googleapi.Expand(req.URL, map[string]string{
48979		"profileId": strconv.FormatInt(c.profileId, 10),
48980	})
48981	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48982}
48983
48984// Do executes the "dfareporting.targetingTemplates.update" call.
48985// Exactly one of *TargetingTemplate or error will be non-nil. Any
48986// non-2xx status code is an error. Response headers are in either
48987// *TargetingTemplate.ServerResponse.Header or (if a response was
48988// returned at all) in error.(*googleapi.Error).Header. Use
48989// googleapi.IsNotModified to check whether the returned error was
48990// because http.StatusNotModified was returned.
48991func (c *TargetingTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48992	gensupport.SetOptions(c.urlParams_, opts...)
48993	res, err := c.doRequest("json")
48994	if res != nil && res.StatusCode == http.StatusNotModified {
48995		if res.Body != nil {
48996			res.Body.Close()
48997		}
48998		return nil, &googleapi.Error{
48999			Code:   res.StatusCode,
49000			Header: res.Header,
49001		}
49002	}
49003	if err != nil {
49004		return nil, err
49005	}
49006	defer googleapi.CloseBody(res)
49007	if err := googleapi.CheckResponse(res); err != nil {
49008		return nil, err
49009	}
49010	ret := &TargetingTemplate{
49011		ServerResponse: googleapi.ServerResponse{
49012			Header:         res.Header,
49013			HTTPStatusCode: res.StatusCode,
49014		},
49015	}
49016	target := &ret
49017	if err := gensupport.DecodeResponse(target, res); err != nil {
49018		return nil, err
49019	}
49020	return ret, nil
49021	// {
49022	//   "description": "Updates an existing targeting template.",
49023	//   "httpMethod": "PUT",
49024	//   "id": "dfareporting.targetingTemplates.update",
49025	//   "parameterOrder": [
49026	//     "profileId"
49027	//   ],
49028	//   "parameters": {
49029	//     "profileId": {
49030	//       "description": "User profile ID associated with this request.",
49031	//       "format": "int64",
49032	//       "location": "path",
49033	//       "required": true,
49034	//       "type": "string"
49035	//     }
49036	//   },
49037	//   "path": "userprofiles/{profileId}/targetingTemplates",
49038	//   "request": {
49039	//     "$ref": "TargetingTemplate"
49040	//   },
49041	//   "response": {
49042	//     "$ref": "TargetingTemplate"
49043	//   },
49044	//   "scopes": [
49045	//     "https://www.googleapis.com/auth/dfatrafficking"
49046	//   ]
49047	// }
49048
49049}
49050
49051// method id "dfareporting.userProfiles.get":
49052
49053type UserProfilesGetCall struct {
49054	s            *Service
49055	profileId    int64
49056	urlParams_   gensupport.URLParams
49057	ifNoneMatch_ string
49058	ctx_         context.Context
49059	header_      http.Header
49060}
49061
49062// Get: Gets one user profile by ID.
49063func (r *UserProfilesService) Get(profileId int64) *UserProfilesGetCall {
49064	c := &UserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49065	c.profileId = profileId
49066	return c
49067}
49068
49069// Fields allows partial responses to be retrieved. See
49070// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49071// for more information.
49072func (c *UserProfilesGetCall) Fields(s ...googleapi.Field) *UserProfilesGetCall {
49073	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49074	return c
49075}
49076
49077// IfNoneMatch sets the optional parameter which makes the operation
49078// fail if the object's ETag matches the given value. This is useful for
49079// getting updates only after the object has changed since the last
49080// request. Use googleapi.IsNotModified to check whether the response
49081// error from Do is the result of In-None-Match.
49082func (c *UserProfilesGetCall) IfNoneMatch(entityTag string) *UserProfilesGetCall {
49083	c.ifNoneMatch_ = entityTag
49084	return c
49085}
49086
49087// Context sets the context to be used in this call's Do method. Any
49088// pending HTTP request will be aborted if the provided context is
49089// canceled.
49090func (c *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
49091	c.ctx_ = ctx
49092	return c
49093}
49094
49095// Header returns an http.Header that can be modified by the caller to
49096// add HTTP headers to the request.
49097func (c *UserProfilesGetCall) Header() http.Header {
49098	if c.header_ == nil {
49099		c.header_ = make(http.Header)
49100	}
49101	return c.header_
49102}
49103
49104func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
49105	reqHeaders := make(http.Header)
49106	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
49107	for k, v := range c.header_ {
49108		reqHeaders[k] = v
49109	}
49110	reqHeaders.Set("User-Agent", c.s.userAgent())
49111	if c.ifNoneMatch_ != "" {
49112		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49113	}
49114	var body io.Reader = nil
49115	c.urlParams_.Set("alt", alt)
49116	c.urlParams_.Set("prettyPrint", "false")
49117	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}")
49118	urls += "?" + c.urlParams_.Encode()
49119	req, err := http.NewRequest("GET", urls, body)
49120	if err != nil {
49121		return nil, err
49122	}
49123	req.Header = reqHeaders
49124	googleapi.Expand(req.URL, map[string]string{
49125		"profileId": strconv.FormatInt(c.profileId, 10),
49126	})
49127	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49128}
49129
49130// Do executes the "dfareporting.userProfiles.get" call.
49131// Exactly one of *UserProfile or error will be non-nil. Any non-2xx
49132// status code is an error. Response headers are in either
49133// *UserProfile.ServerResponse.Header or (if a response was returned at
49134// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
49135// to check whether the returned error was because
49136// http.StatusNotModified was returned.
49137func (c *UserProfilesGetCall) Do(opts ...googleapi.CallOption) (*UserProfile, error) {
49138	gensupport.SetOptions(c.urlParams_, opts...)
49139	res, err := c.doRequest("json")
49140	if res != nil && res.StatusCode == http.StatusNotModified {
49141		if res.Body != nil {
49142			res.Body.Close()
49143		}
49144		return nil, &googleapi.Error{
49145			Code:   res.StatusCode,
49146			Header: res.Header,
49147		}
49148	}
49149	if err != nil {
49150		return nil, err
49151	}
49152	defer googleapi.CloseBody(res)
49153	if err := googleapi.CheckResponse(res); err != nil {
49154		return nil, err
49155	}
49156	ret := &UserProfile{
49157		ServerResponse: googleapi.ServerResponse{
49158			Header:         res.Header,
49159			HTTPStatusCode: res.StatusCode,
49160		},
49161	}
49162	target := &ret
49163	if err := gensupport.DecodeResponse(target, res); err != nil {
49164		return nil, err
49165	}
49166	return ret, nil
49167	// {
49168	//   "description": "Gets one user profile by ID.",
49169	//   "httpMethod": "GET",
49170	//   "id": "dfareporting.userProfiles.get",
49171	//   "parameterOrder": [
49172	//     "profileId"
49173	//   ],
49174	//   "parameters": {
49175	//     "profileId": {
49176	//       "description": "The user profile ID.",
49177	//       "format": "int64",
49178	//       "location": "path",
49179	//       "required": true,
49180	//       "type": "string"
49181	//     }
49182	//   },
49183	//   "path": "userprofiles/{profileId}",
49184	//   "response": {
49185	//     "$ref": "UserProfile"
49186	//   },
49187	//   "scopes": [
49188	//     "https://www.googleapis.com/auth/dfareporting",
49189	//     "https://www.googleapis.com/auth/dfatrafficking"
49190	//   ]
49191	// }
49192
49193}
49194
49195// method id "dfareporting.userProfiles.list":
49196
49197type UserProfilesListCall struct {
49198	s            *Service
49199	urlParams_   gensupport.URLParams
49200	ifNoneMatch_ string
49201	ctx_         context.Context
49202	header_      http.Header
49203}
49204
49205// List: Retrieves list of user profiles for a user.
49206func (r *UserProfilesService) List() *UserProfilesListCall {
49207	c := &UserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49208	return c
49209}
49210
49211// Fields allows partial responses to be retrieved. See
49212// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49213// for more information.
49214func (c *UserProfilesListCall) Fields(s ...googleapi.Field) *UserProfilesListCall {
49215	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49216	return c
49217}
49218
49219// IfNoneMatch sets the optional parameter which makes the operation
49220// fail if the object's ETag matches the given value. This is useful for
49221// getting updates only after the object has changed since the last
49222// request. Use googleapi.IsNotModified to check whether the response
49223// error from Do is the result of In-None-Match.
49224func (c *UserProfilesListCall) IfNoneMatch(entityTag string) *UserProfilesListCall {
49225	c.ifNoneMatch_ = entityTag
49226	return c
49227}
49228
49229// Context sets the context to be used in this call's Do method. Any
49230// pending HTTP request will be aborted if the provided context is
49231// canceled.
49232func (c *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
49233	c.ctx_ = ctx
49234	return c
49235}
49236
49237// Header returns an http.Header that can be modified by the caller to
49238// add HTTP headers to the request.
49239func (c *UserProfilesListCall) Header() http.Header {
49240	if c.header_ == nil {
49241		c.header_ = make(http.Header)
49242	}
49243	return c.header_
49244}
49245
49246func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
49247	reqHeaders := make(http.Header)
49248	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
49249	for k, v := range c.header_ {
49250		reqHeaders[k] = v
49251	}
49252	reqHeaders.Set("User-Agent", c.s.userAgent())
49253	if c.ifNoneMatch_ != "" {
49254		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49255	}
49256	var body io.Reader = nil
49257	c.urlParams_.Set("alt", alt)
49258	c.urlParams_.Set("prettyPrint", "false")
49259	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles")
49260	urls += "?" + c.urlParams_.Encode()
49261	req, err := http.NewRequest("GET", urls, body)
49262	if err != nil {
49263		return nil, err
49264	}
49265	req.Header = reqHeaders
49266	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49267}
49268
49269// Do executes the "dfareporting.userProfiles.list" call.
49270// Exactly one of *UserProfileList or error will be non-nil. Any non-2xx
49271// status code is an error. Response headers are in either
49272// *UserProfileList.ServerResponse.Header or (if a response was returned
49273// at all) in error.(*googleapi.Error).Header. Use
49274// googleapi.IsNotModified to check whether the returned error was
49275// because http.StatusNotModified was returned.
49276func (c *UserProfilesListCall) Do(opts ...googleapi.CallOption) (*UserProfileList, error) {
49277	gensupport.SetOptions(c.urlParams_, opts...)
49278	res, err := c.doRequest("json")
49279	if res != nil && res.StatusCode == http.StatusNotModified {
49280		if res.Body != nil {
49281			res.Body.Close()
49282		}
49283		return nil, &googleapi.Error{
49284			Code:   res.StatusCode,
49285			Header: res.Header,
49286		}
49287	}
49288	if err != nil {
49289		return nil, err
49290	}
49291	defer googleapi.CloseBody(res)
49292	if err := googleapi.CheckResponse(res); err != nil {
49293		return nil, err
49294	}
49295	ret := &UserProfileList{
49296		ServerResponse: googleapi.ServerResponse{
49297			Header:         res.Header,
49298			HTTPStatusCode: res.StatusCode,
49299		},
49300	}
49301	target := &ret
49302	if err := gensupport.DecodeResponse(target, res); err != nil {
49303		return nil, err
49304	}
49305	return ret, nil
49306	// {
49307	//   "description": "Retrieves list of user profiles for a user.",
49308	//   "httpMethod": "GET",
49309	//   "id": "dfareporting.userProfiles.list",
49310	//   "path": "userprofiles",
49311	//   "response": {
49312	//     "$ref": "UserProfileList"
49313	//   },
49314	//   "scopes": [
49315	//     "https://www.googleapis.com/auth/dfareporting",
49316	//     "https://www.googleapis.com/auth/dfatrafficking"
49317	//   ]
49318	// }
49319
49320}
49321
49322// method id "dfareporting.userRolePermissionGroups.get":
49323
49324type UserRolePermissionGroupsGetCall struct {
49325	s            *Service
49326	profileId    int64
49327	id           int64
49328	urlParams_   gensupport.URLParams
49329	ifNoneMatch_ string
49330	ctx_         context.Context
49331	header_      http.Header
49332}
49333
49334// Get: Gets one user role permission group by ID.
49335func (r *UserRolePermissionGroupsService) Get(profileId int64, id int64) *UserRolePermissionGroupsGetCall {
49336	c := &UserRolePermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49337	c.profileId = profileId
49338	c.id = id
49339	return c
49340}
49341
49342// Fields allows partial responses to be retrieved. See
49343// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49344// for more information.
49345func (c *UserRolePermissionGroupsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsGetCall {
49346	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49347	return c
49348}
49349
49350// IfNoneMatch sets the optional parameter which makes the operation
49351// fail if the object's ETag matches the given value. This is useful for
49352// getting updates only after the object has changed since the last
49353// request. Use googleapi.IsNotModified to check whether the response
49354// error from Do is the result of In-None-Match.
49355func (c *UserRolePermissionGroupsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsGetCall {
49356	c.ifNoneMatch_ = entityTag
49357	return c
49358}
49359
49360// Context sets the context to be used in this call's Do method. Any
49361// pending HTTP request will be aborted if the provided context is
49362// canceled.
49363func (c *UserRolePermissionGroupsGetCall) Context(ctx context.Context) *UserRolePermissionGroupsGetCall {
49364	c.ctx_ = ctx
49365	return c
49366}
49367
49368// Header returns an http.Header that can be modified by the caller to
49369// add HTTP headers to the request.
49370func (c *UserRolePermissionGroupsGetCall) Header() http.Header {
49371	if c.header_ == nil {
49372		c.header_ = make(http.Header)
49373	}
49374	return c.header_
49375}
49376
49377func (c *UserRolePermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
49378	reqHeaders := make(http.Header)
49379	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
49380	for k, v := range c.header_ {
49381		reqHeaders[k] = v
49382	}
49383	reqHeaders.Set("User-Agent", c.s.userAgent())
49384	if c.ifNoneMatch_ != "" {
49385		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49386	}
49387	var body io.Reader = nil
49388	c.urlParams_.Set("alt", alt)
49389	c.urlParams_.Set("prettyPrint", "false")
49390	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups/{id}")
49391	urls += "?" + c.urlParams_.Encode()
49392	req, err := http.NewRequest("GET", urls, body)
49393	if err != nil {
49394		return nil, err
49395	}
49396	req.Header = reqHeaders
49397	googleapi.Expand(req.URL, map[string]string{
49398		"profileId": strconv.FormatInt(c.profileId, 10),
49399		"id":        strconv.FormatInt(c.id, 10),
49400	})
49401	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49402}
49403
49404// Do executes the "dfareporting.userRolePermissionGroups.get" call.
49405// Exactly one of *UserRolePermissionGroup or error will be non-nil. Any
49406// non-2xx status code is an error. Response headers are in either
49407// *UserRolePermissionGroup.ServerResponse.Header or (if a response was
49408// returned at all) in error.(*googleapi.Error).Header. Use
49409// googleapi.IsNotModified to check whether the returned error was
49410// because http.StatusNotModified was returned.
49411func (c *UserRolePermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroup, error) {
49412	gensupport.SetOptions(c.urlParams_, opts...)
49413	res, err := c.doRequest("json")
49414	if res != nil && res.StatusCode == http.StatusNotModified {
49415		if res.Body != nil {
49416			res.Body.Close()
49417		}
49418		return nil, &googleapi.Error{
49419			Code:   res.StatusCode,
49420			Header: res.Header,
49421		}
49422	}
49423	if err != nil {
49424		return nil, err
49425	}
49426	defer googleapi.CloseBody(res)
49427	if err := googleapi.CheckResponse(res); err != nil {
49428		return nil, err
49429	}
49430	ret := &UserRolePermissionGroup{
49431		ServerResponse: googleapi.ServerResponse{
49432			Header:         res.Header,
49433			HTTPStatusCode: res.StatusCode,
49434		},
49435	}
49436	target := &ret
49437	if err := gensupport.DecodeResponse(target, res); err != nil {
49438		return nil, err
49439	}
49440	return ret, nil
49441	// {
49442	//   "description": "Gets one user role permission group by ID.",
49443	//   "httpMethod": "GET",
49444	//   "id": "dfareporting.userRolePermissionGroups.get",
49445	//   "parameterOrder": [
49446	//     "profileId",
49447	//     "id"
49448	//   ],
49449	//   "parameters": {
49450	//     "id": {
49451	//       "description": "User role permission group ID.",
49452	//       "format": "int64",
49453	//       "location": "path",
49454	//       "required": true,
49455	//       "type": "string"
49456	//     },
49457	//     "profileId": {
49458	//       "description": "User profile ID associated with this request.",
49459	//       "format": "int64",
49460	//       "location": "path",
49461	//       "required": true,
49462	//       "type": "string"
49463	//     }
49464	//   },
49465	//   "path": "userprofiles/{profileId}/userRolePermissionGroups/{id}",
49466	//   "response": {
49467	//     "$ref": "UserRolePermissionGroup"
49468	//   },
49469	//   "scopes": [
49470	//     "https://www.googleapis.com/auth/dfatrafficking"
49471	//   ]
49472	// }
49473
49474}
49475
49476// method id "dfareporting.userRolePermissionGroups.list":
49477
49478type UserRolePermissionGroupsListCall struct {
49479	s            *Service
49480	profileId    int64
49481	urlParams_   gensupport.URLParams
49482	ifNoneMatch_ string
49483	ctx_         context.Context
49484	header_      http.Header
49485}
49486
49487// List: Gets a list of all supported user role permission groups.
49488func (r *UserRolePermissionGroupsService) List(profileId int64) *UserRolePermissionGroupsListCall {
49489	c := &UserRolePermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49490	c.profileId = profileId
49491	return c
49492}
49493
49494// Fields allows partial responses to be retrieved. See
49495// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49496// for more information.
49497func (c *UserRolePermissionGroupsListCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsListCall {
49498	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49499	return c
49500}
49501
49502// IfNoneMatch sets the optional parameter which makes the operation
49503// fail if the object's ETag matches the given value. This is useful for
49504// getting updates only after the object has changed since the last
49505// request. Use googleapi.IsNotModified to check whether the response
49506// error from Do is the result of In-None-Match.
49507func (c *UserRolePermissionGroupsListCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsListCall {
49508	c.ifNoneMatch_ = entityTag
49509	return c
49510}
49511
49512// Context sets the context to be used in this call's Do method. Any
49513// pending HTTP request will be aborted if the provided context is
49514// canceled.
49515func (c *UserRolePermissionGroupsListCall) Context(ctx context.Context) *UserRolePermissionGroupsListCall {
49516	c.ctx_ = ctx
49517	return c
49518}
49519
49520// Header returns an http.Header that can be modified by the caller to
49521// add HTTP headers to the request.
49522func (c *UserRolePermissionGroupsListCall) Header() http.Header {
49523	if c.header_ == nil {
49524		c.header_ = make(http.Header)
49525	}
49526	return c.header_
49527}
49528
49529func (c *UserRolePermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
49530	reqHeaders := make(http.Header)
49531	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
49532	for k, v := range c.header_ {
49533		reqHeaders[k] = v
49534	}
49535	reqHeaders.Set("User-Agent", c.s.userAgent())
49536	if c.ifNoneMatch_ != "" {
49537		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49538	}
49539	var body io.Reader = nil
49540	c.urlParams_.Set("alt", alt)
49541	c.urlParams_.Set("prettyPrint", "false")
49542	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups")
49543	urls += "?" + c.urlParams_.Encode()
49544	req, err := http.NewRequest("GET", urls, body)
49545	if err != nil {
49546		return nil, err
49547	}
49548	req.Header = reqHeaders
49549	googleapi.Expand(req.URL, map[string]string{
49550		"profileId": strconv.FormatInt(c.profileId, 10),
49551	})
49552	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49553}
49554
49555// Do executes the "dfareporting.userRolePermissionGroups.list" call.
49556// Exactly one of *UserRolePermissionGroupsListResponse or error will be
49557// non-nil. Any non-2xx status code is an error. Response headers are in
49558// either *UserRolePermissionGroupsListResponse.ServerResponse.Header or
49559// (if a response was returned at all) in
49560// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
49561// whether the returned error was because http.StatusNotModified was
49562// returned.
49563func (c *UserRolePermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroupsListResponse, error) {
49564	gensupport.SetOptions(c.urlParams_, opts...)
49565	res, err := c.doRequest("json")
49566	if res != nil && res.StatusCode == http.StatusNotModified {
49567		if res.Body != nil {
49568			res.Body.Close()
49569		}
49570		return nil, &googleapi.Error{
49571			Code:   res.StatusCode,
49572			Header: res.Header,
49573		}
49574	}
49575	if err != nil {
49576		return nil, err
49577	}
49578	defer googleapi.CloseBody(res)
49579	if err := googleapi.CheckResponse(res); err != nil {
49580		return nil, err
49581	}
49582	ret := &UserRolePermissionGroupsListResponse{
49583		ServerResponse: googleapi.ServerResponse{
49584			Header:         res.Header,
49585			HTTPStatusCode: res.StatusCode,
49586		},
49587	}
49588	target := &ret
49589	if err := gensupport.DecodeResponse(target, res); err != nil {
49590		return nil, err
49591	}
49592	return ret, nil
49593	// {
49594	//   "description": "Gets a list of all supported user role permission groups.",
49595	//   "httpMethod": "GET",
49596	//   "id": "dfareporting.userRolePermissionGroups.list",
49597	//   "parameterOrder": [
49598	//     "profileId"
49599	//   ],
49600	//   "parameters": {
49601	//     "profileId": {
49602	//       "description": "User profile ID associated with this request.",
49603	//       "format": "int64",
49604	//       "location": "path",
49605	//       "required": true,
49606	//       "type": "string"
49607	//     }
49608	//   },
49609	//   "path": "userprofiles/{profileId}/userRolePermissionGroups",
49610	//   "response": {
49611	//     "$ref": "UserRolePermissionGroupsListResponse"
49612	//   },
49613	//   "scopes": [
49614	//     "https://www.googleapis.com/auth/dfatrafficking"
49615	//   ]
49616	// }
49617
49618}
49619
49620// method id "dfareporting.userRolePermissions.get":
49621
49622type UserRolePermissionsGetCall struct {
49623	s            *Service
49624	profileId    int64
49625	id           int64
49626	urlParams_   gensupport.URLParams
49627	ifNoneMatch_ string
49628	ctx_         context.Context
49629	header_      http.Header
49630}
49631
49632// Get: Gets one user role permission by ID.
49633func (r *UserRolePermissionsService) Get(profileId int64, id int64) *UserRolePermissionsGetCall {
49634	c := &UserRolePermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49635	c.profileId = profileId
49636	c.id = id
49637	return c
49638}
49639
49640// Fields allows partial responses to be retrieved. See
49641// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49642// for more information.
49643func (c *UserRolePermissionsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionsGetCall {
49644	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49645	return c
49646}
49647
49648// IfNoneMatch sets the optional parameter which makes the operation
49649// fail if the object's ETag matches the given value. This is useful for
49650// getting updates only after the object has changed since the last
49651// request. Use googleapi.IsNotModified to check whether the response
49652// error from Do is the result of In-None-Match.
49653func (c *UserRolePermissionsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionsGetCall {
49654	c.ifNoneMatch_ = entityTag
49655	return c
49656}
49657
49658// Context sets the context to be used in this call's Do method. Any
49659// pending HTTP request will be aborted if the provided context is
49660// canceled.
49661func (c *UserRolePermissionsGetCall) Context(ctx context.Context) *UserRolePermissionsGetCall {
49662	c.ctx_ = ctx
49663	return c
49664}
49665
49666// Header returns an http.Header that can be modified by the caller to
49667// add HTTP headers to the request.
49668func (c *UserRolePermissionsGetCall) Header() http.Header {
49669	if c.header_ == nil {
49670		c.header_ = make(http.Header)
49671	}
49672	return c.header_
49673}
49674
49675func (c *UserRolePermissionsGetCall) doRequest(alt string) (*http.Response, error) {
49676	reqHeaders := make(http.Header)
49677	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
49678	for k, v := range c.header_ {
49679		reqHeaders[k] = v
49680	}
49681	reqHeaders.Set("User-Agent", c.s.userAgent())
49682	if c.ifNoneMatch_ != "" {
49683		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49684	}
49685	var body io.Reader = nil
49686	c.urlParams_.Set("alt", alt)
49687	c.urlParams_.Set("prettyPrint", "false")
49688	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions/{id}")
49689	urls += "?" + c.urlParams_.Encode()
49690	req, err := http.NewRequest("GET", urls, body)
49691	if err != nil {
49692		return nil, err
49693	}
49694	req.Header = reqHeaders
49695	googleapi.Expand(req.URL, map[string]string{
49696		"profileId": strconv.FormatInt(c.profileId, 10),
49697		"id":        strconv.FormatInt(c.id, 10),
49698	})
49699	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49700}
49701
49702// Do executes the "dfareporting.userRolePermissions.get" call.
49703// Exactly one of *UserRolePermission or error will be non-nil. Any
49704// non-2xx status code is an error. Response headers are in either
49705// *UserRolePermission.ServerResponse.Header or (if a response was
49706// returned at all) in error.(*googleapi.Error).Header. Use
49707// googleapi.IsNotModified to check whether the returned error was
49708// because http.StatusNotModified was returned.
49709func (c *UserRolePermissionsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermission, error) {
49710	gensupport.SetOptions(c.urlParams_, opts...)
49711	res, err := c.doRequest("json")
49712	if res != nil && res.StatusCode == http.StatusNotModified {
49713		if res.Body != nil {
49714			res.Body.Close()
49715		}
49716		return nil, &googleapi.Error{
49717			Code:   res.StatusCode,
49718			Header: res.Header,
49719		}
49720	}
49721	if err != nil {
49722		return nil, err
49723	}
49724	defer googleapi.CloseBody(res)
49725	if err := googleapi.CheckResponse(res); err != nil {
49726		return nil, err
49727	}
49728	ret := &UserRolePermission{
49729		ServerResponse: googleapi.ServerResponse{
49730			Header:         res.Header,
49731			HTTPStatusCode: res.StatusCode,
49732		},
49733	}
49734	target := &ret
49735	if err := gensupport.DecodeResponse(target, res); err != nil {
49736		return nil, err
49737	}
49738	return ret, nil
49739	// {
49740	//   "description": "Gets one user role permission by ID.",
49741	//   "httpMethod": "GET",
49742	//   "id": "dfareporting.userRolePermissions.get",
49743	//   "parameterOrder": [
49744	//     "profileId",
49745	//     "id"
49746	//   ],
49747	//   "parameters": {
49748	//     "id": {
49749	//       "description": "User role permission ID.",
49750	//       "format": "int64",
49751	//       "location": "path",
49752	//       "required": true,
49753	//       "type": "string"
49754	//     },
49755	//     "profileId": {
49756	//       "description": "User profile ID associated with this request.",
49757	//       "format": "int64",
49758	//       "location": "path",
49759	//       "required": true,
49760	//       "type": "string"
49761	//     }
49762	//   },
49763	//   "path": "userprofiles/{profileId}/userRolePermissions/{id}",
49764	//   "response": {
49765	//     "$ref": "UserRolePermission"
49766	//   },
49767	//   "scopes": [
49768	//     "https://www.googleapis.com/auth/dfatrafficking"
49769	//   ]
49770	// }
49771
49772}
49773
49774// method id "dfareporting.userRolePermissions.list":
49775
49776type UserRolePermissionsListCall struct {
49777	s            *Service
49778	profileId    int64
49779	urlParams_   gensupport.URLParams
49780	ifNoneMatch_ string
49781	ctx_         context.Context
49782	header_      http.Header
49783}
49784
49785// List: Gets a list of user role permissions, possibly filtered.
49786func (r *UserRolePermissionsService) List(profileId int64) *UserRolePermissionsListCall {
49787	c := &UserRolePermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49788	c.profileId = profileId
49789	return c
49790}
49791
49792// Ids sets the optional parameter "ids": Select only user role
49793// permissions with these IDs.
49794func (c *UserRolePermissionsListCall) Ids(ids ...int64) *UserRolePermissionsListCall {
49795	var ids_ []string
49796	for _, v := range ids {
49797		ids_ = append(ids_, fmt.Sprint(v))
49798	}
49799	c.urlParams_.SetMulti("ids", ids_)
49800	return c
49801}
49802
49803// Fields allows partial responses to be retrieved. See
49804// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49805// for more information.
49806func (c *UserRolePermissionsListCall) Fields(s ...googleapi.Field) *UserRolePermissionsListCall {
49807	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49808	return c
49809}
49810
49811// IfNoneMatch sets the optional parameter which makes the operation
49812// fail if the object's ETag matches the given value. This is useful for
49813// getting updates only after the object has changed since the last
49814// request. Use googleapi.IsNotModified to check whether the response
49815// error from Do is the result of In-None-Match.
49816func (c *UserRolePermissionsListCall) IfNoneMatch(entityTag string) *UserRolePermissionsListCall {
49817	c.ifNoneMatch_ = entityTag
49818	return c
49819}
49820
49821// Context sets the context to be used in this call's Do method. Any
49822// pending HTTP request will be aborted if the provided context is
49823// canceled.
49824func (c *UserRolePermissionsListCall) Context(ctx context.Context) *UserRolePermissionsListCall {
49825	c.ctx_ = ctx
49826	return c
49827}
49828
49829// Header returns an http.Header that can be modified by the caller to
49830// add HTTP headers to the request.
49831func (c *UserRolePermissionsListCall) Header() http.Header {
49832	if c.header_ == nil {
49833		c.header_ = make(http.Header)
49834	}
49835	return c.header_
49836}
49837
49838func (c *UserRolePermissionsListCall) doRequest(alt string) (*http.Response, error) {
49839	reqHeaders := make(http.Header)
49840	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
49841	for k, v := range c.header_ {
49842		reqHeaders[k] = v
49843	}
49844	reqHeaders.Set("User-Agent", c.s.userAgent())
49845	if c.ifNoneMatch_ != "" {
49846		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49847	}
49848	var body io.Reader = nil
49849	c.urlParams_.Set("alt", alt)
49850	c.urlParams_.Set("prettyPrint", "false")
49851	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions")
49852	urls += "?" + c.urlParams_.Encode()
49853	req, err := http.NewRequest("GET", urls, body)
49854	if err != nil {
49855		return nil, err
49856	}
49857	req.Header = reqHeaders
49858	googleapi.Expand(req.URL, map[string]string{
49859		"profileId": strconv.FormatInt(c.profileId, 10),
49860	})
49861	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49862}
49863
49864// Do executes the "dfareporting.userRolePermissions.list" call.
49865// Exactly one of *UserRolePermissionsListResponse or error will be
49866// non-nil. Any non-2xx status code is an error. Response headers are in
49867// either *UserRolePermissionsListResponse.ServerResponse.Header or (if
49868// a response was returned at all) in error.(*googleapi.Error).Header.
49869// Use googleapi.IsNotModified to check whether the returned error was
49870// because http.StatusNotModified was returned.
49871func (c *UserRolePermissionsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionsListResponse, error) {
49872	gensupport.SetOptions(c.urlParams_, opts...)
49873	res, err := c.doRequest("json")
49874	if res != nil && res.StatusCode == http.StatusNotModified {
49875		if res.Body != nil {
49876			res.Body.Close()
49877		}
49878		return nil, &googleapi.Error{
49879			Code:   res.StatusCode,
49880			Header: res.Header,
49881		}
49882	}
49883	if err != nil {
49884		return nil, err
49885	}
49886	defer googleapi.CloseBody(res)
49887	if err := googleapi.CheckResponse(res); err != nil {
49888		return nil, err
49889	}
49890	ret := &UserRolePermissionsListResponse{
49891		ServerResponse: googleapi.ServerResponse{
49892			Header:         res.Header,
49893			HTTPStatusCode: res.StatusCode,
49894		},
49895	}
49896	target := &ret
49897	if err := gensupport.DecodeResponse(target, res); err != nil {
49898		return nil, err
49899	}
49900	return ret, nil
49901	// {
49902	//   "description": "Gets a list of user role permissions, possibly filtered.",
49903	//   "httpMethod": "GET",
49904	//   "id": "dfareporting.userRolePermissions.list",
49905	//   "parameterOrder": [
49906	//     "profileId"
49907	//   ],
49908	//   "parameters": {
49909	//     "ids": {
49910	//       "description": "Select only user role permissions with these IDs.",
49911	//       "format": "int64",
49912	//       "location": "query",
49913	//       "repeated": true,
49914	//       "type": "string"
49915	//     },
49916	//     "profileId": {
49917	//       "description": "User profile ID associated with this request.",
49918	//       "format": "int64",
49919	//       "location": "path",
49920	//       "required": true,
49921	//       "type": "string"
49922	//     }
49923	//   },
49924	//   "path": "userprofiles/{profileId}/userRolePermissions",
49925	//   "response": {
49926	//     "$ref": "UserRolePermissionsListResponse"
49927	//   },
49928	//   "scopes": [
49929	//     "https://www.googleapis.com/auth/dfatrafficking"
49930	//   ]
49931	// }
49932
49933}
49934
49935// method id "dfareporting.userRoles.delete":
49936
49937type UserRolesDeleteCall struct {
49938	s          *Service
49939	profileId  int64
49940	id         int64
49941	urlParams_ gensupport.URLParams
49942	ctx_       context.Context
49943	header_    http.Header
49944}
49945
49946// Delete: Deletes an existing user role.
49947func (r *UserRolesService) Delete(profileId int64, id int64) *UserRolesDeleteCall {
49948	c := &UserRolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49949	c.profileId = profileId
49950	c.id = id
49951	return c
49952}
49953
49954// Fields allows partial responses to be retrieved. See
49955// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49956// for more information.
49957func (c *UserRolesDeleteCall) Fields(s ...googleapi.Field) *UserRolesDeleteCall {
49958	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49959	return c
49960}
49961
49962// Context sets the context to be used in this call's Do method. Any
49963// pending HTTP request will be aborted if the provided context is
49964// canceled.
49965func (c *UserRolesDeleteCall) Context(ctx context.Context) *UserRolesDeleteCall {
49966	c.ctx_ = ctx
49967	return c
49968}
49969
49970// Header returns an http.Header that can be modified by the caller to
49971// add HTTP headers to the request.
49972func (c *UserRolesDeleteCall) Header() http.Header {
49973	if c.header_ == nil {
49974		c.header_ = make(http.Header)
49975	}
49976	return c.header_
49977}
49978
49979func (c *UserRolesDeleteCall) doRequest(alt string) (*http.Response, error) {
49980	reqHeaders := make(http.Header)
49981	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
49982	for k, v := range c.header_ {
49983		reqHeaders[k] = v
49984	}
49985	reqHeaders.Set("User-Agent", c.s.userAgent())
49986	var body io.Reader = nil
49987	c.urlParams_.Set("alt", alt)
49988	c.urlParams_.Set("prettyPrint", "false")
49989	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
49990	urls += "?" + c.urlParams_.Encode()
49991	req, err := http.NewRequest("DELETE", urls, body)
49992	if err != nil {
49993		return nil, err
49994	}
49995	req.Header = reqHeaders
49996	googleapi.Expand(req.URL, map[string]string{
49997		"profileId": strconv.FormatInt(c.profileId, 10),
49998		"id":        strconv.FormatInt(c.id, 10),
49999	})
50000	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50001}
50002
50003// Do executes the "dfareporting.userRoles.delete" call.
50004func (c *UserRolesDeleteCall) Do(opts ...googleapi.CallOption) error {
50005	gensupport.SetOptions(c.urlParams_, opts...)
50006	res, err := c.doRequest("json")
50007	if err != nil {
50008		return err
50009	}
50010	defer googleapi.CloseBody(res)
50011	if err := googleapi.CheckResponse(res); err != nil {
50012		return err
50013	}
50014	return nil
50015	// {
50016	//   "description": "Deletes an existing user role.",
50017	//   "httpMethod": "DELETE",
50018	//   "id": "dfareporting.userRoles.delete",
50019	//   "parameterOrder": [
50020	//     "profileId",
50021	//     "id"
50022	//   ],
50023	//   "parameters": {
50024	//     "id": {
50025	//       "description": "User role ID.",
50026	//       "format": "int64",
50027	//       "location": "path",
50028	//       "required": true,
50029	//       "type": "string"
50030	//     },
50031	//     "profileId": {
50032	//       "description": "User profile ID associated with this request.",
50033	//       "format": "int64",
50034	//       "location": "path",
50035	//       "required": true,
50036	//       "type": "string"
50037	//     }
50038	//   },
50039	//   "path": "userprofiles/{profileId}/userRoles/{id}",
50040	//   "scopes": [
50041	//     "https://www.googleapis.com/auth/dfatrafficking"
50042	//   ]
50043	// }
50044
50045}
50046
50047// method id "dfareporting.userRoles.get":
50048
50049type UserRolesGetCall struct {
50050	s            *Service
50051	profileId    int64
50052	id           int64
50053	urlParams_   gensupport.URLParams
50054	ifNoneMatch_ string
50055	ctx_         context.Context
50056	header_      http.Header
50057}
50058
50059// Get: Gets one user role by ID.
50060func (r *UserRolesService) Get(profileId int64, id int64) *UserRolesGetCall {
50061	c := &UserRolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50062	c.profileId = profileId
50063	c.id = id
50064	return c
50065}
50066
50067// Fields allows partial responses to be retrieved. See
50068// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50069// for more information.
50070func (c *UserRolesGetCall) Fields(s ...googleapi.Field) *UserRolesGetCall {
50071	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50072	return c
50073}
50074
50075// IfNoneMatch sets the optional parameter which makes the operation
50076// fail if the object's ETag matches the given value. This is useful for
50077// getting updates only after the object has changed since the last
50078// request. Use googleapi.IsNotModified to check whether the response
50079// error from Do is the result of In-None-Match.
50080func (c *UserRolesGetCall) IfNoneMatch(entityTag string) *UserRolesGetCall {
50081	c.ifNoneMatch_ = entityTag
50082	return c
50083}
50084
50085// Context sets the context to be used in this call's Do method. Any
50086// pending HTTP request will be aborted if the provided context is
50087// canceled.
50088func (c *UserRolesGetCall) Context(ctx context.Context) *UserRolesGetCall {
50089	c.ctx_ = ctx
50090	return c
50091}
50092
50093// Header returns an http.Header that can be modified by the caller to
50094// add HTTP headers to the request.
50095func (c *UserRolesGetCall) Header() http.Header {
50096	if c.header_ == nil {
50097		c.header_ = make(http.Header)
50098	}
50099	return c.header_
50100}
50101
50102func (c *UserRolesGetCall) doRequest(alt string) (*http.Response, error) {
50103	reqHeaders := make(http.Header)
50104	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
50105	for k, v := range c.header_ {
50106		reqHeaders[k] = v
50107	}
50108	reqHeaders.Set("User-Agent", c.s.userAgent())
50109	if c.ifNoneMatch_ != "" {
50110		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50111	}
50112	var body io.Reader = nil
50113	c.urlParams_.Set("alt", alt)
50114	c.urlParams_.Set("prettyPrint", "false")
50115	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
50116	urls += "?" + c.urlParams_.Encode()
50117	req, err := http.NewRequest("GET", urls, body)
50118	if err != nil {
50119		return nil, err
50120	}
50121	req.Header = reqHeaders
50122	googleapi.Expand(req.URL, map[string]string{
50123		"profileId": strconv.FormatInt(c.profileId, 10),
50124		"id":        strconv.FormatInt(c.id, 10),
50125	})
50126	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50127}
50128
50129// Do executes the "dfareporting.userRoles.get" call.
50130// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50131// code is an error. Response headers are in either
50132// *UserRole.ServerResponse.Header or (if a response was returned at
50133// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50134// to check whether the returned error was because
50135// http.StatusNotModified was returned.
50136func (c *UserRolesGetCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50137	gensupport.SetOptions(c.urlParams_, opts...)
50138	res, err := c.doRequest("json")
50139	if res != nil && res.StatusCode == http.StatusNotModified {
50140		if res.Body != nil {
50141			res.Body.Close()
50142		}
50143		return nil, &googleapi.Error{
50144			Code:   res.StatusCode,
50145			Header: res.Header,
50146		}
50147	}
50148	if err != nil {
50149		return nil, err
50150	}
50151	defer googleapi.CloseBody(res)
50152	if err := googleapi.CheckResponse(res); err != nil {
50153		return nil, err
50154	}
50155	ret := &UserRole{
50156		ServerResponse: googleapi.ServerResponse{
50157			Header:         res.Header,
50158			HTTPStatusCode: res.StatusCode,
50159		},
50160	}
50161	target := &ret
50162	if err := gensupport.DecodeResponse(target, res); err != nil {
50163		return nil, err
50164	}
50165	return ret, nil
50166	// {
50167	//   "description": "Gets one user role by ID.",
50168	//   "httpMethod": "GET",
50169	//   "id": "dfareporting.userRoles.get",
50170	//   "parameterOrder": [
50171	//     "profileId",
50172	//     "id"
50173	//   ],
50174	//   "parameters": {
50175	//     "id": {
50176	//       "description": "User role ID.",
50177	//       "format": "int64",
50178	//       "location": "path",
50179	//       "required": true,
50180	//       "type": "string"
50181	//     },
50182	//     "profileId": {
50183	//       "description": "User profile ID associated with this request.",
50184	//       "format": "int64",
50185	//       "location": "path",
50186	//       "required": true,
50187	//       "type": "string"
50188	//     }
50189	//   },
50190	//   "path": "userprofiles/{profileId}/userRoles/{id}",
50191	//   "response": {
50192	//     "$ref": "UserRole"
50193	//   },
50194	//   "scopes": [
50195	//     "https://www.googleapis.com/auth/dfatrafficking"
50196	//   ]
50197	// }
50198
50199}
50200
50201// method id "dfareporting.userRoles.insert":
50202
50203type UserRolesInsertCall struct {
50204	s          *Service
50205	profileId  int64
50206	userrole   *UserRole
50207	urlParams_ gensupport.URLParams
50208	ctx_       context.Context
50209	header_    http.Header
50210}
50211
50212// Insert: Inserts a new user role.
50213func (r *UserRolesService) Insert(profileId int64, userrole *UserRole) *UserRolesInsertCall {
50214	c := &UserRolesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50215	c.profileId = profileId
50216	c.userrole = userrole
50217	return c
50218}
50219
50220// Fields allows partial responses to be retrieved. See
50221// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50222// for more information.
50223func (c *UserRolesInsertCall) Fields(s ...googleapi.Field) *UserRolesInsertCall {
50224	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50225	return c
50226}
50227
50228// Context sets the context to be used in this call's Do method. Any
50229// pending HTTP request will be aborted if the provided context is
50230// canceled.
50231func (c *UserRolesInsertCall) Context(ctx context.Context) *UserRolesInsertCall {
50232	c.ctx_ = ctx
50233	return c
50234}
50235
50236// Header returns an http.Header that can be modified by the caller to
50237// add HTTP headers to the request.
50238func (c *UserRolesInsertCall) Header() http.Header {
50239	if c.header_ == nil {
50240		c.header_ = make(http.Header)
50241	}
50242	return c.header_
50243}
50244
50245func (c *UserRolesInsertCall) doRequest(alt string) (*http.Response, error) {
50246	reqHeaders := make(http.Header)
50247	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
50248	for k, v := range c.header_ {
50249		reqHeaders[k] = v
50250	}
50251	reqHeaders.Set("User-Agent", c.s.userAgent())
50252	var body io.Reader = nil
50253	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50254	if err != nil {
50255		return nil, err
50256	}
50257	reqHeaders.Set("Content-Type", "application/json")
50258	c.urlParams_.Set("alt", alt)
50259	c.urlParams_.Set("prettyPrint", "false")
50260	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50261	urls += "?" + c.urlParams_.Encode()
50262	req, err := http.NewRequest("POST", urls, body)
50263	if err != nil {
50264		return nil, err
50265	}
50266	req.Header = reqHeaders
50267	googleapi.Expand(req.URL, map[string]string{
50268		"profileId": strconv.FormatInt(c.profileId, 10),
50269	})
50270	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50271}
50272
50273// Do executes the "dfareporting.userRoles.insert" call.
50274// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50275// code is an error. Response headers are in either
50276// *UserRole.ServerResponse.Header or (if a response was returned at
50277// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50278// to check whether the returned error was because
50279// http.StatusNotModified was returned.
50280func (c *UserRolesInsertCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50281	gensupport.SetOptions(c.urlParams_, opts...)
50282	res, err := c.doRequest("json")
50283	if res != nil && res.StatusCode == http.StatusNotModified {
50284		if res.Body != nil {
50285			res.Body.Close()
50286		}
50287		return nil, &googleapi.Error{
50288			Code:   res.StatusCode,
50289			Header: res.Header,
50290		}
50291	}
50292	if err != nil {
50293		return nil, err
50294	}
50295	defer googleapi.CloseBody(res)
50296	if err := googleapi.CheckResponse(res); err != nil {
50297		return nil, err
50298	}
50299	ret := &UserRole{
50300		ServerResponse: googleapi.ServerResponse{
50301			Header:         res.Header,
50302			HTTPStatusCode: res.StatusCode,
50303		},
50304	}
50305	target := &ret
50306	if err := gensupport.DecodeResponse(target, res); err != nil {
50307		return nil, err
50308	}
50309	return ret, nil
50310	// {
50311	//   "description": "Inserts a new user role.",
50312	//   "httpMethod": "POST",
50313	//   "id": "dfareporting.userRoles.insert",
50314	//   "parameterOrder": [
50315	//     "profileId"
50316	//   ],
50317	//   "parameters": {
50318	//     "profileId": {
50319	//       "description": "User profile ID associated with this request.",
50320	//       "format": "int64",
50321	//       "location": "path",
50322	//       "required": true,
50323	//       "type": "string"
50324	//     }
50325	//   },
50326	//   "path": "userprofiles/{profileId}/userRoles",
50327	//   "request": {
50328	//     "$ref": "UserRole"
50329	//   },
50330	//   "response": {
50331	//     "$ref": "UserRole"
50332	//   },
50333	//   "scopes": [
50334	//     "https://www.googleapis.com/auth/dfatrafficking"
50335	//   ]
50336	// }
50337
50338}
50339
50340// method id "dfareporting.userRoles.list":
50341
50342type UserRolesListCall struct {
50343	s            *Service
50344	profileId    int64
50345	urlParams_   gensupport.URLParams
50346	ifNoneMatch_ string
50347	ctx_         context.Context
50348	header_      http.Header
50349}
50350
50351// List: Retrieves a list of user roles, possibly filtered. This method
50352// supports paging.
50353func (r *UserRolesService) List(profileId int64) *UserRolesListCall {
50354	c := &UserRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50355	c.profileId = profileId
50356	return c
50357}
50358
50359// AccountUserRoleOnly sets the optional parameter
50360// "accountUserRoleOnly": Select only account level user roles not
50361// associated with any specific subaccount.
50362func (c *UserRolesListCall) AccountUserRoleOnly(accountUserRoleOnly bool) *UserRolesListCall {
50363	c.urlParams_.Set("accountUserRoleOnly", fmt.Sprint(accountUserRoleOnly))
50364	return c
50365}
50366
50367// Ids sets the optional parameter "ids": Select only user roles with
50368// the specified IDs.
50369func (c *UserRolesListCall) Ids(ids ...int64) *UserRolesListCall {
50370	var ids_ []string
50371	for _, v := range ids {
50372		ids_ = append(ids_, fmt.Sprint(v))
50373	}
50374	c.urlParams_.SetMulti("ids", ids_)
50375	return c
50376}
50377
50378// MaxResults sets the optional parameter "maxResults": Maximum number
50379// of results to return.
50380func (c *UserRolesListCall) MaxResults(maxResults int64) *UserRolesListCall {
50381	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
50382	return c
50383}
50384
50385// PageToken sets the optional parameter "pageToken": Value of the
50386// nextPageToken from the previous result page.
50387func (c *UserRolesListCall) PageToken(pageToken string) *UserRolesListCall {
50388	c.urlParams_.Set("pageToken", pageToken)
50389	return c
50390}
50391
50392// SearchString sets the optional parameter "searchString": Allows
50393// searching for objects by name or ID. Wildcards (*) are allowed. For
50394// example, "userrole*2015" will return objects with names like
50395// "userrole June 2015", "userrole April 2015", or simply "userrole
50396// 2015". Most of the searches also add wildcards implicitly at the
50397// start and the end of the search string. For example, a search string
50398// of "userrole" will match objects with name "my userrole", "userrole
50399// 2015", or simply "userrole".
50400func (c *UserRolesListCall) SearchString(searchString string) *UserRolesListCall {
50401	c.urlParams_.Set("searchString", searchString)
50402	return c
50403}
50404
50405// SortField sets the optional parameter "sortField": Field by which to
50406// sort the list.
50407//
50408// Possible values:
50409//   "ID" (default)
50410//   "NAME"
50411func (c *UserRolesListCall) SortField(sortField string) *UserRolesListCall {
50412	c.urlParams_.Set("sortField", sortField)
50413	return c
50414}
50415
50416// SortOrder sets the optional parameter "sortOrder": Order of sorted
50417// results.
50418//
50419// Possible values:
50420//   "ASCENDING" (default)
50421//   "DESCENDING"
50422func (c *UserRolesListCall) SortOrder(sortOrder string) *UserRolesListCall {
50423	c.urlParams_.Set("sortOrder", sortOrder)
50424	return c
50425}
50426
50427// SubaccountId sets the optional parameter "subaccountId": Select only
50428// user roles that belong to this subaccount.
50429func (c *UserRolesListCall) SubaccountId(subaccountId int64) *UserRolesListCall {
50430	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
50431	return c
50432}
50433
50434// Fields allows partial responses to be retrieved. See
50435// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50436// for more information.
50437func (c *UserRolesListCall) Fields(s ...googleapi.Field) *UserRolesListCall {
50438	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50439	return c
50440}
50441
50442// IfNoneMatch sets the optional parameter which makes the operation
50443// fail if the object's ETag matches the given value. This is useful for
50444// getting updates only after the object has changed since the last
50445// request. Use googleapi.IsNotModified to check whether the response
50446// error from Do is the result of In-None-Match.
50447func (c *UserRolesListCall) IfNoneMatch(entityTag string) *UserRolesListCall {
50448	c.ifNoneMatch_ = entityTag
50449	return c
50450}
50451
50452// Context sets the context to be used in this call's Do method. Any
50453// pending HTTP request will be aborted if the provided context is
50454// canceled.
50455func (c *UserRolesListCall) Context(ctx context.Context) *UserRolesListCall {
50456	c.ctx_ = ctx
50457	return c
50458}
50459
50460// Header returns an http.Header that can be modified by the caller to
50461// add HTTP headers to the request.
50462func (c *UserRolesListCall) Header() http.Header {
50463	if c.header_ == nil {
50464		c.header_ = make(http.Header)
50465	}
50466	return c.header_
50467}
50468
50469func (c *UserRolesListCall) doRequest(alt string) (*http.Response, error) {
50470	reqHeaders := make(http.Header)
50471	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
50472	for k, v := range c.header_ {
50473		reqHeaders[k] = v
50474	}
50475	reqHeaders.Set("User-Agent", c.s.userAgent())
50476	if c.ifNoneMatch_ != "" {
50477		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50478	}
50479	var body io.Reader = nil
50480	c.urlParams_.Set("alt", alt)
50481	c.urlParams_.Set("prettyPrint", "false")
50482	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50483	urls += "?" + c.urlParams_.Encode()
50484	req, err := http.NewRequest("GET", urls, body)
50485	if err != nil {
50486		return nil, err
50487	}
50488	req.Header = reqHeaders
50489	googleapi.Expand(req.URL, map[string]string{
50490		"profileId": strconv.FormatInt(c.profileId, 10),
50491	})
50492	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50493}
50494
50495// Do executes the "dfareporting.userRoles.list" call.
50496// Exactly one of *UserRolesListResponse or error will be non-nil. Any
50497// non-2xx status code is an error. Response headers are in either
50498// *UserRolesListResponse.ServerResponse.Header or (if a response was
50499// returned at all) in error.(*googleapi.Error).Header. Use
50500// googleapi.IsNotModified to check whether the returned error was
50501// because http.StatusNotModified was returned.
50502func (c *UserRolesListCall) Do(opts ...googleapi.CallOption) (*UserRolesListResponse, error) {
50503	gensupport.SetOptions(c.urlParams_, opts...)
50504	res, err := c.doRequest("json")
50505	if res != nil && res.StatusCode == http.StatusNotModified {
50506		if res.Body != nil {
50507			res.Body.Close()
50508		}
50509		return nil, &googleapi.Error{
50510			Code:   res.StatusCode,
50511			Header: res.Header,
50512		}
50513	}
50514	if err != nil {
50515		return nil, err
50516	}
50517	defer googleapi.CloseBody(res)
50518	if err := googleapi.CheckResponse(res); err != nil {
50519		return nil, err
50520	}
50521	ret := &UserRolesListResponse{
50522		ServerResponse: googleapi.ServerResponse{
50523			Header:         res.Header,
50524			HTTPStatusCode: res.StatusCode,
50525		},
50526	}
50527	target := &ret
50528	if err := gensupport.DecodeResponse(target, res); err != nil {
50529		return nil, err
50530	}
50531	return ret, nil
50532	// {
50533	//   "description": "Retrieves a list of user roles, possibly filtered. This method supports paging.",
50534	//   "httpMethod": "GET",
50535	//   "id": "dfareporting.userRoles.list",
50536	//   "parameterOrder": [
50537	//     "profileId"
50538	//   ],
50539	//   "parameters": {
50540	//     "accountUserRoleOnly": {
50541	//       "description": "Select only account level user roles not associated with any specific subaccount.",
50542	//       "location": "query",
50543	//       "type": "boolean"
50544	//     },
50545	//     "ids": {
50546	//       "description": "Select only user roles with the specified IDs.",
50547	//       "format": "int64",
50548	//       "location": "query",
50549	//       "repeated": true,
50550	//       "type": "string"
50551	//     },
50552	//     "maxResults": {
50553	//       "default": "1000",
50554	//       "description": "Maximum number of results to return.",
50555	//       "format": "int32",
50556	//       "location": "query",
50557	//       "maximum": "1000",
50558	//       "minimum": "0",
50559	//       "type": "integer"
50560	//     },
50561	//     "pageToken": {
50562	//       "description": "Value of the nextPageToken from the previous result page.",
50563	//       "location": "query",
50564	//       "type": "string"
50565	//     },
50566	//     "profileId": {
50567	//       "description": "User profile ID associated with this request.",
50568	//       "format": "int64",
50569	//       "location": "path",
50570	//       "required": true,
50571	//       "type": "string"
50572	//     },
50573	//     "searchString": {
50574	//       "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\".",
50575	//       "location": "query",
50576	//       "type": "string"
50577	//     },
50578	//     "sortField": {
50579	//       "default": "ID",
50580	//       "description": "Field by which to sort the list.",
50581	//       "enum": [
50582	//         "ID",
50583	//         "NAME"
50584	//       ],
50585	//       "enumDescriptions": [
50586	//         "",
50587	//         ""
50588	//       ],
50589	//       "location": "query",
50590	//       "type": "string"
50591	//     },
50592	//     "sortOrder": {
50593	//       "default": "ASCENDING",
50594	//       "description": "Order of sorted results.",
50595	//       "enum": [
50596	//         "ASCENDING",
50597	//         "DESCENDING"
50598	//       ],
50599	//       "enumDescriptions": [
50600	//         "",
50601	//         ""
50602	//       ],
50603	//       "location": "query",
50604	//       "type": "string"
50605	//     },
50606	//     "subaccountId": {
50607	//       "description": "Select only user roles that belong to this subaccount.",
50608	//       "format": "int64",
50609	//       "location": "query",
50610	//       "type": "string"
50611	//     }
50612	//   },
50613	//   "path": "userprofiles/{profileId}/userRoles",
50614	//   "response": {
50615	//     "$ref": "UserRolesListResponse"
50616	//   },
50617	//   "scopes": [
50618	//     "https://www.googleapis.com/auth/dfatrafficking"
50619	//   ]
50620	// }
50621
50622}
50623
50624// Pages invokes f for each page of results.
50625// A non-nil error returned from f will halt the iteration.
50626// The provided context supersedes any context provided to the Context method.
50627func (c *UserRolesListCall) Pages(ctx context.Context, f func(*UserRolesListResponse) error) error {
50628	c.ctx_ = ctx
50629	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
50630	for {
50631		x, err := c.Do()
50632		if err != nil {
50633			return err
50634		}
50635		if err := f(x); err != nil {
50636			return err
50637		}
50638		if x.NextPageToken == "" {
50639			return nil
50640		}
50641		c.PageToken(x.NextPageToken)
50642	}
50643}
50644
50645// method id "dfareporting.userRoles.patch":
50646
50647type UserRolesPatchCall struct {
50648	s          *Service
50649	profileId  int64
50650	userrole   *UserRole
50651	urlParams_ gensupport.URLParams
50652	ctx_       context.Context
50653	header_    http.Header
50654}
50655
50656// Patch: Updates an existing user role. This method supports patch
50657// semantics.
50658func (r *UserRolesService) Patch(profileId int64, id int64, userrole *UserRole) *UserRolesPatchCall {
50659	c := &UserRolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50660	c.profileId = profileId
50661	c.urlParams_.Set("id", fmt.Sprint(id))
50662	c.userrole = userrole
50663	return c
50664}
50665
50666// Fields allows partial responses to be retrieved. See
50667// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50668// for more information.
50669func (c *UserRolesPatchCall) Fields(s ...googleapi.Field) *UserRolesPatchCall {
50670	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50671	return c
50672}
50673
50674// Context sets the context to be used in this call's Do method. Any
50675// pending HTTP request will be aborted if the provided context is
50676// canceled.
50677func (c *UserRolesPatchCall) Context(ctx context.Context) *UserRolesPatchCall {
50678	c.ctx_ = ctx
50679	return c
50680}
50681
50682// Header returns an http.Header that can be modified by the caller to
50683// add HTTP headers to the request.
50684func (c *UserRolesPatchCall) Header() http.Header {
50685	if c.header_ == nil {
50686		c.header_ = make(http.Header)
50687	}
50688	return c.header_
50689}
50690
50691func (c *UserRolesPatchCall) doRequest(alt string) (*http.Response, error) {
50692	reqHeaders := make(http.Header)
50693	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
50694	for k, v := range c.header_ {
50695		reqHeaders[k] = v
50696	}
50697	reqHeaders.Set("User-Agent", c.s.userAgent())
50698	var body io.Reader = nil
50699	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50700	if err != nil {
50701		return nil, err
50702	}
50703	reqHeaders.Set("Content-Type", "application/json")
50704	c.urlParams_.Set("alt", alt)
50705	c.urlParams_.Set("prettyPrint", "false")
50706	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50707	urls += "?" + c.urlParams_.Encode()
50708	req, err := http.NewRequest("PATCH", urls, body)
50709	if err != nil {
50710		return nil, err
50711	}
50712	req.Header = reqHeaders
50713	googleapi.Expand(req.URL, map[string]string{
50714		"profileId": strconv.FormatInt(c.profileId, 10),
50715	})
50716	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50717}
50718
50719// Do executes the "dfareporting.userRoles.patch" call.
50720// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50721// code is an error. Response headers are in either
50722// *UserRole.ServerResponse.Header or (if a response was returned at
50723// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50724// to check whether the returned error was because
50725// http.StatusNotModified was returned.
50726func (c *UserRolesPatchCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50727	gensupport.SetOptions(c.urlParams_, opts...)
50728	res, err := c.doRequest("json")
50729	if res != nil && res.StatusCode == http.StatusNotModified {
50730		if res.Body != nil {
50731			res.Body.Close()
50732		}
50733		return nil, &googleapi.Error{
50734			Code:   res.StatusCode,
50735			Header: res.Header,
50736		}
50737	}
50738	if err != nil {
50739		return nil, err
50740	}
50741	defer googleapi.CloseBody(res)
50742	if err := googleapi.CheckResponse(res); err != nil {
50743		return nil, err
50744	}
50745	ret := &UserRole{
50746		ServerResponse: googleapi.ServerResponse{
50747			Header:         res.Header,
50748			HTTPStatusCode: res.StatusCode,
50749		},
50750	}
50751	target := &ret
50752	if err := gensupport.DecodeResponse(target, res); err != nil {
50753		return nil, err
50754	}
50755	return ret, nil
50756	// {
50757	//   "description": "Updates an existing user role. This method supports patch semantics.",
50758	//   "httpMethod": "PATCH",
50759	//   "id": "dfareporting.userRoles.patch",
50760	//   "parameterOrder": [
50761	//     "profileId",
50762	//     "id"
50763	//   ],
50764	//   "parameters": {
50765	//     "id": {
50766	//       "description": "User role ID.",
50767	//       "format": "int64",
50768	//       "location": "query",
50769	//       "required": true,
50770	//       "type": "string"
50771	//     },
50772	//     "profileId": {
50773	//       "description": "User profile ID associated with this request.",
50774	//       "format": "int64",
50775	//       "location": "path",
50776	//       "required": true,
50777	//       "type": "string"
50778	//     }
50779	//   },
50780	//   "path": "userprofiles/{profileId}/userRoles",
50781	//   "request": {
50782	//     "$ref": "UserRole"
50783	//   },
50784	//   "response": {
50785	//     "$ref": "UserRole"
50786	//   },
50787	//   "scopes": [
50788	//     "https://www.googleapis.com/auth/dfatrafficking"
50789	//   ]
50790	// }
50791
50792}
50793
50794// method id "dfareporting.userRoles.update":
50795
50796type UserRolesUpdateCall struct {
50797	s          *Service
50798	profileId  int64
50799	userrole   *UserRole
50800	urlParams_ gensupport.URLParams
50801	ctx_       context.Context
50802	header_    http.Header
50803}
50804
50805// Update: Updates an existing user role.
50806func (r *UserRolesService) Update(profileId int64, userrole *UserRole) *UserRolesUpdateCall {
50807	c := &UserRolesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50808	c.profileId = profileId
50809	c.userrole = userrole
50810	return c
50811}
50812
50813// Fields allows partial responses to be retrieved. See
50814// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50815// for more information.
50816func (c *UserRolesUpdateCall) Fields(s ...googleapi.Field) *UserRolesUpdateCall {
50817	c.urlParams_.Set("fields", googleapi.CombineFields(s))
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 *UserRolesUpdateCall) Context(ctx context.Context) *UserRolesUpdateCall {
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 *UserRolesUpdateCall) Header() http.Header {
50832	if c.header_ == nil {
50833		c.header_ = make(http.Header)
50834	}
50835	return c.header_
50836}
50837
50838func (c *UserRolesUpdateCall) doRequest(alt string) (*http.Response, error) {
50839	reqHeaders := make(http.Header)
50840	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
50841	for k, v := range c.header_ {
50842		reqHeaders[k] = v
50843	}
50844	reqHeaders.Set("User-Agent", c.s.userAgent())
50845	var body io.Reader = nil
50846	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50847	if err != nil {
50848		return nil, err
50849	}
50850	reqHeaders.Set("Content-Type", "application/json")
50851	c.urlParams_.Set("alt", alt)
50852	c.urlParams_.Set("prettyPrint", "false")
50853	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50854	urls += "?" + c.urlParams_.Encode()
50855	req, err := http.NewRequest("PUT", urls, body)
50856	if err != nil {
50857		return nil, err
50858	}
50859	req.Header = reqHeaders
50860	googleapi.Expand(req.URL, map[string]string{
50861		"profileId": strconv.FormatInt(c.profileId, 10),
50862	})
50863	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50864}
50865
50866// Do executes the "dfareporting.userRoles.update" call.
50867// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50868// code is an error. Response headers are in either
50869// *UserRole.ServerResponse.Header or (if a response was returned at
50870// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50871// to check whether the returned error was because
50872// http.StatusNotModified was returned.
50873func (c *UserRolesUpdateCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50874	gensupport.SetOptions(c.urlParams_, opts...)
50875	res, err := c.doRequest("json")
50876	if res != nil && res.StatusCode == http.StatusNotModified {
50877		if res.Body != nil {
50878			res.Body.Close()
50879		}
50880		return nil, &googleapi.Error{
50881			Code:   res.StatusCode,
50882			Header: res.Header,
50883		}
50884	}
50885	if err != nil {
50886		return nil, err
50887	}
50888	defer googleapi.CloseBody(res)
50889	if err := googleapi.CheckResponse(res); err != nil {
50890		return nil, err
50891	}
50892	ret := &UserRole{
50893		ServerResponse: googleapi.ServerResponse{
50894			Header:         res.Header,
50895			HTTPStatusCode: res.StatusCode,
50896		},
50897	}
50898	target := &ret
50899	if err := gensupport.DecodeResponse(target, res); err != nil {
50900		return nil, err
50901	}
50902	return ret, nil
50903	// {
50904	//   "description": "Updates an existing user role.",
50905	//   "httpMethod": "PUT",
50906	//   "id": "dfareporting.userRoles.update",
50907	//   "parameterOrder": [
50908	//     "profileId"
50909	//   ],
50910	//   "parameters": {
50911	//     "profileId": {
50912	//       "description": "User profile ID associated with this request.",
50913	//       "format": "int64",
50914	//       "location": "path",
50915	//       "required": true,
50916	//       "type": "string"
50917	//     }
50918	//   },
50919	//   "path": "userprofiles/{profileId}/userRoles",
50920	//   "request": {
50921	//     "$ref": "UserRole"
50922	//   },
50923	//   "response": {
50924	//     "$ref": "UserRole"
50925	//   },
50926	//   "scopes": [
50927	//     "https://www.googleapis.com/auth/dfatrafficking"
50928	//   ]
50929	// }
50930
50931}
50932
50933// method id "dfareporting.videoFormats.get":
50934
50935type VideoFormatsGetCall struct {
50936	s            *Service
50937	profileId    int64
50938	id           int64
50939	urlParams_   gensupport.URLParams
50940	ifNoneMatch_ string
50941	ctx_         context.Context
50942	header_      http.Header
50943}
50944
50945// Get: Gets one video format by ID.
50946func (r *VideoFormatsService) Get(profileId int64, id int64) *VideoFormatsGetCall {
50947	c := &VideoFormatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50948	c.profileId = profileId
50949	c.id = id
50950	return c
50951}
50952
50953// Fields allows partial responses to be retrieved. See
50954// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50955// for more information.
50956func (c *VideoFormatsGetCall) Fields(s ...googleapi.Field) *VideoFormatsGetCall {
50957	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50958	return c
50959}
50960
50961// IfNoneMatch sets the optional parameter which makes the operation
50962// fail if the object's ETag matches the given value. This is useful for
50963// getting updates only after the object has changed since the last
50964// request. Use googleapi.IsNotModified to check whether the response
50965// error from Do is the result of In-None-Match.
50966func (c *VideoFormatsGetCall) IfNoneMatch(entityTag string) *VideoFormatsGetCall {
50967	c.ifNoneMatch_ = entityTag
50968	return c
50969}
50970
50971// Context sets the context to be used in this call's Do method. Any
50972// pending HTTP request will be aborted if the provided context is
50973// canceled.
50974func (c *VideoFormatsGetCall) Context(ctx context.Context) *VideoFormatsGetCall {
50975	c.ctx_ = ctx
50976	return c
50977}
50978
50979// Header returns an http.Header that can be modified by the caller to
50980// add HTTP headers to the request.
50981func (c *VideoFormatsGetCall) Header() http.Header {
50982	if c.header_ == nil {
50983		c.header_ = make(http.Header)
50984	}
50985	return c.header_
50986}
50987
50988func (c *VideoFormatsGetCall) doRequest(alt string) (*http.Response, error) {
50989	reqHeaders := make(http.Header)
50990	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
50991	for k, v := range c.header_ {
50992		reqHeaders[k] = v
50993	}
50994	reqHeaders.Set("User-Agent", c.s.userAgent())
50995	if c.ifNoneMatch_ != "" {
50996		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50997	}
50998	var body io.Reader = nil
50999	c.urlParams_.Set("alt", alt)
51000	c.urlParams_.Set("prettyPrint", "false")
51001	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats/{id}")
51002	urls += "?" + c.urlParams_.Encode()
51003	req, err := http.NewRequest("GET", urls, body)
51004	if err != nil {
51005		return nil, err
51006	}
51007	req.Header = reqHeaders
51008	googleapi.Expand(req.URL, map[string]string{
51009		"profileId": strconv.FormatInt(c.profileId, 10),
51010		"id":        strconv.FormatInt(c.id, 10),
51011	})
51012	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51013}
51014
51015// Do executes the "dfareporting.videoFormats.get" call.
51016// Exactly one of *VideoFormat or error will be non-nil. Any non-2xx
51017// status code is an error. Response headers are in either
51018// *VideoFormat.ServerResponse.Header or (if a response was returned at
51019// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
51020// to check whether the returned error was because
51021// http.StatusNotModified was returned.
51022func (c *VideoFormatsGetCall) Do(opts ...googleapi.CallOption) (*VideoFormat, error) {
51023	gensupport.SetOptions(c.urlParams_, opts...)
51024	res, err := c.doRequest("json")
51025	if res != nil && res.StatusCode == http.StatusNotModified {
51026		if res.Body != nil {
51027			res.Body.Close()
51028		}
51029		return nil, &googleapi.Error{
51030			Code:   res.StatusCode,
51031			Header: res.Header,
51032		}
51033	}
51034	if err != nil {
51035		return nil, err
51036	}
51037	defer googleapi.CloseBody(res)
51038	if err := googleapi.CheckResponse(res); err != nil {
51039		return nil, err
51040	}
51041	ret := &VideoFormat{
51042		ServerResponse: googleapi.ServerResponse{
51043			Header:         res.Header,
51044			HTTPStatusCode: res.StatusCode,
51045		},
51046	}
51047	target := &ret
51048	if err := gensupport.DecodeResponse(target, res); err != nil {
51049		return nil, err
51050	}
51051	return ret, nil
51052	// {
51053	//   "description": "Gets one video format by ID.",
51054	//   "httpMethod": "GET",
51055	//   "id": "dfareporting.videoFormats.get",
51056	//   "parameterOrder": [
51057	//     "profileId",
51058	//     "id"
51059	//   ],
51060	//   "parameters": {
51061	//     "id": {
51062	//       "description": "Video format ID.",
51063	//       "format": "int32",
51064	//       "location": "path",
51065	//       "required": true,
51066	//       "type": "integer"
51067	//     },
51068	//     "profileId": {
51069	//       "description": "User profile ID associated with this request.",
51070	//       "format": "int64",
51071	//       "location": "path",
51072	//       "required": true,
51073	//       "type": "string"
51074	//     }
51075	//   },
51076	//   "path": "userprofiles/{profileId}/videoFormats/{id}",
51077	//   "response": {
51078	//     "$ref": "VideoFormat"
51079	//   },
51080	//   "scopes": [
51081	//     "https://www.googleapis.com/auth/dfatrafficking"
51082	//   ]
51083	// }
51084
51085}
51086
51087// method id "dfareporting.videoFormats.list":
51088
51089type VideoFormatsListCall struct {
51090	s            *Service
51091	profileId    int64
51092	urlParams_   gensupport.URLParams
51093	ifNoneMatch_ string
51094	ctx_         context.Context
51095	header_      http.Header
51096}
51097
51098// List: Lists available video formats.
51099func (r *VideoFormatsService) List(profileId int64) *VideoFormatsListCall {
51100	c := &VideoFormatsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51101	c.profileId = profileId
51102	return c
51103}
51104
51105// Fields allows partial responses to be retrieved. See
51106// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
51107// for more information.
51108func (c *VideoFormatsListCall) Fields(s ...googleapi.Field) *VideoFormatsListCall {
51109	c.urlParams_.Set("fields", googleapi.CombineFields(s))
51110	return c
51111}
51112
51113// IfNoneMatch sets the optional parameter which makes the operation
51114// fail if the object's ETag matches the given value. This is useful for
51115// getting updates only after the object has changed since the last
51116// request. Use googleapi.IsNotModified to check whether the response
51117// error from Do is the result of In-None-Match.
51118func (c *VideoFormatsListCall) IfNoneMatch(entityTag string) *VideoFormatsListCall {
51119	c.ifNoneMatch_ = entityTag
51120	return c
51121}
51122
51123// Context sets the context to be used in this call's Do method. Any
51124// pending HTTP request will be aborted if the provided context is
51125// canceled.
51126func (c *VideoFormatsListCall) Context(ctx context.Context) *VideoFormatsListCall {
51127	c.ctx_ = ctx
51128	return c
51129}
51130
51131// Header returns an http.Header that can be modified by the caller to
51132// add HTTP headers to the request.
51133func (c *VideoFormatsListCall) Header() http.Header {
51134	if c.header_ == nil {
51135		c.header_ = make(http.Header)
51136	}
51137	return c.header_
51138}
51139
51140func (c *VideoFormatsListCall) doRequest(alt string) (*http.Response, error) {
51141	reqHeaders := make(http.Header)
51142	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
51143	for k, v := range c.header_ {
51144		reqHeaders[k] = v
51145	}
51146	reqHeaders.Set("User-Agent", c.s.userAgent())
51147	if c.ifNoneMatch_ != "" {
51148		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51149	}
51150	var body io.Reader = nil
51151	c.urlParams_.Set("alt", alt)
51152	c.urlParams_.Set("prettyPrint", "false")
51153	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats")
51154	urls += "?" + c.urlParams_.Encode()
51155	req, err := http.NewRequest("GET", urls, body)
51156	if err != nil {
51157		return nil, err
51158	}
51159	req.Header = reqHeaders
51160	googleapi.Expand(req.URL, map[string]string{
51161		"profileId": strconv.FormatInt(c.profileId, 10),
51162	})
51163	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51164}
51165
51166// Do executes the "dfareporting.videoFormats.list" call.
51167// Exactly one of *VideoFormatsListResponse or error will be non-nil.
51168// Any non-2xx status code is an error. Response headers are in either
51169// *VideoFormatsListResponse.ServerResponse.Header or (if a response was
51170// returned at all) in error.(*googleapi.Error).Header. Use
51171// googleapi.IsNotModified to check whether the returned error was
51172// because http.StatusNotModified was returned.
51173func (c *VideoFormatsListCall) Do(opts ...googleapi.CallOption) (*VideoFormatsListResponse, error) {
51174	gensupport.SetOptions(c.urlParams_, opts...)
51175	res, err := c.doRequest("json")
51176	if res != nil && res.StatusCode == http.StatusNotModified {
51177		if res.Body != nil {
51178			res.Body.Close()
51179		}
51180		return nil, &googleapi.Error{
51181			Code:   res.StatusCode,
51182			Header: res.Header,
51183		}
51184	}
51185	if err != nil {
51186		return nil, err
51187	}
51188	defer googleapi.CloseBody(res)
51189	if err := googleapi.CheckResponse(res); err != nil {
51190		return nil, err
51191	}
51192	ret := &VideoFormatsListResponse{
51193		ServerResponse: googleapi.ServerResponse{
51194			Header:         res.Header,
51195			HTTPStatusCode: res.StatusCode,
51196		},
51197	}
51198	target := &ret
51199	if err := gensupport.DecodeResponse(target, res); err != nil {
51200		return nil, err
51201	}
51202	return ret, nil
51203	// {
51204	//   "description": "Lists available video formats.",
51205	//   "httpMethod": "GET",
51206	//   "id": "dfareporting.videoFormats.list",
51207	//   "parameterOrder": [
51208	//     "profileId"
51209	//   ],
51210	//   "parameters": {
51211	//     "profileId": {
51212	//       "description": "User profile ID associated with this request.",
51213	//       "format": "int64",
51214	//       "location": "path",
51215	//       "required": true,
51216	//       "type": "string"
51217	//     }
51218	//   },
51219	//   "path": "userprofiles/{profileId}/videoFormats",
51220	//   "response": {
51221	//     "$ref": "VideoFormatsListResponse"
51222	//   },
51223	//   "scopes": [
51224	//     "https://www.googleapis.com/auth/dfatrafficking"
51225	//   ]
51226	// }
51227
51228}
51229