1// Copyright 2020 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package dfareporting provides access to the DCM/DFA Reporting And Trafficking API.
8//
9// For product documentation, see: https://developers.google.com/doubleclick-advertisers/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/dfareporting/v3.1"
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.1"
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.1"
77const apiName = "dfareporting"
78const apiVersion = "v3.1"
79const basePath = "https://www.googleapis.com/dfareporting/v3.1/"
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	CurrencyId int64 `json:"currencyId,omitempty,string"`
982
983	// DefaultCreativeSizeId: Default placement dimensions for this account.
984	DefaultCreativeSizeId int64 `json:"defaultCreativeSizeId,omitempty,string"`
985
986	// Description: Description of this account.
987	Description string `json:"description,omitempty"`
988
989	// Id: ID of this account. This is a read-only, auto-generated field.
990	Id int64 `json:"id,omitempty,string"`
991
992	// Kind: Identifies what kind of resource this is. Value: the fixed
993	// string "dfareporting#account".
994	Kind string `json:"kind,omitempty"`
995
996	// Locale: Locale of this account.
997	// Acceptable values are:
998	// - "cs" (Czech)
999	// - "de" (German)
1000	// - "en" (English)
1001	// - "en-GB" (English United Kingdom)
1002	// - "es" (Spanish)
1003	// - "fr" (French)
1004	// - "it" (Italian)
1005	// - "ja" (Japanese)
1006	// - "ko" (Korean)
1007	// - "pl" (Polish)
1008	// - "pt-BR" (Portuguese Brazil)
1009	// - "ru" (Russian)
1010	// - "sv" (Swedish)
1011	// - "tr" (Turkish)
1012	// - "zh-CN" (Chinese Simplified)
1013	// - "zh-TW" (Chinese Traditional)
1014	Locale string `json:"locale,omitempty"`
1015
1016	// MaximumImageSize: Maximum image size allowed for this account, in
1017	// kilobytes. Value must be greater than or equal to 1.
1018	MaximumImageSize int64 `json:"maximumImageSize,omitempty,string"`
1019
1020	// Name: Name of this account. This is a required field, and must be
1021	// less than 128 characters long and be globally unique.
1022	Name string `json:"name,omitempty"`
1023
1024	// NielsenOcrEnabled: Whether campaigns created in this account will be
1025	// enabled for Nielsen OCR reach ratings by default.
1026	NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
1027
1028	// ReportsConfiguration: Reporting configuration of this account.
1029	ReportsConfiguration *ReportsConfiguration `json:"reportsConfiguration,omitempty"`
1030
1031	// ShareReportsWithTwitter: Share Path to Conversion reports with
1032	// Twitter.
1033	ShareReportsWithTwitter bool `json:"shareReportsWithTwitter,omitempty"`
1034
1035	// TeaserSizeLimit: File size limit in kilobytes of Rich Media teaser
1036	// creatives. Acceptable values are 1 to 10240, inclusive.
1037	TeaserSizeLimit int64 `json:"teaserSizeLimit,omitempty,string"`
1038
1039	// ServerResponse contains the HTTP response code and headers from the
1040	// server.
1041	googleapi.ServerResponse `json:"-"`
1042
1043	// ForceSendFields is a list of field names (e.g.
1044	// "AccountPermissionIds") to unconditionally include in API requests.
1045	// By default, fields with empty values are omitted from API requests.
1046	// However, any non-pointer, non-interface field appearing in
1047	// ForceSendFields will be sent to the server regardless of whether the
1048	// field is empty or not. This may be used to include empty fields in
1049	// Patch requests.
1050	ForceSendFields []string `json:"-"`
1051
1052	// NullFields is a list of field names (e.g. "AccountPermissionIds") to
1053	// include in API requests with the JSON null value. By default, fields
1054	// with empty values are omitted from API requests. However, any field
1055	// with an empty value appearing in NullFields will be sent to the
1056	// server as null. It is an error if a field in this list has a
1057	// non-empty value. This may be used to include null fields in Patch
1058	// requests.
1059	NullFields []string `json:"-"`
1060}
1061
1062func (s *Account) MarshalJSON() ([]byte, error) {
1063	type NoMethod Account
1064	raw := NoMethod(*s)
1065	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1066}
1067
1068// AccountActiveAdSummary: Gets a summary of active ads in an account.
1069type AccountActiveAdSummary struct {
1070	// AccountId: ID of the account.
1071	AccountId int64 `json:"accountId,omitempty,string"`
1072
1073	// ActiveAds: Ads that have been activated for the account
1074	ActiveAds int64 `json:"activeAds,omitempty,string"`
1075
1076	// ActiveAdsLimitTier: Maximum number of active ads allowed for the
1077	// account.
1078	//
1079	// Possible values:
1080	//   "ACTIVE_ADS_TIER_100K"
1081	//   "ACTIVE_ADS_TIER_1M"
1082	//   "ACTIVE_ADS_TIER_200K"
1083	//   "ACTIVE_ADS_TIER_300K"
1084	//   "ACTIVE_ADS_TIER_40K"
1085	//   "ACTIVE_ADS_TIER_500K"
1086	//   "ACTIVE_ADS_TIER_750K"
1087	//   "ACTIVE_ADS_TIER_75K"
1088	ActiveAdsLimitTier string `json:"activeAdsLimitTier,omitempty"`
1089
1090	// AvailableAds: Ads that can be activated for the account.
1091	AvailableAds int64 `json:"availableAds,omitempty,string"`
1092
1093	// Kind: Identifies what kind of resource this is. Value: the fixed
1094	// string "dfareporting#accountActiveAdSummary".
1095	Kind string `json:"kind,omitempty"`
1096
1097	// ServerResponse contains the HTTP response code and headers from the
1098	// server.
1099	googleapi.ServerResponse `json:"-"`
1100
1101	// ForceSendFields is a list of field names (e.g. "AccountId") to
1102	// unconditionally include in API requests. By default, fields with
1103	// empty values are omitted from API requests. However, any non-pointer,
1104	// non-interface field appearing in ForceSendFields will be sent to the
1105	// server regardless of whether the field is empty or not. This may be
1106	// used to include empty fields in Patch requests.
1107	ForceSendFields []string `json:"-"`
1108
1109	// NullFields is a list of field names (e.g. "AccountId") to include in
1110	// API requests with the JSON null value. By default, fields with empty
1111	// values are omitted from API requests. However, any field with an
1112	// empty value appearing in NullFields will be sent to the server as
1113	// null. It is an error if a field in this list has a non-empty value.
1114	// This may be used to include null fields in Patch requests.
1115	NullFields []string `json:"-"`
1116}
1117
1118func (s *AccountActiveAdSummary) MarshalJSON() ([]byte, error) {
1119	type NoMethod AccountActiveAdSummary
1120	raw := NoMethod(*s)
1121	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1122}
1123
1124// AccountPermission: AccountPermissions contains information about a
1125// particular account permission. Some features of Campaign Manager
1126// require an account permission to be present in the account.
1127type AccountPermission struct {
1128	// AccountProfiles: Account profiles associated with this account
1129	// permission.
1130	//
1131	// Possible values are:
1132	// - "ACCOUNT_PROFILE_BASIC"
1133	// - "ACCOUNT_PROFILE_STANDARD"
1134	//
1135	// Possible values:
1136	//   "ACCOUNT_PROFILE_BASIC"
1137	//   "ACCOUNT_PROFILE_STANDARD"
1138	AccountProfiles []string `json:"accountProfiles,omitempty"`
1139
1140	// Id: ID of this account permission.
1141	Id int64 `json:"id,omitempty,string"`
1142
1143	// Kind: Identifies what kind of resource this is. Value: the fixed
1144	// string "dfareporting#accountPermission".
1145	Kind string `json:"kind,omitempty"`
1146
1147	// Level: Administrative level required to enable this account
1148	// permission.
1149	//
1150	// Possible values:
1151	//   "ADMINISTRATOR"
1152	//   "USER"
1153	Level string `json:"level,omitempty"`
1154
1155	// Name: Name of this account permission.
1156	Name string `json:"name,omitempty"`
1157
1158	// PermissionGroupId: Permission group of this account permission.
1159	PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
1160
1161	// ServerResponse contains the HTTP response code and headers from the
1162	// server.
1163	googleapi.ServerResponse `json:"-"`
1164
1165	// ForceSendFields is a list of field names (e.g. "AccountProfiles") to
1166	// unconditionally include in API requests. By default, fields with
1167	// empty values are omitted from API requests. However, any non-pointer,
1168	// non-interface field appearing in ForceSendFields will be sent to the
1169	// server regardless of whether the field is empty or not. This may be
1170	// used to include empty fields in Patch requests.
1171	ForceSendFields []string `json:"-"`
1172
1173	// NullFields is a list of field names (e.g. "AccountProfiles") to
1174	// include in API requests with the JSON null value. By default, fields
1175	// with empty values are omitted from API requests. However, any field
1176	// with an empty value appearing in NullFields will be sent to the
1177	// server as null. It is an error if a field in this list has a
1178	// non-empty value. This may be used to include null fields in Patch
1179	// requests.
1180	NullFields []string `json:"-"`
1181}
1182
1183func (s *AccountPermission) MarshalJSON() ([]byte, error) {
1184	type NoMethod AccountPermission
1185	raw := NoMethod(*s)
1186	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1187}
1188
1189// AccountPermissionGroup: AccountPermissionGroups contains a mapping of
1190// permission group IDs to names. A permission group is a grouping of
1191// account permissions.
1192type AccountPermissionGroup struct {
1193	// Id: ID of this account permission group.
1194	Id int64 `json:"id,omitempty,string"`
1195
1196	// Kind: Identifies what kind of resource this is. Value: the fixed
1197	// string "dfareporting#accountPermissionGroup".
1198	Kind string `json:"kind,omitempty"`
1199
1200	// Name: Name of this account permission group.
1201	Name string `json:"name,omitempty"`
1202
1203	// ServerResponse contains the HTTP response code and headers from the
1204	// server.
1205	googleapi.ServerResponse `json:"-"`
1206
1207	// ForceSendFields is a list of field names (e.g. "Id") to
1208	// unconditionally include in API requests. By default, fields with
1209	// empty values are omitted from API requests. However, any non-pointer,
1210	// non-interface field appearing in ForceSendFields will be sent to the
1211	// server regardless of whether the field is empty or not. This may be
1212	// used to include empty fields in Patch requests.
1213	ForceSendFields []string `json:"-"`
1214
1215	// NullFields is a list of field names (e.g. "Id") to include in API
1216	// requests with the JSON null value. By default, fields with empty
1217	// values are omitted from API requests. However, any field with an
1218	// empty value appearing in NullFields will be sent to the server as
1219	// null. It is an error if a field in this list has a non-empty value.
1220	// This may be used to include null fields in Patch requests.
1221	NullFields []string `json:"-"`
1222}
1223
1224func (s *AccountPermissionGroup) MarshalJSON() ([]byte, error) {
1225	type NoMethod AccountPermissionGroup
1226	raw := NoMethod(*s)
1227	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1228}
1229
1230// AccountPermissionGroupsListResponse: Account Permission Group List
1231// Response
1232type AccountPermissionGroupsListResponse struct {
1233	// AccountPermissionGroups: Account permission group collection.
1234	AccountPermissionGroups []*AccountPermissionGroup `json:"accountPermissionGroups,omitempty"`
1235
1236	// Kind: Identifies what kind of resource this is. Value: the fixed
1237	// string "dfareporting#accountPermissionGroupsListResponse".
1238	Kind string `json:"kind,omitempty"`
1239
1240	// ServerResponse contains the HTTP response code and headers from the
1241	// server.
1242	googleapi.ServerResponse `json:"-"`
1243
1244	// ForceSendFields is a list of field names (e.g.
1245	// "AccountPermissionGroups") to unconditionally include in API
1246	// requests. By default, fields with empty values are omitted from API
1247	// requests. However, any non-pointer, non-interface field appearing in
1248	// ForceSendFields will be sent to the server regardless of whether the
1249	// field is empty or not. This may be used to include empty fields in
1250	// Patch requests.
1251	ForceSendFields []string `json:"-"`
1252
1253	// NullFields is a list of field names (e.g. "AccountPermissionGroups")
1254	// to include in API requests with the JSON null value. By default,
1255	// fields with empty values are omitted from API requests. However, any
1256	// field with an empty value appearing in NullFields will be sent to the
1257	// server as null. It is an error if a field in this list has a
1258	// non-empty value. This may be used to include null fields in Patch
1259	// requests.
1260	NullFields []string `json:"-"`
1261}
1262
1263func (s *AccountPermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
1264	type NoMethod AccountPermissionGroupsListResponse
1265	raw := NoMethod(*s)
1266	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1267}
1268
1269// AccountPermissionsListResponse: Account Permission List Response
1270type AccountPermissionsListResponse struct {
1271	// AccountPermissions: Account permission collection.
1272	AccountPermissions []*AccountPermission `json:"accountPermissions,omitempty"`
1273
1274	// Kind: Identifies what kind of resource this is. Value: the fixed
1275	// string "dfareporting#accountPermissionsListResponse".
1276	Kind string `json:"kind,omitempty"`
1277
1278	// ServerResponse contains the HTTP response code and headers from the
1279	// server.
1280	googleapi.ServerResponse `json:"-"`
1281
1282	// ForceSendFields is a list of field names (e.g. "AccountPermissions")
1283	// to unconditionally include in API requests. By default, fields with
1284	// empty values are omitted from API requests. However, any non-pointer,
1285	// non-interface field appearing in ForceSendFields will be sent to the
1286	// server regardless of whether the field is empty or not. This may be
1287	// used to include empty fields in Patch requests.
1288	ForceSendFields []string `json:"-"`
1289
1290	// NullFields is a list of field names (e.g. "AccountPermissions") to
1291	// include in API requests with the JSON null value. By default, fields
1292	// with empty values are omitted from API requests. However, any field
1293	// with an empty value appearing in NullFields will be sent to the
1294	// server as null. It is an error if a field in this list has a
1295	// non-empty value. This may be used to include null fields in Patch
1296	// requests.
1297	NullFields []string `json:"-"`
1298}
1299
1300func (s *AccountPermissionsListResponse) MarshalJSON() ([]byte, error) {
1301	type NoMethod AccountPermissionsListResponse
1302	raw := NoMethod(*s)
1303	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1304}
1305
1306// AccountUserProfile: AccountUserProfiles contains properties of a
1307// Campaign Manager user profile. This resource is specifically for
1308// managing user profiles, whereas UserProfiles is for accessing the
1309// API.
1310type AccountUserProfile struct {
1311	// AccountId: Account ID of the user profile. This is a read-only field
1312	// that can be left blank.
1313	AccountId int64 `json:"accountId,omitempty,string"`
1314
1315	// Active: Whether this user profile is active. This defaults to false,
1316	// and must be set true on insert for the user profile to be usable.
1317	Active bool `json:"active,omitempty"`
1318
1319	// AdvertiserFilter: Filter that describes which advertisers are visible
1320	// to the user profile.
1321	AdvertiserFilter *ObjectFilter `json:"advertiserFilter,omitempty"`
1322
1323	// CampaignFilter: Filter that describes which campaigns are visible to
1324	// the user profile.
1325	CampaignFilter *ObjectFilter `json:"campaignFilter,omitempty"`
1326
1327	// Comments: Comments for this user profile.
1328	Comments string `json:"comments,omitempty"`
1329
1330	// Email: Email of the user profile. The email addresss must be linked
1331	// to a Google Account. This field is required on insertion and is
1332	// read-only after insertion.
1333	Email string `json:"email,omitempty"`
1334
1335	// Id: ID of the user profile. This is a read-only, auto-generated
1336	// field.
1337	Id int64 `json:"id,omitempty,string"`
1338
1339	// Kind: Identifies what kind of resource this is. Value: the fixed
1340	// string "dfareporting#accountUserProfile".
1341	Kind string `json:"kind,omitempty"`
1342
1343	// Locale: Locale of the user profile. This is a required
1344	// field.
1345	// Acceptable values are:
1346	// - "cs" (Czech)
1347	// - "de" (German)
1348	// - "en" (English)
1349	// - "en-GB" (English United Kingdom)
1350	// - "es" (Spanish)
1351	// - "fr" (French)
1352	// - "it" (Italian)
1353	// - "ja" (Japanese)
1354	// - "ko" (Korean)
1355	// - "pl" (Polish)
1356	// - "pt-BR" (Portuguese Brazil)
1357	// - "ru" (Russian)
1358	// - "sv" (Swedish)
1359	// - "tr" (Turkish)
1360	// - "zh-CN" (Chinese Simplified)
1361	// - "zh-TW" (Chinese Traditional)
1362	Locale string `json:"locale,omitempty"`
1363
1364	// Name: Name of the user profile. This is a required field. Must be
1365	// less than 64 characters long, must be globally unique, and cannot
1366	// contain whitespace or any of the following characters: "&;"#%,".
1367	Name string `json:"name,omitempty"`
1368
1369	// SiteFilter: Filter that describes which sites are visible to the user
1370	// profile.
1371	SiteFilter *ObjectFilter `json:"siteFilter,omitempty"`
1372
1373	// SubaccountId: Subaccount ID of the user profile. This is a read-only
1374	// field that can be left blank.
1375	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1376
1377	// TraffickerType: Trafficker type of this user profile. This is a
1378	// read-only field.
1379	//
1380	// Possible values:
1381	//   "EXTERNAL_TRAFFICKER"
1382	//   "INTERNAL_NON_TRAFFICKER"
1383	//   "INTERNAL_TRAFFICKER"
1384	TraffickerType string `json:"traffickerType,omitempty"`
1385
1386	// UserAccessType: User type of the user profile. This is a read-only
1387	// field that can be left blank.
1388	//
1389	// Possible values:
1390	//   "INTERNAL_ADMINISTRATOR"
1391	//   "NORMAL_USER"
1392	//   "READ_ONLY_SUPER_USER"
1393	//   "SUPER_USER"
1394	UserAccessType string `json:"userAccessType,omitempty"`
1395
1396	// UserRoleFilter: Filter that describes which user roles are visible to
1397	// the user profile.
1398	UserRoleFilter *ObjectFilter `json:"userRoleFilter,omitempty"`
1399
1400	// UserRoleId: User role ID of the user profile. This is a required
1401	// field.
1402	UserRoleId int64 `json:"userRoleId,omitempty,string"`
1403
1404	// ServerResponse contains the HTTP response code and headers from the
1405	// server.
1406	googleapi.ServerResponse `json:"-"`
1407
1408	// ForceSendFields is a list of field names (e.g. "AccountId") to
1409	// unconditionally include in API requests. By default, fields with
1410	// empty values are omitted from API requests. However, any non-pointer,
1411	// non-interface field appearing in ForceSendFields will be sent to the
1412	// server regardless of whether the field is empty or not. This may be
1413	// used to include empty fields in Patch requests.
1414	ForceSendFields []string `json:"-"`
1415
1416	// NullFields is a list of field names (e.g. "AccountId") to include in
1417	// API requests with the JSON null value. By default, fields with empty
1418	// values are omitted from API requests. However, any field with an
1419	// empty value appearing in NullFields will be sent to the server as
1420	// null. It is an error if a field in this list has a non-empty value.
1421	// This may be used to include null fields in Patch requests.
1422	NullFields []string `json:"-"`
1423}
1424
1425func (s *AccountUserProfile) MarshalJSON() ([]byte, error) {
1426	type NoMethod AccountUserProfile
1427	raw := NoMethod(*s)
1428	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1429}
1430
1431// AccountUserProfilesListResponse: Account User Profile List Response
1432type AccountUserProfilesListResponse struct {
1433	// AccountUserProfiles: Account user profile collection.
1434	AccountUserProfiles []*AccountUserProfile `json:"accountUserProfiles,omitempty"`
1435
1436	// Kind: Identifies what kind of resource this is. Value: the fixed
1437	// string "dfareporting#accountUserProfilesListResponse".
1438	Kind string `json:"kind,omitempty"`
1439
1440	// NextPageToken: Pagination token to be used for the next list
1441	// operation.
1442	NextPageToken string `json:"nextPageToken,omitempty"`
1443
1444	// ServerResponse contains the HTTP response code and headers from the
1445	// server.
1446	googleapi.ServerResponse `json:"-"`
1447
1448	// ForceSendFields is a list of field names (e.g. "AccountUserProfiles")
1449	// to unconditionally include in API requests. By default, fields with
1450	// empty values are omitted from API requests. However, any non-pointer,
1451	// non-interface field appearing in ForceSendFields will be sent to the
1452	// server regardless of whether the field is empty or not. This may be
1453	// used to include empty fields in Patch requests.
1454	ForceSendFields []string `json:"-"`
1455
1456	// NullFields is a list of field names (e.g. "AccountUserProfiles") to
1457	// include in API requests with the JSON null value. By default, fields
1458	// with empty values are omitted from API requests. However, any field
1459	// with an empty value appearing in NullFields will be sent to the
1460	// server as null. It is an error if a field in this list has a
1461	// non-empty value. This may be used to include null fields in Patch
1462	// requests.
1463	NullFields []string `json:"-"`
1464}
1465
1466func (s *AccountUserProfilesListResponse) MarshalJSON() ([]byte, error) {
1467	type NoMethod AccountUserProfilesListResponse
1468	raw := NoMethod(*s)
1469	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1470}
1471
1472// AccountsListResponse: Account List Response
1473type AccountsListResponse struct {
1474	// Accounts: Account collection.
1475	Accounts []*Account `json:"accounts,omitempty"`
1476
1477	// Kind: Identifies what kind of resource this is. Value: the fixed
1478	// string "dfareporting#accountsListResponse".
1479	Kind string `json:"kind,omitempty"`
1480
1481	// NextPageToken: Pagination token to be used for the next list
1482	// operation.
1483	NextPageToken string `json:"nextPageToken,omitempty"`
1484
1485	// ServerResponse contains the HTTP response code and headers from the
1486	// server.
1487	googleapi.ServerResponse `json:"-"`
1488
1489	// ForceSendFields is a list of field names (e.g. "Accounts") to
1490	// unconditionally include in API requests. By default, fields with
1491	// empty values are omitted from API requests. However, any non-pointer,
1492	// non-interface field appearing in ForceSendFields will be sent to the
1493	// server regardless of whether the field is empty or not. This may be
1494	// used to include empty fields in Patch requests.
1495	ForceSendFields []string `json:"-"`
1496
1497	// NullFields is a list of field names (e.g. "Accounts") to include in
1498	// API requests with the JSON null value. By default, fields with empty
1499	// values are omitted from API requests. However, any field with an
1500	// empty value appearing in NullFields will be sent to the server as
1501	// null. It is an error if a field in this list has a non-empty value.
1502	// This may be used to include null fields in Patch requests.
1503	NullFields []string `json:"-"`
1504}
1505
1506func (s *AccountsListResponse) MarshalJSON() ([]byte, error) {
1507	type NoMethod AccountsListResponse
1508	raw := NoMethod(*s)
1509	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1510}
1511
1512// Activities: Represents an activity group.
1513type Activities struct {
1514	// Filters: List of activity filters. The dimension values need to be
1515	// all either of type "dfa:activity" or "dfa:activityGroup".
1516	Filters []*DimensionValue `json:"filters,omitempty"`
1517
1518	// Kind: The kind of resource this is, in this case
1519	// dfareporting#activities.
1520	Kind string `json:"kind,omitempty"`
1521
1522	// MetricNames: List of names of floodlight activity metrics.
1523	MetricNames []string `json:"metricNames,omitempty"`
1524
1525	// ForceSendFields is a list of field names (e.g. "Filters") to
1526	// unconditionally include in API requests. By default, fields with
1527	// empty values are omitted from API requests. However, any non-pointer,
1528	// non-interface field appearing in ForceSendFields will be sent to the
1529	// server regardless of whether the field is empty or not. This may be
1530	// used to include empty fields in Patch requests.
1531	ForceSendFields []string `json:"-"`
1532
1533	// NullFields is a list of field names (e.g. "Filters") to include in
1534	// API requests with the JSON null value. By default, fields with empty
1535	// values are omitted from API requests. However, any field with an
1536	// empty value appearing in NullFields will be sent to the server as
1537	// null. It is an error if a field in this list has a non-empty value.
1538	// This may be used to include null fields in Patch requests.
1539	NullFields []string `json:"-"`
1540}
1541
1542func (s *Activities) MarshalJSON() ([]byte, error) {
1543	type NoMethod Activities
1544	raw := NoMethod(*s)
1545	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1546}
1547
1548// Ad: Contains properties of a Campaign Manager ad.
1549type Ad struct {
1550	// AccountId: Account ID of this ad. This is a read-only field that can
1551	// be left blank.
1552	AccountId int64 `json:"accountId,omitempty,string"`
1553
1554	// Active: Whether this ad is active. When true, archived must be false.
1555	Active bool `json:"active,omitempty"`
1556
1557	// AdvertiserId: Advertiser ID of this ad. This is a required field on
1558	// insertion.
1559	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
1560
1561	// AdvertiserIdDimensionValue: Dimension value for the ID of the
1562	// advertiser. This is a read-only, auto-generated field.
1563	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
1564
1565	// Archived: Whether this ad is archived. When true, active must be
1566	// false.
1567	Archived bool `json:"archived,omitempty"`
1568
1569	// AudienceSegmentId: Audience segment ID that is being targeted for
1570	// this ad. Applicable when type is AD_SERVING_STANDARD_AD.
1571	AudienceSegmentId int64 `json:"audienceSegmentId,omitempty,string"`
1572
1573	// CampaignId: Campaign ID of this ad. This is a required field on
1574	// insertion.
1575	CampaignId int64 `json:"campaignId,omitempty,string"`
1576
1577	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
1578	// This is a read-only, auto-generated field.
1579	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
1580
1581	// ClickThroughUrl: Click-through URL for this ad. This is a required
1582	// field on insertion. Applicable when type is AD_SERVING_CLICK_TRACKER.
1583	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
1584
1585	// ClickThroughUrlSuffixProperties: Click-through URL suffix properties
1586	// for this ad. Applies to the URL in the ad or (if overriding ad
1587	// properties) the URL in the creative.
1588	ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
1589
1590	// Comments: Comments for this ad.
1591	Comments string `json:"comments,omitempty"`
1592
1593	// Compatibility: Compatibility of this ad. Applicable when type is
1594	// AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to
1595	// either rendering on desktop or on mobile devices or in mobile apps
1596	// for regular or interstitial ads, respectively. APP and
1597	// APP_INTERSTITIAL are only used for existing default ads. New mobile
1598	// placements must be assigned DISPLAY or DISPLAY_INTERSTITIAL and
1599	// default ads created for those placements will be limited to those
1600	// compatibility types. IN_STREAM_VIDEO refers to rendering in-stream
1601	// video ads developed with the VAST standard.
1602	//
1603	// Possible values:
1604	//   "APP"
1605	//   "APP_INTERSTITIAL"
1606	//   "DISPLAY"
1607	//   "DISPLAY_INTERSTITIAL"
1608	//   "IN_STREAM_AUDIO"
1609	//   "IN_STREAM_VIDEO"
1610	Compatibility string `json:"compatibility,omitempty"`
1611
1612	// CreateInfo: Information about the creation of this ad. This is a
1613	// read-only field.
1614	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
1615
1616	// CreativeGroupAssignments: Creative group assignments for this ad.
1617	// Applicable when type is AD_SERVING_CLICK_TRACKER. Only one assignment
1618	// per creative group number is allowed for a maximum of two
1619	// assignments.
1620	CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
1621
1622	// CreativeRotation: Creative rotation for this ad. Applicable when type
1623	// is AD_SERVING_DEFAULT_AD, AD_SERVING_STANDARD_AD, or
1624	// AD_SERVING_TRACKING. When type is AD_SERVING_DEFAULT_AD, this field
1625	// should have exactly one creativeAssignment.
1626	CreativeRotation *CreativeRotation `json:"creativeRotation,omitempty"`
1627
1628	// DayPartTargeting: Time and day targeting information for this ad.
1629	// This field must be left blank if the ad is using a targeting
1630	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1631	DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
1632
1633	// DefaultClickThroughEventTagProperties: Default click-through event
1634	// tag properties for this ad.
1635	DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
1636
1637	// DeliverySchedule: Delivery schedule information for this ad.
1638	// Applicable when type is AD_SERVING_STANDARD_AD or
1639	// AD_SERVING_TRACKING. This field along with subfields priority and
1640	// impressionRatio are required on insertion when type is
1641	// AD_SERVING_STANDARD_AD.
1642	DeliverySchedule *DeliverySchedule `json:"deliverySchedule,omitempty"`
1643
1644	// DynamicClickTracker: Whether this ad is a dynamic click tracker.
1645	// Applicable when type is AD_SERVING_CLICK_TRACKER. This is a required
1646	// field on insert, and is read-only after insert.
1647	DynamicClickTracker bool `json:"dynamicClickTracker,omitempty"`
1648
1649	// EndTime: Date and time that this ad should stop serving. Must be
1650	// later than the start time. This is a required field on insertion.
1651	EndTime string `json:"endTime,omitempty"`
1652
1653	// EventTagOverrides: Event tag overrides for this ad.
1654	EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
1655
1656	// GeoTargeting: Geographical targeting information for this ad. This
1657	// field must be left blank if the ad is using a targeting template.
1658	// Applicable when type is AD_SERVING_STANDARD_AD.
1659	GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
1660
1661	// Id: ID of this ad. This is a read-only, auto-generated field.
1662	Id int64 `json:"id,omitempty,string"`
1663
1664	// IdDimensionValue: Dimension value for the ID of this ad. This is a
1665	// read-only, auto-generated field.
1666	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1667
1668	// KeyValueTargetingExpression: Key-value targeting information for this
1669	// ad. This field must be left blank if the ad is using a targeting
1670	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1671	KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
1672
1673	// Kind: Identifies what kind of resource this is. Value: the fixed
1674	// string "dfareporting#ad".
1675	Kind string `json:"kind,omitempty"`
1676
1677	// LanguageTargeting: Language targeting information for this ad. This
1678	// field must be left blank if the ad is using a targeting template.
1679	// Applicable when type is AD_SERVING_STANDARD_AD.
1680	LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
1681
1682	// LastModifiedInfo: Information about the most recent modification of
1683	// this ad. This is a read-only field.
1684	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
1685
1686	// Name: Name of this ad. This is a required field and must be less than
1687	// 256 characters long.
1688	Name string `json:"name,omitempty"`
1689
1690	// PlacementAssignments: Placement assignments for this ad.
1691	PlacementAssignments []*PlacementAssignment `json:"placementAssignments,omitempty"`
1692
1693	// RemarketingListExpression: Remarketing list targeting expression for
1694	// this ad. This field must be left blank if the ad is using a targeting
1695	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1696	RemarketingListExpression *ListTargetingExpression `json:"remarketingListExpression,omitempty"`
1697
1698	// Size: Size of this ad. Applicable when type is AD_SERVING_DEFAULT_AD.
1699	Size *Size `json:"size,omitempty"`
1700
1701	// SslCompliant: Whether this ad is ssl compliant. This is a read-only
1702	// field that is auto-generated when the ad is inserted or updated.
1703	SslCompliant bool `json:"sslCompliant,omitempty"`
1704
1705	// SslRequired: Whether this ad requires ssl. This is a read-only field
1706	// that is auto-generated when the ad is inserted or updated.
1707	SslRequired bool `json:"sslRequired,omitempty"`
1708
1709	// StartTime: Date and time that this ad should start serving. If
1710	// creating an ad, this field must be a time in the future. This is a
1711	// required field on insertion.
1712	StartTime string `json:"startTime,omitempty"`
1713
1714	// SubaccountId: Subaccount ID of this ad. This is a read-only field
1715	// that can be left blank.
1716	SubaccountId int64 `json:"subaccountId,omitempty,string"`
1717
1718	// TargetingTemplateId: Targeting template ID, used to apply
1719	// preconfigured targeting information to this ad. This cannot be set
1720	// while any of dayPartTargeting, geoTargeting,
1721	// keyValueTargetingExpression, languageTargeting,
1722	// remarketingListExpression, or technologyTargeting are set. Applicable
1723	// when type is AD_SERVING_STANDARD_AD.
1724	TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
1725
1726	// TechnologyTargeting: Technology platform targeting information for
1727	// this ad. This field must be left blank if the ad is using a targeting
1728	// template. Applicable when type is AD_SERVING_STANDARD_AD.
1729	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
1730
1731	// Type: Type of ad. This is a required field on insertion. Note that
1732	// default ads (AD_SERVING_DEFAULT_AD) cannot be created directly (see
1733	// Creative resource).
1734	//
1735	// Possible values:
1736	//   "AD_SERVING_CLICK_TRACKER"
1737	//   "AD_SERVING_DEFAULT_AD"
1738	//   "AD_SERVING_STANDARD_AD"
1739	//   "AD_SERVING_TRACKING"
1740	Type string `json:"type,omitempty"`
1741
1742	// ServerResponse contains the HTTP response code and headers from the
1743	// server.
1744	googleapi.ServerResponse `json:"-"`
1745
1746	// ForceSendFields is a list of field names (e.g. "AccountId") to
1747	// unconditionally include in API requests. By default, fields with
1748	// empty values are omitted from API requests. However, any non-pointer,
1749	// non-interface field appearing in ForceSendFields will be sent to the
1750	// server regardless of whether the field is empty or not. This may be
1751	// used to include empty fields in Patch requests.
1752	ForceSendFields []string `json:"-"`
1753
1754	// NullFields is a list of field names (e.g. "AccountId") to include in
1755	// API requests with the JSON null value. By default, fields with empty
1756	// values are omitted from API requests. However, any field with an
1757	// empty value appearing in NullFields will be sent to the server as
1758	// null. It is an error if a field in this list has a non-empty value.
1759	// This may be used to include null fields in Patch requests.
1760	NullFields []string `json:"-"`
1761}
1762
1763func (s *Ad) MarshalJSON() ([]byte, error) {
1764	type NoMethod Ad
1765	raw := NoMethod(*s)
1766	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1767}
1768
1769// AdBlockingConfiguration: Campaign ad blocking settings.
1770type AdBlockingConfiguration struct {
1771	// ClickThroughUrl: Click-through URL used by brand-neutral ads. This is
1772	// a required field when overrideClickThroughUrl is set to true.
1773	ClickThroughUrl string `json:"clickThroughUrl,omitempty"`
1774
1775	// CreativeBundleId: ID of a creative bundle to use for this campaign.
1776	// If set, brand-neutral ads will select creatives from this bundle.
1777	// Otherwise, a default transparent pixel will be used.
1778	CreativeBundleId int64 `json:"creativeBundleId,omitempty,string"`
1779
1780	// Enabled: Whether this campaign has enabled ad blocking. When true, ad
1781	// blocking is enabled for placements in the campaign, but this may be
1782	// overridden by site and placement settings. When false, ad blocking is
1783	// disabled for all placements under the campaign, regardless of site
1784	// and placement settings.
1785	Enabled bool `json:"enabled,omitempty"`
1786
1787	// OverrideClickThroughUrl: Whether the brand-neutral ad's click-through
1788	// URL comes from the campaign's creative bundle or the override URL.
1789	// Must be set to true if ad blocking is enabled and no creative bundle
1790	// is configured.
1791	OverrideClickThroughUrl bool `json:"overrideClickThroughUrl,omitempty"`
1792
1793	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
1794	// unconditionally include in API requests. By default, fields with
1795	// empty values are omitted from API requests. However, any non-pointer,
1796	// non-interface field appearing in ForceSendFields will be sent to the
1797	// server regardless of whether the field is empty or not. This may be
1798	// used to include empty fields in Patch requests.
1799	ForceSendFields []string `json:"-"`
1800
1801	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
1802	// include in API requests with the JSON null value. By default, fields
1803	// with empty values are omitted from API requests. However, any field
1804	// with an empty value appearing in NullFields will be sent to the
1805	// server as null. It is an error if a field in this list has a
1806	// non-empty value. This may be used to include null fields in Patch
1807	// requests.
1808	NullFields []string `json:"-"`
1809}
1810
1811func (s *AdBlockingConfiguration) MarshalJSON() ([]byte, error) {
1812	type NoMethod AdBlockingConfiguration
1813	raw := NoMethod(*s)
1814	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1815}
1816
1817// AdSlot: Ad Slot
1818type AdSlot struct {
1819	// Comment: Comment for this ad slot.
1820	Comment string `json:"comment,omitempty"`
1821
1822	// Compatibility: Ad slot compatibility. DISPLAY and
1823	// DISPLAY_INTERSTITIAL refer to rendering either on desktop, mobile
1824	// devices or in mobile apps for regular or interstitial ads
1825	// respectively. APP and APP_INTERSTITIAL are for rendering in mobile
1826	// apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads
1827	// developed with the VAST standard.
1828	//
1829	// Possible values:
1830	//   "APP"
1831	//   "APP_INTERSTITIAL"
1832	//   "DISPLAY"
1833	//   "DISPLAY_INTERSTITIAL"
1834	//   "IN_STREAM_AUDIO"
1835	//   "IN_STREAM_VIDEO"
1836	Compatibility string `json:"compatibility,omitempty"`
1837
1838	// Height: Height of this ad slot.
1839	Height int64 `json:"height,omitempty,string"`
1840
1841	// LinkedPlacementId: ID of the placement from an external platform that
1842	// is linked to this ad slot.
1843	LinkedPlacementId int64 `json:"linkedPlacementId,omitempty,string"`
1844
1845	// Name: Name of this ad slot.
1846	Name string `json:"name,omitempty"`
1847
1848	// PaymentSourceType: Payment source type of this ad slot.
1849	//
1850	// Possible values:
1851	//   "PLANNING_PAYMENT_SOURCE_TYPE_AGENCY_PAID"
1852	//   "PLANNING_PAYMENT_SOURCE_TYPE_PUBLISHER_PAID"
1853	PaymentSourceType string `json:"paymentSourceType,omitempty"`
1854
1855	// Primary: Primary ad slot of a roadblock inventory item.
1856	Primary bool `json:"primary,omitempty"`
1857
1858	// Width: Width of this ad slot.
1859	Width int64 `json:"width,omitempty,string"`
1860
1861	// ForceSendFields is a list of field names (e.g. "Comment") to
1862	// unconditionally include in API requests. By default, fields with
1863	// empty values are omitted from API requests. However, any non-pointer,
1864	// non-interface field appearing in ForceSendFields will be sent to the
1865	// server regardless of whether the field is empty or not. This may be
1866	// used to include empty fields in Patch requests.
1867	ForceSendFields []string `json:"-"`
1868
1869	// NullFields is a list of field names (e.g. "Comment") to include in
1870	// API requests with the JSON null value. By default, fields with empty
1871	// values are omitted from API requests. However, any field with an
1872	// empty value appearing in NullFields will be sent to the server as
1873	// null. It is an error if a field in this list has a non-empty value.
1874	// This may be used to include null fields in Patch requests.
1875	NullFields []string `json:"-"`
1876}
1877
1878func (s *AdSlot) MarshalJSON() ([]byte, error) {
1879	type NoMethod AdSlot
1880	raw := NoMethod(*s)
1881	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1882}
1883
1884// AdsListResponse: Ad List Response
1885type AdsListResponse struct {
1886	// Ads: Ad collection.
1887	Ads []*Ad `json:"ads,omitempty"`
1888
1889	// Kind: Identifies what kind of resource this is. Value: the fixed
1890	// string "dfareporting#adsListResponse".
1891	Kind string `json:"kind,omitempty"`
1892
1893	// NextPageToken: Pagination token to be used for the next list
1894	// operation.
1895	NextPageToken string `json:"nextPageToken,omitempty"`
1896
1897	// ServerResponse contains the HTTP response code and headers from the
1898	// server.
1899	googleapi.ServerResponse `json:"-"`
1900
1901	// ForceSendFields is a list of field names (e.g. "Ads") to
1902	// unconditionally include in API requests. By default, fields with
1903	// empty values are omitted from API requests. However, any non-pointer,
1904	// non-interface field appearing in ForceSendFields will be sent to the
1905	// server regardless of whether the field is empty or not. This may be
1906	// used to include empty fields in Patch requests.
1907	ForceSendFields []string `json:"-"`
1908
1909	// NullFields is a list of field names (e.g. "Ads") to include in API
1910	// requests with the JSON null value. By default, fields with empty
1911	// values are omitted from API requests. However, any field with an
1912	// empty value appearing in NullFields will be sent to the server as
1913	// null. It is an error if a field in this list has a non-empty value.
1914	// This may be used to include null fields in Patch requests.
1915	NullFields []string `json:"-"`
1916}
1917
1918func (s *AdsListResponse) MarshalJSON() ([]byte, error) {
1919	type NoMethod AdsListResponse
1920	raw := NoMethod(*s)
1921	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1922}
1923
1924// Advertiser: Contains properties of a Campaign Manager advertiser.
1925type Advertiser struct {
1926	// AccountId: Account ID of this advertiser.This is a read-only field
1927	// that can be left blank.
1928	AccountId int64 `json:"accountId,omitempty,string"`
1929
1930	// AdvertiserGroupId: ID of the advertiser group this advertiser belongs
1931	// to. You can group advertisers for reporting purposes, allowing you to
1932	// see aggregated information for all advertisers in each group.
1933	AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
1934
1935	// ClickThroughUrlSuffix: Suffix added to click-through URL of ad
1936	// creative associations under this advertiser. Must be less than 129
1937	// characters long.
1938	ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
1939
1940	// DefaultClickThroughEventTagId: ID of the click-through event tag to
1941	// apply by default to the landing pages of this advertiser's campaigns.
1942	DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
1943
1944	// DefaultEmail: Default email address used in sender field for tag
1945	// emails.
1946	DefaultEmail string `json:"defaultEmail,omitempty"`
1947
1948	// FloodlightConfigurationId: Floodlight configuration ID of this
1949	// advertiser. The floodlight configuration ID will be created
1950	// automatically, so on insert this field should be left blank. This
1951	// field can be set to another advertiser's floodlight configuration ID
1952	// in order to share that advertiser's floodlight configuration with
1953	// this advertiser, so long as:
1954	// - This advertiser's original floodlight configuration is not already
1955	// associated with floodlight activities or floodlight activity groups.
1956	//
1957	// - This advertiser's original floodlight configuration is not already
1958	// shared with another advertiser.
1959	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
1960
1961	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
1962	// of the floodlight configuration. This is a read-only, auto-generated
1963	// field.
1964	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
1965
1966	// Id: ID of this advertiser. This is a read-only, auto-generated field.
1967	Id int64 `json:"id,omitempty,string"`
1968
1969	// IdDimensionValue: Dimension value for the ID of this advertiser. This
1970	// is a read-only, auto-generated field.
1971	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1972
1973	// Kind: Identifies what kind of resource this is. Value: the fixed
1974	// string "dfareporting#advertiser".
1975	Kind string `json:"kind,omitempty"`
1976
1977	// Name: Name of this advertiser. This is a required field and must be
1978	// less than 256 characters long and unique among advertisers of the
1979	// same account.
1980	Name string `json:"name,omitempty"`
1981
1982	// OriginalFloodlightConfigurationId: Original floodlight configuration
1983	// before any sharing occurred. Set the floodlightConfigurationId of
1984	// this advertiser to originalFloodlightConfigurationId to unshare the
1985	// advertiser's current floodlight configuration. You cannot unshare an
1986	// advertiser's floodlight configuration if the shared configuration has
1987	// activities associated with any campaign or placement.
1988	OriginalFloodlightConfigurationId int64 `json:"originalFloodlightConfigurationId,omitempty,string"`
1989
1990	// Status: Status of this advertiser.
1991	//
1992	// Possible values:
1993	//   "APPROVED"
1994	//   "ON_HOLD"
1995	Status string `json:"status,omitempty"`
1996
1997	// SubaccountId: Subaccount ID of this advertiser.This is a read-only
1998	// field that can be left blank.
1999	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2000
2001	// Suspended: Suspension status of this advertiser.
2002	Suspended bool `json:"suspended,omitempty"`
2003
2004	// ServerResponse contains the HTTP response code and headers from the
2005	// server.
2006	googleapi.ServerResponse `json:"-"`
2007
2008	// ForceSendFields is a list of field names (e.g. "AccountId") to
2009	// unconditionally include in API requests. By default, fields with
2010	// empty values are omitted from API requests. However, any non-pointer,
2011	// non-interface field appearing in ForceSendFields will be sent to the
2012	// server regardless of whether the field is empty or not. This may be
2013	// used to include empty fields in Patch requests.
2014	ForceSendFields []string `json:"-"`
2015
2016	// NullFields is a list of field names (e.g. "AccountId") to include in
2017	// API requests with the JSON null value. By default, fields with empty
2018	// values are omitted from API requests. However, any field with an
2019	// empty value appearing in NullFields will be sent to the server as
2020	// null. It is an error if a field in this list has a non-empty value.
2021	// This may be used to include null fields in Patch requests.
2022	NullFields []string `json:"-"`
2023}
2024
2025func (s *Advertiser) MarshalJSON() ([]byte, error) {
2026	type NoMethod Advertiser
2027	raw := NoMethod(*s)
2028	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2029}
2030
2031// AdvertiserGroup: Groups advertisers together so that reports can be
2032// generated for the entire group at once.
2033type AdvertiserGroup struct {
2034	// AccountId: Account ID of this advertiser group. This is a read-only
2035	// field that can be left blank.
2036	AccountId int64 `json:"accountId,omitempty,string"`
2037
2038	// Id: ID of this advertiser group. This is a read-only, auto-generated
2039	// field.
2040	Id int64 `json:"id,omitempty,string"`
2041
2042	// Kind: Identifies what kind of resource this is. Value: the fixed
2043	// string "dfareporting#advertiserGroup".
2044	Kind string `json:"kind,omitempty"`
2045
2046	// Name: Name of this advertiser group. This is a required field and
2047	// must be less than 256 characters long and unique among advertiser
2048	// groups of the same account.
2049	Name string `json:"name,omitempty"`
2050
2051	// ServerResponse contains the HTTP response code and headers from the
2052	// server.
2053	googleapi.ServerResponse `json:"-"`
2054
2055	// ForceSendFields is a list of field names (e.g. "AccountId") to
2056	// unconditionally include in API requests. By default, fields with
2057	// empty values are omitted from API requests. However, any non-pointer,
2058	// non-interface field appearing in ForceSendFields will be sent to the
2059	// server regardless of whether the field is empty or not. This may be
2060	// used to include empty fields in Patch requests.
2061	ForceSendFields []string `json:"-"`
2062
2063	// NullFields is a list of field names (e.g. "AccountId") to include in
2064	// API requests with the JSON null value. By default, fields with empty
2065	// values are omitted from API requests. However, any field with an
2066	// empty value appearing in NullFields will be sent to the server as
2067	// null. It is an error if a field in this list has a non-empty value.
2068	// This may be used to include null fields in Patch requests.
2069	NullFields []string `json:"-"`
2070}
2071
2072func (s *AdvertiserGroup) MarshalJSON() ([]byte, error) {
2073	type NoMethod AdvertiserGroup
2074	raw := NoMethod(*s)
2075	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2076}
2077
2078// AdvertiserGroupsListResponse: Advertiser Group List Response
2079type AdvertiserGroupsListResponse struct {
2080	// AdvertiserGroups: Advertiser group collection.
2081	AdvertiserGroups []*AdvertiserGroup `json:"advertiserGroups,omitempty"`
2082
2083	// Kind: Identifies what kind of resource this is. Value: the fixed
2084	// string "dfareporting#advertiserGroupsListResponse".
2085	Kind string `json:"kind,omitempty"`
2086
2087	// NextPageToken: Pagination token to be used for the next list
2088	// operation.
2089	NextPageToken string `json:"nextPageToken,omitempty"`
2090
2091	// ServerResponse contains the HTTP response code and headers from the
2092	// server.
2093	googleapi.ServerResponse `json:"-"`
2094
2095	// ForceSendFields is a list of field names (e.g. "AdvertiserGroups") to
2096	// unconditionally include in API requests. By default, fields with
2097	// empty values are omitted from API requests. However, any non-pointer,
2098	// non-interface field appearing in ForceSendFields will be sent to the
2099	// server regardless of whether the field is empty or not. This may be
2100	// used to include empty fields in Patch requests.
2101	ForceSendFields []string `json:"-"`
2102
2103	// NullFields is a list of field names (e.g. "AdvertiserGroups") to
2104	// include in API requests with the JSON null value. By default, fields
2105	// with empty values are omitted from API requests. However, any field
2106	// with an empty value appearing in NullFields will be sent to the
2107	// server as null. It is an error if a field in this list has a
2108	// non-empty value. This may be used to include null fields in Patch
2109	// requests.
2110	NullFields []string `json:"-"`
2111}
2112
2113func (s *AdvertiserGroupsListResponse) MarshalJSON() ([]byte, error) {
2114	type NoMethod AdvertiserGroupsListResponse
2115	raw := NoMethod(*s)
2116	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2117}
2118
2119// AdvertiserLandingPagesListResponse: Landing Page List Response
2120type AdvertiserLandingPagesListResponse struct {
2121	// Kind: Identifies what kind of resource this is. Value: the fixed
2122	// string "dfareporting#advertiserLandingPagesListResponse".
2123	Kind string `json:"kind,omitempty"`
2124
2125	// LandingPages: Landing page collection
2126	LandingPages []*LandingPage `json:"landingPages,omitempty"`
2127
2128	// NextPageToken: Pagination token to be used for the next list
2129	// operation.
2130	NextPageToken string `json:"nextPageToken,omitempty"`
2131
2132	// ServerResponse contains the HTTP response code and headers from the
2133	// server.
2134	googleapi.ServerResponse `json:"-"`
2135
2136	// ForceSendFields is a list of field names (e.g. "Kind") to
2137	// unconditionally include in API requests. By default, fields with
2138	// empty values are omitted from API requests. However, any non-pointer,
2139	// non-interface field appearing in ForceSendFields will be sent to the
2140	// server regardless of whether the field is empty or not. This may be
2141	// used to include empty fields in Patch requests.
2142	ForceSendFields []string `json:"-"`
2143
2144	// NullFields is a list of field names (e.g. "Kind") to include in API
2145	// requests with the JSON null value. By default, fields with empty
2146	// values are omitted from API requests. However, any field with an
2147	// empty value appearing in NullFields will be sent to the server as
2148	// null. It is an error if a field in this list has a non-empty value.
2149	// This may be used to include null fields in Patch requests.
2150	NullFields []string `json:"-"`
2151}
2152
2153func (s *AdvertiserLandingPagesListResponse) MarshalJSON() ([]byte, error) {
2154	type NoMethod AdvertiserLandingPagesListResponse
2155	raw := NoMethod(*s)
2156	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2157}
2158
2159// AdvertisersListResponse: Advertiser List Response
2160type AdvertisersListResponse struct {
2161	// Advertisers: Advertiser collection.
2162	Advertisers []*Advertiser `json:"advertisers,omitempty"`
2163
2164	// Kind: Identifies what kind of resource this is. Value: the fixed
2165	// string "dfareporting#advertisersListResponse".
2166	Kind string `json:"kind,omitempty"`
2167
2168	// NextPageToken: Pagination token to be used for the next list
2169	// operation.
2170	NextPageToken string `json:"nextPageToken,omitempty"`
2171
2172	// ServerResponse contains the HTTP response code and headers from the
2173	// server.
2174	googleapi.ServerResponse `json:"-"`
2175
2176	// ForceSendFields is a list of field names (e.g. "Advertisers") to
2177	// unconditionally include in API requests. By default, fields with
2178	// empty values are omitted from API requests. However, any non-pointer,
2179	// non-interface field appearing in ForceSendFields will be sent to the
2180	// server regardless of whether the field is empty or not. This may be
2181	// used to include empty fields in Patch requests.
2182	ForceSendFields []string `json:"-"`
2183
2184	// NullFields is a list of field names (e.g. "Advertisers") to include
2185	// in API requests with the JSON null value. By default, fields with
2186	// empty values are omitted from API requests. However, any field with
2187	// an empty value appearing in NullFields will be sent to the server as
2188	// null. It is an error if a field in this list has a non-empty value.
2189	// This may be used to include null fields in Patch requests.
2190	NullFields []string `json:"-"`
2191}
2192
2193func (s *AdvertisersListResponse) MarshalJSON() ([]byte, error) {
2194	type NoMethod AdvertisersListResponse
2195	raw := NoMethod(*s)
2196	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2197}
2198
2199// AudienceSegment: Audience Segment.
2200type AudienceSegment struct {
2201	// Allocation: Weight allocated to this segment. The weight assigned
2202	// will be understood in proportion to the weights assigned to other
2203	// segments in the same segment group. Acceptable values are 1 to 1000,
2204	// inclusive.
2205	Allocation int64 `json:"allocation,omitempty"`
2206
2207	// Id: ID of this audience segment. This is a read-only, auto-generated
2208	// field.
2209	Id int64 `json:"id,omitempty,string"`
2210
2211	// Name: Name of this audience segment. This is a required field and
2212	// must be less than 65 characters long.
2213	Name string `json:"name,omitempty"`
2214
2215	// ForceSendFields is a list of field names (e.g. "Allocation") to
2216	// unconditionally include in API requests. By default, fields with
2217	// empty values are omitted from API requests. However, any non-pointer,
2218	// non-interface field appearing in ForceSendFields will be sent to the
2219	// server regardless of whether the field is empty or not. This may be
2220	// used to include empty fields in Patch requests.
2221	ForceSendFields []string `json:"-"`
2222
2223	// NullFields is a list of field names (e.g. "Allocation") to include in
2224	// API requests with the JSON null value. By default, fields with empty
2225	// values are omitted from API requests. However, any field with an
2226	// empty value appearing in NullFields will be sent to the server as
2227	// null. It is an error if a field in this list has a non-empty value.
2228	// This may be used to include null fields in Patch requests.
2229	NullFields []string `json:"-"`
2230}
2231
2232func (s *AudienceSegment) MarshalJSON() ([]byte, error) {
2233	type NoMethod AudienceSegment
2234	raw := NoMethod(*s)
2235	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2236}
2237
2238// AudienceSegmentGroup: Audience Segment Group.
2239type AudienceSegmentGroup struct {
2240	// AudienceSegments: Audience segments assigned to this group. The
2241	// number of segments must be between 2 and 100.
2242	AudienceSegments []*AudienceSegment `json:"audienceSegments,omitempty"`
2243
2244	// Id: ID of this audience segment group. This is a read-only,
2245	// auto-generated field.
2246	Id int64 `json:"id,omitempty,string"`
2247
2248	// Name: Name of this audience segment group. This is a required field
2249	// and must be less than 65 characters long.
2250	Name string `json:"name,omitempty"`
2251
2252	// ForceSendFields is a list of field names (e.g. "AudienceSegments") to
2253	// unconditionally include in API requests. By default, fields with
2254	// empty values are omitted from API requests. However, any non-pointer,
2255	// non-interface field appearing in ForceSendFields will be sent to the
2256	// server regardless of whether the field is empty or not. This may be
2257	// used to include empty fields in Patch requests.
2258	ForceSendFields []string `json:"-"`
2259
2260	// NullFields is a list of field names (e.g. "AudienceSegments") to
2261	// include in API requests with the JSON null value. By default, fields
2262	// with empty values are omitted from API requests. However, any field
2263	// with an empty value appearing in NullFields will be sent to the
2264	// server as null. It is an error if a field in this list has a
2265	// non-empty value. This may be used to include null fields in Patch
2266	// requests.
2267	NullFields []string `json:"-"`
2268}
2269
2270func (s *AudienceSegmentGroup) MarshalJSON() ([]byte, error) {
2271	type NoMethod AudienceSegmentGroup
2272	raw := NoMethod(*s)
2273	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2274}
2275
2276// Browser: Contains information about a browser that can be targeted by
2277// ads.
2278type Browser struct {
2279	// BrowserVersionId: ID referring to this grouping of browser and
2280	// version numbers. This is the ID used for targeting.
2281	BrowserVersionId int64 `json:"browserVersionId,omitempty,string"`
2282
2283	// DartId: DART ID of this browser. This is the ID used when generating
2284	// reports.
2285	DartId int64 `json:"dartId,omitempty,string"`
2286
2287	// Kind: Identifies what kind of resource this is. Value: the fixed
2288	// string "dfareporting#browser".
2289	Kind string `json:"kind,omitempty"`
2290
2291	// MajorVersion: Major version number (leftmost number) of this browser.
2292	// For example, for Chrome 5.0.376.86 beta, this field should be set to
2293	// 5. An asterisk (*) may be used to target any version number, and a
2294	// question mark (?) may be used to target cases where the version
2295	// number cannot be identified. For example, Chrome *.* targets any
2296	// version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets
2297	// Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad
2298	// server knows the browser is Firefox but can't tell which version it
2299	// is.
2300	MajorVersion string `json:"majorVersion,omitempty"`
2301
2302	// MinorVersion: Minor version number (number after first dot on left)
2303	// of this browser. For example, for Chrome 5.0.375.86 beta, this field
2304	// should be set to 0. An asterisk (*) may be used to target any version
2305	// number, and a question mark (?) may be used to target cases where the
2306	// version number cannot be identified. For example, Chrome *.* targets
2307	// any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets
2308	// Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad
2309	// server knows the browser is Firefox but can't tell which version it
2310	// is.
2311	MinorVersion string `json:"minorVersion,omitempty"`
2312
2313	// Name: Name of this browser.
2314	Name string `json:"name,omitempty"`
2315
2316	// ForceSendFields is a list of field names (e.g. "BrowserVersionId") to
2317	// unconditionally include in API requests. By default, fields with
2318	// empty values are omitted from API requests. However, any non-pointer,
2319	// non-interface field appearing in ForceSendFields will be sent to the
2320	// server regardless of whether the field is empty or not. This may be
2321	// used to include empty fields in Patch requests.
2322	ForceSendFields []string `json:"-"`
2323
2324	// NullFields is a list of field names (e.g. "BrowserVersionId") to
2325	// include in API requests with the JSON null value. By default, fields
2326	// with empty values are omitted from API requests. However, any field
2327	// with an empty value appearing in NullFields will be sent to the
2328	// server as null. It is an error if a field in this list has a
2329	// non-empty value. This may be used to include null fields in Patch
2330	// requests.
2331	NullFields []string `json:"-"`
2332}
2333
2334func (s *Browser) MarshalJSON() ([]byte, error) {
2335	type NoMethod Browser
2336	raw := NoMethod(*s)
2337	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2338}
2339
2340// BrowsersListResponse: Browser List Response
2341type BrowsersListResponse struct {
2342	// Browsers: Browser collection.
2343	Browsers []*Browser `json:"browsers,omitempty"`
2344
2345	// Kind: Identifies what kind of resource this is. Value: the fixed
2346	// string "dfareporting#browsersListResponse".
2347	Kind string `json:"kind,omitempty"`
2348
2349	// ServerResponse contains the HTTP response code and headers from the
2350	// server.
2351	googleapi.ServerResponse `json:"-"`
2352
2353	// ForceSendFields is a list of field names (e.g. "Browsers") to
2354	// unconditionally include in API requests. By default, fields with
2355	// empty values are omitted from API requests. However, any non-pointer,
2356	// non-interface field appearing in ForceSendFields will be sent to the
2357	// server regardless of whether the field is empty or not. This may be
2358	// used to include empty fields in Patch requests.
2359	ForceSendFields []string `json:"-"`
2360
2361	// NullFields is a list of field names (e.g. "Browsers") to include in
2362	// API requests with the JSON null value. By default, fields with empty
2363	// values are omitted from API requests. However, any field with an
2364	// empty value appearing in NullFields will be sent to the server as
2365	// null. It is an error if a field in this list has a non-empty value.
2366	// This may be used to include null fields in Patch requests.
2367	NullFields []string `json:"-"`
2368}
2369
2370func (s *BrowsersListResponse) MarshalJSON() ([]byte, error) {
2371	type NoMethod BrowsersListResponse
2372	raw := NoMethod(*s)
2373	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2374}
2375
2376// Campaign: Contains properties of a Campaign Manager campaign.
2377type Campaign struct {
2378	// AccountId: Account ID of this campaign. This is a read-only field
2379	// that can be left blank.
2380	AccountId int64 `json:"accountId,omitempty,string"`
2381
2382	// AdBlockingConfiguration: Ad blocking settings for this campaign.
2383	AdBlockingConfiguration *AdBlockingConfiguration `json:"adBlockingConfiguration,omitempty"`
2384
2385	// AdditionalCreativeOptimizationConfigurations: Additional creative
2386	// optimization configurations for the campaign.
2387	AdditionalCreativeOptimizationConfigurations []*CreativeOptimizationConfiguration `json:"additionalCreativeOptimizationConfigurations,omitempty"`
2388
2389	// AdvertiserGroupId: Advertiser group ID of the associated advertiser.
2390	AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
2391
2392	// AdvertiserId: Advertiser ID of this campaign. This is a required
2393	// field.
2394	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
2395
2396	// AdvertiserIdDimensionValue: Dimension value for the advertiser ID of
2397	// this campaign. This is a read-only, auto-generated field.
2398	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
2399
2400	// Archived: Whether this campaign has been archived.
2401	Archived bool `json:"archived,omitempty"`
2402
2403	// AudienceSegmentGroups: Audience segment groups assigned to this
2404	// campaign. Cannot have more than 300 segment groups.
2405	AudienceSegmentGroups []*AudienceSegmentGroup `json:"audienceSegmentGroups,omitempty"`
2406
2407	// BillingInvoiceCode: Billing invoice code included in the Campaign
2408	// Manager client billing invoices associated with the campaign.
2409	BillingInvoiceCode string `json:"billingInvoiceCode,omitempty"`
2410
2411	// ClickThroughUrlSuffixProperties: Click-through URL suffix override
2412	// properties for this campaign.
2413	ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
2414
2415	// Comment: Arbitrary comments about this campaign. Must be less than
2416	// 256 characters long.
2417	Comment string `json:"comment,omitempty"`
2418
2419	// CreateInfo: Information about the creation of this campaign. This is
2420	// a read-only field.
2421	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
2422
2423	// CreativeGroupIds: List of creative group IDs that are assigned to the
2424	// campaign.
2425	CreativeGroupIds googleapi.Int64s `json:"creativeGroupIds,omitempty"`
2426
2427	// CreativeOptimizationConfiguration: Creative optimization
2428	// configuration for the campaign.
2429	CreativeOptimizationConfiguration *CreativeOptimizationConfiguration `json:"creativeOptimizationConfiguration,omitempty"`
2430
2431	// DefaultClickThroughEventTagProperties: Click-through event tag ID
2432	// override properties for this campaign.
2433	DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
2434
2435	// DefaultLandingPageId: The default landing page ID for this campaign.
2436	DefaultLandingPageId int64 `json:"defaultLandingPageId,omitempty,string"`
2437
2438	// EndDate: Date on which the campaign will stop running. On insert, the
2439	// end date must be today or a future date. The end date must be later
2440	// than or be the same as the start date. If, for example, you set
2441	// 6/25/2015 as both the start and end dates, the effective campaign run
2442	// date is just that day only, 6/25/2015. The hours, minutes, and
2443	// seconds of the end date should not be set, as doing so will result in
2444	// an error. This is a required field.
2445	EndDate string `json:"endDate,omitempty"`
2446
2447	// EventTagOverrides: Overrides that can be used to activate or
2448	// deactivate advertiser event tags.
2449	EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
2450
2451	// ExternalId: External ID for this campaign.
2452	ExternalId string `json:"externalId,omitempty"`
2453
2454	// Id: ID of this campaign. This is a read-only auto-generated field.
2455	Id int64 `json:"id,omitempty,string"`
2456
2457	// IdDimensionValue: Dimension value for the ID of this campaign. This
2458	// is a read-only, auto-generated field.
2459	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
2460
2461	// Kind: Identifies what kind of resource this is. Value: the fixed
2462	// string "dfareporting#campaign".
2463	Kind string `json:"kind,omitempty"`
2464
2465	// LastModifiedInfo: Information about the most recent modification of
2466	// this campaign. This is a read-only field.
2467	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
2468
2469	// Name: Name of this campaign. This is a required field and must be
2470	// less than 256 characters long and unique among campaigns of the same
2471	// advertiser.
2472	Name string `json:"name,omitempty"`
2473
2474	// NielsenOcrEnabled: Whether Nielsen reports are enabled for this
2475	// campaign.
2476	NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
2477
2478	// StartDate: Date on which the campaign starts running. The start date
2479	// can be any date. The hours, minutes, and seconds of the start date
2480	// should not be set, as doing so will result in an error. This is a
2481	// required field.
2482	StartDate string `json:"startDate,omitempty"`
2483
2484	// SubaccountId: Subaccount ID of this campaign. This is a read-only
2485	// field that can be left blank.
2486	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2487
2488	// TraffickerEmails: Campaign trafficker contact emails.
2489	TraffickerEmails []string `json:"traffickerEmails,omitempty"`
2490
2491	// ServerResponse contains the HTTP response code and headers from the
2492	// server.
2493	googleapi.ServerResponse `json:"-"`
2494
2495	// ForceSendFields is a list of field names (e.g. "AccountId") to
2496	// unconditionally include in API requests. By default, fields with
2497	// empty values are omitted from API requests. However, any non-pointer,
2498	// non-interface field appearing in ForceSendFields will be sent to the
2499	// server regardless of whether the field is empty or not. This may be
2500	// used to include empty fields in Patch requests.
2501	ForceSendFields []string `json:"-"`
2502
2503	// NullFields is a list of field names (e.g. "AccountId") to include in
2504	// API requests with the JSON null value. By default, fields with empty
2505	// values are omitted from API requests. However, any field with an
2506	// empty value appearing in NullFields will be sent to the server as
2507	// null. It is an error if a field in this list has a non-empty value.
2508	// This may be used to include null fields in Patch requests.
2509	NullFields []string `json:"-"`
2510}
2511
2512func (s *Campaign) MarshalJSON() ([]byte, error) {
2513	type NoMethod Campaign
2514	raw := NoMethod(*s)
2515	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2516}
2517
2518// CampaignCreativeAssociation: Identifies a creative which has been
2519// associated with a given campaign.
2520type CampaignCreativeAssociation struct {
2521	// CreativeId: ID of the creative associated with the campaign. This is
2522	// a required field.
2523	CreativeId int64 `json:"creativeId,omitempty,string"`
2524
2525	// Kind: Identifies what kind of resource this is. Value: the fixed
2526	// string "dfareporting#campaignCreativeAssociation".
2527	Kind string `json:"kind,omitempty"`
2528
2529	// ServerResponse contains the HTTP response code and headers from the
2530	// server.
2531	googleapi.ServerResponse `json:"-"`
2532
2533	// ForceSendFields is a list of field names (e.g. "CreativeId") to
2534	// unconditionally include in API requests. By default, fields with
2535	// empty values are omitted from API requests. However, any non-pointer,
2536	// non-interface field appearing in ForceSendFields will be sent to the
2537	// server regardless of whether the field is empty or not. This may be
2538	// used to include empty fields in Patch requests.
2539	ForceSendFields []string `json:"-"`
2540
2541	// NullFields is a list of field names (e.g. "CreativeId") to include in
2542	// API requests with the JSON null value. By default, fields with empty
2543	// values are omitted from API requests. However, any field with an
2544	// empty value appearing in NullFields will be sent to the server as
2545	// null. It is an error if a field in this list has a non-empty value.
2546	// This may be used to include null fields in Patch requests.
2547	NullFields []string `json:"-"`
2548}
2549
2550func (s *CampaignCreativeAssociation) MarshalJSON() ([]byte, error) {
2551	type NoMethod CampaignCreativeAssociation
2552	raw := NoMethod(*s)
2553	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2554}
2555
2556// CampaignCreativeAssociationsListResponse: Campaign Creative
2557// Association List Response
2558type CampaignCreativeAssociationsListResponse struct {
2559	// CampaignCreativeAssociations: Campaign creative association
2560	// collection
2561	CampaignCreativeAssociations []*CampaignCreativeAssociation `json:"campaignCreativeAssociations,omitempty"`
2562
2563	// Kind: Identifies what kind of resource this is. Value: the fixed
2564	// string "dfareporting#campaignCreativeAssociationsListResponse".
2565	Kind string `json:"kind,omitempty"`
2566
2567	// NextPageToken: Pagination token to be used for the next list
2568	// operation.
2569	NextPageToken string `json:"nextPageToken,omitempty"`
2570
2571	// ServerResponse contains the HTTP response code and headers from the
2572	// server.
2573	googleapi.ServerResponse `json:"-"`
2574
2575	// ForceSendFields is a list of field names (e.g.
2576	// "CampaignCreativeAssociations") to unconditionally include in API
2577	// requests. By default, fields with empty values are omitted from API
2578	// requests. However, any non-pointer, non-interface field appearing in
2579	// ForceSendFields will be sent to the server regardless of whether the
2580	// field is empty or not. This may be used to include empty fields in
2581	// Patch requests.
2582	ForceSendFields []string `json:"-"`
2583
2584	// NullFields is a list of field names (e.g.
2585	// "CampaignCreativeAssociations") to include in API requests with the
2586	// JSON null value. By default, fields with empty values are omitted
2587	// from API requests. However, any field with an empty value appearing
2588	// in NullFields will be sent to the server as null. It is an error if a
2589	// field in this list has a non-empty value. This may be used to include
2590	// null fields in Patch requests.
2591	NullFields []string `json:"-"`
2592}
2593
2594func (s *CampaignCreativeAssociationsListResponse) MarshalJSON() ([]byte, error) {
2595	type NoMethod CampaignCreativeAssociationsListResponse
2596	raw := NoMethod(*s)
2597	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2598}
2599
2600// CampaignsListResponse: Campaign List Response
2601type CampaignsListResponse struct {
2602	// Campaigns: Campaign collection.
2603	Campaigns []*Campaign `json:"campaigns,omitempty"`
2604
2605	// Kind: Identifies what kind of resource this is. Value: the fixed
2606	// string "dfareporting#campaignsListResponse".
2607	Kind string `json:"kind,omitempty"`
2608
2609	// NextPageToken: Pagination token to be used for the next list
2610	// operation.
2611	NextPageToken string `json:"nextPageToken,omitempty"`
2612
2613	// ServerResponse contains the HTTP response code and headers from the
2614	// server.
2615	googleapi.ServerResponse `json:"-"`
2616
2617	// ForceSendFields is a list of field names (e.g. "Campaigns") to
2618	// unconditionally include in API requests. By default, fields with
2619	// empty values are omitted from API requests. However, any non-pointer,
2620	// non-interface field appearing in ForceSendFields will be sent to the
2621	// server regardless of whether the field is empty or not. This may be
2622	// used to include empty fields in Patch requests.
2623	ForceSendFields []string `json:"-"`
2624
2625	// NullFields is a list of field names (e.g. "Campaigns") to include in
2626	// API requests with the JSON null value. By default, fields with empty
2627	// values are omitted from API requests. However, any field with an
2628	// empty value appearing in NullFields will be sent to the server as
2629	// null. It is an error if a field in this list has a non-empty value.
2630	// This may be used to include null fields in Patch requests.
2631	NullFields []string `json:"-"`
2632}
2633
2634func (s *CampaignsListResponse) MarshalJSON() ([]byte, error) {
2635	type NoMethod CampaignsListResponse
2636	raw := NoMethod(*s)
2637	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2638}
2639
2640// ChangeLog: Describes a change that a user has made to a resource.
2641type ChangeLog struct {
2642	// AccountId: Account ID of the modified object.
2643	AccountId int64 `json:"accountId,omitempty,string"`
2644
2645	// Action: Action which caused the change.
2646	Action string `json:"action,omitempty"`
2647
2648	// ChangeTime: Time when the object was modified.
2649	ChangeTime string `json:"changeTime,omitempty"`
2650
2651	// FieldName: Field name of the object which changed.
2652	FieldName string `json:"fieldName,omitempty"`
2653
2654	// Id: ID of this change log.
2655	Id int64 `json:"id,omitempty,string"`
2656
2657	// Kind: Identifies what kind of resource this is. Value: the fixed
2658	// string "dfareporting#changeLog".
2659	Kind string `json:"kind,omitempty"`
2660
2661	// NewValue: New value of the object field.
2662	NewValue string `json:"newValue,omitempty"`
2663
2664	// ObjectId: ID of the object of this change log. The object could be a
2665	// campaign, placement, ad, or other type.
2666	ObjectId int64 `json:"objectId,omitempty,string"`
2667
2668	// ObjectType: Object type of the change log.
2669	ObjectType string `json:"objectType,omitempty"`
2670
2671	// OldValue: Old value of the object field.
2672	OldValue string `json:"oldValue,omitempty"`
2673
2674	// SubaccountId: Subaccount ID of the modified object.
2675	SubaccountId int64 `json:"subaccountId,omitempty,string"`
2676
2677	// TransactionId: Transaction ID of this change log. When a single API
2678	// call results in many changes, each change will have a separate ID in
2679	// the change log but will share the same transactionId.
2680	TransactionId int64 `json:"transactionId,omitempty,string"`
2681
2682	// UserProfileId: ID of the user who modified the object.
2683	UserProfileId int64 `json:"userProfileId,omitempty,string"`
2684
2685	// UserProfileName: User profile name of the user who modified the
2686	// object.
2687	UserProfileName string `json:"userProfileName,omitempty"`
2688
2689	// ServerResponse contains the HTTP response code and headers from the
2690	// server.
2691	googleapi.ServerResponse `json:"-"`
2692
2693	// ForceSendFields is a list of field names (e.g. "AccountId") to
2694	// unconditionally include in API requests. By default, fields with
2695	// empty values are omitted from API requests. However, any non-pointer,
2696	// non-interface field appearing in ForceSendFields will be sent to the
2697	// server regardless of whether the field is empty or not. This may be
2698	// used to include empty fields in Patch requests.
2699	ForceSendFields []string `json:"-"`
2700
2701	// NullFields is a list of field names (e.g. "AccountId") to include in
2702	// API requests with the JSON null value. By default, fields with empty
2703	// values are omitted from API requests. However, any field with an
2704	// empty value appearing in NullFields will be sent to the server as
2705	// null. It is an error if a field in this list has a non-empty value.
2706	// This may be used to include null fields in Patch requests.
2707	NullFields []string `json:"-"`
2708}
2709
2710func (s *ChangeLog) MarshalJSON() ([]byte, error) {
2711	type NoMethod ChangeLog
2712	raw := NoMethod(*s)
2713	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2714}
2715
2716// ChangeLogsListResponse: Change Log List Response
2717type ChangeLogsListResponse struct {
2718	// ChangeLogs: Change log collection.
2719	ChangeLogs []*ChangeLog `json:"changeLogs,omitempty"`
2720
2721	// Kind: Identifies what kind of resource this is. Value: the fixed
2722	// string "dfareporting#changeLogsListResponse".
2723	Kind string `json:"kind,omitempty"`
2724
2725	// NextPageToken: Pagination token to be used for the next list
2726	// operation.
2727	NextPageToken string `json:"nextPageToken,omitempty"`
2728
2729	// ServerResponse contains the HTTP response code and headers from the
2730	// server.
2731	googleapi.ServerResponse `json:"-"`
2732
2733	// ForceSendFields is a list of field names (e.g. "ChangeLogs") to
2734	// unconditionally include in API requests. By default, fields with
2735	// empty values are omitted from API requests. However, any non-pointer,
2736	// non-interface field appearing in ForceSendFields will be sent to the
2737	// server regardless of whether the field is empty or not. This may be
2738	// used to include empty fields in Patch requests.
2739	ForceSendFields []string `json:"-"`
2740
2741	// NullFields is a list of field names (e.g. "ChangeLogs") to include in
2742	// API requests with the JSON null value. By default, fields with empty
2743	// values are omitted from API requests. However, any field with an
2744	// empty value appearing in NullFields will be sent to the server as
2745	// null. It is an error if a field in this list has a non-empty value.
2746	// This may be used to include null fields in Patch requests.
2747	NullFields []string `json:"-"`
2748}
2749
2750func (s *ChangeLogsListResponse) MarshalJSON() ([]byte, error) {
2751	type NoMethod ChangeLogsListResponse
2752	raw := NoMethod(*s)
2753	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2754}
2755
2756// CitiesListResponse: City List Response
2757type CitiesListResponse struct {
2758	// Cities: City collection.
2759	Cities []*City `json:"cities,omitempty"`
2760
2761	// Kind: Identifies what kind of resource this is. Value: the fixed
2762	// string "dfareporting#citiesListResponse".
2763	Kind string `json:"kind,omitempty"`
2764
2765	// ServerResponse contains the HTTP response code and headers from the
2766	// server.
2767	googleapi.ServerResponse `json:"-"`
2768
2769	// ForceSendFields is a list of field names (e.g. "Cities") to
2770	// unconditionally include in API requests. By default, fields with
2771	// empty values are omitted from API requests. However, any non-pointer,
2772	// non-interface field appearing in ForceSendFields will be sent to the
2773	// server regardless of whether the field is empty or not. This may be
2774	// used to include empty fields in Patch requests.
2775	ForceSendFields []string `json:"-"`
2776
2777	// NullFields is a list of field names (e.g. "Cities") to include in API
2778	// requests with the JSON null value. By default, fields with empty
2779	// values are omitted from API requests. However, any field with an
2780	// empty value appearing in NullFields will be sent to the server as
2781	// null. It is an error if a field in this list has a non-empty value.
2782	// This may be used to include null fields in Patch requests.
2783	NullFields []string `json:"-"`
2784}
2785
2786func (s *CitiesListResponse) MarshalJSON() ([]byte, error) {
2787	type NoMethod CitiesListResponse
2788	raw := NoMethod(*s)
2789	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2790}
2791
2792// City: Contains information about a city that can be targeted by ads.
2793type City struct {
2794	// CountryCode: Country code of the country to which this city belongs.
2795	CountryCode string `json:"countryCode,omitempty"`
2796
2797	// CountryDartId: DART ID of the country to which this city belongs.
2798	CountryDartId int64 `json:"countryDartId,omitempty,string"`
2799
2800	// DartId: DART ID of this city. This is the ID used for targeting and
2801	// generating reports.
2802	DartId int64 `json:"dartId,omitempty,string"`
2803
2804	// Kind: Identifies what kind of resource this is. Value: the fixed
2805	// string "dfareporting#city".
2806	Kind string `json:"kind,omitempty"`
2807
2808	// MetroCode: Metro region code of the metro region (DMA) to which this
2809	// city belongs.
2810	MetroCode string `json:"metroCode,omitempty"`
2811
2812	// MetroDmaId: ID of the metro region (DMA) to which this city belongs.
2813	MetroDmaId int64 `json:"metroDmaId,omitempty,string"`
2814
2815	// Name: Name of this city.
2816	Name string `json:"name,omitempty"`
2817
2818	// RegionCode: Region code of the region to which this city belongs.
2819	RegionCode string `json:"regionCode,omitempty"`
2820
2821	// RegionDartId: DART ID of the region to which this city belongs.
2822	RegionDartId int64 `json:"regionDartId,omitempty,string"`
2823
2824	// ForceSendFields is a list of field names (e.g. "CountryCode") to
2825	// unconditionally include in API requests. By default, fields with
2826	// empty values are omitted from API requests. However, any non-pointer,
2827	// non-interface field appearing in ForceSendFields will be sent to the
2828	// server regardless of whether the field is empty or not. This may be
2829	// used to include empty fields in Patch requests.
2830	ForceSendFields []string `json:"-"`
2831
2832	// NullFields is a list of field names (e.g. "CountryCode") to include
2833	// in API requests with the JSON null value. By default, fields with
2834	// empty values are omitted from API requests. However, any field with
2835	// an empty value appearing in NullFields will be sent to the server as
2836	// null. It is an error if a field in this list has a non-empty value.
2837	// This may be used to include null fields in Patch requests.
2838	NullFields []string `json:"-"`
2839}
2840
2841func (s *City) MarshalJSON() ([]byte, error) {
2842	type NoMethod City
2843	raw := NoMethod(*s)
2844	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2845}
2846
2847// ClickTag: Creative Click Tag.
2848type ClickTag struct {
2849	// ClickThroughUrl: Parameter value for the specified click tag. This
2850	// field contains a click-through url.
2851	ClickThroughUrl *CreativeClickThroughUrl `json:"clickThroughUrl,omitempty"`
2852
2853	// EventName: Advertiser event name associated with the click tag. This
2854	// field is used by DISPLAY_IMAGE_GALLERY and HTML5_BANNER creatives.
2855	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
2856	EventName string `json:"eventName,omitempty"`
2857
2858	// Name: Parameter name for the specified click tag. For
2859	// DISPLAY_IMAGE_GALLERY creative assets, this field must match the
2860	// value of the creative asset's creativeAssetId.name field.
2861	Name string `json:"name,omitempty"`
2862
2863	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
2864	// unconditionally include in API requests. By default, fields with
2865	// empty values are omitted from API requests. However, any non-pointer,
2866	// non-interface field appearing in ForceSendFields will be sent to the
2867	// server regardless of whether the field is empty or not. This may be
2868	// used to include empty fields in Patch requests.
2869	ForceSendFields []string `json:"-"`
2870
2871	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
2872	// include in API requests with the JSON null value. By default, fields
2873	// with empty values are omitted from API requests. However, any field
2874	// with an empty value appearing in NullFields will be sent to the
2875	// server as null. It is an error if a field in this list has a
2876	// non-empty value. This may be used to include null fields in Patch
2877	// requests.
2878	NullFields []string `json:"-"`
2879}
2880
2881func (s *ClickTag) MarshalJSON() ([]byte, error) {
2882	type NoMethod ClickTag
2883	raw := NoMethod(*s)
2884	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2885}
2886
2887// ClickThroughUrl: Click-through URL
2888type ClickThroughUrl struct {
2889	// ComputedClickThroughUrl: Read-only convenience field representing the
2890	// actual URL that will be used for this click-through. The URL is
2891	// computed as follows:
2892	// - If defaultLandingPage is enabled then the campaign's default
2893	// landing page URL is assigned to this field.
2894	// - If defaultLandingPage is not enabled and a landingPageId is
2895	// specified then that landing page's URL is assigned to this field.
2896	// - If neither of the above cases apply, then the customClickThroughUrl
2897	// is assigned to this field.
2898	ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
2899
2900	// CustomClickThroughUrl: Custom click-through URL. Applicable if the
2901	// defaultLandingPage field is set to false and the landingPageId field
2902	// is left unset.
2903	CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
2904
2905	// DefaultLandingPage: Whether the campaign default landing page is
2906	// used.
2907	DefaultLandingPage bool `json:"defaultLandingPage,omitempty"`
2908
2909	// LandingPageId: ID of the landing page for the click-through URL.
2910	// Applicable if the defaultLandingPage field is set to false.
2911	LandingPageId int64 `json:"landingPageId,omitempty,string"`
2912
2913	// ForceSendFields is a list of field names (e.g.
2914	// "ComputedClickThroughUrl") to unconditionally include in API
2915	// requests. By default, fields with empty values are omitted from API
2916	// requests. However, any non-pointer, non-interface field appearing in
2917	// ForceSendFields will be sent to the server regardless of whether the
2918	// field is empty or not. This may be used to include empty fields in
2919	// Patch requests.
2920	ForceSendFields []string `json:"-"`
2921
2922	// NullFields is a list of field names (e.g. "ComputedClickThroughUrl")
2923	// to include in API requests with the JSON null value. By default,
2924	// fields with empty values are omitted from API requests. However, any
2925	// field with an empty value appearing in NullFields will be sent to the
2926	// server as null. It is an error if a field in this list has a
2927	// non-empty value. This may be used to include null fields in Patch
2928	// requests.
2929	NullFields []string `json:"-"`
2930}
2931
2932func (s *ClickThroughUrl) MarshalJSON() ([]byte, error) {
2933	type NoMethod ClickThroughUrl
2934	raw := NoMethod(*s)
2935	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2936}
2937
2938// ClickThroughUrlSuffixProperties: Click Through URL Suffix settings.
2939type ClickThroughUrlSuffixProperties struct {
2940	// ClickThroughUrlSuffix: Click-through URL suffix to apply to all ads
2941	// in this entity's scope. Must be less than 128 characters long.
2942	ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
2943
2944	// OverrideInheritedSuffix: Whether this entity should override the
2945	// inherited click-through URL suffix with its own defined value.
2946	OverrideInheritedSuffix bool `json:"overrideInheritedSuffix,omitempty"`
2947
2948	// ForceSendFields is a list of field names (e.g.
2949	// "ClickThroughUrlSuffix") to unconditionally include in API requests.
2950	// By default, fields with empty values are omitted from API requests.
2951	// However, any non-pointer, non-interface field appearing in
2952	// ForceSendFields will be sent to the server regardless of whether the
2953	// field is empty or not. This may be used to include empty fields in
2954	// Patch requests.
2955	ForceSendFields []string `json:"-"`
2956
2957	// NullFields is a list of field names (e.g. "ClickThroughUrlSuffix") to
2958	// include in API requests with the JSON null value. By default, fields
2959	// with empty values are omitted from API requests. However, any field
2960	// with an empty value appearing in NullFields will be sent to the
2961	// server as null. It is an error if a field in this list has a
2962	// non-empty value. This may be used to include null fields in Patch
2963	// requests.
2964	NullFields []string `json:"-"`
2965}
2966
2967func (s *ClickThroughUrlSuffixProperties) MarshalJSON() ([]byte, error) {
2968	type NoMethod ClickThroughUrlSuffixProperties
2969	raw := NoMethod(*s)
2970	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2971}
2972
2973// CompanionClickThroughOverride: Companion Click-through override.
2974type CompanionClickThroughOverride struct {
2975	// ClickThroughUrl: Click-through URL of this companion click-through
2976	// override.
2977	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
2978
2979	// CreativeId: ID of the creative for this companion click-through
2980	// override.
2981	CreativeId int64 `json:"creativeId,omitempty,string"`
2982
2983	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
2984	// unconditionally include in API requests. By default, fields with
2985	// empty values are omitted from API requests. However, any non-pointer,
2986	// non-interface field appearing in ForceSendFields will be sent to the
2987	// server regardless of whether the field is empty or not. This may be
2988	// used to include empty fields in Patch requests.
2989	ForceSendFields []string `json:"-"`
2990
2991	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
2992	// include in API requests with the JSON null value. By default, fields
2993	// with empty values are omitted from API requests. However, any field
2994	// with an empty value appearing in NullFields will be sent to the
2995	// server as null. It is an error if a field in this list has a
2996	// non-empty value. This may be used to include null fields in Patch
2997	// requests.
2998	NullFields []string `json:"-"`
2999}
3000
3001func (s *CompanionClickThroughOverride) MarshalJSON() ([]byte, error) {
3002	type NoMethod CompanionClickThroughOverride
3003	raw := NoMethod(*s)
3004	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3005}
3006
3007// CompanionSetting: Companion Settings
3008type CompanionSetting struct {
3009	// CompanionsDisabled: Whether companions are disabled for this
3010	// placement.
3011	CompanionsDisabled bool `json:"companionsDisabled,omitempty"`
3012
3013	// EnabledSizes: Whitelist of companion sizes to be served to this
3014	// placement. Set this list to null or empty to serve all companion
3015	// sizes.
3016	EnabledSizes []*Size `json:"enabledSizes,omitempty"`
3017
3018	// ImageOnly: Whether to serve only static images as companions.
3019	ImageOnly bool `json:"imageOnly,omitempty"`
3020
3021	// Kind: Identifies what kind of resource this is. Value: the fixed
3022	// string "dfareporting#companionSetting".
3023	Kind string `json:"kind,omitempty"`
3024
3025	// ForceSendFields is a list of field names (e.g. "CompanionsDisabled")
3026	// to unconditionally include in API requests. By default, fields with
3027	// empty values are omitted from API requests. However, any non-pointer,
3028	// non-interface field appearing in ForceSendFields will be sent to the
3029	// server regardless of whether the field is empty or not. This may be
3030	// used to include empty fields in Patch requests.
3031	ForceSendFields []string `json:"-"`
3032
3033	// NullFields is a list of field names (e.g. "CompanionsDisabled") to
3034	// include in API requests with the JSON null value. By default, fields
3035	// with empty values are omitted from API requests. However, any field
3036	// with an empty value appearing in NullFields will be sent to the
3037	// server as null. It is an error if a field in this list has a
3038	// non-empty value. This may be used to include null fields in Patch
3039	// requests.
3040	NullFields []string `json:"-"`
3041}
3042
3043func (s *CompanionSetting) MarshalJSON() ([]byte, error) {
3044	type NoMethod CompanionSetting
3045	raw := NoMethod(*s)
3046	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3047}
3048
3049// CompatibleFields: Represents a response to the queryCompatibleFields
3050// method.
3051type CompatibleFields struct {
3052	// CrossDimensionReachReportCompatibleFields: Contains items that are
3053	// compatible to be selected for a report of type
3054	// "CROSS_DIMENSION_REACH".
3055	CrossDimensionReachReportCompatibleFields *CrossDimensionReachReportCompatibleFields `json:"crossDimensionReachReportCompatibleFields,omitempty"`
3056
3057	// FloodlightReportCompatibleFields: Contains items that are compatible
3058	// to be selected for a report of type "FLOODLIGHT".
3059	FloodlightReportCompatibleFields *FloodlightReportCompatibleFields `json:"floodlightReportCompatibleFields,omitempty"`
3060
3061	// Kind: The kind of resource this is, in this case
3062	// dfareporting#compatibleFields.
3063	Kind string `json:"kind,omitempty"`
3064
3065	// PathToConversionReportCompatibleFields: Contains items that are
3066	// compatible to be selected for a report of type "PATH_TO_CONVERSION".
3067	PathToConversionReportCompatibleFields *PathToConversionReportCompatibleFields `json:"pathToConversionReportCompatibleFields,omitempty"`
3068
3069	// ReachReportCompatibleFields: Contains items that are compatible to be
3070	// selected for a report of type "REACH".
3071	ReachReportCompatibleFields *ReachReportCompatibleFields `json:"reachReportCompatibleFields,omitempty"`
3072
3073	// ReportCompatibleFields: Contains items that are compatible to be
3074	// selected for a report of type "STANDARD".
3075	ReportCompatibleFields *ReportCompatibleFields `json:"reportCompatibleFields,omitempty"`
3076
3077	// ServerResponse contains the HTTP response code and headers from the
3078	// server.
3079	googleapi.ServerResponse `json:"-"`
3080
3081	// ForceSendFields is a list of field names (e.g.
3082	// "CrossDimensionReachReportCompatibleFields") to unconditionally
3083	// include in API requests. By default, fields with empty values are
3084	// omitted from API requests. However, any non-pointer, non-interface
3085	// field appearing in ForceSendFields will be sent to the server
3086	// regardless of whether the field is empty or not. This may be used to
3087	// include empty fields in Patch requests.
3088	ForceSendFields []string `json:"-"`
3089
3090	// NullFields is a list of field names (e.g.
3091	// "CrossDimensionReachReportCompatibleFields") to include in API
3092	// requests with the JSON null value. By default, fields with empty
3093	// values are omitted from API requests. However, any field with an
3094	// empty value appearing in NullFields will be sent to the server as
3095	// null. It is an error if a field in this list has a non-empty value.
3096	// This may be used to include null fields in Patch requests.
3097	NullFields []string `json:"-"`
3098}
3099
3100func (s *CompatibleFields) MarshalJSON() ([]byte, error) {
3101	type NoMethod CompatibleFields
3102	raw := NoMethod(*s)
3103	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3104}
3105
3106// ConnectionType: Contains information about an internet connection
3107// type that can be targeted by ads. Clients can use the connection type
3108// to target mobile vs. broadband users.
3109type ConnectionType struct {
3110	// Id: ID of this connection type.
3111	Id int64 `json:"id,omitempty,string"`
3112
3113	// Kind: Identifies what kind of resource this is. Value: the fixed
3114	// string "dfareporting#connectionType".
3115	Kind string `json:"kind,omitempty"`
3116
3117	// Name: Name of this connection type.
3118	Name string `json:"name,omitempty"`
3119
3120	// ServerResponse contains the HTTP response code and headers from the
3121	// server.
3122	googleapi.ServerResponse `json:"-"`
3123
3124	// ForceSendFields is a list of field names (e.g. "Id") to
3125	// unconditionally include in API requests. By default, fields with
3126	// empty values are omitted from API requests. However, any non-pointer,
3127	// non-interface field appearing in ForceSendFields will be sent to the
3128	// server regardless of whether the field is empty or not. This may be
3129	// used to include empty fields in Patch requests.
3130	ForceSendFields []string `json:"-"`
3131
3132	// NullFields is a list of field names (e.g. "Id") to include in API
3133	// requests with the JSON null value. By default, fields with empty
3134	// values are omitted from API requests. However, any field with an
3135	// empty value appearing in NullFields will be sent to the server as
3136	// null. It is an error if a field in this list has a non-empty value.
3137	// This may be used to include null fields in Patch requests.
3138	NullFields []string `json:"-"`
3139}
3140
3141func (s *ConnectionType) MarshalJSON() ([]byte, error) {
3142	type NoMethod ConnectionType
3143	raw := NoMethod(*s)
3144	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3145}
3146
3147// ConnectionTypesListResponse: Connection Type List Response
3148type ConnectionTypesListResponse struct {
3149	// ConnectionTypes: Collection of connection types such as broadband and
3150	// mobile.
3151	ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
3152
3153	// Kind: Identifies what kind of resource this is. Value: the fixed
3154	// string "dfareporting#connectionTypesListResponse".
3155	Kind string `json:"kind,omitempty"`
3156
3157	// ServerResponse contains the HTTP response code and headers from the
3158	// server.
3159	googleapi.ServerResponse `json:"-"`
3160
3161	// ForceSendFields is a list of field names (e.g. "ConnectionTypes") to
3162	// unconditionally include in API requests. By default, fields with
3163	// empty values are omitted from API requests. However, any non-pointer,
3164	// non-interface field appearing in ForceSendFields will be sent to the
3165	// server regardless of whether the field is empty or not. This may be
3166	// used to include empty fields in Patch requests.
3167	ForceSendFields []string `json:"-"`
3168
3169	// NullFields is a list of field names (e.g. "ConnectionTypes") to
3170	// include in API requests with the JSON null value. By default, fields
3171	// with empty values are omitted from API requests. However, any field
3172	// with an empty value appearing in NullFields will be sent to the
3173	// server as null. It is an error if a field in this list has a
3174	// non-empty value. This may be used to include null fields in Patch
3175	// requests.
3176	NullFields []string `json:"-"`
3177}
3178
3179func (s *ConnectionTypesListResponse) MarshalJSON() ([]byte, error) {
3180	type NoMethod ConnectionTypesListResponse
3181	raw := NoMethod(*s)
3182	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3183}
3184
3185// ContentCategoriesListResponse: Content Category List Response
3186type ContentCategoriesListResponse struct {
3187	// ContentCategories: Content category collection.
3188	ContentCategories []*ContentCategory `json:"contentCategories,omitempty"`
3189
3190	// Kind: Identifies what kind of resource this is. Value: the fixed
3191	// string "dfareporting#contentCategoriesListResponse".
3192	Kind string `json:"kind,omitempty"`
3193
3194	// NextPageToken: Pagination token to be used for the next list
3195	// operation.
3196	NextPageToken string `json:"nextPageToken,omitempty"`
3197
3198	// ServerResponse contains the HTTP response code and headers from the
3199	// server.
3200	googleapi.ServerResponse `json:"-"`
3201
3202	// ForceSendFields is a list of field names (e.g. "ContentCategories")
3203	// to unconditionally include in API requests. By default, fields with
3204	// empty values are omitted from API requests. However, any non-pointer,
3205	// non-interface field appearing in ForceSendFields will be sent to the
3206	// server regardless of whether the field is empty or not. This may be
3207	// used to include empty fields in Patch requests.
3208	ForceSendFields []string `json:"-"`
3209
3210	// NullFields is a list of field names (e.g. "ContentCategories") to
3211	// include in API requests with the JSON null value. By default, fields
3212	// with empty values are omitted from API requests. However, any field
3213	// with an empty value appearing in NullFields will be sent to the
3214	// server as null. It is an error if a field in this list has a
3215	// non-empty value. This may be used to include null fields in Patch
3216	// requests.
3217	NullFields []string `json:"-"`
3218}
3219
3220func (s *ContentCategoriesListResponse) MarshalJSON() ([]byte, error) {
3221	type NoMethod ContentCategoriesListResponse
3222	raw := NoMethod(*s)
3223	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3224}
3225
3226// ContentCategory: Organizes placements according to the contents of
3227// their associated webpages.
3228type ContentCategory struct {
3229	// AccountId: Account ID of this content category. This is a read-only
3230	// field that can be left blank.
3231	AccountId int64 `json:"accountId,omitempty,string"`
3232
3233	// Id: ID of this content category. This is a read-only, auto-generated
3234	// field.
3235	Id int64 `json:"id,omitempty,string"`
3236
3237	// Kind: Identifies what kind of resource this is. Value: the fixed
3238	// string "dfareporting#contentCategory".
3239	Kind string `json:"kind,omitempty"`
3240
3241	// Name: Name of this content category. This is a required field and
3242	// must be less than 256 characters long and unique among content
3243	// categories of the same account.
3244	Name string `json:"name,omitempty"`
3245
3246	// ServerResponse contains the HTTP response code and headers from the
3247	// server.
3248	googleapi.ServerResponse `json:"-"`
3249
3250	// ForceSendFields is a list of field names (e.g. "AccountId") to
3251	// unconditionally include in API requests. By default, fields with
3252	// empty values are omitted from API requests. However, any non-pointer,
3253	// non-interface field appearing in ForceSendFields will be sent to the
3254	// server regardless of whether the field is empty or not. This may be
3255	// used to include empty fields in Patch requests.
3256	ForceSendFields []string `json:"-"`
3257
3258	// NullFields is a list of field names (e.g. "AccountId") to include in
3259	// API requests with the JSON null value. By default, fields with empty
3260	// values are omitted from API requests. However, any field with an
3261	// empty value appearing in NullFields will be sent to the server as
3262	// null. It is an error if a field in this list has a non-empty value.
3263	// This may be used to include null fields in Patch requests.
3264	NullFields []string `json:"-"`
3265}
3266
3267func (s *ContentCategory) MarshalJSON() ([]byte, error) {
3268	type NoMethod ContentCategory
3269	raw := NoMethod(*s)
3270	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3271}
3272
3273// Conversion: A Conversion represents when a user successfully performs
3274// a desired action after seeing an ad.
3275type Conversion struct {
3276	// ChildDirectedTreatment: Whether this particular request may come from
3277	// a user under the age of 13, under COPPA compliance.
3278	ChildDirectedTreatment bool `json:"childDirectedTreatment,omitempty"`
3279
3280	// CustomVariables: Custom floodlight variables.
3281	CustomVariables []*CustomFloodlightVariable `json:"customVariables,omitempty"`
3282
3283	// EncryptedUserId: The alphanumeric encrypted user ID. When set,
3284	// encryptionInfo should also be specified. This field is mutually
3285	// exclusive with encryptedUserIdCandidates[], mobileDeviceId and gclid.
3286	// This or encryptedUserIdCandidates[] or mobileDeviceId or gclid is a
3287	// required field.
3288	EncryptedUserId string `json:"encryptedUserId,omitempty"`
3289
3290	// EncryptedUserIdCandidates: A list of the alphanumeric encrypted user
3291	// IDs. Any user ID with exposure prior to the conversion timestamp will
3292	// be used in the inserted conversion. If no such user ID is found then
3293	// the conversion will be rejected with NO_COOKIE_MATCH_FOUND error.
3294	// When set, encryptionInfo should also be specified. This field may
3295	// only be used when calling batchinsert; it is not supported by
3296	// batchupdate. This field is mutually exclusive with encryptedUserId,
3297	// mobileDeviceId and gclid. This or encryptedUserId or mobileDeviceId
3298	// or gclid is a required field.
3299	EncryptedUserIdCandidates []string `json:"encryptedUserIdCandidates,omitempty"`
3300
3301	// FloodlightActivityId: Floodlight Activity ID of this conversion. This
3302	// is a required field.
3303	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
3304
3305	// FloodlightConfigurationId: Floodlight Configuration ID of this
3306	// conversion. This is a required field.
3307	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
3308
3309	// Gclid: The Google click ID. This field is mutually exclusive with
3310	// encryptedUserId, encryptedUserIdCandidates[] and mobileDeviceId. This
3311	// or encryptedUserId or encryptedUserIdCandidates[] or mobileDeviceId
3312	// is a required field.
3313	Gclid string `json:"gclid,omitempty"`
3314
3315	// Kind: Identifies what kind of resource this is. Value: the fixed
3316	// string "dfareporting#conversion".
3317	Kind string `json:"kind,omitempty"`
3318
3319	// LimitAdTracking: Whether Limit Ad Tracking is enabled. When set to
3320	// true, the conversion will be used for reporting but not targeting.
3321	// This will prevent remarketing.
3322	LimitAdTracking bool `json:"limitAdTracking,omitempty"`
3323
3324	// MobileDeviceId: The mobile device ID. This field is mutually
3325	// exclusive with encryptedUserId, encryptedUserIdCandidates[] and
3326	// gclid. This or encryptedUserId or encryptedUserIdCandidates[] or
3327	// gclid is a required field.
3328	MobileDeviceId string `json:"mobileDeviceId,omitempty"`
3329
3330	// NonPersonalizedAd: Whether the conversion was for a non personalized
3331	// ad.
3332	NonPersonalizedAd bool `json:"nonPersonalizedAd,omitempty"`
3333
3334	// Ordinal: The ordinal of the conversion. Use this field to control how
3335	// conversions of the same user and day are de-duplicated. This is a
3336	// required field.
3337	Ordinal string `json:"ordinal,omitempty"`
3338
3339	// Quantity: The quantity of the conversion.
3340	Quantity int64 `json:"quantity,omitempty,string"`
3341
3342	// TimestampMicros: The timestamp of conversion, in Unix epoch micros.
3343	// This is a required field.
3344	TimestampMicros int64 `json:"timestampMicros,omitempty,string"`
3345
3346	// TreatmentForUnderage: Whether this particular request may come from a
3347	// user under the age of 16 (may differ by country), under compliance
3348	// with the European Union's General Data Protection Regulation (GDPR).
3349	TreatmentForUnderage bool `json:"treatmentForUnderage,omitempty"`
3350
3351	// Value: The value of the conversion.
3352	Value float64 `json:"value,omitempty"`
3353
3354	// ForceSendFields is a list of field names (e.g.
3355	// "ChildDirectedTreatment") to unconditionally include in API requests.
3356	// By default, fields with empty values are omitted from API requests.
3357	// However, any non-pointer, non-interface field appearing in
3358	// ForceSendFields will be sent to the server regardless of whether the
3359	// field is empty or not. This may be used to include empty fields in
3360	// Patch requests.
3361	ForceSendFields []string `json:"-"`
3362
3363	// NullFields is a list of field names (e.g. "ChildDirectedTreatment")
3364	// to include in API requests with the JSON null value. By default,
3365	// fields with empty values are omitted from API requests. However, any
3366	// field with an empty value appearing in NullFields will be sent to the
3367	// server as null. It is an error if a field in this list has a
3368	// non-empty value. This may be used to include null fields in Patch
3369	// requests.
3370	NullFields []string `json:"-"`
3371}
3372
3373func (s *Conversion) MarshalJSON() ([]byte, error) {
3374	type NoMethod Conversion
3375	raw := NoMethod(*s)
3376	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3377}
3378
3379func (s *Conversion) UnmarshalJSON(data []byte) error {
3380	type NoMethod Conversion
3381	var s1 struct {
3382		Value gensupport.JSONFloat64 `json:"value"`
3383		*NoMethod
3384	}
3385	s1.NoMethod = (*NoMethod)(s)
3386	if err := json.Unmarshal(data, &s1); err != nil {
3387		return err
3388	}
3389	s.Value = float64(s1.Value)
3390	return nil
3391}
3392
3393// ConversionError: The error code and description for a conversion that
3394// failed to insert or update.
3395type ConversionError struct {
3396	// Code: The error code.
3397	//
3398	// Possible values:
3399	//   "INTERNAL"
3400	//   "INVALID_ARGUMENT"
3401	//   "NOT_FOUND"
3402	//   "PERMISSION_DENIED"
3403	Code string `json:"code,omitempty"`
3404
3405	// Kind: Identifies what kind of resource this is. Value: the fixed
3406	// string "dfareporting#conversionError".
3407	Kind string `json:"kind,omitempty"`
3408
3409	// Message: A description of the error.
3410	Message string `json:"message,omitempty"`
3411
3412	// ForceSendFields is a list of field names (e.g. "Code") to
3413	// unconditionally include in API requests. By default, fields with
3414	// empty values are omitted from API requests. However, any non-pointer,
3415	// non-interface field appearing in ForceSendFields will be sent to the
3416	// server regardless of whether the field is empty or not. This may be
3417	// used to include empty fields in Patch requests.
3418	ForceSendFields []string `json:"-"`
3419
3420	// NullFields is a list of field names (e.g. "Code") to include in API
3421	// requests with the JSON null value. By default, fields with empty
3422	// values are omitted from API requests. However, any field with an
3423	// empty value appearing in NullFields will be sent to the server as
3424	// null. It is an error if a field in this list has a non-empty value.
3425	// This may be used to include null fields in Patch requests.
3426	NullFields []string `json:"-"`
3427}
3428
3429func (s *ConversionError) MarshalJSON() ([]byte, error) {
3430	type NoMethod ConversionError
3431	raw := NoMethod(*s)
3432	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3433}
3434
3435// ConversionStatus: The original conversion that was inserted or
3436// updated and whether there were any errors.
3437type ConversionStatus struct {
3438	// Conversion: The original conversion that was inserted or updated.
3439	Conversion *Conversion `json:"conversion,omitempty"`
3440
3441	// Errors: A list of errors related to this conversion.
3442	Errors []*ConversionError `json:"errors,omitempty"`
3443
3444	// Kind: Identifies what kind of resource this is. Value: the fixed
3445	// string "dfareporting#conversionStatus".
3446	Kind string `json:"kind,omitempty"`
3447
3448	// ForceSendFields is a list of field names (e.g. "Conversion") to
3449	// unconditionally include in API requests. By default, fields with
3450	// empty values are omitted from API requests. However, any non-pointer,
3451	// non-interface field appearing in ForceSendFields will be sent to the
3452	// server regardless of whether the field is empty or not. This may be
3453	// used to include empty fields in Patch requests.
3454	ForceSendFields []string `json:"-"`
3455
3456	// NullFields is a list of field names (e.g. "Conversion") to include in
3457	// API requests with the JSON null value. By default, fields with empty
3458	// values are omitted from API requests. However, any field with an
3459	// empty value appearing in NullFields will be sent to the server as
3460	// null. It is an error if a field in this list has a non-empty value.
3461	// This may be used to include null fields in Patch requests.
3462	NullFields []string `json:"-"`
3463}
3464
3465func (s *ConversionStatus) MarshalJSON() ([]byte, error) {
3466	type NoMethod ConversionStatus
3467	raw := NoMethod(*s)
3468	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3469}
3470
3471// ConversionsBatchInsertRequest: Insert Conversions Request.
3472type ConversionsBatchInsertRequest struct {
3473	// Conversions: The set of conversions to insert.
3474	Conversions []*Conversion `json:"conversions,omitempty"`
3475
3476	// EncryptionInfo: Describes how encryptedUserId or
3477	// encryptedUserIdCandidates[] is encrypted. This is a required field if
3478	// encryptedUserId or encryptedUserIdCandidates[] is used.
3479	EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3480
3481	// Kind: Identifies what kind of resource this is. Value: the fixed
3482	// string "dfareporting#conversionsBatchInsertRequest".
3483	Kind string `json:"kind,omitempty"`
3484
3485	// ForceSendFields is a list of field names (e.g. "Conversions") to
3486	// unconditionally include in API requests. By default, fields with
3487	// empty values are omitted from API requests. However, any non-pointer,
3488	// non-interface field appearing in ForceSendFields will be sent to the
3489	// server regardless of whether the field is empty or not. This may be
3490	// used to include empty fields in Patch requests.
3491	ForceSendFields []string `json:"-"`
3492
3493	// NullFields is a list of field names (e.g. "Conversions") to include
3494	// in API requests with the JSON null value. By default, fields with
3495	// empty values are omitted from API requests. However, any field with
3496	// an empty value appearing in NullFields will be sent to the server as
3497	// null. It is an error if a field in this list has a non-empty value.
3498	// This may be used to include null fields in Patch requests.
3499	NullFields []string `json:"-"`
3500}
3501
3502func (s *ConversionsBatchInsertRequest) MarshalJSON() ([]byte, error) {
3503	type NoMethod ConversionsBatchInsertRequest
3504	raw := NoMethod(*s)
3505	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3506}
3507
3508// ConversionsBatchInsertResponse: Insert Conversions Response.
3509type ConversionsBatchInsertResponse struct {
3510	// HasFailures: Indicates that some or all conversions failed to insert.
3511	HasFailures bool `json:"hasFailures,omitempty"`
3512
3513	// Kind: Identifies what kind of resource this is. Value: the fixed
3514	// string "dfareporting#conversionsBatchInsertResponse".
3515	Kind string `json:"kind,omitempty"`
3516
3517	// Status: The insert status of each conversion. Statuses are returned
3518	// in the same order that conversions are inserted.
3519	Status []*ConversionStatus `json:"status,omitempty"`
3520
3521	// ServerResponse contains the HTTP response code and headers from the
3522	// server.
3523	googleapi.ServerResponse `json:"-"`
3524
3525	// ForceSendFields is a list of field names (e.g. "HasFailures") to
3526	// unconditionally include in API requests. By default, fields with
3527	// empty values are omitted from API requests. However, any non-pointer,
3528	// non-interface field appearing in ForceSendFields will be sent to the
3529	// server regardless of whether the field is empty or not. This may be
3530	// used to include empty fields in Patch requests.
3531	ForceSendFields []string `json:"-"`
3532
3533	// NullFields is a list of field names (e.g. "HasFailures") to include
3534	// in API requests with the JSON null value. By default, fields with
3535	// empty values are omitted from API requests. However, any field with
3536	// an empty value appearing in NullFields will be sent to the server as
3537	// null. It is an error if a field in this list has a non-empty value.
3538	// This may be used to include null fields in Patch requests.
3539	NullFields []string `json:"-"`
3540}
3541
3542func (s *ConversionsBatchInsertResponse) MarshalJSON() ([]byte, error) {
3543	type NoMethod ConversionsBatchInsertResponse
3544	raw := NoMethod(*s)
3545	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3546}
3547
3548// ConversionsBatchUpdateRequest: Update Conversions Request.
3549type ConversionsBatchUpdateRequest struct {
3550	// Conversions: The set of conversions to update.
3551	Conversions []*Conversion `json:"conversions,omitempty"`
3552
3553	// EncryptionInfo: Describes how encryptedUserId is encrypted. This is a
3554	// required field if encryptedUserId is used.
3555	EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3556
3557	// Kind: Identifies what kind of resource this is. Value: the fixed
3558	// string "dfareporting#conversionsBatchUpdateRequest".
3559	Kind string `json:"kind,omitempty"`
3560
3561	// ForceSendFields is a list of field names (e.g. "Conversions") to
3562	// unconditionally include in API requests. By default, fields with
3563	// empty values are omitted from API requests. However, any non-pointer,
3564	// non-interface field appearing in ForceSendFields will be sent to the
3565	// server regardless of whether the field is empty or not. This may be
3566	// used to include empty fields in Patch requests.
3567	ForceSendFields []string `json:"-"`
3568
3569	// NullFields is a list of field names (e.g. "Conversions") to include
3570	// in API requests with the JSON null value. By default, fields with
3571	// empty values are omitted from API requests. However, any field with
3572	// an empty value appearing in NullFields will be sent to the server as
3573	// null. It is an error if a field in this list has a non-empty value.
3574	// This may be used to include null fields in Patch requests.
3575	NullFields []string `json:"-"`
3576}
3577
3578func (s *ConversionsBatchUpdateRequest) MarshalJSON() ([]byte, error) {
3579	type NoMethod ConversionsBatchUpdateRequest
3580	raw := NoMethod(*s)
3581	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3582}
3583
3584// ConversionsBatchUpdateResponse: Update Conversions Response.
3585type ConversionsBatchUpdateResponse struct {
3586	// HasFailures: Indicates that some or all conversions failed to update.
3587	HasFailures bool `json:"hasFailures,omitempty"`
3588
3589	// Kind: Identifies what kind of resource this is. Value: the fixed
3590	// string "dfareporting#conversionsBatchUpdateResponse".
3591	Kind string `json:"kind,omitempty"`
3592
3593	// Status: The update status of each conversion. Statuses are returned
3594	// in the same order that conversions are updated.
3595	Status []*ConversionStatus `json:"status,omitempty"`
3596
3597	// ServerResponse contains the HTTP response code and headers from the
3598	// server.
3599	googleapi.ServerResponse `json:"-"`
3600
3601	// ForceSendFields is a list of field names (e.g. "HasFailures") to
3602	// unconditionally include in API requests. By default, fields with
3603	// empty values are omitted from API requests. However, any non-pointer,
3604	// non-interface field appearing in ForceSendFields will be sent to the
3605	// server regardless of whether the field is empty or not. This may be
3606	// used to include empty fields in Patch requests.
3607	ForceSendFields []string `json:"-"`
3608
3609	// NullFields is a list of field names (e.g. "HasFailures") to include
3610	// in API requests with the JSON null value. By default, fields with
3611	// empty values are omitted from API requests. However, any field with
3612	// an empty value appearing in NullFields will be sent to the server as
3613	// null. It is an error if a field in this list has a non-empty value.
3614	// This may be used to include null fields in Patch requests.
3615	NullFields []string `json:"-"`
3616}
3617
3618func (s *ConversionsBatchUpdateResponse) MarshalJSON() ([]byte, error) {
3619	type NoMethod ConversionsBatchUpdateResponse
3620	raw := NoMethod(*s)
3621	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3622}
3623
3624// CountriesListResponse: Country List Response
3625type CountriesListResponse struct {
3626	// Countries: Country collection.
3627	Countries []*Country `json:"countries,omitempty"`
3628
3629	// Kind: Identifies what kind of resource this is. Value: the fixed
3630	// string "dfareporting#countriesListResponse".
3631	Kind string `json:"kind,omitempty"`
3632
3633	// ServerResponse contains the HTTP response code and headers from the
3634	// server.
3635	googleapi.ServerResponse `json:"-"`
3636
3637	// ForceSendFields is a list of field names (e.g. "Countries") to
3638	// unconditionally include in API requests. By default, fields with
3639	// empty values are omitted from API requests. However, any non-pointer,
3640	// non-interface field appearing in ForceSendFields will be sent to the
3641	// server regardless of whether the field is empty or not. This may be
3642	// used to include empty fields in Patch requests.
3643	ForceSendFields []string `json:"-"`
3644
3645	// NullFields is a list of field names (e.g. "Countries") to include in
3646	// API requests with the JSON null value. By default, fields with empty
3647	// values are omitted from API requests. However, any field with an
3648	// empty value appearing in NullFields will be sent to the server as
3649	// null. It is an error if a field in this list has a non-empty value.
3650	// This may be used to include null fields in Patch requests.
3651	NullFields []string `json:"-"`
3652}
3653
3654func (s *CountriesListResponse) MarshalJSON() ([]byte, error) {
3655	type NoMethod CountriesListResponse
3656	raw := NoMethod(*s)
3657	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3658}
3659
3660// Country: Contains information about a country that can be targeted by
3661// ads.
3662type Country struct {
3663	// CountryCode: Country code.
3664	CountryCode string `json:"countryCode,omitempty"`
3665
3666	// DartId: DART ID of this country. This is the ID used for targeting
3667	// and generating reports.
3668	DartId int64 `json:"dartId,omitempty,string"`
3669
3670	// Kind: Identifies what kind of resource this is. Value: the fixed
3671	// string "dfareporting#country".
3672	Kind string `json:"kind,omitempty"`
3673
3674	// Name: Name of this country.
3675	Name string `json:"name,omitempty"`
3676
3677	// SslEnabled: Whether ad serving supports secure servers in this
3678	// country.
3679	SslEnabled bool `json:"sslEnabled,omitempty"`
3680
3681	// ServerResponse contains the HTTP response code and headers from the
3682	// server.
3683	googleapi.ServerResponse `json:"-"`
3684
3685	// ForceSendFields is a list of field names (e.g. "CountryCode") to
3686	// unconditionally include in API requests. By default, fields with
3687	// empty values are omitted from API requests. However, any non-pointer,
3688	// non-interface field appearing in ForceSendFields will be sent to the
3689	// server regardless of whether the field is empty or not. This may be
3690	// used to include empty fields in Patch requests.
3691	ForceSendFields []string `json:"-"`
3692
3693	// NullFields is a list of field names (e.g. "CountryCode") to include
3694	// in API requests with the JSON null value. By default, fields with
3695	// empty values are omitted from API requests. However, any field with
3696	// an empty value appearing in NullFields will be sent to the server as
3697	// null. It is an error if a field in this list has a non-empty value.
3698	// This may be used to include null fields in Patch requests.
3699	NullFields []string `json:"-"`
3700}
3701
3702func (s *Country) MarshalJSON() ([]byte, error) {
3703	type NoMethod Country
3704	raw := NoMethod(*s)
3705	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3706}
3707
3708// Creative: Contains properties of a Creative.
3709type Creative struct {
3710	// AccountId: Account ID of this creative. This field, if left unset,
3711	// will be auto-generated for both insert and update operations.
3712	// Applicable to all creative types.
3713	AccountId int64 `json:"accountId,omitempty,string"`
3714
3715	// Active: Whether the creative is active. Applicable to all creative
3716	// types.
3717	Active bool `json:"active,omitempty"`
3718
3719	// AdParameters: Ad parameters user for VPAID creative. This is a
3720	// read-only field. Applicable to the following creative types: all
3721	// VPAID.
3722	AdParameters string `json:"adParameters,omitempty"`
3723
3724	// AdTagKeys: Keywords for a Rich Media creative. Keywords let you
3725	// customize the creative settings of a Rich Media ad running on your
3726	// site without having to contact the advertiser. You can use keywords
3727	// to dynamically change the look or functionality of a creative.
3728	// Applicable to the following creative types: all RICH_MEDIA, and all
3729	// VPAID.
3730	AdTagKeys []string `json:"adTagKeys,omitempty"`
3731
3732	// AdditionalSizes: Additional sizes associated with a responsive
3733	// creative. When inserting or updating a creative either the size ID
3734	// field or size width and height fields can be used. Applicable to
3735	// DISPLAY creatives when the primary asset type is HTML_IMAGE.
3736	AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
3737
3738	// AdvertiserId: Advertiser ID of this creative. This is a required
3739	// field. Applicable to all creative types.
3740	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
3741
3742	// AllowScriptAccess: Whether script access is allowed for this
3743	// creative. This is a read-only and deprecated field which will
3744	// automatically be set to true on update. Applicable to the following
3745	// creative types: FLASH_INPAGE.
3746	AllowScriptAccess bool `json:"allowScriptAccess,omitempty"`
3747
3748	// Archived: Whether the creative is archived. Applicable to all
3749	// creative types.
3750	Archived bool `json:"archived,omitempty"`
3751
3752	// ArtworkType: Type of artwork used for the creative. This is a
3753	// read-only field. Applicable to the following creative types: all
3754	// RICH_MEDIA, and all VPAID.
3755	//
3756	// Possible values:
3757	//   "ARTWORK_TYPE_FLASH"
3758	//   "ARTWORK_TYPE_HTML5"
3759	//   "ARTWORK_TYPE_IMAGE"
3760	//   "ARTWORK_TYPE_MIXED"
3761	ArtworkType string `json:"artworkType,omitempty"`
3762
3763	// AuthoringSource: Source application where creative was authored.
3764	// Presently, only DBM authored creatives will have this field set.
3765	// Applicable to all creative types.
3766	//
3767	// Possible values:
3768	//   "CREATIVE_AUTHORING_SOURCE_DBM"
3769	//   "CREATIVE_AUTHORING_SOURCE_DCM"
3770	//   "CREATIVE_AUTHORING_SOURCE_STUDIO"
3771	AuthoringSource string `json:"authoringSource,omitempty"`
3772
3773	// AuthoringTool: Authoring tool for HTML5 banner creatives. This is a
3774	// read-only field. Applicable to the following creative types:
3775	// HTML5_BANNER.
3776	//
3777	// Possible values:
3778	//   "NINJA"
3779	//   "SWIFFY"
3780	AuthoringTool string `json:"authoringTool,omitempty"`
3781
3782	// AutoAdvanceImages: Whether images are automatically advanced for
3783	// image gallery creatives. Applicable to the following creative types:
3784	// DISPLAY_IMAGE_GALLERY.
3785	AutoAdvanceImages bool `json:"autoAdvanceImages,omitempty"`
3786
3787	// BackgroundColor: The 6-character HTML color code, beginning with #,
3788	// for the background of the window area where the Flash file is
3789	// displayed. Default is white. Applicable to the following creative
3790	// types: FLASH_INPAGE.
3791	BackgroundColor string `json:"backgroundColor,omitempty"`
3792
3793	// BackupImageClickThroughUrl: Click-through URL for backup image.
3794	// Applicable to ENHANCED_BANNER when the primary asset type is not
3795	// HTML_IMAGE.
3796	BackupImageClickThroughUrl *CreativeClickThroughUrl `json:"backupImageClickThroughUrl,omitempty"`
3797
3798	// BackupImageFeatures: List of feature dependencies that will cause a
3799	// backup image to be served if the browser that serves the ad does not
3800	// support them. Feature dependencies are features that a browser must
3801	// be able to support in order to render your HTML5 creative asset
3802	// correctly. This field is initially auto-generated to contain all
3803	// features detected by Campaign Manager for all the assets of this
3804	// creative and can then be modified by the client. To reset this field,
3805	// copy over all the creativeAssets' detected features. Applicable to
3806	// the following creative types: HTML5_BANNER. Applicable to DISPLAY
3807	// when the primary asset type is not HTML_IMAGE.
3808	//
3809	// Possible values:
3810	//   "APPLICATION_CACHE"
3811	//   "AUDIO"
3812	//   "CANVAS"
3813	//   "CANVAS_TEXT"
3814	//   "CSS_ANIMATIONS"
3815	//   "CSS_BACKGROUND_SIZE"
3816	//   "CSS_BORDER_IMAGE"
3817	//   "CSS_BORDER_RADIUS"
3818	//   "CSS_BOX_SHADOW"
3819	//   "CSS_COLUMNS"
3820	//   "CSS_FLEX_BOX"
3821	//   "CSS_FONT_FACE"
3822	//   "CSS_GENERATED_CONTENT"
3823	//   "CSS_GRADIENTS"
3824	//   "CSS_HSLA"
3825	//   "CSS_MULTIPLE_BGS"
3826	//   "CSS_OPACITY"
3827	//   "CSS_REFLECTIONS"
3828	//   "CSS_RGBA"
3829	//   "CSS_TEXT_SHADOW"
3830	//   "CSS_TRANSFORMS"
3831	//   "CSS_TRANSFORMS3D"
3832	//   "CSS_TRANSITIONS"
3833	//   "DRAG_AND_DROP"
3834	//   "GEO_LOCATION"
3835	//   "HASH_CHANGE"
3836	//   "HISTORY"
3837	//   "INDEXED_DB"
3838	//   "INLINE_SVG"
3839	//   "INPUT_ATTR_AUTOCOMPLETE"
3840	//   "INPUT_ATTR_AUTOFOCUS"
3841	//   "INPUT_ATTR_LIST"
3842	//   "INPUT_ATTR_MAX"
3843	//   "INPUT_ATTR_MIN"
3844	//   "INPUT_ATTR_MULTIPLE"
3845	//   "INPUT_ATTR_PATTERN"
3846	//   "INPUT_ATTR_PLACEHOLDER"
3847	//   "INPUT_ATTR_REQUIRED"
3848	//   "INPUT_ATTR_STEP"
3849	//   "INPUT_TYPE_COLOR"
3850	//   "INPUT_TYPE_DATE"
3851	//   "INPUT_TYPE_DATETIME"
3852	//   "INPUT_TYPE_DATETIME_LOCAL"
3853	//   "INPUT_TYPE_EMAIL"
3854	//   "INPUT_TYPE_MONTH"
3855	//   "INPUT_TYPE_NUMBER"
3856	//   "INPUT_TYPE_RANGE"
3857	//   "INPUT_TYPE_SEARCH"
3858	//   "INPUT_TYPE_TEL"
3859	//   "INPUT_TYPE_TIME"
3860	//   "INPUT_TYPE_URL"
3861	//   "INPUT_TYPE_WEEK"
3862	//   "LOCAL_STORAGE"
3863	//   "POST_MESSAGE"
3864	//   "SESSION_STORAGE"
3865	//   "SMIL"
3866	//   "SVG_CLIP_PATHS"
3867	//   "SVG_FE_IMAGE"
3868	//   "SVG_FILTERS"
3869	//   "SVG_HREF"
3870	//   "TOUCH"
3871	//   "VIDEO"
3872	//   "WEBGL"
3873	//   "WEB_SOCKETS"
3874	//   "WEB_SQL_DATABASE"
3875	//   "WEB_WORKERS"
3876	BackupImageFeatures []string `json:"backupImageFeatures,omitempty"`
3877
3878	// BackupImageReportingLabel: Reporting label used for HTML5 banner
3879	// backup image. Applicable to the following creative types: DISPLAY
3880	// when the primary asset type is not HTML_IMAGE.
3881	BackupImageReportingLabel string `json:"backupImageReportingLabel,omitempty"`
3882
3883	// BackupImageTargetWindow: Target window for backup image. Applicable
3884	// to the following creative types: FLASH_INPAGE and HTML5_BANNER.
3885	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
3886	BackupImageTargetWindow *TargetWindow `json:"backupImageTargetWindow,omitempty"`
3887
3888	// ClickTags: Click tags of the creative. For DISPLAY, FLASH_INPAGE, and
3889	// HTML5_BANNER creatives, this is a subset of detected click tags for
3890	// the assets associated with this creative. After creating a flash
3891	// asset, detected click tags will be returned in the
3892	// creativeAssetMetadata. When inserting the creative, populate the
3893	// creative clickTags field using the creativeAssetMetadata.clickTags
3894	// field. For DISPLAY_IMAGE_GALLERY creatives, there should be exactly
3895	// one entry in this list for each image creative asset. A click tag is
3896	// matched with a corresponding creative asset by matching the
3897	// clickTag.name field with the creativeAsset.assetIdentifier.name
3898	// field. Applicable to the following creative types:
3899	// DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER. Applicable to
3900	// DISPLAY when the primary asset type is not HTML_IMAGE.
3901	ClickTags []*ClickTag `json:"clickTags,omitempty"`
3902
3903	// CommercialId: Industry standard ID assigned to creative for reach and
3904	// frequency. Applicable to INSTREAM_VIDEO_REDIRECT creatives.
3905	CommercialId string `json:"commercialId,omitempty"`
3906
3907	// CompanionCreatives: List of companion creatives assigned to an
3908	// in-Stream video creative. Acceptable values include IDs of existing
3909	// flash and image creatives. Applicable to the following creative
3910	// types: all VPAID, all INSTREAM_AUDIO and all INSTREAM_VIDEO with
3911	// dynamicAssetSelection set to false.
3912	CompanionCreatives googleapi.Int64s `json:"companionCreatives,omitempty"`
3913
3914	// Compatibility: Compatibilities associated with this creative. This is
3915	// a read-only field. DISPLAY and DISPLAY_INTERSTITIAL refer to
3916	// rendering either on desktop or on mobile devices or in mobile apps
3917	// for regular or interstitial ads, respectively. APP and
3918	// APP_INTERSTITIAL are for rendering in mobile apps. Only pre-existing
3919	// creatives may have these compatibilities since new creatives will
3920	// either be assigned DISPLAY or DISPLAY_INTERSTITIAL instead.
3921	// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
3922	// with the VAST standard. IN_STREAM_AUDIO refers to rendering in
3923	// in-stream audio ads developed with the VAST standard. Applicable to
3924	// all creative types.
3925	//
3926	// Acceptable values are:
3927	// - "APP"
3928	// - "APP_INTERSTITIAL"
3929	// - "IN_STREAM_VIDEO"
3930	// - "IN_STREAM_AUDIO"
3931	// - "DISPLAY"
3932	// - "DISPLAY_INTERSTITIAL"
3933	//
3934	// Possible values:
3935	//   "APP"
3936	//   "APP_INTERSTITIAL"
3937	//   "DISPLAY"
3938	//   "DISPLAY_INTERSTITIAL"
3939	//   "IN_STREAM_AUDIO"
3940	//   "IN_STREAM_VIDEO"
3941	Compatibility []string `json:"compatibility,omitempty"`
3942
3943	// ConvertFlashToHtml5: Whether Flash assets associated with the
3944	// creative need to be automatically converted to HTML5. This flag is
3945	// enabled by default and users can choose to disable it if they don't
3946	// want the system to generate and use HTML5 asset for this creative.
3947	// Applicable to the following creative type: FLASH_INPAGE. Applicable
3948	// to DISPLAY when the primary asset type is not HTML_IMAGE.
3949	ConvertFlashToHtml5 bool `json:"convertFlashToHtml5,omitempty"`
3950
3951	// CounterCustomEvents: List of counter events configured for the
3952	// creative. For DISPLAY_IMAGE_GALLERY creatives, these are read-only
3953	// and auto-generated from clickTags. Applicable to the following
3954	// creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
3955	CounterCustomEvents []*CreativeCustomEvent `json:"counterCustomEvents,omitempty"`
3956
3957	// CreativeAssetSelection: Required if dynamicAssetSelection is true.
3958	CreativeAssetSelection *CreativeAssetSelection `json:"creativeAssetSelection,omitempty"`
3959
3960	// CreativeAssets: Assets associated with a creative. Applicable to all
3961	// but the following creative types: INTERNAL_REDIRECT,
3962	// INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT
3963	CreativeAssets []*CreativeAsset `json:"creativeAssets,omitempty"`
3964
3965	// CreativeFieldAssignments: Creative field assignments for this
3966	// creative. Applicable to all creative types.
3967	CreativeFieldAssignments []*CreativeFieldAssignment `json:"creativeFieldAssignments,omitempty"`
3968
3969	// CustomKeyValues: Custom key-values for a Rich Media creative.
3970	// Key-values let you customize the creative settings of a Rich Media ad
3971	// running on your site without having to contact the advertiser. You
3972	// can use key-values to dynamically change the look or functionality of
3973	// a creative. Applicable to the following creative types: all
3974	// RICH_MEDIA, and all VPAID.
3975	CustomKeyValues []string `json:"customKeyValues,omitempty"`
3976
3977	// DynamicAssetSelection: Set this to true to enable the use of rules to
3978	// target individual assets in this creative. When set to true
3979	// creativeAssetSelection must be set. This also controls asset-level
3980	// companions. When this is true, companion creatives should be assigned
3981	// to creative assets. Learn more. Applicable to INSTREAM_VIDEO
3982	// creatives.
3983	DynamicAssetSelection bool `json:"dynamicAssetSelection,omitempty"`
3984
3985	// ExitCustomEvents: List of exit events configured for the creative.
3986	// For DISPLAY and DISPLAY_IMAGE_GALLERY creatives, these are read-only
3987	// and auto-generated from clickTags, For DISPLAY, an event is also
3988	// created from the backupImageReportingLabel. Applicable to the
3989	// following creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and
3990	// all VPAID. Applicable to DISPLAY when the primary asset type is not
3991	// HTML_IMAGE.
3992	ExitCustomEvents []*CreativeCustomEvent `json:"exitCustomEvents,omitempty"`
3993
3994	// FsCommand: OpenWindow FSCommand of this creative. This lets the SWF
3995	// file communicate with either Flash Player or the program hosting
3996	// Flash Player, such as a web browser. This is only triggered if
3997	// allowScriptAccess field is true. Applicable to the following creative
3998	// types: FLASH_INPAGE.
3999	FsCommand *FsCommand `json:"fsCommand,omitempty"`
4000
4001	// HtmlCode: HTML code for the creative. This is a required field when
4002	// applicable. This field is ignored if htmlCodeLocked is true.
4003	// Applicable to the following creative types: all CUSTOM, FLASH_INPAGE,
4004	// and HTML5_BANNER, and all RICH_MEDIA.
4005	HtmlCode string `json:"htmlCode,omitempty"`
4006
4007	// HtmlCodeLocked: Whether HTML code is generated by Campaign Manager or
4008	// manually entered. Set to true to ignore changes to htmlCode.
4009	// Applicable to the following creative types: FLASH_INPAGE and
4010	// HTML5_BANNER.
4011	HtmlCodeLocked bool `json:"htmlCodeLocked,omitempty"`
4012
4013	// Id: ID of this creative. This is a read-only, auto-generated field.
4014	// Applicable to all creative types.
4015	Id int64 `json:"id,omitempty,string"`
4016
4017	// IdDimensionValue: Dimension value for the ID of this creative. This
4018	// is a read-only field. Applicable to all creative types.
4019	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4020
4021	// Kind: Identifies what kind of resource this is. Value: the fixed
4022	// string "dfareporting#creative".
4023	Kind string `json:"kind,omitempty"`
4024
4025	// LastModifiedInfo: Creative last modification information. This is a
4026	// read-only field. Applicable to all creative types.
4027	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
4028
4029	// LatestTraffickedCreativeId: Latest Studio trafficked creative ID
4030	// associated with rich media and VPAID creatives. This is a read-only
4031	// field. Applicable to the following creative types: all RICH_MEDIA,
4032	// and all VPAID.
4033	LatestTraffickedCreativeId int64 `json:"latestTraffickedCreativeId,omitempty,string"`
4034
4035	// MediaDescription: Description of the audio or video ad. Applicable to
4036	// the following creative types: all INSTREAM_VIDEO, INSTREAM_AUDIO, and
4037	// all VPAID.
4038	MediaDescription string `json:"mediaDescription,omitempty"`
4039
4040	// MediaDuration: Creative audio or video duration in seconds. This is a
4041	// read-only field. Applicable to the following creative types:
4042	// INSTREAM_VIDEO, INSTREAM_AUDIO, all RICH_MEDIA, and all VPAID.
4043	MediaDuration float64 `json:"mediaDuration,omitempty"`
4044
4045	// Name: Name of the creative. This is a required field and must be less
4046	// than 256 characters long. Applicable to all creative types.
4047	Name string `json:"name,omitempty"`
4048
4049	// OverrideCss: Override CSS value for rich media creatives. Applicable
4050	// to the following creative types: all RICH_MEDIA.
4051	OverrideCss string `json:"overrideCss,omitempty"`
4052
4053	// ProgressOffset: Amount of time to play the video before counting a
4054	// view. Applicable to the following creative types: all INSTREAM_VIDEO.
4055	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
4056
4057	// RedirectUrl: URL of hosted image or hosted video or another ad tag.
4058	// For INSTREAM_VIDEO_REDIRECT creatives this is the in-stream video
4059	// redirect URL. The standard for a VAST (Video Ad Serving Template) ad
4060	// response allows for a redirect link to another VAST 2.0 or 3.0 call.
4061	// This is a required field when applicable. Applicable to the following
4062	// creative types: DISPLAY_REDIRECT, INTERNAL_REDIRECT,
4063	// INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO_REDIRECT
4064	RedirectUrl string `json:"redirectUrl,omitempty"`
4065
4066	// RenderingId: ID of current rendering version. This is a read-only
4067	// field. Applicable to all creative types.
4068	RenderingId int64 `json:"renderingId,omitempty,string"`
4069
4070	// RenderingIdDimensionValue: Dimension value for the rendering ID of
4071	// this creative. This is a read-only field. Applicable to all creative
4072	// types.
4073	RenderingIdDimensionValue *DimensionValue `json:"renderingIdDimensionValue,omitempty"`
4074
4075	// RequiredFlashPluginVersion: The minimum required Flash plugin version
4076	// for this creative. For example, 11.2.202.235. This is a read-only
4077	// field. Applicable to the following creative types: all RICH_MEDIA,
4078	// and all VPAID.
4079	RequiredFlashPluginVersion string `json:"requiredFlashPluginVersion,omitempty"`
4080
4081	// RequiredFlashVersion: The internal Flash version for this creative as
4082	// calculated by Studio. This is a read-only field. Applicable to the
4083	// following creative types: FLASH_INPAGE all RICH_MEDIA, and all VPAID.
4084	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
4085	RequiredFlashVersion int64 `json:"requiredFlashVersion,omitempty"`
4086
4087	// Size: Size associated with this creative. When inserting or updating
4088	// a creative either the size ID field or size width and height fields
4089	// can be used. This is a required field when applicable; however for
4090	// IMAGE, FLASH_INPAGE creatives, and for DISPLAY creatives with a
4091	// primary asset of type HTML_IMAGE, if left blank, this field will be
4092	// automatically set using the actual size of the associated image
4093	// assets. Applicable to the following creative types: DISPLAY,
4094	// DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all
4095	// RICH_MEDIA.
4096	Size *Size `json:"size,omitempty"`
4097
4098	// SkipOffset: Amount of time to play the video before the skip button
4099	// appears. Applicable to the following creative types: all
4100	// INSTREAM_VIDEO.
4101	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
4102
4103	// Skippable: Whether the user can choose to skip the creative.
4104	// Applicable to the following creative types: all INSTREAM_VIDEO and
4105	// all VPAID.
4106	Skippable bool `json:"skippable,omitempty"`
4107
4108	// SslCompliant: Whether the creative is SSL-compliant. This is a
4109	// read-only field. Applicable to all creative types.
4110	SslCompliant bool `json:"sslCompliant,omitempty"`
4111
4112	// SslOverride: Whether creative should be treated as SSL compliant even
4113	// if the system scan shows it's not. Applicable to all creative types.
4114	SslOverride bool `json:"sslOverride,omitempty"`
4115
4116	// StudioAdvertiserId: Studio advertiser ID associated with rich media
4117	// and VPAID creatives. This is a read-only field. Applicable to the
4118	// following creative types: all RICH_MEDIA, and all VPAID.
4119	StudioAdvertiserId int64 `json:"studioAdvertiserId,omitempty,string"`
4120
4121	// StudioCreativeId: Studio creative ID associated with rich media and
4122	// VPAID creatives. This is a read-only field. Applicable to the
4123	// following creative types: all RICH_MEDIA, and all VPAID.
4124	StudioCreativeId int64 `json:"studioCreativeId,omitempty,string"`
4125
4126	// StudioTraffickedCreativeId: Studio trafficked creative ID associated
4127	// with rich media and VPAID creatives. This is a read-only field.
4128	// Applicable to the following creative types: all RICH_MEDIA, and all
4129	// VPAID.
4130	StudioTraffickedCreativeId int64 `json:"studioTraffickedCreativeId,omitempty,string"`
4131
4132	// SubaccountId: Subaccount ID of this creative. This field, if left
4133	// unset, will be auto-generated for both insert and update operations.
4134	// Applicable to all creative types.
4135	SubaccountId int64 `json:"subaccountId,omitempty,string"`
4136
4137	// ThirdPartyBackupImageImpressionsUrl: Third-party URL used to record
4138	// backup image impressions. Applicable to the following creative types:
4139	// all RICH_MEDIA.
4140	ThirdPartyBackupImageImpressionsUrl string `json:"thirdPartyBackupImageImpressionsUrl,omitempty"`
4141
4142	// ThirdPartyRichMediaImpressionsUrl: Third-party URL used to record
4143	// rich media impressions. Applicable to the following creative types:
4144	// all RICH_MEDIA.
4145	ThirdPartyRichMediaImpressionsUrl string `json:"thirdPartyRichMediaImpressionsUrl,omitempty"`
4146
4147	// ThirdPartyUrls: Third-party URLs for tracking in-stream creative
4148	// events. Applicable to the following creative types: all
4149	// INSTREAM_VIDEO, all INSTREAM_AUDIO, and all VPAID.
4150	ThirdPartyUrls []*ThirdPartyTrackingUrl `json:"thirdPartyUrls,omitempty"`
4151
4152	// TimerCustomEvents: List of timer events configured for the creative.
4153	// For DISPLAY_IMAGE_GALLERY creatives, these are read-only and
4154	// auto-generated from clickTags. Applicable to the following creative
4155	// types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
4156	// Applicable to DISPLAY when the primary asset is not HTML_IMAGE.
4157	TimerCustomEvents []*CreativeCustomEvent `json:"timerCustomEvents,omitempty"`
4158
4159	// TotalFileSize: Combined size of all creative assets. This is a
4160	// read-only field. Applicable to the following creative types: all
4161	// RICH_MEDIA, and all VPAID.
4162	TotalFileSize int64 `json:"totalFileSize,omitempty,string"`
4163
4164	// Type: Type of this creative. This is a required field. Applicable to
4165	// all creative types.
4166	//
4167	// Note: FLASH_INPAGE, HTML5_BANNER, and IMAGE are only used for
4168	// existing creatives. New creatives should use DISPLAY as a replacement
4169	// for these types.
4170	//
4171	// Possible values:
4172	//   "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
4173	//   "CUSTOM_DISPLAY"
4174	//   "CUSTOM_DISPLAY_INTERSTITIAL"
4175	//   "DISPLAY"
4176	//   "DISPLAY_IMAGE_GALLERY"
4177	//   "DISPLAY_REDIRECT"
4178	//   "FLASH_INPAGE"
4179	//   "HTML5_BANNER"
4180	//   "IMAGE"
4181	//   "INSTREAM_AUDIO"
4182	//   "INSTREAM_VIDEO"
4183	//   "INSTREAM_VIDEO_REDIRECT"
4184	//   "INTERNAL_REDIRECT"
4185	//   "INTERSTITIAL_INTERNAL_REDIRECT"
4186	//   "RICH_MEDIA_DISPLAY_BANNER"
4187	//   "RICH_MEDIA_DISPLAY_EXPANDING"
4188	//   "RICH_MEDIA_DISPLAY_INTERSTITIAL"
4189	//   "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL"
4190	//   "RICH_MEDIA_IM_EXPAND"
4191	//   "RICH_MEDIA_INPAGE_FLOATING"
4192	//   "RICH_MEDIA_MOBILE_IN_APP"
4193	//   "RICH_MEDIA_PEEL_DOWN"
4194	//   "TRACKING_TEXT"
4195	//   "VPAID_LINEAR_VIDEO"
4196	//   "VPAID_NON_LINEAR_VIDEO"
4197	Type string `json:"type,omitempty"`
4198
4199	// UniversalAdId: A Universal Ad ID as per the VAST 4.0 spec. Applicable
4200	// to the following creative types: INSTREAM_AUDIO and INSTREAM_VIDEO
4201	// and VPAID.
4202	UniversalAdId *UniversalAdId `json:"universalAdId,omitempty"`
4203
4204	// Version: The version number helps you keep track of multiple versions
4205	// of your creative in your reports. The version number will always be
4206	// auto-generated during insert operations to start at 1. For tracking
4207	// creatives the version cannot be incremented and will always remain at
4208	// 1. For all other creative types the version can be incremented only
4209	// by 1 during update operations. In addition, the version will be
4210	// automatically incremented by 1 when undergoing Rich Media creative
4211	// merging. Applicable to all creative types.
4212	Version int64 `json:"version,omitempty"`
4213
4214	// ServerResponse contains the HTTP response code and headers from the
4215	// server.
4216	googleapi.ServerResponse `json:"-"`
4217
4218	// ForceSendFields is a list of field names (e.g. "AccountId") to
4219	// unconditionally include in API requests. By default, fields with
4220	// empty values are omitted from API requests. However, any non-pointer,
4221	// non-interface field appearing in ForceSendFields will be sent to the
4222	// server regardless of whether the field is empty or not. This may be
4223	// used to include empty fields in Patch requests.
4224	ForceSendFields []string `json:"-"`
4225
4226	// NullFields is a list of field names (e.g. "AccountId") to include in
4227	// API requests with the JSON null value. By default, fields with empty
4228	// values are omitted from API requests. However, any field with an
4229	// empty value appearing in NullFields will be sent to the server as
4230	// null. It is an error if a field in this list has a non-empty value.
4231	// This may be used to include null fields in Patch requests.
4232	NullFields []string `json:"-"`
4233}
4234
4235func (s *Creative) MarshalJSON() ([]byte, error) {
4236	type NoMethod Creative
4237	raw := NoMethod(*s)
4238	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4239}
4240
4241func (s *Creative) UnmarshalJSON(data []byte) error {
4242	type NoMethod Creative
4243	var s1 struct {
4244		MediaDuration gensupport.JSONFloat64 `json:"mediaDuration"`
4245		*NoMethod
4246	}
4247	s1.NoMethod = (*NoMethod)(s)
4248	if err := json.Unmarshal(data, &s1); err != nil {
4249		return err
4250	}
4251	s.MediaDuration = float64(s1.MediaDuration)
4252	return nil
4253}
4254
4255// CreativeAsset: Creative Asset.
4256type CreativeAsset struct {
4257	// ActionScript3: Whether ActionScript3 is enabled for the flash asset.
4258	// This is a read-only field. Applicable to the following creative type:
4259	// FLASH_INPAGE. Applicable to DISPLAY when the primary asset type is
4260	// not HTML_IMAGE.
4261	ActionScript3 bool `json:"actionScript3,omitempty"`
4262
4263	// Active: Whether the video or audio asset is active. This is a
4264	// read-only field for VPAID_NON_LINEAR_VIDEO assets. Applicable to the
4265	// following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and all
4266	// VPAID.
4267	Active bool `json:"active,omitempty"`
4268
4269	// AdditionalSizes: Additional sizes associated with this creative
4270	// asset. HTML5 asset generated by compatible software such as GWD will
4271	// be able to support more sizes this creative asset can render.
4272	AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
4273
4274	// Alignment: Possible alignments for an asset. This is a read-only
4275	// field. Applicable to the following creative types:
4276	// RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL.
4277	//
4278	// Possible values:
4279	//   "ALIGNMENT_BOTTOM"
4280	//   "ALIGNMENT_LEFT"
4281	//   "ALIGNMENT_RIGHT"
4282	//   "ALIGNMENT_TOP"
4283	Alignment string `json:"alignment,omitempty"`
4284
4285	// ArtworkType: Artwork type of rich media creative. This is a read-only
4286	// field. Applicable to the following creative types: all RICH_MEDIA.
4287	//
4288	// Possible values:
4289	//   "ARTWORK_TYPE_FLASH"
4290	//   "ARTWORK_TYPE_HTML5"
4291	//   "ARTWORK_TYPE_IMAGE"
4292	//   "ARTWORK_TYPE_MIXED"
4293	ArtworkType string `json:"artworkType,omitempty"`
4294
4295	// AssetIdentifier: Identifier of this asset. This is the same
4296	// identifier returned during creative asset insert operation. This is a
4297	// required field. Applicable to all but the following creative types:
4298	// all REDIRECT and TRACKING_TEXT.
4299	AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4300
4301	// BackupImageExit: Exit event configured for the backup image.
4302	// Applicable to the following creative types: all RICH_MEDIA.
4303	BackupImageExit *CreativeCustomEvent `json:"backupImageExit,omitempty"`
4304
4305	// BitRate: Detected bit-rate for audio or video asset. This is a
4306	// read-only field. Applicable to the following creative types:
4307	// INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
4308	BitRate int64 `json:"bitRate,omitempty"`
4309
4310	// ChildAssetType: Rich media child asset type. This is a read-only
4311	// field. Applicable to the following creative types: all VPAID.
4312	//
4313	// Possible values:
4314	//   "CHILD_ASSET_TYPE_DATA"
4315	//   "CHILD_ASSET_TYPE_FLASH"
4316	//   "CHILD_ASSET_TYPE_IMAGE"
4317	//   "CHILD_ASSET_TYPE_VIDEO"
4318	ChildAssetType string `json:"childAssetType,omitempty"`
4319
4320	// CollapsedSize: Size of an asset when collapsed. This is a read-only
4321	// field. Applicable to the following creative types: all RICH_MEDIA and
4322	// all VPAID. Additionally, applicable to assets whose displayType is
4323	// ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN.
4324	CollapsedSize *Size `json:"collapsedSize,omitempty"`
4325
4326	// CompanionCreativeIds: List of companion creatives assigned to an
4327	// in-stream video creative asset. Acceptable values include IDs of
4328	// existing flash and image creatives. Applicable to INSTREAM_VIDEO
4329	// creative type with dynamicAssetSelection set to true.
4330	CompanionCreativeIds googleapi.Int64s `json:"companionCreativeIds,omitempty"`
4331
4332	// CustomStartTimeValue: Custom start time in seconds for making the
4333	// asset visible. Applicable to the following creative types: all
4334	// RICH_MEDIA. Value must be greater than or equal to 0.
4335	CustomStartTimeValue int64 `json:"customStartTimeValue,omitempty"`
4336
4337	// DetectedFeatures: List of feature dependencies for the creative asset
4338	// that are detected by Campaign Manager. Feature dependencies are
4339	// features that a browser must be able to support in order to render
4340	// your HTML5 creative correctly. This is a read-only, auto-generated
4341	// field. Applicable to the following creative types: HTML5_BANNER.
4342	// Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
4343	//
4344	// Possible values:
4345	//   "APPLICATION_CACHE"
4346	//   "AUDIO"
4347	//   "CANVAS"
4348	//   "CANVAS_TEXT"
4349	//   "CSS_ANIMATIONS"
4350	//   "CSS_BACKGROUND_SIZE"
4351	//   "CSS_BORDER_IMAGE"
4352	//   "CSS_BORDER_RADIUS"
4353	//   "CSS_BOX_SHADOW"
4354	//   "CSS_COLUMNS"
4355	//   "CSS_FLEX_BOX"
4356	//   "CSS_FONT_FACE"
4357	//   "CSS_GENERATED_CONTENT"
4358	//   "CSS_GRADIENTS"
4359	//   "CSS_HSLA"
4360	//   "CSS_MULTIPLE_BGS"
4361	//   "CSS_OPACITY"
4362	//   "CSS_REFLECTIONS"
4363	//   "CSS_RGBA"
4364	//   "CSS_TEXT_SHADOW"
4365	//   "CSS_TRANSFORMS"
4366	//   "CSS_TRANSFORMS3D"
4367	//   "CSS_TRANSITIONS"
4368	//   "DRAG_AND_DROP"
4369	//   "GEO_LOCATION"
4370	//   "HASH_CHANGE"
4371	//   "HISTORY"
4372	//   "INDEXED_DB"
4373	//   "INLINE_SVG"
4374	//   "INPUT_ATTR_AUTOCOMPLETE"
4375	//   "INPUT_ATTR_AUTOFOCUS"
4376	//   "INPUT_ATTR_LIST"
4377	//   "INPUT_ATTR_MAX"
4378	//   "INPUT_ATTR_MIN"
4379	//   "INPUT_ATTR_MULTIPLE"
4380	//   "INPUT_ATTR_PATTERN"
4381	//   "INPUT_ATTR_PLACEHOLDER"
4382	//   "INPUT_ATTR_REQUIRED"
4383	//   "INPUT_ATTR_STEP"
4384	//   "INPUT_TYPE_COLOR"
4385	//   "INPUT_TYPE_DATE"
4386	//   "INPUT_TYPE_DATETIME"
4387	//   "INPUT_TYPE_DATETIME_LOCAL"
4388	//   "INPUT_TYPE_EMAIL"
4389	//   "INPUT_TYPE_MONTH"
4390	//   "INPUT_TYPE_NUMBER"
4391	//   "INPUT_TYPE_RANGE"
4392	//   "INPUT_TYPE_SEARCH"
4393	//   "INPUT_TYPE_TEL"
4394	//   "INPUT_TYPE_TIME"
4395	//   "INPUT_TYPE_URL"
4396	//   "INPUT_TYPE_WEEK"
4397	//   "LOCAL_STORAGE"
4398	//   "POST_MESSAGE"
4399	//   "SESSION_STORAGE"
4400	//   "SMIL"
4401	//   "SVG_CLIP_PATHS"
4402	//   "SVG_FE_IMAGE"
4403	//   "SVG_FILTERS"
4404	//   "SVG_HREF"
4405	//   "TOUCH"
4406	//   "VIDEO"
4407	//   "WEBGL"
4408	//   "WEB_SOCKETS"
4409	//   "WEB_SQL_DATABASE"
4410	//   "WEB_WORKERS"
4411	DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4412
4413	// DisplayType: Type of rich media asset. This is a read-only field.
4414	// Applicable to the following creative types: all RICH_MEDIA.
4415	//
4416	// Possible values:
4417	//   "ASSET_DISPLAY_TYPE_BACKDROP"
4418	//   "ASSET_DISPLAY_TYPE_EXPANDING"
4419	//   "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH"
4420	//   "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH_EXPANDING"
4421	//   "ASSET_DISPLAY_TYPE_FLOATING"
4422	//   "ASSET_DISPLAY_TYPE_INPAGE"
4423	//   "ASSET_DISPLAY_TYPE_OVERLAY"
4424	//   "ASSET_DISPLAY_TYPE_PEEL_DOWN"
4425	//   "ASSET_DISPLAY_TYPE_VPAID_LINEAR"
4426	//   "ASSET_DISPLAY_TYPE_VPAID_NON_LINEAR"
4427	DisplayType string `json:"displayType,omitempty"`
4428
4429	// Duration: Duration in seconds for which an asset will be displayed.
4430	// Applicable to the following creative types: INSTREAM_AUDIO,
4431	// INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. Value must be greater than or
4432	// equal to 1.
4433	Duration int64 `json:"duration,omitempty"`
4434
4435	// DurationType: Duration type for which an asset will be displayed.
4436	// Applicable to the following creative types: all RICH_MEDIA.
4437	//
4438	// Possible values:
4439	//   "ASSET_DURATION_TYPE_AUTO"
4440	//   "ASSET_DURATION_TYPE_CUSTOM"
4441	//   "ASSET_DURATION_TYPE_NONE"
4442	DurationType string `json:"durationType,omitempty"`
4443
4444	// ExpandedDimension: Detected expanded dimension for video asset. This
4445	// is a read-only field. Applicable to the following creative types:
4446	// INSTREAM_VIDEO and all VPAID.
4447	ExpandedDimension *Size `json:"expandedDimension,omitempty"`
4448
4449	// FileSize: File size associated with this creative asset. This is a
4450	// read-only field. Applicable to all but the following creative types:
4451	// all REDIRECT and TRACKING_TEXT.
4452	FileSize int64 `json:"fileSize,omitempty,string"`
4453
4454	// FlashVersion: Flash version of the asset. This is a read-only field.
4455	// Applicable to the following creative types: FLASH_INPAGE, all
4456	// RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary
4457	// asset type is not HTML_IMAGE.
4458	FlashVersion int64 `json:"flashVersion,omitempty"`
4459
4460	// HideFlashObjects: Whether to hide Flash objects flag for an asset.
4461	// Applicable to the following creative types: all RICH_MEDIA.
4462	HideFlashObjects bool `json:"hideFlashObjects,omitempty"`
4463
4464	// HideSelectionBoxes: Whether to hide selection boxes flag for an
4465	// asset. Applicable to the following creative types: all RICH_MEDIA.
4466	HideSelectionBoxes bool `json:"hideSelectionBoxes,omitempty"`
4467
4468	// HorizontallyLocked: Whether the asset is horizontally locked. This is
4469	// a read-only field. Applicable to the following creative types: all
4470	// RICH_MEDIA.
4471	HorizontallyLocked bool `json:"horizontallyLocked,omitempty"`
4472
4473	// Id: Numeric ID of this creative asset. This is a required field and
4474	// should not be modified. Applicable to all but the following creative
4475	// types: all REDIRECT and TRACKING_TEXT.
4476	Id int64 `json:"id,omitempty,string"`
4477
4478	// IdDimensionValue: Dimension value for the ID of the asset. This is a
4479	// read-only, auto-generated field.
4480	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4481
4482	// MediaDuration: Detected duration for audio or video asset. This is a
4483	// read-only field. Applicable to the following creative types:
4484	// INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
4485	MediaDuration float64 `json:"mediaDuration,omitempty"`
4486
4487	// MimeType: Detected MIME type for audio or video asset. This is a
4488	// read-only field. Applicable to the following creative types:
4489	// INSTREAM_AUDIO, INSTREAM_VIDEO and all VPAID.
4490	MimeType string `json:"mimeType,omitempty"`
4491
4492	// Offset: Offset position for an asset in collapsed mode. This is a
4493	// read-only field. Applicable to the following creative types: all
4494	// RICH_MEDIA and all VPAID. Additionally, only applicable to assets
4495	// whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or
4496	// ASSET_DISPLAY_TYPE_PEEL_DOWN.
4497	Offset *OffsetPosition `json:"offset,omitempty"`
4498
4499	// Orientation: Orientation of video asset. This is a read-only,
4500	// auto-generated field.
4501	//
4502	// Possible values:
4503	//   "LANDSCAPE"
4504	//   "PORTRAIT"
4505	//   "SQUARE"
4506	Orientation string `json:"orientation,omitempty"`
4507
4508	// OriginalBackup: Whether the backup asset is original or changed by
4509	// the user in Campaign Manager. Applicable to the following creative
4510	// types: all RICH_MEDIA.
4511	OriginalBackup bool `json:"originalBackup,omitempty"`
4512
4513	// Position: Offset position for an asset. Applicable to the following
4514	// creative types: all RICH_MEDIA.
4515	Position *OffsetPosition `json:"position,omitempty"`
4516
4517	// PositionLeftUnit: Offset left unit for an asset. This is a read-only
4518	// field. Applicable to the following creative types: all RICH_MEDIA.
4519	//
4520	// Possible values:
4521	//   "OFFSET_UNIT_PERCENT"
4522	//   "OFFSET_UNIT_PIXEL"
4523	//   "OFFSET_UNIT_PIXEL_FROM_CENTER"
4524	PositionLeftUnit string `json:"positionLeftUnit,omitempty"`
4525
4526	// PositionTopUnit: Offset top unit for an asset. This is a read-only
4527	// field if the asset displayType is ASSET_DISPLAY_TYPE_OVERLAY.
4528	// Applicable to the following creative types: all RICH_MEDIA.
4529	//
4530	// Possible values:
4531	//   "OFFSET_UNIT_PERCENT"
4532	//   "OFFSET_UNIT_PIXEL"
4533	//   "OFFSET_UNIT_PIXEL_FROM_CENTER"
4534	PositionTopUnit string `json:"positionTopUnit,omitempty"`
4535
4536	// ProgressiveServingUrl: Progressive URL for video asset. This is a
4537	// read-only field. Applicable to the following creative types:
4538	// INSTREAM_VIDEO and all VPAID.
4539	ProgressiveServingUrl string `json:"progressiveServingUrl,omitempty"`
4540
4541	// Pushdown: Whether the asset pushes down other content. Applicable to
4542	// the following creative types: all RICH_MEDIA. Additionally, only
4543	// applicable when the asset offsets are 0, the collapsedSize.width
4544	// matches size.width, and the collapsedSize.height is less than
4545	// size.height.
4546	Pushdown bool `json:"pushdown,omitempty"`
4547
4548	// PushdownDuration: Pushdown duration in seconds for an asset.
4549	// Applicable to the following creative types: all
4550	// RICH_MEDIA.Additionally, only applicable when the asset pushdown
4551	// field is true, the offsets are 0, the collapsedSize.width matches
4552	// size.width, and the collapsedSize.height is less than size.height.
4553	// Acceptable values are 0 to 9.99, inclusive.
4554	PushdownDuration float64 `json:"pushdownDuration,omitempty"`
4555
4556	// Role: Role of the asset in relation to creative. Applicable to all
4557	// but the following creative types: all REDIRECT and TRACKING_TEXT.
4558	// This is a required field.
4559	// PRIMARY applies to DISPLAY, FLASH_INPAGE, HTML5_BANNER, IMAGE,
4560	// DISPLAY_IMAGE_GALLERY, all RICH_MEDIA (which may contain multiple
4561	// primary assets), and all VPAID creatives.
4562	// BACKUP_IMAGE applies to FLASH_INPAGE, HTML5_BANNER, all RICH_MEDIA,
4563	// and all VPAID creatives. Applicable to DISPLAY when the primary asset
4564	// type is not HTML_IMAGE.
4565	// ADDITIONAL_IMAGE and ADDITIONAL_FLASH apply to FLASH_INPAGE
4566	// creatives.
4567	// OTHER refers to assets from sources other than Campaign Manager, such
4568	// as Studio uploaded assets, applicable to all RICH_MEDIA and all VPAID
4569	// creatives.
4570	// PARENT_VIDEO refers to videos uploaded by the user in Campaign
4571	// Manager and is applicable to INSTREAM_VIDEO and VPAID_LINEAR_VIDEO
4572	// creatives.
4573	// TRANSCODED_VIDEO refers to videos transcoded by Campaign Manager from
4574	// PARENT_VIDEO assets and is applicable to INSTREAM_VIDEO and
4575	// VPAID_LINEAR_VIDEO creatives.
4576	// ALTERNATE_VIDEO refers to the Campaign Manager representation of
4577	// child asset videos from Studio, and is applicable to
4578	// VPAID_LINEAR_VIDEO creatives. These cannot be added or removed within
4579	// Campaign Manager.
4580	// For VPAID_LINEAR_VIDEO creatives, PARENT_VIDEO, TRANSCODED_VIDEO and
4581	// ALTERNATE_VIDEO assets that are marked active serve as backup in case
4582	// the VPAID creative cannot be served. Only PARENT_VIDEO assets can be
4583	// added or removed for an INSTREAM_VIDEO or VPAID_LINEAR_VIDEO
4584	// creative.
4585	// PARENT_AUDIO refers to audios uploaded by the user in Campaign
4586	// Manager and is applicable to INSTREAM_AUDIO
4587	// creatives.
4588	// TRANSCODED_AUDIO refers to audios transcoded by Campaign Manager from
4589	// PARENT_AUDIO assets and is applicable to INSTREAM_AUDIO creatives.
4590	//
4591	// Possible values:
4592	//   "ADDITIONAL_FLASH"
4593	//   "ADDITIONAL_IMAGE"
4594	//   "ALTERNATE_VIDEO"
4595	//   "BACKUP_IMAGE"
4596	//   "OTHER"
4597	//   "PARENT_AUDIO"
4598	//   "PARENT_VIDEO"
4599	//   "PRIMARY"
4600	//   "TRANSCODED_AUDIO"
4601	//   "TRANSCODED_VIDEO"
4602	Role string `json:"role,omitempty"`
4603
4604	// Size: Size associated with this creative asset. This is a required
4605	// field when applicable; however for IMAGE and FLASH_INPAGE, creatives
4606	// if left blank, this field will be automatically set using the actual
4607	// size of the associated image asset. Applicable to the following
4608	// creative types: DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER,
4609	// IMAGE, and all RICH_MEDIA. Applicable to DISPLAY when the primary
4610	// asset type is not HTML_IMAGE.
4611	Size *Size `json:"size,omitempty"`
4612
4613	// SslCompliant: Whether the asset is SSL-compliant. This is a read-only
4614	// field. Applicable to all but the following creative types: all
4615	// REDIRECT and TRACKING_TEXT.
4616	SslCompliant bool `json:"sslCompliant,omitempty"`
4617
4618	// StartTimeType: Initial wait time type before making the asset
4619	// visible. Applicable to the following creative types: all RICH_MEDIA.
4620	//
4621	// Possible values:
4622	//   "ASSET_START_TIME_TYPE_CUSTOM"
4623	//   "ASSET_START_TIME_TYPE_NONE"
4624	StartTimeType string `json:"startTimeType,omitempty"`
4625
4626	// StreamingServingUrl: Streaming URL for video asset. This is a
4627	// read-only field. Applicable to the following creative types:
4628	// INSTREAM_VIDEO and all VPAID.
4629	StreamingServingUrl string `json:"streamingServingUrl,omitempty"`
4630
4631	// Transparency: Whether the asset is transparent. Applicable to the
4632	// following creative types: all RICH_MEDIA. Additionally, only
4633	// applicable to HTML5 assets.
4634	Transparency bool `json:"transparency,omitempty"`
4635
4636	// VerticallyLocked: Whether the asset is vertically locked. This is a
4637	// read-only field. Applicable to the following creative types: all
4638	// RICH_MEDIA.
4639	VerticallyLocked bool `json:"verticallyLocked,omitempty"`
4640
4641	// WindowMode: Window mode options for flash assets. Applicable to the
4642	// following creative types: FLASH_INPAGE, RICH_MEDIA_DISPLAY_EXPANDING,
4643	// RICH_MEDIA_IM_EXPAND, RICH_MEDIA_DISPLAY_BANNER, and
4644	// RICH_MEDIA_INPAGE_FLOATING.
4645	//
4646	// Possible values:
4647	//   "OPAQUE"
4648	//   "TRANSPARENT"
4649	//   "WINDOW"
4650	WindowMode string `json:"windowMode,omitempty"`
4651
4652	// ZIndex: zIndex value of an asset. Applicable to the following
4653	// creative types: all RICH_MEDIA.Additionally, only applicable to
4654	// assets whose displayType is NOT one of the following types:
4655	// ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable
4656	// values are -999999999 to 999999999, inclusive.
4657	ZIndex int64 `json:"zIndex,omitempty"`
4658
4659	// ZipFilename: File name of zip file. This is a read-only field.
4660	// Applicable to the following creative types: HTML5_BANNER.
4661	ZipFilename string `json:"zipFilename,omitempty"`
4662
4663	// ZipFilesize: Size of zip file. This is a read-only field. Applicable
4664	// to the following creative types: HTML5_BANNER.
4665	ZipFilesize string `json:"zipFilesize,omitempty"`
4666
4667	// ForceSendFields is a list of field names (e.g. "ActionScript3") to
4668	// unconditionally include in API requests. By default, fields with
4669	// empty values are omitted from API requests. However, any non-pointer,
4670	// non-interface field appearing in ForceSendFields will be sent to the
4671	// server regardless of whether the field is empty or not. This may be
4672	// used to include empty fields in Patch requests.
4673	ForceSendFields []string `json:"-"`
4674
4675	// NullFields is a list of field names (e.g. "ActionScript3") to include
4676	// in API requests with the JSON null value. By default, fields with
4677	// empty values are omitted from API requests. However, any field with
4678	// an empty value appearing in NullFields will be sent to the server as
4679	// null. It is an error if a field in this list has a non-empty value.
4680	// This may be used to include null fields in Patch requests.
4681	NullFields []string `json:"-"`
4682}
4683
4684func (s *CreativeAsset) MarshalJSON() ([]byte, error) {
4685	type NoMethod CreativeAsset
4686	raw := NoMethod(*s)
4687	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4688}
4689
4690func (s *CreativeAsset) UnmarshalJSON(data []byte) error {
4691	type NoMethod CreativeAsset
4692	var s1 struct {
4693		MediaDuration    gensupport.JSONFloat64 `json:"mediaDuration"`
4694		PushdownDuration gensupport.JSONFloat64 `json:"pushdownDuration"`
4695		*NoMethod
4696	}
4697	s1.NoMethod = (*NoMethod)(s)
4698	if err := json.Unmarshal(data, &s1); err != nil {
4699		return err
4700	}
4701	s.MediaDuration = float64(s1.MediaDuration)
4702	s.PushdownDuration = float64(s1.PushdownDuration)
4703	return nil
4704}
4705
4706// CreativeAssetId: Creative Asset ID.
4707type CreativeAssetId struct {
4708	// Name: Name of the creative asset. This is a required field while
4709	// inserting an asset. After insertion, this assetIdentifier is used to
4710	// identify the uploaded asset. Characters in the name must be
4711	// alphanumeric or one of the following: ".-_ ". Spaces are allowed.
4712	Name string `json:"name,omitempty"`
4713
4714	// Type: Type of asset to upload. This is a required field. FLASH and
4715	// IMAGE are no longer supported for new uploads. All image assets
4716	// should use HTML_IMAGE.
4717	//
4718	// Possible values:
4719	//   "AUDIO"
4720	//   "FLASH"
4721	//   "HTML"
4722	//   "HTML_IMAGE"
4723	//   "IMAGE"
4724	//   "VIDEO"
4725	Type string `json:"type,omitempty"`
4726
4727	// ForceSendFields is a list of field names (e.g. "Name") to
4728	// unconditionally include in API requests. By default, fields with
4729	// empty values are omitted from API requests. However, any non-pointer,
4730	// non-interface field appearing in ForceSendFields will be sent to the
4731	// server regardless of whether the field is empty or not. This may be
4732	// used to include empty fields in Patch requests.
4733	ForceSendFields []string `json:"-"`
4734
4735	// NullFields is a list of field names (e.g. "Name") to include in API
4736	// requests with the JSON null value. By default, fields with empty
4737	// values are omitted from API requests. However, any field with an
4738	// empty value appearing in NullFields will be sent to the server as
4739	// null. It is an error if a field in this list has a non-empty value.
4740	// This may be used to include null fields in Patch requests.
4741	NullFields []string `json:"-"`
4742}
4743
4744func (s *CreativeAssetId) MarshalJSON() ([]byte, error) {
4745	type NoMethod CreativeAssetId
4746	raw := NoMethod(*s)
4747	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4748}
4749
4750// CreativeAssetMetadata: CreativeAssets contains properties of a
4751// creative asset file which will be uploaded or has already been
4752// uploaded. Refer to the creative sample code for how to upload assets
4753// and insert a creative.
4754type CreativeAssetMetadata struct {
4755	// AssetIdentifier: ID of the creative asset. This is a required field.
4756	AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4757
4758	// ClickTags: List of detected click tags for assets. This is a
4759	// read-only auto-generated field.
4760	ClickTags []*ClickTag `json:"clickTags,omitempty"`
4761
4762	// DetectedFeatures: List of feature dependencies for the creative asset
4763	// that are detected by Campaign Manager. Feature dependencies are
4764	// features that a browser must be able to support in order to render
4765	// your HTML5 creative correctly. This is a read-only, auto-generated
4766	// field.
4767	//
4768	// Possible values:
4769	//   "APPLICATION_CACHE"
4770	//   "AUDIO"
4771	//   "CANVAS"
4772	//   "CANVAS_TEXT"
4773	//   "CSS_ANIMATIONS"
4774	//   "CSS_BACKGROUND_SIZE"
4775	//   "CSS_BORDER_IMAGE"
4776	//   "CSS_BORDER_RADIUS"
4777	//   "CSS_BOX_SHADOW"
4778	//   "CSS_COLUMNS"
4779	//   "CSS_FLEX_BOX"
4780	//   "CSS_FONT_FACE"
4781	//   "CSS_GENERATED_CONTENT"
4782	//   "CSS_GRADIENTS"
4783	//   "CSS_HSLA"
4784	//   "CSS_MULTIPLE_BGS"
4785	//   "CSS_OPACITY"
4786	//   "CSS_REFLECTIONS"
4787	//   "CSS_RGBA"
4788	//   "CSS_TEXT_SHADOW"
4789	//   "CSS_TRANSFORMS"
4790	//   "CSS_TRANSFORMS3D"
4791	//   "CSS_TRANSITIONS"
4792	//   "DRAG_AND_DROP"
4793	//   "GEO_LOCATION"
4794	//   "HASH_CHANGE"
4795	//   "HISTORY"
4796	//   "INDEXED_DB"
4797	//   "INLINE_SVG"
4798	//   "INPUT_ATTR_AUTOCOMPLETE"
4799	//   "INPUT_ATTR_AUTOFOCUS"
4800	//   "INPUT_ATTR_LIST"
4801	//   "INPUT_ATTR_MAX"
4802	//   "INPUT_ATTR_MIN"
4803	//   "INPUT_ATTR_MULTIPLE"
4804	//   "INPUT_ATTR_PATTERN"
4805	//   "INPUT_ATTR_PLACEHOLDER"
4806	//   "INPUT_ATTR_REQUIRED"
4807	//   "INPUT_ATTR_STEP"
4808	//   "INPUT_TYPE_COLOR"
4809	//   "INPUT_TYPE_DATE"
4810	//   "INPUT_TYPE_DATETIME"
4811	//   "INPUT_TYPE_DATETIME_LOCAL"
4812	//   "INPUT_TYPE_EMAIL"
4813	//   "INPUT_TYPE_MONTH"
4814	//   "INPUT_TYPE_NUMBER"
4815	//   "INPUT_TYPE_RANGE"
4816	//   "INPUT_TYPE_SEARCH"
4817	//   "INPUT_TYPE_TEL"
4818	//   "INPUT_TYPE_TIME"
4819	//   "INPUT_TYPE_URL"
4820	//   "INPUT_TYPE_WEEK"
4821	//   "LOCAL_STORAGE"
4822	//   "POST_MESSAGE"
4823	//   "SESSION_STORAGE"
4824	//   "SMIL"
4825	//   "SVG_CLIP_PATHS"
4826	//   "SVG_FE_IMAGE"
4827	//   "SVG_FILTERS"
4828	//   "SVG_HREF"
4829	//   "TOUCH"
4830	//   "VIDEO"
4831	//   "WEBGL"
4832	//   "WEB_SOCKETS"
4833	//   "WEB_SQL_DATABASE"
4834	//   "WEB_WORKERS"
4835	DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4836
4837	// Id: Numeric ID of the asset. This is a read-only, auto-generated
4838	// field.
4839	Id int64 `json:"id,omitempty,string"`
4840
4841	// IdDimensionValue: Dimension value for the numeric ID of the asset.
4842	// This is a read-only, auto-generated field.
4843	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4844
4845	// Kind: Identifies what kind of resource this is. Value: the fixed
4846	// string "dfareporting#creativeAssetMetadata".
4847	Kind string `json:"kind,omitempty"`
4848
4849	// WarnedValidationRules: Rules validated during code generation that
4850	// generated a warning. This is a read-only, auto-generated
4851	// field.
4852	//
4853	// Possible values are:
4854	// - "ADMOB_REFERENCED"
4855	// - "ASSET_FORMAT_UNSUPPORTED_DCM"
4856	// - "ASSET_INVALID"
4857	// - "CLICK_TAG_HARD_CODED"
4858	// - "CLICK_TAG_INVALID"
4859	// - "CLICK_TAG_IN_GWD"
4860	// - "CLICK_TAG_MISSING"
4861	// - "CLICK_TAG_MORE_THAN_ONE"
4862	// - "CLICK_TAG_NON_TOP_LEVEL"
4863	// - "COMPONENT_UNSUPPORTED_DCM"
4864	// - "ENABLER_UNSUPPORTED_METHOD_DCM"
4865	// - "EXTERNAL_FILE_REFERENCED"
4866	// - "FILE_DETAIL_EMPTY"
4867	// - "FILE_TYPE_INVALID"
4868	// - "GWD_PROPERTIES_INVALID"
4869	// - "HTML5_FEATURE_UNSUPPORTED"
4870	// - "LINKED_FILE_NOT_FOUND"
4871	// - "MAX_FLASH_VERSION_11"
4872	// - "MRAID_REFERENCED"
4873	// - "NOT_SSL_COMPLIANT"
4874	// - "ORPHANED_ASSET"
4875	// - "PRIMARY_HTML_MISSING"
4876	// - "SVG_INVALID"
4877	// - "ZIP_INVALID"
4878	//
4879	// Possible values:
4880	//   "ADMOB_REFERENCED"
4881	//   "ASSET_FORMAT_UNSUPPORTED_DCM"
4882	//   "ASSET_INVALID"
4883	//   "CLICK_TAG_HARD_CODED"
4884	//   "CLICK_TAG_INVALID"
4885	//   "CLICK_TAG_IN_GWD"
4886	//   "CLICK_TAG_MISSING"
4887	//   "CLICK_TAG_MORE_THAN_ONE"
4888	//   "CLICK_TAG_NON_TOP_LEVEL"
4889	//   "COMPONENT_UNSUPPORTED_DCM"
4890	//   "ENABLER_UNSUPPORTED_METHOD_DCM"
4891	//   "EXTERNAL_FILE_REFERENCED"
4892	//   "FILE_DETAIL_EMPTY"
4893	//   "FILE_TYPE_INVALID"
4894	//   "GWD_PROPERTIES_INVALID"
4895	//   "HTML5_FEATURE_UNSUPPORTED"
4896	//   "LINKED_FILE_NOT_FOUND"
4897	//   "MAX_FLASH_VERSION_11"
4898	//   "MRAID_REFERENCED"
4899	//   "NOT_SSL_COMPLIANT"
4900	//   "ORPHANED_ASSET"
4901	//   "PRIMARY_HTML_MISSING"
4902	//   "SVG_INVALID"
4903	//   "ZIP_INVALID"
4904	WarnedValidationRules []string `json:"warnedValidationRules,omitempty"`
4905
4906	// ServerResponse contains the HTTP response code and headers from the
4907	// server.
4908	googleapi.ServerResponse `json:"-"`
4909
4910	// ForceSendFields is a list of field names (e.g. "AssetIdentifier") to
4911	// unconditionally include in API requests. By default, fields with
4912	// empty values are omitted from API requests. However, any non-pointer,
4913	// non-interface field appearing in ForceSendFields will be sent to the
4914	// server regardless of whether the field is empty or not. This may be
4915	// used to include empty fields in Patch requests.
4916	ForceSendFields []string `json:"-"`
4917
4918	// NullFields is a list of field names (e.g. "AssetIdentifier") to
4919	// include in API requests with the JSON null value. By default, fields
4920	// with empty values are omitted from API requests. However, any field
4921	// with an empty value appearing in NullFields will be sent to the
4922	// server as null. It is an error if a field in this list has a
4923	// non-empty value. This may be used to include null fields in Patch
4924	// requests.
4925	NullFields []string `json:"-"`
4926}
4927
4928func (s *CreativeAssetMetadata) MarshalJSON() ([]byte, error) {
4929	type NoMethod CreativeAssetMetadata
4930	raw := NoMethod(*s)
4931	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4932}
4933
4934// CreativeAssetSelection: Encapsulates the list of rules for asset
4935// selection and a default asset in case none of the rules match.
4936// Applicable to INSTREAM_VIDEO creatives.
4937type CreativeAssetSelection struct {
4938	// DefaultAssetId: A creativeAssets[].id. This should refer to one of
4939	// the parent assets in this creative, and will be served if none of the
4940	// rules match. This is a required field.
4941	DefaultAssetId int64 `json:"defaultAssetId,omitempty,string"`
4942
4943	// Rules: Rules determine which asset will be served to a viewer. Rules
4944	// will be evaluated in the order in which they are stored in this list.
4945	// This list must contain at least one rule. Applicable to
4946	// INSTREAM_VIDEO creatives.
4947	Rules []*Rule `json:"rules,omitempty"`
4948
4949	// ForceSendFields is a list of field names (e.g. "DefaultAssetId") to
4950	// unconditionally include in API requests. By default, fields with
4951	// empty values are omitted from API requests. However, any non-pointer,
4952	// non-interface field appearing in ForceSendFields will be sent to the
4953	// server regardless of whether the field is empty or not. This may be
4954	// used to include empty fields in Patch requests.
4955	ForceSendFields []string `json:"-"`
4956
4957	// NullFields is a list of field names (e.g. "DefaultAssetId") to
4958	// include in API requests with the JSON null value. By default, fields
4959	// with empty values are omitted from API requests. However, any field
4960	// with an empty value appearing in NullFields will be sent to the
4961	// server as null. It is an error if a field in this list has a
4962	// non-empty value. This may be used to include null fields in Patch
4963	// requests.
4964	NullFields []string `json:"-"`
4965}
4966
4967func (s *CreativeAssetSelection) MarshalJSON() ([]byte, error) {
4968	type NoMethod CreativeAssetSelection
4969	raw := NoMethod(*s)
4970	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4971}
4972
4973// CreativeAssignment: Creative Assignment.
4974type CreativeAssignment struct {
4975	// Active: Whether this creative assignment is active. When true, the
4976	// creative will be included in the ad's rotation.
4977	Active bool `json:"active,omitempty"`
4978
4979	// ApplyEventTags: Whether applicable event tags should fire when this
4980	// creative assignment is rendered. If this value is unset when the ad
4981	// is inserted or updated, it will default to true for all creative
4982	// types EXCEPT for INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT,
4983	// and INSTREAM_VIDEO.
4984	ApplyEventTags bool `json:"applyEventTags,omitempty"`
4985
4986	// ClickThroughUrl: Click-through URL of the creative assignment.
4987	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
4988
4989	// CompanionCreativeOverrides: Companion creative overrides for this
4990	// creative assignment. Applicable to video ads.
4991	CompanionCreativeOverrides []*CompanionClickThroughOverride `json:"companionCreativeOverrides,omitempty"`
4992
4993	// CreativeGroupAssignments: Creative group assignments for this
4994	// creative assignment. Only one assignment per creative group number is
4995	// allowed for a maximum of two assignments.
4996	CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
4997
4998	// CreativeId: ID of the creative to be assigned. This is a required
4999	// field.
5000	CreativeId int64 `json:"creativeId,omitempty,string"`
5001
5002	// CreativeIdDimensionValue: Dimension value for the ID of the creative.
5003	// This is a read-only, auto-generated field.
5004	CreativeIdDimensionValue *DimensionValue `json:"creativeIdDimensionValue,omitempty"`
5005
5006	// EndTime: Date and time that the assigned creative should stop
5007	// serving. Must be later than the start time.
5008	EndTime string `json:"endTime,omitempty"`
5009
5010	// RichMediaExitOverrides: Rich media exit overrides for this creative
5011	// assignment.
5012	// Applicable when the creative type is any of the following:
5013	// - DISPLAY
5014	// - RICH_MEDIA_INPAGE
5015	// - RICH_MEDIA_INPAGE_FLOATING
5016	// - RICH_MEDIA_IM_EXPAND
5017	// - RICH_MEDIA_EXPANDING
5018	// - RICH_MEDIA_INTERSTITIAL_FLOAT
5019	// - RICH_MEDIA_MOBILE_IN_APP
5020	// - RICH_MEDIA_MULTI_FLOATING
5021	// - RICH_MEDIA_PEEL_DOWN
5022	// - VPAID_LINEAR
5023	// - VPAID_NON_LINEAR
5024	RichMediaExitOverrides []*RichMediaExitOverride `json:"richMediaExitOverrides,omitempty"`
5025
5026	// Sequence: Sequence number of the creative assignment, applicable when
5027	// the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable
5028	// values are 1 to 65535, inclusive.
5029	Sequence int64 `json:"sequence,omitempty"`
5030
5031	// SslCompliant: Whether the creative to be assigned is SSL-compliant.
5032	// This is a read-only field that is auto-generated when the ad is
5033	// inserted or updated.
5034	SslCompliant bool `json:"sslCompliant,omitempty"`
5035
5036	// StartTime: Date and time that the assigned creative should start
5037	// serving.
5038	StartTime string `json:"startTime,omitempty"`
5039
5040	// Weight: Weight of the creative assignment, applicable when the
5041	// rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater
5042	// than or equal to 1.
5043	Weight int64 `json:"weight,omitempty"`
5044
5045	// ForceSendFields is a list of field names (e.g. "Active") to
5046	// unconditionally include in API requests. By default, fields with
5047	// empty values are omitted from API requests. However, any non-pointer,
5048	// non-interface field appearing in ForceSendFields will be sent to the
5049	// server regardless of whether the field is empty or not. This may be
5050	// used to include empty fields in Patch requests.
5051	ForceSendFields []string `json:"-"`
5052
5053	// NullFields is a list of field names (e.g. "Active") to include in API
5054	// requests with the JSON null value. By default, fields with empty
5055	// values are omitted from API requests. However, any field with an
5056	// empty value appearing in NullFields will be sent to the server as
5057	// null. It is an error if a field in this list has a non-empty value.
5058	// This may be used to include null fields in Patch requests.
5059	NullFields []string `json:"-"`
5060}
5061
5062func (s *CreativeAssignment) MarshalJSON() ([]byte, error) {
5063	type NoMethod CreativeAssignment
5064	raw := NoMethod(*s)
5065	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5066}
5067
5068// CreativeClickThroughUrl: Click-through URL
5069type CreativeClickThroughUrl struct {
5070	// ComputedClickThroughUrl: Read-only convenience field representing the
5071	// actual URL that will be used for this click-through. The URL is
5072	// computed as follows:
5073	// - If landingPageId is specified then that landing page's URL is
5074	// assigned to this field.
5075	// - Otherwise, the customClickThroughUrl is assigned to this field.
5076	ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
5077
5078	// CustomClickThroughUrl: Custom click-through URL. Applicable if the
5079	// landingPageId field is left unset.
5080	CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
5081
5082	// LandingPageId: ID of the landing page for the click-through URL.
5083	LandingPageId int64 `json:"landingPageId,omitempty,string"`
5084
5085	// ForceSendFields is a list of field names (e.g.
5086	// "ComputedClickThroughUrl") to unconditionally include in API
5087	// requests. By default, fields with empty values are omitted from API
5088	// requests. However, any non-pointer, non-interface field appearing in
5089	// ForceSendFields will be sent to the server regardless of whether the
5090	// field is empty or not. This may be used to include empty fields in
5091	// Patch requests.
5092	ForceSendFields []string `json:"-"`
5093
5094	// NullFields is a list of field names (e.g. "ComputedClickThroughUrl")
5095	// to include in API requests with the JSON null value. By default,
5096	// fields with empty values are omitted from API requests. However, any
5097	// field with an empty value appearing in NullFields will be sent to the
5098	// server as null. It is an error if a field in this list has a
5099	// non-empty value. This may be used to include null fields in Patch
5100	// requests.
5101	NullFields []string `json:"-"`
5102}
5103
5104func (s *CreativeClickThroughUrl) MarshalJSON() ([]byte, error) {
5105	type NoMethod CreativeClickThroughUrl
5106	raw := NoMethod(*s)
5107	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5108}
5109
5110// CreativeCustomEvent: Creative Custom Event.
5111type CreativeCustomEvent struct {
5112	// AdvertiserCustomEventId: Unique ID of this event used by Reporting
5113	// and Data Transfer. This is a read-only field.
5114	AdvertiserCustomEventId int64 `json:"advertiserCustomEventId,omitempty,string"`
5115
5116	// AdvertiserCustomEventName: User-entered name for the event.
5117	AdvertiserCustomEventName string `json:"advertiserCustomEventName,omitempty"`
5118
5119	// AdvertiserCustomEventType: Type of the event. This is a read-only
5120	// field.
5121	//
5122	// Possible values:
5123	//   "ADVERTISER_EVENT_COUNTER"
5124	//   "ADVERTISER_EVENT_EXIT"
5125	//   "ADVERTISER_EVENT_TIMER"
5126	AdvertiserCustomEventType string `json:"advertiserCustomEventType,omitempty"`
5127
5128	// ArtworkLabel: Artwork label column, used to link events in Campaign
5129	// Manager back to events in Studio. This is a required field and should
5130	// not be modified after insertion.
5131	ArtworkLabel string `json:"artworkLabel,omitempty"`
5132
5133	// ArtworkType: Artwork type used by the creative.This is a read-only
5134	// field.
5135	//
5136	// Possible values:
5137	//   "ARTWORK_TYPE_FLASH"
5138	//   "ARTWORK_TYPE_HTML5"
5139	//   "ARTWORK_TYPE_IMAGE"
5140	//   "ARTWORK_TYPE_MIXED"
5141	ArtworkType string `json:"artworkType,omitempty"`
5142
5143	// ExitClickThroughUrl: Exit click-through URL for the event. This field
5144	// is used only for exit events.
5145	ExitClickThroughUrl *CreativeClickThroughUrl `json:"exitClickThroughUrl,omitempty"`
5146
5147	// Id: ID of this event. This is a required field and should not be
5148	// modified after insertion.
5149	Id int64 `json:"id,omitempty,string"`
5150
5151	// PopupWindowProperties: Properties for rich media popup windows. This
5152	// field is used only for exit events.
5153	PopupWindowProperties *PopupWindowProperties `json:"popupWindowProperties,omitempty"`
5154
5155	// TargetType: Target type used by the event.
5156	//
5157	// Possible values:
5158	//   "TARGET_BLANK"
5159	//   "TARGET_PARENT"
5160	//   "TARGET_POPUP"
5161	//   "TARGET_SELF"
5162	//   "TARGET_TOP"
5163	TargetType string `json:"targetType,omitempty"`
5164
5165	// VideoReportingId: Video reporting ID, used to differentiate multiple
5166	// videos in a single creative. This is a read-only field.
5167	VideoReportingId string `json:"videoReportingId,omitempty"`
5168
5169	// ForceSendFields is a list of field names (e.g.
5170	// "AdvertiserCustomEventId") to unconditionally include in API
5171	// requests. By default, fields with empty values are omitted from API
5172	// requests. However, any non-pointer, non-interface field appearing in
5173	// ForceSendFields will be sent to the server regardless of whether the
5174	// field is empty or not. This may be used to include empty fields in
5175	// Patch requests.
5176	ForceSendFields []string `json:"-"`
5177
5178	// NullFields is a list of field names (e.g. "AdvertiserCustomEventId")
5179	// to include in API requests with the JSON null value. By default,
5180	// fields with empty values are omitted from API requests. However, any
5181	// field with an empty value appearing in NullFields will be sent to the
5182	// server as null. It is an error if a field in this list has a
5183	// non-empty value. This may be used to include null fields in Patch
5184	// requests.
5185	NullFields []string `json:"-"`
5186}
5187
5188func (s *CreativeCustomEvent) MarshalJSON() ([]byte, error) {
5189	type NoMethod CreativeCustomEvent
5190	raw := NoMethod(*s)
5191	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5192}
5193
5194// CreativeField: Contains properties of a creative field.
5195type CreativeField struct {
5196	// AccountId: Account ID of this creative field. This is a read-only
5197	// field that can be left blank.
5198	AccountId int64 `json:"accountId,omitempty,string"`
5199
5200	// AdvertiserId: Advertiser ID of this creative field. This is a
5201	// required field on insertion.
5202	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5203
5204	// AdvertiserIdDimensionValue: Dimension value for the ID of the
5205	// advertiser. This is a read-only, auto-generated field.
5206	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5207
5208	// Id: ID of this creative field. This is a read-only, auto-generated
5209	// field.
5210	Id int64 `json:"id,omitempty,string"`
5211
5212	// Kind: Identifies what kind of resource this is. Value: the fixed
5213	// string "dfareporting#creativeField".
5214	Kind string `json:"kind,omitempty"`
5215
5216	// Name: Name of this creative field. This is a required field and must
5217	// be less than 256 characters long and unique among creative fields of
5218	// the same advertiser.
5219	Name string `json:"name,omitempty"`
5220
5221	// SubaccountId: Subaccount ID of this creative field. This is a
5222	// read-only field that can be left blank.
5223	SubaccountId int64 `json:"subaccountId,omitempty,string"`
5224
5225	// ServerResponse contains the HTTP response code and headers from the
5226	// server.
5227	googleapi.ServerResponse `json:"-"`
5228
5229	// ForceSendFields is a list of field names (e.g. "AccountId") to
5230	// unconditionally include in API requests. By default, fields with
5231	// empty values are omitted from API requests. However, any non-pointer,
5232	// non-interface field appearing in ForceSendFields will be sent to the
5233	// server regardless of whether the field is empty or not. This may be
5234	// used to include empty fields in Patch requests.
5235	ForceSendFields []string `json:"-"`
5236
5237	// NullFields is a list of field names (e.g. "AccountId") to include in
5238	// API requests with the JSON null value. By default, fields with empty
5239	// values are omitted from API requests. However, any field with an
5240	// empty value appearing in NullFields will be sent to the server as
5241	// null. It is an error if a field in this list has a non-empty value.
5242	// This may be used to include null fields in Patch requests.
5243	NullFields []string `json:"-"`
5244}
5245
5246func (s *CreativeField) MarshalJSON() ([]byte, error) {
5247	type NoMethod CreativeField
5248	raw := NoMethod(*s)
5249	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5250}
5251
5252// CreativeFieldAssignment: Creative Field Assignment.
5253type CreativeFieldAssignment struct {
5254	// CreativeFieldId: ID of the creative field.
5255	CreativeFieldId int64 `json:"creativeFieldId,omitempty,string"`
5256
5257	// CreativeFieldValueId: ID of the creative field value.
5258	CreativeFieldValueId int64 `json:"creativeFieldValueId,omitempty,string"`
5259
5260	// ForceSendFields is a list of field names (e.g. "CreativeFieldId") to
5261	// unconditionally include in API requests. By default, fields with
5262	// empty values are omitted from API requests. However, any non-pointer,
5263	// non-interface field appearing in ForceSendFields will be sent to the
5264	// server regardless of whether the field is empty or not. This may be
5265	// used to include empty fields in Patch requests.
5266	ForceSendFields []string `json:"-"`
5267
5268	// NullFields is a list of field names (e.g. "CreativeFieldId") to
5269	// include in API requests with the JSON null value. By default, fields
5270	// with empty values are omitted from API requests. However, any field
5271	// with an empty value appearing in NullFields will be sent to the
5272	// server as null. It is an error if a field in this list has a
5273	// non-empty value. This may be used to include null fields in Patch
5274	// requests.
5275	NullFields []string `json:"-"`
5276}
5277
5278func (s *CreativeFieldAssignment) MarshalJSON() ([]byte, error) {
5279	type NoMethod CreativeFieldAssignment
5280	raw := NoMethod(*s)
5281	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5282}
5283
5284// CreativeFieldValue: Contains properties of a creative field value.
5285type CreativeFieldValue struct {
5286	// Id: ID of this creative field value. This is a read-only,
5287	// auto-generated field.
5288	Id int64 `json:"id,omitempty,string"`
5289
5290	// Kind: Identifies what kind of resource this is. Value: the fixed
5291	// string "dfareporting#creativeFieldValue".
5292	Kind string `json:"kind,omitempty"`
5293
5294	// Value: Value of this creative field value. It needs to be less than
5295	// 256 characters in length and unique per creative field.
5296	Value string `json:"value,omitempty"`
5297
5298	// ServerResponse contains the HTTP response code and headers from the
5299	// server.
5300	googleapi.ServerResponse `json:"-"`
5301
5302	// ForceSendFields is a list of field names (e.g. "Id") to
5303	// unconditionally include in API requests. By default, fields with
5304	// empty values are omitted from API requests. However, any non-pointer,
5305	// non-interface field appearing in ForceSendFields will be sent to the
5306	// server regardless of whether the field is empty or not. This may be
5307	// used to include empty fields in Patch requests.
5308	ForceSendFields []string `json:"-"`
5309
5310	// NullFields is a list of field names (e.g. "Id") to include in API
5311	// requests with the JSON null value. By default, fields with empty
5312	// values are omitted from API requests. However, any field with an
5313	// empty value appearing in NullFields will be sent to the server as
5314	// null. It is an error if a field in this list has a non-empty value.
5315	// This may be used to include null fields in Patch requests.
5316	NullFields []string `json:"-"`
5317}
5318
5319func (s *CreativeFieldValue) MarshalJSON() ([]byte, error) {
5320	type NoMethod CreativeFieldValue
5321	raw := NoMethod(*s)
5322	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5323}
5324
5325// CreativeFieldValuesListResponse: Creative Field Value List Response
5326type CreativeFieldValuesListResponse struct {
5327	// CreativeFieldValues: Creative field value collection.
5328	CreativeFieldValues []*CreativeFieldValue `json:"creativeFieldValues,omitempty"`
5329
5330	// Kind: Identifies what kind of resource this is. Value: the fixed
5331	// string "dfareporting#creativeFieldValuesListResponse".
5332	Kind string `json:"kind,omitempty"`
5333
5334	// NextPageToken: Pagination token to be used for the next list
5335	// operation.
5336	NextPageToken string `json:"nextPageToken,omitempty"`
5337
5338	// ServerResponse contains the HTTP response code and headers from the
5339	// server.
5340	googleapi.ServerResponse `json:"-"`
5341
5342	// ForceSendFields is a list of field names (e.g. "CreativeFieldValues")
5343	// to unconditionally include in API requests. By default, fields with
5344	// empty values are omitted from API requests. However, any non-pointer,
5345	// non-interface field appearing in ForceSendFields will be sent to the
5346	// server regardless of whether the field is empty or not. This may be
5347	// used to include empty fields in Patch requests.
5348	ForceSendFields []string `json:"-"`
5349
5350	// NullFields is a list of field names (e.g. "CreativeFieldValues") to
5351	// include in API requests with the JSON null value. By default, fields
5352	// with empty values are omitted from API requests. However, any field
5353	// with an empty value appearing in NullFields will be sent to the
5354	// server as null. It is an error if a field in this list has a
5355	// non-empty value. This may be used to include null fields in Patch
5356	// requests.
5357	NullFields []string `json:"-"`
5358}
5359
5360func (s *CreativeFieldValuesListResponse) MarshalJSON() ([]byte, error) {
5361	type NoMethod CreativeFieldValuesListResponse
5362	raw := NoMethod(*s)
5363	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5364}
5365
5366// CreativeFieldsListResponse: Creative Field List Response
5367type CreativeFieldsListResponse struct {
5368	// CreativeFields: Creative field collection.
5369	CreativeFields []*CreativeField `json:"creativeFields,omitempty"`
5370
5371	// Kind: Identifies what kind of resource this is. Value: the fixed
5372	// string "dfareporting#creativeFieldsListResponse".
5373	Kind string `json:"kind,omitempty"`
5374
5375	// NextPageToken: Pagination token to be used for the next list
5376	// operation.
5377	NextPageToken string `json:"nextPageToken,omitempty"`
5378
5379	// ServerResponse contains the HTTP response code and headers from the
5380	// server.
5381	googleapi.ServerResponse `json:"-"`
5382
5383	// ForceSendFields is a list of field names (e.g. "CreativeFields") to
5384	// unconditionally include in API requests. By default, fields with
5385	// empty values are omitted from API requests. However, any non-pointer,
5386	// non-interface field appearing in ForceSendFields will be sent to the
5387	// server regardless of whether the field is empty or not. This may be
5388	// used to include empty fields in Patch requests.
5389	ForceSendFields []string `json:"-"`
5390
5391	// NullFields is a list of field names (e.g. "CreativeFields") to
5392	// include in API requests with the JSON null value. By default, fields
5393	// with empty values are omitted from API requests. However, any field
5394	// with an empty value appearing in NullFields will be sent to the
5395	// server as null. It is an error if a field in this list has a
5396	// non-empty value. This may be used to include null fields in Patch
5397	// requests.
5398	NullFields []string `json:"-"`
5399}
5400
5401func (s *CreativeFieldsListResponse) MarshalJSON() ([]byte, error) {
5402	type NoMethod CreativeFieldsListResponse
5403	raw := NoMethod(*s)
5404	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5405}
5406
5407// CreativeGroup: Contains properties of a creative group.
5408type CreativeGroup struct {
5409	// AccountId: Account ID of this creative group. This is a read-only
5410	// field that can be left blank.
5411	AccountId int64 `json:"accountId,omitempty,string"`
5412
5413	// AdvertiserId: Advertiser ID of this creative group. This is a
5414	// required field on insertion.
5415	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5416
5417	// AdvertiserIdDimensionValue: Dimension value for the ID of the
5418	// advertiser. This is a read-only, auto-generated field.
5419	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5420
5421	// GroupNumber: Subgroup of the creative group. Assign your creative
5422	// groups to a subgroup in order to filter or manage them more easily.
5423	// This field is required on insertion and is read-only after insertion.
5424	// Acceptable values are 1 to 2, inclusive.
5425	GroupNumber int64 `json:"groupNumber,omitempty"`
5426
5427	// Id: ID of this creative group. This is a read-only, auto-generated
5428	// field.
5429	Id int64 `json:"id,omitempty,string"`
5430
5431	// Kind: Identifies what kind of resource this is. Value: the fixed
5432	// string "dfareporting#creativeGroup".
5433	Kind string `json:"kind,omitempty"`
5434
5435	// Name: Name of this creative group. This is a required field and must
5436	// be less than 256 characters long and unique among creative groups of
5437	// the same advertiser.
5438	Name string `json:"name,omitempty"`
5439
5440	// SubaccountId: Subaccount ID of this creative group. This is a
5441	// read-only field that can be left blank.
5442	SubaccountId int64 `json:"subaccountId,omitempty,string"`
5443
5444	// ServerResponse contains the HTTP response code and headers from the
5445	// server.
5446	googleapi.ServerResponse `json:"-"`
5447
5448	// ForceSendFields is a list of field names (e.g. "AccountId") to
5449	// unconditionally include in API requests. By default, fields with
5450	// empty values are omitted from API requests. However, any non-pointer,
5451	// non-interface field appearing in ForceSendFields will be sent to the
5452	// server regardless of whether the field is empty or not. This may be
5453	// used to include empty fields in Patch requests.
5454	ForceSendFields []string `json:"-"`
5455
5456	// NullFields is a list of field names (e.g. "AccountId") to include in
5457	// API requests with the JSON null value. By default, fields with empty
5458	// values are omitted from API requests. However, any field with an
5459	// empty value appearing in NullFields will be sent to the server as
5460	// null. It is an error if a field in this list has a non-empty value.
5461	// This may be used to include null fields in Patch requests.
5462	NullFields []string `json:"-"`
5463}
5464
5465func (s *CreativeGroup) MarshalJSON() ([]byte, error) {
5466	type NoMethod CreativeGroup
5467	raw := NoMethod(*s)
5468	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5469}
5470
5471// CreativeGroupAssignment: Creative Group Assignment.
5472type CreativeGroupAssignment struct {
5473	// CreativeGroupId: ID of the creative group to be assigned.
5474	CreativeGroupId int64 `json:"creativeGroupId,omitempty,string"`
5475
5476	// CreativeGroupNumber: Creative group number of the creative group
5477	// assignment.
5478	//
5479	// Possible values:
5480	//   "CREATIVE_GROUP_ONE"
5481	//   "CREATIVE_GROUP_TWO"
5482	CreativeGroupNumber string `json:"creativeGroupNumber,omitempty"`
5483
5484	// ForceSendFields is a list of field names (e.g. "CreativeGroupId") to
5485	// unconditionally include in API requests. By default, fields with
5486	// empty values are omitted from API requests. However, any non-pointer,
5487	// non-interface field appearing in ForceSendFields will be sent to the
5488	// server regardless of whether the field is empty or not. This may be
5489	// used to include empty fields in Patch requests.
5490	ForceSendFields []string `json:"-"`
5491
5492	// NullFields is a list of field names (e.g. "CreativeGroupId") to
5493	// include in API requests with the JSON null value. By default, fields
5494	// with empty values are omitted from API requests. However, any field
5495	// with an empty value appearing in NullFields will be sent to the
5496	// server as null. It is an error if a field in this list has a
5497	// non-empty value. This may be used to include null fields in Patch
5498	// requests.
5499	NullFields []string `json:"-"`
5500}
5501
5502func (s *CreativeGroupAssignment) MarshalJSON() ([]byte, error) {
5503	type NoMethod CreativeGroupAssignment
5504	raw := NoMethod(*s)
5505	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5506}
5507
5508// CreativeGroupsListResponse: Creative Group List Response
5509type CreativeGroupsListResponse struct {
5510	// CreativeGroups: Creative group collection.
5511	CreativeGroups []*CreativeGroup `json:"creativeGroups,omitempty"`
5512
5513	// Kind: Identifies what kind of resource this is. Value: the fixed
5514	// string "dfareporting#creativeGroupsListResponse".
5515	Kind string `json:"kind,omitempty"`
5516
5517	// NextPageToken: Pagination token to be used for the next list
5518	// operation.
5519	NextPageToken string `json:"nextPageToken,omitempty"`
5520
5521	// ServerResponse contains the HTTP response code and headers from the
5522	// server.
5523	googleapi.ServerResponse `json:"-"`
5524
5525	// ForceSendFields is a list of field names (e.g. "CreativeGroups") to
5526	// unconditionally include in API requests. By default, fields with
5527	// empty values are omitted from API requests. However, any non-pointer,
5528	// non-interface field appearing in ForceSendFields will be sent to the
5529	// server regardless of whether the field is empty or not. This may be
5530	// used to include empty fields in Patch requests.
5531	ForceSendFields []string `json:"-"`
5532
5533	// NullFields is a list of field names (e.g. "CreativeGroups") to
5534	// include in API requests with the JSON null value. By default, fields
5535	// with empty values are omitted from API requests. However, any field
5536	// with an empty value appearing in NullFields will be sent to the
5537	// server as null. It is an error if a field in this list has a
5538	// non-empty value. This may be used to include null fields in Patch
5539	// requests.
5540	NullFields []string `json:"-"`
5541}
5542
5543func (s *CreativeGroupsListResponse) MarshalJSON() ([]byte, error) {
5544	type NoMethod CreativeGroupsListResponse
5545	raw := NoMethod(*s)
5546	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5547}
5548
5549// CreativeOptimizationConfiguration: Creative optimization settings.
5550type CreativeOptimizationConfiguration struct {
5551	// Id: ID of this creative optimization config. This field is
5552	// auto-generated when the campaign is inserted or updated. It can be
5553	// null for existing campaigns.
5554	Id int64 `json:"id,omitempty,string"`
5555
5556	// Name: Name of this creative optimization config. This is a required
5557	// field and must be less than 129 characters long.
5558	Name string `json:"name,omitempty"`
5559
5560	// OptimizationActivitys: List of optimization activities associated
5561	// with this configuration.
5562	OptimizationActivitys []*OptimizationActivity `json:"optimizationActivitys,omitempty"`
5563
5564	// OptimizationModel: Optimization model for this configuration.
5565	//
5566	// Possible values:
5567	//   "CLICK"
5568	//   "POST_CLICK"
5569	//   "POST_CLICK_AND_IMPRESSION"
5570	//   "POST_IMPRESSION"
5571	//   "VIDEO_COMPLETION"
5572	OptimizationModel string `json:"optimizationModel,omitempty"`
5573
5574	// ForceSendFields is a list of field names (e.g. "Id") to
5575	// unconditionally include in API requests. By default, fields with
5576	// empty values are omitted from API requests. However, any non-pointer,
5577	// non-interface field appearing in ForceSendFields will be sent to the
5578	// server regardless of whether the field is empty or not. This may be
5579	// used to include empty fields in Patch requests.
5580	ForceSendFields []string `json:"-"`
5581
5582	// NullFields is a list of field names (e.g. "Id") to include in API
5583	// requests with the JSON null value. By default, fields with empty
5584	// values are omitted from API requests. However, any field with an
5585	// empty value appearing in NullFields will be sent to the server as
5586	// null. It is an error if a field in this list has a non-empty value.
5587	// This may be used to include null fields in Patch requests.
5588	NullFields []string `json:"-"`
5589}
5590
5591func (s *CreativeOptimizationConfiguration) MarshalJSON() ([]byte, error) {
5592	type NoMethod CreativeOptimizationConfiguration
5593	raw := NoMethod(*s)
5594	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5595}
5596
5597// CreativeRotation: Creative Rotation.
5598type CreativeRotation struct {
5599	// CreativeAssignments: Creative assignments in this creative rotation.
5600	CreativeAssignments []*CreativeAssignment `json:"creativeAssignments,omitempty"`
5601
5602	// CreativeOptimizationConfigurationId: Creative optimization
5603	// configuration that is used by this ad. It should refer to one of the
5604	// existing optimization configurations in the ad's campaign. If it is
5605	// unset or set to 0, then the campaign's default optimization
5606	// configuration will be used for this ad.
5607	CreativeOptimizationConfigurationId int64 `json:"creativeOptimizationConfigurationId,omitempty,string"`
5608
5609	// Type: Type of creative rotation. Can be used to specify whether to
5610	// use sequential or random rotation.
5611	//
5612	// Possible values:
5613	//   "CREATIVE_ROTATION_TYPE_RANDOM"
5614	//   "CREATIVE_ROTATION_TYPE_SEQUENTIAL"
5615	Type string `json:"type,omitempty"`
5616
5617	// WeightCalculationStrategy: Strategy for calculating weights. Used
5618	// with CREATIVE_ROTATION_TYPE_RANDOM.
5619	//
5620	// Possible values:
5621	//   "WEIGHT_STRATEGY_CUSTOM"
5622	//   "WEIGHT_STRATEGY_EQUAL"
5623	//   "WEIGHT_STRATEGY_HIGHEST_CTR"
5624	//   "WEIGHT_STRATEGY_OPTIMIZED"
5625	WeightCalculationStrategy string `json:"weightCalculationStrategy,omitempty"`
5626
5627	// ForceSendFields is a list of field names (e.g. "CreativeAssignments")
5628	// to unconditionally include in API requests. By default, fields with
5629	// empty values are omitted from API requests. However, any non-pointer,
5630	// non-interface field appearing in ForceSendFields will be sent to the
5631	// server regardless of whether the field is empty or not. This may be
5632	// used to include empty fields in Patch requests.
5633	ForceSendFields []string `json:"-"`
5634
5635	// NullFields is a list of field names (e.g. "CreativeAssignments") to
5636	// include in API requests with the JSON null value. By default, fields
5637	// with empty values are omitted from API requests. However, any field
5638	// with an empty value appearing in NullFields will be sent to the
5639	// server as null. It is an error if a field in this list has a
5640	// non-empty value. This may be used to include null fields in Patch
5641	// requests.
5642	NullFields []string `json:"-"`
5643}
5644
5645func (s *CreativeRotation) MarshalJSON() ([]byte, error) {
5646	type NoMethod CreativeRotation
5647	raw := NoMethod(*s)
5648	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5649}
5650
5651// CreativesListResponse: Creative List Response
5652type CreativesListResponse struct {
5653	// Creatives: Creative collection.
5654	Creatives []*Creative `json:"creatives,omitempty"`
5655
5656	// Kind: Identifies what kind of resource this is. Value: the fixed
5657	// string "dfareporting#creativesListResponse".
5658	Kind string `json:"kind,omitempty"`
5659
5660	// NextPageToken: Pagination token to be used for the next list
5661	// operation.
5662	NextPageToken string `json:"nextPageToken,omitempty"`
5663
5664	// ServerResponse contains the HTTP response code and headers from the
5665	// server.
5666	googleapi.ServerResponse `json:"-"`
5667
5668	// ForceSendFields is a list of field names (e.g. "Creatives") to
5669	// unconditionally include in API requests. By default, fields with
5670	// empty values are omitted from API requests. However, any non-pointer,
5671	// non-interface field appearing in ForceSendFields will be sent to the
5672	// server regardless of whether the field is empty or not. This may be
5673	// used to include empty fields in Patch requests.
5674	ForceSendFields []string `json:"-"`
5675
5676	// NullFields is a list of field names (e.g. "Creatives") to include in
5677	// API requests with the JSON null value. By default, fields with empty
5678	// values are omitted from API requests. However, any field with an
5679	// empty value appearing in NullFields will be sent to the server as
5680	// null. It is an error if a field in this list has a non-empty value.
5681	// This may be used to include null fields in Patch requests.
5682	NullFields []string `json:"-"`
5683}
5684
5685func (s *CreativesListResponse) MarshalJSON() ([]byte, error) {
5686	type NoMethod CreativesListResponse
5687	raw := NoMethod(*s)
5688	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5689}
5690
5691// CrossDimensionReachReportCompatibleFields: Represents fields that are
5692// compatible to be selected for a report of type
5693// "CROSS_DIMENSION_REACH".
5694type CrossDimensionReachReportCompatibleFields struct {
5695	// Breakdown: Dimensions which are compatible to be selected in the
5696	// "breakdown" section of the report.
5697	Breakdown []*Dimension `json:"breakdown,omitempty"`
5698
5699	// DimensionFilters: Dimensions which are compatible to be selected in
5700	// the "dimensionFilters" section of the report.
5701	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
5702
5703	// Kind: The kind of resource this is, in this case
5704	// dfareporting#crossDimensionReachReportCompatibleFields.
5705	Kind string `json:"kind,omitempty"`
5706
5707	// Metrics: Metrics which are compatible to be selected in the
5708	// "metricNames" section of the report.
5709	Metrics []*Metric `json:"metrics,omitempty"`
5710
5711	// OverlapMetrics: Metrics which are compatible to be selected in the
5712	// "overlapMetricNames" section of the report.
5713	OverlapMetrics []*Metric `json:"overlapMetrics,omitempty"`
5714
5715	// ForceSendFields is a list of field names (e.g. "Breakdown") to
5716	// unconditionally include in API requests. By default, fields with
5717	// empty values are omitted from API requests. However, any non-pointer,
5718	// non-interface field appearing in ForceSendFields will be sent to the
5719	// server regardless of whether the field is empty or not. This may be
5720	// used to include empty fields in Patch requests.
5721	ForceSendFields []string `json:"-"`
5722
5723	// NullFields is a list of field names (e.g. "Breakdown") to include in
5724	// API requests with the JSON null value. By default, fields with empty
5725	// values are omitted from API requests. However, any field with an
5726	// empty value appearing in NullFields will be sent to the server as
5727	// null. It is an error if a field in this list has a non-empty value.
5728	// This may be used to include null fields in Patch requests.
5729	NullFields []string `json:"-"`
5730}
5731
5732func (s *CrossDimensionReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
5733	type NoMethod CrossDimensionReachReportCompatibleFields
5734	raw := NoMethod(*s)
5735	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5736}
5737
5738// CustomFloodlightVariable: A custom floodlight variable.
5739type CustomFloodlightVariable struct {
5740	// Kind: Identifies what kind of resource this is. Value: the fixed
5741	// string "dfareporting#customFloodlightVariable".
5742	Kind string `json:"kind,omitempty"`
5743
5744	// Type: The type of custom floodlight variable to supply a value for.
5745	// These map to the "u[1-20]=" in the tags.
5746	//
5747	// Possible values:
5748	//   "U1"
5749	//   "U10"
5750	//   "U100"
5751	//   "U11"
5752	//   "U12"
5753	//   "U13"
5754	//   "U14"
5755	//   "U15"
5756	//   "U16"
5757	//   "U17"
5758	//   "U18"
5759	//   "U19"
5760	//   "U2"
5761	//   "U20"
5762	//   "U21"
5763	//   "U22"
5764	//   "U23"
5765	//   "U24"
5766	//   "U25"
5767	//   "U26"
5768	//   "U27"
5769	//   "U28"
5770	//   "U29"
5771	//   "U3"
5772	//   "U30"
5773	//   "U31"
5774	//   "U32"
5775	//   "U33"
5776	//   "U34"
5777	//   "U35"
5778	//   "U36"
5779	//   "U37"
5780	//   "U38"
5781	//   "U39"
5782	//   "U4"
5783	//   "U40"
5784	//   "U41"
5785	//   "U42"
5786	//   "U43"
5787	//   "U44"
5788	//   "U45"
5789	//   "U46"
5790	//   "U47"
5791	//   "U48"
5792	//   "U49"
5793	//   "U5"
5794	//   "U50"
5795	//   "U51"
5796	//   "U52"
5797	//   "U53"
5798	//   "U54"
5799	//   "U55"
5800	//   "U56"
5801	//   "U57"
5802	//   "U58"
5803	//   "U59"
5804	//   "U6"
5805	//   "U60"
5806	//   "U61"
5807	//   "U62"
5808	//   "U63"
5809	//   "U64"
5810	//   "U65"
5811	//   "U66"
5812	//   "U67"
5813	//   "U68"
5814	//   "U69"
5815	//   "U7"
5816	//   "U70"
5817	//   "U71"
5818	//   "U72"
5819	//   "U73"
5820	//   "U74"
5821	//   "U75"
5822	//   "U76"
5823	//   "U77"
5824	//   "U78"
5825	//   "U79"
5826	//   "U8"
5827	//   "U80"
5828	//   "U81"
5829	//   "U82"
5830	//   "U83"
5831	//   "U84"
5832	//   "U85"
5833	//   "U86"
5834	//   "U87"
5835	//   "U88"
5836	//   "U89"
5837	//   "U9"
5838	//   "U90"
5839	//   "U91"
5840	//   "U92"
5841	//   "U93"
5842	//   "U94"
5843	//   "U95"
5844	//   "U96"
5845	//   "U97"
5846	//   "U98"
5847	//   "U99"
5848	Type string `json:"type,omitempty"`
5849
5850	// Value: The value of the custom floodlight variable. The length of
5851	// string must not exceed 50 characters.
5852	Value string `json:"value,omitempty"`
5853
5854	// ForceSendFields is a list of field names (e.g. "Kind") to
5855	// unconditionally include in API requests. By default, fields with
5856	// empty values are omitted from API requests. However, any non-pointer,
5857	// non-interface field appearing in ForceSendFields will be sent to the
5858	// server regardless of whether the field is empty or not. This may be
5859	// used to include empty fields in Patch requests.
5860	ForceSendFields []string `json:"-"`
5861
5862	// NullFields is a list of field names (e.g. "Kind") to include in API
5863	// requests with the JSON null value. By default, fields with empty
5864	// values are omitted from API requests. However, any field with an
5865	// empty value appearing in NullFields will be sent to the server as
5866	// null. It is an error if a field in this list has a non-empty value.
5867	// This may be used to include null fields in Patch requests.
5868	NullFields []string `json:"-"`
5869}
5870
5871func (s *CustomFloodlightVariable) MarshalJSON() ([]byte, error) {
5872	type NoMethod CustomFloodlightVariable
5873	raw := NoMethod(*s)
5874	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5875}
5876
5877// CustomRichMediaEvents: Represents a Custom Rich Media Events group.
5878type CustomRichMediaEvents struct {
5879	// FilteredEventIds: List of custom rich media event IDs. Dimension
5880	// values must be all of type dfa:richMediaEventTypeIdAndName.
5881	FilteredEventIds []*DimensionValue `json:"filteredEventIds,omitempty"`
5882
5883	// Kind: The kind of resource this is, in this case
5884	// dfareporting#customRichMediaEvents.
5885	Kind string `json:"kind,omitempty"`
5886
5887	// ForceSendFields is a list of field names (e.g. "FilteredEventIds") to
5888	// unconditionally include in API requests. By default, fields with
5889	// empty values are omitted from API requests. However, any non-pointer,
5890	// non-interface field appearing in ForceSendFields will be sent to the
5891	// server regardless of whether the field is empty or not. This may be
5892	// used to include empty fields in Patch requests.
5893	ForceSendFields []string `json:"-"`
5894
5895	// NullFields is a list of field names (e.g. "FilteredEventIds") to
5896	// include in API requests with the JSON null value. By default, fields
5897	// with empty values are omitted from API requests. However, any field
5898	// with an empty value appearing in NullFields will be sent to the
5899	// server as null. It is an error if a field in this list has a
5900	// non-empty value. This may be used to include null fields in Patch
5901	// requests.
5902	NullFields []string `json:"-"`
5903}
5904
5905func (s *CustomRichMediaEvents) MarshalJSON() ([]byte, error) {
5906	type NoMethod CustomRichMediaEvents
5907	raw := NoMethod(*s)
5908	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5909}
5910
5911// DateRange: Represents a date range.
5912type DateRange struct {
5913	// EndDate: The end date of the date range, inclusive. A string of the
5914	// format: "yyyy-MM-dd".
5915	EndDate string `json:"endDate,omitempty"`
5916
5917	// Kind: The kind of resource this is, in this case
5918	// dfareporting#dateRange.
5919	Kind string `json:"kind,omitempty"`
5920
5921	// RelativeDateRange: The date range relative to the date of when the
5922	// report is run.
5923	//
5924	// Possible values:
5925	//   "LAST_14_DAYS"
5926	//   "LAST_24_MONTHS"
5927	//   "LAST_30_DAYS"
5928	//   "LAST_365_DAYS"
5929	//   "LAST_60_DAYS"
5930	//   "LAST_7_DAYS"
5931	//   "LAST_90_DAYS"
5932	//   "MONTH_TO_DATE"
5933	//   "PREVIOUS_MONTH"
5934	//   "PREVIOUS_QUARTER"
5935	//   "PREVIOUS_WEEK"
5936	//   "PREVIOUS_YEAR"
5937	//   "QUARTER_TO_DATE"
5938	//   "TODAY"
5939	//   "WEEK_TO_DATE"
5940	//   "YEAR_TO_DATE"
5941	//   "YESTERDAY"
5942	RelativeDateRange string `json:"relativeDateRange,omitempty"`
5943
5944	// StartDate: The start date of the date range, inclusive. A string of
5945	// the format: "yyyy-MM-dd".
5946	StartDate string `json:"startDate,omitempty"`
5947
5948	// ForceSendFields is a list of field names (e.g. "EndDate") to
5949	// unconditionally include in API requests. By default, fields with
5950	// empty values are omitted from API requests. However, any non-pointer,
5951	// non-interface field appearing in ForceSendFields will be sent to the
5952	// server regardless of whether the field is empty or not. This may be
5953	// used to include empty fields in Patch requests.
5954	ForceSendFields []string `json:"-"`
5955
5956	// NullFields is a list of field names (e.g. "EndDate") to include in
5957	// API requests with the JSON null value. By default, fields with empty
5958	// values are omitted from API requests. However, any field with an
5959	// empty value appearing in NullFields will be sent to the server as
5960	// null. It is an error if a field in this list has a non-empty value.
5961	// This may be used to include null fields in Patch requests.
5962	NullFields []string `json:"-"`
5963}
5964
5965func (s *DateRange) MarshalJSON() ([]byte, error) {
5966	type NoMethod DateRange
5967	raw := NoMethod(*s)
5968	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5969}
5970
5971// DayPartTargeting: Day Part Targeting.
5972type DayPartTargeting struct {
5973	// DaysOfWeek: Days of the week when the ad will serve.
5974	//
5975	// Acceptable values are:
5976	// - "SUNDAY"
5977	// - "MONDAY"
5978	// - "TUESDAY"
5979	// - "WEDNESDAY"
5980	// - "THURSDAY"
5981	// - "FRIDAY"
5982	// - "SATURDAY"
5983	//
5984	// Possible values:
5985	//   "FRIDAY"
5986	//   "MONDAY"
5987	//   "SATURDAY"
5988	//   "SUNDAY"
5989	//   "THURSDAY"
5990	//   "TUESDAY"
5991	//   "WEDNESDAY"
5992	DaysOfWeek []string `json:"daysOfWeek,omitempty"`
5993
5994	// HoursOfDay: Hours of the day when the ad will serve, where 0 is
5995	// midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with
5996	// days of week, in which case the ad would serve during these hours on
5997	// the specified days. For example if Monday, Wednesday, Friday are the
5998	// days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is
5999	// specified, the ad would serve Monday, Wednesdays, and Fridays at
6000	// 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive.
6001	HoursOfDay []int64 `json:"hoursOfDay,omitempty"`
6002
6003	// UserLocalTime: Whether or not to use the user's local time. If false,
6004	// the America/New York time zone applies.
6005	UserLocalTime bool `json:"userLocalTime,omitempty"`
6006
6007	// ForceSendFields is a list of field names (e.g. "DaysOfWeek") to
6008	// unconditionally include in API requests. By default, fields with
6009	// empty values are omitted from API requests. However, any non-pointer,
6010	// non-interface field appearing in ForceSendFields will be sent to the
6011	// server regardless of whether the field is empty or not. This may be
6012	// used to include empty fields in Patch requests.
6013	ForceSendFields []string `json:"-"`
6014
6015	// NullFields is a list of field names (e.g. "DaysOfWeek") to include in
6016	// API requests with the JSON null value. By default, fields with empty
6017	// values are omitted from API requests. However, any field with an
6018	// empty value appearing in NullFields will be sent to the server as
6019	// null. It is an error if a field in this list has a non-empty value.
6020	// This may be used to include null fields in Patch requests.
6021	NullFields []string `json:"-"`
6022}
6023
6024func (s *DayPartTargeting) MarshalJSON() ([]byte, error) {
6025	type NoMethod DayPartTargeting
6026	raw := NoMethod(*s)
6027	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6028}
6029
6030// DeepLink: Contains information about a landing page deep link.
6031type DeepLink struct {
6032	// AppUrl: The URL of the mobile app being linked to.
6033	AppUrl string `json:"appUrl,omitempty"`
6034
6035	// FallbackUrl: The fallback URL. This URL will be served to users who
6036	// do not have the mobile app installed.
6037	FallbackUrl string `json:"fallbackUrl,omitempty"`
6038
6039	// Kind: Identifies what kind of resource this is. Value: the fixed
6040	// string "dfareporting#deepLink".
6041	Kind string `json:"kind,omitempty"`
6042
6043	// MobileApp: The mobile app targeted by this deep link.
6044	MobileApp *MobileApp `json:"mobileApp,omitempty"`
6045
6046	// RemarketingListIds: Ads served to users on these remarketing lists
6047	// will use this deep link. Applicable when mobileApp.directory is
6048	// APPLE_APP_STORE.
6049	RemarketingListIds googleapi.Int64s `json:"remarketingListIds,omitempty"`
6050
6051	// ForceSendFields is a list of field names (e.g. "AppUrl") to
6052	// unconditionally include in API requests. By default, fields with
6053	// empty values are omitted from API requests. However, any non-pointer,
6054	// non-interface field appearing in ForceSendFields will be sent to the
6055	// server regardless of whether the field is empty or not. This may be
6056	// used to include empty fields in Patch requests.
6057	ForceSendFields []string `json:"-"`
6058
6059	// NullFields is a list of field names (e.g. "AppUrl") to include in API
6060	// requests with the JSON null value. By default, fields with empty
6061	// values are omitted from API requests. However, any field with an
6062	// empty value appearing in NullFields will be sent to the server as
6063	// null. It is an error if a field in this list has a non-empty value.
6064	// This may be used to include null fields in Patch requests.
6065	NullFields []string `json:"-"`
6066}
6067
6068func (s *DeepLink) MarshalJSON() ([]byte, error) {
6069	type NoMethod DeepLink
6070	raw := NoMethod(*s)
6071	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6072}
6073
6074// DefaultClickThroughEventTagProperties: Properties of inheriting and
6075// overriding the default click-through event tag. A campaign may
6076// override the event tag defined at the advertiser level, and an ad may
6077// also override the campaign's setting further.
6078type DefaultClickThroughEventTagProperties struct {
6079	// DefaultClickThroughEventTagId: ID of the click-through event tag to
6080	// apply to all ads in this entity's scope.
6081	DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
6082
6083	// OverrideInheritedEventTag: Whether this entity should override the
6084	// inherited default click-through event tag with its own defined value.
6085	OverrideInheritedEventTag bool `json:"overrideInheritedEventTag,omitempty"`
6086
6087	// ForceSendFields is a list of field names (e.g.
6088	// "DefaultClickThroughEventTagId") to unconditionally include in API
6089	// requests. By default, fields with empty values are omitted from API
6090	// requests. However, any non-pointer, non-interface field appearing in
6091	// ForceSendFields will be sent to the server regardless of whether the
6092	// field is empty or not. This may be used to include empty fields in
6093	// Patch requests.
6094	ForceSendFields []string `json:"-"`
6095
6096	// NullFields is a list of field names (e.g.
6097	// "DefaultClickThroughEventTagId") to include in API requests with the
6098	// JSON null value. By default, fields with empty values are omitted
6099	// from API requests. However, any field with an empty value appearing
6100	// in NullFields will be sent to the server as null. It is an error if a
6101	// field in this list has a non-empty value. This may be used to include
6102	// null fields in Patch requests.
6103	NullFields []string `json:"-"`
6104}
6105
6106func (s *DefaultClickThroughEventTagProperties) MarshalJSON() ([]byte, error) {
6107	type NoMethod DefaultClickThroughEventTagProperties
6108	raw := NoMethod(*s)
6109	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6110}
6111
6112// DeliverySchedule: Delivery Schedule.
6113type DeliverySchedule struct {
6114	// FrequencyCap: Limit on the number of times an individual user can be
6115	// served the ad within a specified period of time.
6116	FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
6117
6118	// HardCutoff: Whether or not hard cutoff is enabled. If true, the ad
6119	// will not serve after the end date and time. Otherwise the ad will
6120	// continue to be served until it has reached its delivery goals.
6121	HardCutoff bool `json:"hardCutoff,omitempty"`
6122
6123	// ImpressionRatio: Impression ratio for this ad. This ratio determines
6124	// how often each ad is served relative to the others. For example, if
6125	// ad A has an impression ratio of 1 and ad B has an impression ratio of
6126	// 3, then Campaign Manager will serve ad B three times as often as ad
6127	// A. Acceptable values are 1 to 10, inclusive.
6128	ImpressionRatio int64 `json:"impressionRatio,omitempty,string"`
6129
6130	// Priority: Serving priority of an ad, with respect to other ads. The
6131	// lower the priority number, the greater the priority with which it is
6132	// served.
6133	//
6134	// Possible values:
6135	//   "AD_PRIORITY_01"
6136	//   "AD_PRIORITY_02"
6137	//   "AD_PRIORITY_03"
6138	//   "AD_PRIORITY_04"
6139	//   "AD_PRIORITY_05"
6140	//   "AD_PRIORITY_06"
6141	//   "AD_PRIORITY_07"
6142	//   "AD_PRIORITY_08"
6143	//   "AD_PRIORITY_09"
6144	//   "AD_PRIORITY_10"
6145	//   "AD_PRIORITY_11"
6146	//   "AD_PRIORITY_12"
6147	//   "AD_PRIORITY_13"
6148	//   "AD_PRIORITY_14"
6149	//   "AD_PRIORITY_15"
6150	//   "AD_PRIORITY_16"
6151	Priority string `json:"priority,omitempty"`
6152
6153	// ForceSendFields is a list of field names (e.g. "FrequencyCap") to
6154	// unconditionally include in API requests. By default, fields with
6155	// empty values are omitted from API requests. However, any non-pointer,
6156	// non-interface field appearing in ForceSendFields will be sent to the
6157	// server regardless of whether the field is empty or not. This may be
6158	// used to include empty fields in Patch requests.
6159	ForceSendFields []string `json:"-"`
6160
6161	// NullFields is a list of field names (e.g. "FrequencyCap") to include
6162	// in API requests with the JSON null value. By default, fields with
6163	// empty values are omitted from API requests. However, any field with
6164	// an empty value appearing in NullFields will be sent to the server as
6165	// null. It is an error if a field in this list has a non-empty value.
6166	// This may be used to include null fields in Patch requests.
6167	NullFields []string `json:"-"`
6168}
6169
6170func (s *DeliverySchedule) MarshalJSON() ([]byte, error) {
6171	type NoMethod DeliverySchedule
6172	raw := NoMethod(*s)
6173	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6174}
6175
6176// DfpSettings: Google Ad Manager Settings
6177type DfpSettings struct {
6178	// DfpNetworkCode: Ad Manager network code for this directory site.
6179	DfpNetworkCode string `json:"dfpNetworkCode,omitempty"`
6180
6181	// DfpNetworkName: Ad Manager network name for this directory site.
6182	DfpNetworkName string `json:"dfpNetworkName,omitempty"`
6183
6184	// ProgrammaticPlacementAccepted: Whether this directory site accepts
6185	// programmatic placements.
6186	ProgrammaticPlacementAccepted bool `json:"programmaticPlacementAccepted,omitempty"`
6187
6188	// PubPaidPlacementAccepted: Whether this directory site accepts
6189	// publisher-paid tags.
6190	PubPaidPlacementAccepted bool `json:"pubPaidPlacementAccepted,omitempty"`
6191
6192	// PublisherPortalOnly: Whether this directory site is available only
6193	// via Publisher Portal.
6194	PublisherPortalOnly bool `json:"publisherPortalOnly,omitempty"`
6195
6196	// ForceSendFields is a list of field names (e.g. "DfpNetworkCode") to
6197	// unconditionally include in API requests. By default, fields with
6198	// empty values are omitted from API requests. However, any non-pointer,
6199	// non-interface field appearing in ForceSendFields will be sent to the
6200	// server regardless of whether the field is empty or not. This may be
6201	// used to include empty fields in Patch requests.
6202	ForceSendFields []string `json:"-"`
6203
6204	// NullFields is a list of field names (e.g. "DfpNetworkCode") to
6205	// include in API requests with the JSON null value. By default, fields
6206	// with empty values are omitted from API requests. However, any field
6207	// with an empty value appearing in NullFields will be sent to the
6208	// server as null. It is an error if a field in this list has a
6209	// non-empty value. This may be used to include null fields in Patch
6210	// requests.
6211	NullFields []string `json:"-"`
6212}
6213
6214func (s *DfpSettings) MarshalJSON() ([]byte, error) {
6215	type NoMethod DfpSettings
6216	raw := NoMethod(*s)
6217	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6218}
6219
6220// Dimension: Represents a dimension.
6221type Dimension struct {
6222	// Kind: The kind of resource this is, in this case
6223	// dfareporting#dimension.
6224	Kind string `json:"kind,omitempty"`
6225
6226	// Name: The dimension name, e.g. dfa:advertiser
6227	Name string `json:"name,omitempty"`
6228
6229	// ForceSendFields is a list of field names (e.g. "Kind") to
6230	// unconditionally include in API requests. By default, fields with
6231	// empty values are omitted from API requests. However, any non-pointer,
6232	// non-interface field appearing in ForceSendFields will be sent to the
6233	// server regardless of whether the field is empty or not. This may be
6234	// used to include empty fields in Patch requests.
6235	ForceSendFields []string `json:"-"`
6236
6237	// NullFields is a list of field names (e.g. "Kind") to include in API
6238	// requests with the JSON null value. By default, fields with empty
6239	// values are omitted from API requests. However, any field with an
6240	// empty value appearing in NullFields will be sent to the server as
6241	// null. It is an error if a field in this list has a non-empty value.
6242	// This may be used to include null fields in Patch requests.
6243	NullFields []string `json:"-"`
6244}
6245
6246func (s *Dimension) MarshalJSON() ([]byte, error) {
6247	type NoMethod Dimension
6248	raw := NoMethod(*s)
6249	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6250}
6251
6252// DimensionFilter: Represents a dimension filter.
6253type DimensionFilter struct {
6254	// DimensionName: The name of the dimension to filter.
6255	DimensionName string `json:"dimensionName,omitempty"`
6256
6257	// Kind: The kind of resource this is, in this case
6258	// dfareporting#dimensionFilter.
6259	Kind string `json:"kind,omitempty"`
6260
6261	// Value: The value of the dimension to filter.
6262	Value string `json:"value,omitempty"`
6263
6264	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6265	// unconditionally include in API requests. By default, fields with
6266	// empty values are omitted from API requests. However, any non-pointer,
6267	// non-interface field appearing in ForceSendFields will be sent to the
6268	// server regardless of whether the field is empty or not. This may be
6269	// used to include empty fields in Patch requests.
6270	ForceSendFields []string `json:"-"`
6271
6272	// NullFields is a list of field names (e.g. "DimensionName") to include
6273	// in API requests with the JSON null value. By default, fields with
6274	// empty values are omitted from API requests. However, any field with
6275	// an empty value appearing in NullFields will be sent to the server as
6276	// null. It is an error if a field in this list has a non-empty value.
6277	// This may be used to include null fields in Patch requests.
6278	NullFields []string `json:"-"`
6279}
6280
6281func (s *DimensionFilter) MarshalJSON() ([]byte, error) {
6282	type NoMethod DimensionFilter
6283	raw := NoMethod(*s)
6284	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6285}
6286
6287// DimensionValue: Represents a DimensionValue resource.
6288type DimensionValue struct {
6289	// DimensionName: The name of the dimension.
6290	DimensionName string `json:"dimensionName,omitempty"`
6291
6292	// Etag: The eTag of this response for caching purposes.
6293	Etag string `json:"etag,omitempty"`
6294
6295	// Id: The ID associated with the value if available.
6296	Id string `json:"id,omitempty"`
6297
6298	// Kind: The kind of resource this is, in this case
6299	// dfareporting#dimensionValue.
6300	Kind string `json:"kind,omitempty"`
6301
6302	// MatchType: Determines how the 'value' field is matched when
6303	// filtering. If not specified, defaults to EXACT. If set to
6304	// WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable
6305	// length character sequences, and it can be escaped with a backslash.
6306	// Note, only paid search dimensions ('dfa:paidSearch*') allow a
6307	// matchType other than EXACT.
6308	//
6309	// Possible values:
6310	//   "BEGINS_WITH"
6311	//   "CONTAINS"
6312	//   "EXACT"
6313	//   "WILDCARD_EXPRESSION"
6314	MatchType string `json:"matchType,omitempty"`
6315
6316	// Value: The value of the dimension.
6317	Value string `json:"value,omitempty"`
6318
6319	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6320	// unconditionally include in API requests. By default, fields with
6321	// empty values are omitted from API requests. However, any non-pointer,
6322	// non-interface field appearing in ForceSendFields will be sent to the
6323	// server regardless of whether the field is empty or not. This may be
6324	// used to include empty fields in Patch requests.
6325	ForceSendFields []string `json:"-"`
6326
6327	// NullFields is a list of field names (e.g. "DimensionName") to include
6328	// in API requests with the JSON null value. By default, fields with
6329	// empty values are omitted from API requests. However, any field with
6330	// an empty value appearing in NullFields will be sent to the server as
6331	// null. It is an error if a field in this list has a non-empty value.
6332	// This may be used to include null fields in Patch requests.
6333	NullFields []string `json:"-"`
6334}
6335
6336func (s *DimensionValue) MarshalJSON() ([]byte, error) {
6337	type NoMethod DimensionValue
6338	raw := NoMethod(*s)
6339	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6340}
6341
6342// DimensionValueList: Represents the list of DimensionValue resources.
6343type DimensionValueList struct {
6344	// Etag: The eTag of this response for caching purposes.
6345	Etag string `json:"etag,omitempty"`
6346
6347	// Items: The dimension values returned in this response.
6348	Items []*DimensionValue `json:"items,omitempty"`
6349
6350	// Kind: The kind of list this is, in this case
6351	// dfareporting#dimensionValueList.
6352	Kind string `json:"kind,omitempty"`
6353
6354	// NextPageToken: Continuation token used to page through dimension
6355	// values. To retrieve the next page of results, set the next request's
6356	// "pageToken" to the value of this field. The page token is only valid
6357	// for a limited amount of time and should not be persisted.
6358	NextPageToken string `json:"nextPageToken,omitempty"`
6359
6360	// ServerResponse contains the HTTP response code and headers from the
6361	// server.
6362	googleapi.ServerResponse `json:"-"`
6363
6364	// ForceSendFields is a list of field names (e.g. "Etag") to
6365	// unconditionally include in API requests. By default, fields with
6366	// empty values are omitted from API requests. However, any non-pointer,
6367	// non-interface field appearing in ForceSendFields will be sent to the
6368	// server regardless of whether the field is empty or not. This may be
6369	// used to include empty fields in Patch requests.
6370	ForceSendFields []string `json:"-"`
6371
6372	// NullFields is a list of field names (e.g. "Etag") to include in API
6373	// requests with the JSON null value. By default, fields with empty
6374	// values are omitted from API requests. However, any field with an
6375	// empty value appearing in NullFields will be sent to the server as
6376	// null. It is an error if a field in this list has a non-empty value.
6377	// This may be used to include null fields in Patch requests.
6378	NullFields []string `json:"-"`
6379}
6380
6381func (s *DimensionValueList) MarshalJSON() ([]byte, error) {
6382	type NoMethod DimensionValueList
6383	raw := NoMethod(*s)
6384	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6385}
6386
6387// DimensionValueRequest: Represents a DimensionValuesRequest.
6388type DimensionValueRequest struct {
6389	// DimensionName: The name of the dimension for which values should be
6390	// requested.
6391	DimensionName string `json:"dimensionName,omitempty"`
6392
6393	// EndDate: The end date of the date range for which to retrieve
6394	// dimension values. A string of the format "yyyy-MM-dd".
6395	EndDate string `json:"endDate,omitempty"`
6396
6397	// Filters: The list of filters by which to filter values. The filters
6398	// are ANDed.
6399	Filters []*DimensionFilter `json:"filters,omitempty"`
6400
6401	// Kind: The kind of request this is, in this case
6402	// dfareporting#dimensionValueRequest.
6403	Kind string `json:"kind,omitempty"`
6404
6405	// StartDate: The start date of the date range for which to retrieve
6406	// dimension values. A string of the format "yyyy-MM-dd".
6407	StartDate string `json:"startDate,omitempty"`
6408
6409	// ForceSendFields is a list of field names (e.g. "DimensionName") to
6410	// unconditionally include in API requests. By default, fields with
6411	// empty values are omitted from API requests. However, any non-pointer,
6412	// non-interface field appearing in ForceSendFields will be sent to the
6413	// server regardless of whether the field is empty or not. This may be
6414	// used to include empty fields in Patch requests.
6415	ForceSendFields []string `json:"-"`
6416
6417	// NullFields is a list of field names (e.g. "DimensionName") to include
6418	// in API requests with the JSON null value. By default, fields with
6419	// empty values are omitted from API requests. However, any field with
6420	// an empty value appearing in NullFields will be sent to the server as
6421	// null. It is an error if a field in this list has a non-empty value.
6422	// This may be used to include null fields in Patch requests.
6423	NullFields []string `json:"-"`
6424}
6425
6426func (s *DimensionValueRequest) MarshalJSON() ([]byte, error) {
6427	type NoMethod DimensionValueRequest
6428	raw := NoMethod(*s)
6429	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6430}
6431
6432// DirectorySite: DirectorySites contains properties of a website from
6433// the Site Directory. Sites need to be added to an account via the
6434// Sites resource before they can be assigned to a placement.
6435type DirectorySite struct {
6436	// Active: Whether this directory site is active.
6437	Active bool `json:"active,omitempty"`
6438
6439	// Id: ID of this directory site. This is a read-only, auto-generated
6440	// field.
6441	Id int64 `json:"id,omitempty,string"`
6442
6443	// IdDimensionValue: Dimension value for the ID of this directory site.
6444	// This is a read-only, auto-generated field.
6445	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
6446
6447	// InpageTagFormats: Tag types for regular placements.
6448	//
6449	// Acceptable values are:
6450	// - "STANDARD"
6451	// - "IFRAME_JAVASCRIPT_INPAGE"
6452	// - "INTERNAL_REDIRECT_INPAGE"
6453	// - "JAVASCRIPT_INPAGE"
6454	//
6455	// Possible values:
6456	//   "IFRAME_JAVASCRIPT_INPAGE"
6457	//   "INTERNAL_REDIRECT_INPAGE"
6458	//   "JAVASCRIPT_INPAGE"
6459	//   "STANDARD"
6460	InpageTagFormats []string `json:"inpageTagFormats,omitempty"`
6461
6462	// InterstitialTagFormats: Tag types for interstitial
6463	// placements.
6464	//
6465	// Acceptable values are:
6466	// - "IFRAME_JAVASCRIPT_INTERSTITIAL"
6467	// - "INTERNAL_REDIRECT_INTERSTITIAL"
6468	// - "JAVASCRIPT_INTERSTITIAL"
6469	//
6470	// Possible values:
6471	//   "IFRAME_JAVASCRIPT_INTERSTITIAL"
6472	//   "INTERNAL_REDIRECT_INTERSTITIAL"
6473	//   "JAVASCRIPT_INTERSTITIAL"
6474	InterstitialTagFormats []string `json:"interstitialTagFormats,omitempty"`
6475
6476	// Kind: Identifies what kind of resource this is. Value: the fixed
6477	// string "dfareporting#directorySite".
6478	Kind string `json:"kind,omitempty"`
6479
6480	// Name: Name of this directory site.
6481	Name string `json:"name,omitempty"`
6482
6483	// Settings: Directory site settings.
6484	Settings *DirectorySiteSettings `json:"settings,omitempty"`
6485
6486	// Url: URL of this directory site.
6487	Url string `json:"url,omitempty"`
6488
6489	// ServerResponse contains the HTTP response code and headers from the
6490	// server.
6491	googleapi.ServerResponse `json:"-"`
6492
6493	// ForceSendFields is a list of field names (e.g. "Active") to
6494	// unconditionally include in API requests. By default, fields with
6495	// empty values are omitted from API requests. However, any non-pointer,
6496	// non-interface field appearing in ForceSendFields will be sent to the
6497	// server regardless of whether the field is empty or not. This may be
6498	// used to include empty fields in Patch requests.
6499	ForceSendFields []string `json:"-"`
6500
6501	// NullFields is a list of field names (e.g. "Active") to include in API
6502	// requests with the JSON null value. By default, fields with empty
6503	// values are omitted from API requests. However, any field with an
6504	// empty value appearing in NullFields will be sent to the server as
6505	// null. It is an error if a field in this list has a non-empty value.
6506	// This may be used to include null fields in Patch requests.
6507	NullFields []string `json:"-"`
6508}
6509
6510func (s *DirectorySite) MarshalJSON() ([]byte, error) {
6511	type NoMethod DirectorySite
6512	raw := NoMethod(*s)
6513	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6514}
6515
6516// DirectorySiteSettings: Directory Site Settings
6517type DirectorySiteSettings struct {
6518	// ActiveViewOptOut: Whether this directory site has disabled active
6519	// view creatives.
6520	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
6521
6522	// DfpSettings: Directory site Ad Manager settings.
6523	DfpSettings *DfpSettings `json:"dfpSettings,omitempty"`
6524
6525	// InstreamVideoPlacementAccepted: Whether this site accepts in-stream
6526	// video ads.
6527	InstreamVideoPlacementAccepted bool `json:"instreamVideoPlacementAccepted,omitempty"`
6528
6529	// InterstitialPlacementAccepted: Whether this site accepts interstitial
6530	// ads.
6531	InterstitialPlacementAccepted bool `json:"interstitialPlacementAccepted,omitempty"`
6532
6533	// ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to
6534	// unconditionally include in API requests. By default, fields with
6535	// empty values are omitted from API requests. However, any non-pointer,
6536	// non-interface field appearing in ForceSendFields will be sent to the
6537	// server regardless of whether the field is empty or not. This may be
6538	// used to include empty fields in Patch requests.
6539	ForceSendFields []string `json:"-"`
6540
6541	// NullFields is a list of field names (e.g. "ActiveViewOptOut") to
6542	// include in API requests with the JSON null value. By default, fields
6543	// with empty values are omitted from API requests. However, any field
6544	// with an empty value appearing in NullFields will be sent to the
6545	// server as null. It is an error if a field in this list has a
6546	// non-empty value. This may be used to include null fields in Patch
6547	// requests.
6548	NullFields []string `json:"-"`
6549}
6550
6551func (s *DirectorySiteSettings) MarshalJSON() ([]byte, error) {
6552	type NoMethod DirectorySiteSettings
6553	raw := NoMethod(*s)
6554	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6555}
6556
6557// DirectorySitesListResponse: Directory Site List Response
6558type DirectorySitesListResponse struct {
6559	// DirectorySites: Directory site collection.
6560	DirectorySites []*DirectorySite `json:"directorySites,omitempty"`
6561
6562	// Kind: Identifies what kind of resource this is. Value: the fixed
6563	// string "dfareporting#directorySitesListResponse".
6564	Kind string `json:"kind,omitempty"`
6565
6566	// NextPageToken: Pagination token to be used for the next list
6567	// operation.
6568	NextPageToken string `json:"nextPageToken,omitempty"`
6569
6570	// ServerResponse contains the HTTP response code and headers from the
6571	// server.
6572	googleapi.ServerResponse `json:"-"`
6573
6574	// ForceSendFields is a list of field names (e.g. "DirectorySites") to
6575	// unconditionally include in API requests. By default, fields with
6576	// empty values are omitted from API requests. However, any non-pointer,
6577	// non-interface field appearing in ForceSendFields will be sent to the
6578	// server regardless of whether the field is empty or not. This may be
6579	// used to include empty fields in Patch requests.
6580	ForceSendFields []string `json:"-"`
6581
6582	// NullFields is a list of field names (e.g. "DirectorySites") to
6583	// include in API requests with the JSON null value. By default, fields
6584	// with empty values are omitted from API requests. However, any field
6585	// with an empty value appearing in NullFields will be sent to the
6586	// server as null. It is an error if a field in this list has a
6587	// non-empty value. This may be used to include null fields in Patch
6588	// requests.
6589	NullFields []string `json:"-"`
6590}
6591
6592func (s *DirectorySitesListResponse) MarshalJSON() ([]byte, error) {
6593	type NoMethod DirectorySitesListResponse
6594	raw := NoMethod(*s)
6595	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6596}
6597
6598// DynamicTargetingKey: Contains properties of a dynamic targeting key.
6599// Dynamic targeting keys are unique, user-friendly labels, created at
6600// the advertiser level in DCM, that can be assigned to ads, creatives,
6601// and placements and used for targeting with Studio dynamic creatives.
6602// Use these labels instead of numeric Campaign Manager IDs (such as
6603// placement IDs) to save time and avoid errors in your dynamic feeds.
6604type DynamicTargetingKey struct {
6605	// Kind: Identifies what kind of resource this is. Value: the fixed
6606	// string "dfareporting#dynamicTargetingKey".
6607	Kind string `json:"kind,omitempty"`
6608
6609	// Name: Name of this dynamic targeting key. This is a required field.
6610	// Must be less than 256 characters long and cannot contain commas. All
6611	// characters are converted to lowercase.
6612	Name string `json:"name,omitempty"`
6613
6614	// ObjectId: ID of the object of this dynamic targeting key. This is a
6615	// required field.
6616	ObjectId int64 `json:"objectId,omitempty,string"`
6617
6618	// ObjectType: Type of the object of this dynamic targeting key. This is
6619	// a required field.
6620	//
6621	// Possible values:
6622	//   "OBJECT_AD"
6623	//   "OBJECT_ADVERTISER"
6624	//   "OBJECT_CREATIVE"
6625	//   "OBJECT_PLACEMENT"
6626	ObjectType string `json:"objectType,omitempty"`
6627
6628	// ServerResponse contains the HTTP response code and headers from the
6629	// server.
6630	googleapi.ServerResponse `json:"-"`
6631
6632	// ForceSendFields is a list of field names (e.g. "Kind") to
6633	// unconditionally include in API requests. By default, fields with
6634	// empty values are omitted from API requests. However, any non-pointer,
6635	// non-interface field appearing in ForceSendFields will be sent to the
6636	// server regardless of whether the field is empty or not. This may be
6637	// used to include empty fields in Patch requests.
6638	ForceSendFields []string `json:"-"`
6639
6640	// NullFields is a list of field names (e.g. "Kind") to include in API
6641	// requests with the JSON null value. By default, fields with empty
6642	// values are omitted from API requests. However, any field with an
6643	// empty value appearing in NullFields will be sent to the server as
6644	// null. It is an error if a field in this list has a non-empty value.
6645	// This may be used to include null fields in Patch requests.
6646	NullFields []string `json:"-"`
6647}
6648
6649func (s *DynamicTargetingKey) MarshalJSON() ([]byte, error) {
6650	type NoMethod DynamicTargetingKey
6651	raw := NoMethod(*s)
6652	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6653}
6654
6655// DynamicTargetingKeysListResponse: Dynamic Targeting Key List Response
6656type DynamicTargetingKeysListResponse struct {
6657	// DynamicTargetingKeys: Dynamic targeting key collection.
6658	DynamicTargetingKeys []*DynamicTargetingKey `json:"dynamicTargetingKeys,omitempty"`
6659
6660	// Kind: Identifies what kind of resource this is. Value: the fixed
6661	// string "dfareporting#dynamicTargetingKeysListResponse".
6662	Kind string `json:"kind,omitempty"`
6663
6664	// ServerResponse contains the HTTP response code and headers from the
6665	// server.
6666	googleapi.ServerResponse `json:"-"`
6667
6668	// ForceSendFields is a list of field names (e.g.
6669	// "DynamicTargetingKeys") to unconditionally include in API requests.
6670	// By default, fields with empty values are omitted from API requests.
6671	// However, any non-pointer, non-interface field appearing in
6672	// ForceSendFields will be sent to the server regardless of whether the
6673	// field is empty or not. This may be used to include empty fields in
6674	// Patch requests.
6675	ForceSendFields []string `json:"-"`
6676
6677	// NullFields is a list of field names (e.g. "DynamicTargetingKeys") to
6678	// include in API requests with the JSON null value. By default, fields
6679	// with empty values are omitted from API requests. However, any field
6680	// with an empty value appearing in NullFields will be sent to the
6681	// server as null. It is an error if a field in this list has a
6682	// non-empty value. This may be used to include null fields in Patch
6683	// requests.
6684	NullFields []string `json:"-"`
6685}
6686
6687func (s *DynamicTargetingKeysListResponse) MarshalJSON() ([]byte, error) {
6688	type NoMethod DynamicTargetingKeysListResponse
6689	raw := NoMethod(*s)
6690	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6691}
6692
6693// EncryptionInfo: A description of how user IDs are encrypted.
6694type EncryptionInfo struct {
6695	// EncryptionEntityId: The encryption entity ID. This should match the
6696	// encryption configuration for ad serving or Data Transfer.
6697	EncryptionEntityId int64 `json:"encryptionEntityId,omitempty,string"`
6698
6699	// EncryptionEntityType: The encryption entity type. This should match
6700	// the encryption configuration for ad serving or Data Transfer.
6701	//
6702	// Possible values:
6703	//   "ADWORDS_CUSTOMER"
6704	//   "DBM_ADVERTISER"
6705	//   "DBM_PARTNER"
6706	//   "DCM_ACCOUNT"
6707	//   "DCM_ADVERTISER"
6708	//   "DFP_NETWORK_CODE"
6709	//   "ENCRYPTION_ENTITY_TYPE_UNKNOWN"
6710	EncryptionEntityType string `json:"encryptionEntityType,omitempty"`
6711
6712	// EncryptionSource: Describes whether the encrypted cookie was received
6713	// from ad serving (the %m macro) or from Data Transfer.
6714	//
6715	// Possible values:
6716	//   "AD_SERVING"
6717	//   "DATA_TRANSFER"
6718	//   "ENCRYPTION_SCOPE_UNKNOWN"
6719	EncryptionSource string `json:"encryptionSource,omitempty"`
6720
6721	// Kind: Identifies what kind of resource this is. Value: the fixed
6722	// string "dfareporting#encryptionInfo".
6723	Kind string `json:"kind,omitempty"`
6724
6725	// ForceSendFields is a list of field names (e.g. "EncryptionEntityId")
6726	// to unconditionally include in API requests. By default, fields with
6727	// empty values are omitted from API requests. However, any non-pointer,
6728	// non-interface field appearing in ForceSendFields will be sent to the
6729	// server regardless of whether the field is empty or not. This may be
6730	// used to include empty fields in Patch requests.
6731	ForceSendFields []string `json:"-"`
6732
6733	// NullFields is a list of field names (e.g. "EncryptionEntityId") to
6734	// include in API requests with the JSON null value. By default, fields
6735	// with empty values are omitted from API requests. However, any field
6736	// with an empty value appearing in NullFields will be sent to the
6737	// server as null. It is an error if a field in this list has a
6738	// non-empty value. This may be used to include null fields in Patch
6739	// requests.
6740	NullFields []string `json:"-"`
6741}
6742
6743func (s *EncryptionInfo) MarshalJSON() ([]byte, error) {
6744	type NoMethod EncryptionInfo
6745	raw := NoMethod(*s)
6746	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6747}
6748
6749// EventTag: Contains properties of an event tag.
6750type EventTag struct {
6751	// AccountId: Account ID of this event tag. This is a read-only field
6752	// that can be left blank.
6753	AccountId int64 `json:"accountId,omitempty,string"`
6754
6755	// AdvertiserId: Advertiser ID of this event tag. This field or the
6756	// campaignId field is required on insertion.
6757	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
6758
6759	// AdvertiserIdDimensionValue: Dimension value for the ID of the
6760	// advertiser. This is a read-only, auto-generated field.
6761	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
6762
6763	// CampaignId: Campaign ID of this event tag. This field or the
6764	// advertiserId field is required on insertion.
6765	CampaignId int64 `json:"campaignId,omitempty,string"`
6766
6767	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
6768	// This is a read-only, auto-generated field.
6769	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
6770
6771	// EnabledByDefault: Whether this event tag should be automatically
6772	// enabled for all of the advertiser's campaigns and ads.
6773	EnabledByDefault bool `json:"enabledByDefault,omitempty"`
6774
6775	// ExcludeFromAdxRequests: Whether to remove this event tag from ads
6776	// that are trafficked through Display & Video 360 to Ad Exchange. This
6777	// may be useful if the event tag uses a pixel that is unapproved for Ad
6778	// Exchange bids on one or more networks, such as the Google Display
6779	// Network.
6780	ExcludeFromAdxRequests bool `json:"excludeFromAdxRequests,omitempty"`
6781
6782	// Id: ID of this event tag. This is a read-only, auto-generated field.
6783	Id int64 `json:"id,omitempty,string"`
6784
6785	// Kind: Identifies what kind of resource this is. Value: the fixed
6786	// string "dfareporting#eventTag".
6787	Kind string `json:"kind,omitempty"`
6788
6789	// Name: Name of this event tag. This is a required field and must be
6790	// less than 256 characters long.
6791	Name string `json:"name,omitempty"`
6792
6793	// SiteFilterType: Site filter type for this event tag. If no type is
6794	// specified then the event tag will be applied to all sites.
6795	//
6796	// Possible values:
6797	//   "BLACKLIST"
6798	//   "WHITELIST"
6799	SiteFilterType string `json:"siteFilterType,omitempty"`
6800
6801	// SiteIds: Filter list of site IDs associated with this event tag. The
6802	// siteFilterType determines whether this is a whitelist or blacklist
6803	// filter.
6804	SiteIds googleapi.Int64s `json:"siteIds,omitempty"`
6805
6806	// SslCompliant: Whether this tag is SSL-compliant or not. This is a
6807	// read-only field.
6808	SslCompliant bool `json:"sslCompliant,omitempty"`
6809
6810	// Status: Status of this event tag. Must be ENABLED for this event tag
6811	// to fire. This is a required field.
6812	//
6813	// Possible values:
6814	//   "DISABLED"
6815	//   "ENABLED"
6816	Status string `json:"status,omitempty"`
6817
6818	// SubaccountId: Subaccount ID of this event tag. This is a read-only
6819	// field that can be left blank.
6820	SubaccountId int64 `json:"subaccountId,omitempty,string"`
6821
6822	// Type: Event tag type. Can be used to specify whether to use a
6823	// third-party pixel, a third-party JavaScript URL, or a third-party
6824	// click-through URL for either impression or click tracking. This is a
6825	// required field.
6826	//
6827	// Possible values:
6828	//   "CLICK_THROUGH_EVENT_TAG"
6829	//   "IMPRESSION_IMAGE_EVENT_TAG"
6830	//   "IMPRESSION_JAVASCRIPT_EVENT_TAG"
6831	Type string `json:"type,omitempty"`
6832
6833	// Url: Payload URL for this event tag. The URL on a click-through event
6834	// tag should have a landing page URL appended to the end of it. This
6835	// field is required on insertion.
6836	Url string `json:"url,omitempty"`
6837
6838	// UrlEscapeLevels: Number of times the landing page URL should be
6839	// URL-escaped before being appended to the click-through event tag URL.
6840	// Only applies to click-through event tags as specified by the event
6841	// tag type.
6842	UrlEscapeLevels int64 `json:"urlEscapeLevels,omitempty"`
6843
6844	// ServerResponse contains the HTTP response code and headers from the
6845	// server.
6846	googleapi.ServerResponse `json:"-"`
6847
6848	// ForceSendFields is a list of field names (e.g. "AccountId") to
6849	// unconditionally include in API requests. By default, fields with
6850	// empty values are omitted from API requests. However, any non-pointer,
6851	// non-interface field appearing in ForceSendFields will be sent to the
6852	// server regardless of whether the field is empty or not. This may be
6853	// used to include empty fields in Patch requests.
6854	ForceSendFields []string `json:"-"`
6855
6856	// NullFields is a list of field names (e.g. "AccountId") to include in
6857	// API requests with the JSON null value. By default, fields with empty
6858	// values are omitted from API requests. However, any field with an
6859	// empty value appearing in NullFields will be sent to the server as
6860	// null. It is an error if a field in this list has a non-empty value.
6861	// This may be used to include null fields in Patch requests.
6862	NullFields []string `json:"-"`
6863}
6864
6865func (s *EventTag) MarshalJSON() ([]byte, error) {
6866	type NoMethod EventTag
6867	raw := NoMethod(*s)
6868	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6869}
6870
6871// EventTagOverride: Event tag override information.
6872type EventTagOverride struct {
6873	// Enabled: Whether this override is enabled.
6874	Enabled bool `json:"enabled,omitempty"`
6875
6876	// Id: ID of this event tag override. This is a read-only,
6877	// auto-generated field.
6878	Id int64 `json:"id,omitempty,string"`
6879
6880	// ForceSendFields is a list of field names (e.g. "Enabled") to
6881	// unconditionally include in API requests. By default, fields with
6882	// empty values are omitted from API requests. However, any non-pointer,
6883	// non-interface field appearing in ForceSendFields will be sent to the
6884	// server regardless of whether the field is empty or not. This may be
6885	// used to include empty fields in Patch requests.
6886	ForceSendFields []string `json:"-"`
6887
6888	// NullFields is a list of field names (e.g. "Enabled") to include in
6889	// API requests with the JSON null value. By default, fields with empty
6890	// values are omitted from API requests. However, any field with an
6891	// empty value appearing in NullFields will be sent to the server as
6892	// null. It is an error if a field in this list has a non-empty value.
6893	// This may be used to include null fields in Patch requests.
6894	NullFields []string `json:"-"`
6895}
6896
6897func (s *EventTagOverride) MarshalJSON() ([]byte, error) {
6898	type NoMethod EventTagOverride
6899	raw := NoMethod(*s)
6900	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6901}
6902
6903// EventTagsListResponse: Event Tag List Response
6904type EventTagsListResponse struct {
6905	// EventTags: Event tag collection.
6906	EventTags []*EventTag `json:"eventTags,omitempty"`
6907
6908	// Kind: Identifies what kind of resource this is. Value: the fixed
6909	// string "dfareporting#eventTagsListResponse".
6910	Kind string `json:"kind,omitempty"`
6911
6912	// ServerResponse contains the HTTP response code and headers from the
6913	// server.
6914	googleapi.ServerResponse `json:"-"`
6915
6916	// ForceSendFields is a list of field names (e.g. "EventTags") to
6917	// unconditionally include in API requests. By default, fields with
6918	// empty values are omitted from API requests. However, any non-pointer,
6919	// non-interface field appearing in ForceSendFields will be sent to the
6920	// server regardless of whether the field is empty or not. This may be
6921	// used to include empty fields in Patch requests.
6922	ForceSendFields []string `json:"-"`
6923
6924	// NullFields is a list of field names (e.g. "EventTags") to include in
6925	// API requests with the JSON null value. By default, fields with empty
6926	// values are omitted from API requests. However, any field with an
6927	// empty value appearing in NullFields will be sent to the server as
6928	// null. It is an error if a field in this list has a non-empty value.
6929	// This may be used to include null fields in Patch requests.
6930	NullFields []string `json:"-"`
6931}
6932
6933func (s *EventTagsListResponse) MarshalJSON() ([]byte, error) {
6934	type NoMethod EventTagsListResponse
6935	raw := NoMethod(*s)
6936	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6937}
6938
6939// File: Represents a File resource. A file contains the metadata for a
6940// report run. It shows the status of the run and holds the URLs to the
6941// generated report data if the run is finished and the status is
6942// "REPORT_AVAILABLE".
6943type File struct {
6944	// DateRange: The date range for which the file has report data. The
6945	// date range will always be the absolute date range for which the
6946	// report is run.
6947	DateRange *DateRange `json:"dateRange,omitempty"`
6948
6949	// Etag: The eTag of this response for caching purposes.
6950	Etag string `json:"etag,omitempty"`
6951
6952	// FileName: The filename of the file.
6953	FileName string `json:"fileName,omitempty"`
6954
6955	// Format: The output format of the report. Only available once the file
6956	// is available.
6957	//
6958	// Possible values:
6959	//   "CSV"
6960	//   "EXCEL"
6961	Format string `json:"format,omitempty"`
6962
6963	// Id: The unique ID of this report file.
6964	Id int64 `json:"id,omitempty,string"`
6965
6966	// Kind: The kind of resource this is, in this case dfareporting#file.
6967	Kind string `json:"kind,omitempty"`
6968
6969	// LastModifiedTime: The timestamp in milliseconds since epoch when this
6970	// file was last modified.
6971	LastModifiedTime int64 `json:"lastModifiedTime,omitempty,string"`
6972
6973	// ReportId: The ID of the report this file was generated from.
6974	ReportId int64 `json:"reportId,omitempty,string"`
6975
6976	// Status: The status of the report file.
6977	//
6978	// Possible values:
6979	//   "CANCELLED"
6980	//   "FAILED"
6981	//   "PROCESSING"
6982	//   "REPORT_AVAILABLE"
6983	Status string `json:"status,omitempty"`
6984
6985	// Urls: The URLs where the completed report file can be downloaded.
6986	Urls *FileUrls `json:"urls,omitempty"`
6987
6988	// ServerResponse contains the HTTP response code and headers from the
6989	// server.
6990	googleapi.ServerResponse `json:"-"`
6991
6992	// ForceSendFields is a list of field names (e.g. "DateRange") to
6993	// unconditionally include in API requests. By default, fields with
6994	// empty values are omitted from API requests. However, any non-pointer,
6995	// non-interface field appearing in ForceSendFields will be sent to the
6996	// server regardless of whether the field is empty or not. This may be
6997	// used to include empty fields in Patch requests.
6998	ForceSendFields []string `json:"-"`
6999
7000	// NullFields is a list of field names (e.g. "DateRange") to include in
7001	// API requests with the JSON null value. By default, fields with empty
7002	// values are omitted from API requests. However, any field with an
7003	// empty value appearing in NullFields will be sent to the server as
7004	// null. It is an error if a field in this list has a non-empty value.
7005	// This may be used to include null fields in Patch requests.
7006	NullFields []string `json:"-"`
7007}
7008
7009func (s *File) MarshalJSON() ([]byte, error) {
7010	type NoMethod File
7011	raw := NoMethod(*s)
7012	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7013}
7014
7015// FileUrls: The URLs where the completed report file can be downloaded.
7016type FileUrls struct {
7017	// ApiUrl: The URL for downloading the report data through the API.
7018	ApiUrl string `json:"apiUrl,omitempty"`
7019
7020	// BrowserUrl: The URL for downloading the report data through a
7021	// browser.
7022	BrowserUrl string `json:"browserUrl,omitempty"`
7023
7024	// ForceSendFields is a list of field names (e.g. "ApiUrl") to
7025	// unconditionally include in API requests. By default, fields with
7026	// empty values are omitted from API requests. However, any non-pointer,
7027	// non-interface field appearing in ForceSendFields will be sent to the
7028	// server regardless of whether the field is empty or not. This may be
7029	// used to include empty fields in Patch requests.
7030	ForceSendFields []string `json:"-"`
7031
7032	// NullFields is a list of field names (e.g. "ApiUrl") to include in API
7033	// requests with the JSON null value. By default, fields with empty
7034	// values are omitted from API requests. However, any field with an
7035	// empty value appearing in NullFields will be sent to the server as
7036	// null. It is an error if a field in this list has a non-empty value.
7037	// This may be used to include null fields in Patch requests.
7038	NullFields []string `json:"-"`
7039}
7040
7041func (s *FileUrls) MarshalJSON() ([]byte, error) {
7042	type NoMethod FileUrls
7043	raw := NoMethod(*s)
7044	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7045}
7046
7047// FileList: Represents the list of File resources.
7048type FileList struct {
7049	// Etag: The eTag of this response for caching purposes.
7050	Etag string `json:"etag,omitempty"`
7051
7052	// Items: The files returned in this response.
7053	Items []*File `json:"items,omitempty"`
7054
7055	// Kind: The kind of list this is, in this case dfareporting#fileList.
7056	Kind string `json:"kind,omitempty"`
7057
7058	// NextPageToken: Continuation token used to page through files. To
7059	// retrieve the next page of results, set the next request's "pageToken"
7060	// to the value of this field. The page token is only valid for a
7061	// limited amount of time and should not be persisted.
7062	NextPageToken string `json:"nextPageToken,omitempty"`
7063
7064	// ServerResponse contains the HTTP response code and headers from the
7065	// server.
7066	googleapi.ServerResponse `json:"-"`
7067
7068	// ForceSendFields is a list of field names (e.g. "Etag") to
7069	// unconditionally include in API requests. By default, fields with
7070	// empty values are omitted from API requests. However, any non-pointer,
7071	// non-interface field appearing in ForceSendFields will be sent to the
7072	// server regardless of whether the field is empty or not. This may be
7073	// used to include empty fields in Patch requests.
7074	ForceSendFields []string `json:"-"`
7075
7076	// NullFields is a list of field names (e.g. "Etag") to include in API
7077	// requests with the JSON null value. By default, fields with empty
7078	// values are omitted from API requests. However, any field with an
7079	// empty value appearing in NullFields will be sent to the server as
7080	// null. It is an error if a field in this list has a non-empty value.
7081	// This may be used to include null fields in Patch requests.
7082	NullFields []string `json:"-"`
7083}
7084
7085func (s *FileList) MarshalJSON() ([]byte, error) {
7086	type NoMethod FileList
7087	raw := NoMethod(*s)
7088	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7089}
7090
7091// Flight: Flight
7092type Flight struct {
7093	// EndDate: Inventory item flight end date.
7094	EndDate string `json:"endDate,omitempty"`
7095
7096	// RateOrCost: Rate or cost of this flight.
7097	RateOrCost int64 `json:"rateOrCost,omitempty,string"`
7098
7099	// StartDate: Inventory item flight start date.
7100	StartDate string `json:"startDate,omitempty"`
7101
7102	// Units: Units of this flight.
7103	Units int64 `json:"units,omitempty,string"`
7104
7105	// ForceSendFields is a list of field names (e.g. "EndDate") to
7106	// unconditionally include in API requests. By default, fields with
7107	// empty values are omitted from API requests. However, any non-pointer,
7108	// non-interface field appearing in ForceSendFields will be sent to the
7109	// server regardless of whether the field is empty or not. This may be
7110	// used to include empty fields in Patch requests.
7111	ForceSendFields []string `json:"-"`
7112
7113	// NullFields is a list of field names (e.g. "EndDate") to include in
7114	// API requests with the JSON null value. By default, fields with empty
7115	// values are omitted from API requests. However, any field with an
7116	// empty value appearing in NullFields will be sent to the server as
7117	// null. It is an error if a field in this list has a non-empty value.
7118	// This may be used to include null fields in Patch requests.
7119	NullFields []string `json:"-"`
7120}
7121
7122func (s *Flight) MarshalJSON() ([]byte, error) {
7123	type NoMethod Flight
7124	raw := NoMethod(*s)
7125	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7126}
7127
7128// FloodlightActivitiesGenerateTagResponse: Floodlight Activity
7129// GenerateTag Response
7130type FloodlightActivitiesGenerateTagResponse struct {
7131	// FloodlightActivityTag: Generated tag for this Floodlight activity.
7132	// For global site tags, this is the event snippet.
7133	FloodlightActivityTag string `json:"floodlightActivityTag,omitempty"`
7134
7135	// GlobalSiteTagGlobalSnippet: The global snippet section of a global
7136	// site tag. The global site tag sets new cookies on your domain, which
7137	// will store a unique identifier for a user or the ad click that
7138	// brought the user to your site. Learn more.
7139	GlobalSiteTagGlobalSnippet string `json:"globalSiteTagGlobalSnippet,omitempty"`
7140
7141	// Kind: Identifies what kind of resource this is. Value: the fixed
7142	// string "dfareporting#floodlightActivitiesGenerateTagResponse".
7143	Kind string `json:"kind,omitempty"`
7144
7145	// ServerResponse contains the HTTP response code and headers from the
7146	// server.
7147	googleapi.ServerResponse `json:"-"`
7148
7149	// ForceSendFields is a list of field names (e.g.
7150	// "FloodlightActivityTag") to unconditionally include in API requests.
7151	// By default, fields with empty values are omitted from API requests.
7152	// However, any non-pointer, non-interface field appearing in
7153	// ForceSendFields will be sent to the server regardless of whether the
7154	// field is empty or not. This may be used to include empty fields in
7155	// Patch requests.
7156	ForceSendFields []string `json:"-"`
7157
7158	// NullFields is a list of field names (e.g. "FloodlightActivityTag") to
7159	// include in API requests with the JSON null value. By default, fields
7160	// with empty values are omitted from API requests. However, any field
7161	// with an empty value appearing in NullFields will be sent to the
7162	// server as null. It is an error if a field in this list has a
7163	// non-empty value. This may be used to include null fields in Patch
7164	// requests.
7165	NullFields []string `json:"-"`
7166}
7167
7168func (s *FloodlightActivitiesGenerateTagResponse) MarshalJSON() ([]byte, error) {
7169	type NoMethod FloodlightActivitiesGenerateTagResponse
7170	raw := NoMethod(*s)
7171	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7172}
7173
7174// FloodlightActivitiesListResponse: Floodlight Activity List Response
7175type FloodlightActivitiesListResponse struct {
7176	// FloodlightActivities: Floodlight activity collection.
7177	FloodlightActivities []*FloodlightActivity `json:"floodlightActivities,omitempty"`
7178
7179	// Kind: Identifies what kind of resource this is. Value: the fixed
7180	// string "dfareporting#floodlightActivitiesListResponse".
7181	Kind string `json:"kind,omitempty"`
7182
7183	// NextPageToken: Pagination token to be used for the next list
7184	// operation.
7185	NextPageToken string `json:"nextPageToken,omitempty"`
7186
7187	// ServerResponse contains the HTTP response code and headers from the
7188	// server.
7189	googleapi.ServerResponse `json:"-"`
7190
7191	// ForceSendFields is a list of field names (e.g.
7192	// "FloodlightActivities") to unconditionally include in API requests.
7193	// By default, fields with empty values are omitted from API requests.
7194	// However, any non-pointer, non-interface field appearing in
7195	// ForceSendFields will be sent to the server regardless of whether the
7196	// field is empty or not. This may be used to include empty fields in
7197	// Patch requests.
7198	ForceSendFields []string `json:"-"`
7199
7200	// NullFields is a list of field names (e.g. "FloodlightActivities") to
7201	// include in API requests with the JSON null value. By default, fields
7202	// with empty values are omitted from API requests. However, any field
7203	// with an empty value appearing in NullFields will be sent to the
7204	// server as null. It is an error if a field in this list has a
7205	// non-empty value. This may be used to include null fields in Patch
7206	// requests.
7207	NullFields []string `json:"-"`
7208}
7209
7210func (s *FloodlightActivitiesListResponse) MarshalJSON() ([]byte, error) {
7211	type NoMethod FloodlightActivitiesListResponse
7212	raw := NoMethod(*s)
7213	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7214}
7215
7216// FloodlightActivity: Contains properties of a Floodlight activity.
7217type FloodlightActivity struct {
7218	// AccountId: Account ID of this floodlight activity. This is a
7219	// read-only field that can be left blank.
7220	AccountId int64 `json:"accountId,omitempty,string"`
7221
7222	// AdvertiserId: Advertiser ID of this floodlight activity. If this
7223	// field is left blank, the value will be copied over either from the
7224	// activity group's advertiser or the existing activity's advertiser.
7225	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7226
7227	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7228	// advertiser. This is a read-only, auto-generated field.
7229	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7230
7231	// CacheBustingType: Code type used for cache busting in the generated
7232	// tag. Applicable only when floodlightActivityGroupType is COUNTER and
7233	// countingMethod is STANDARD_COUNTING or UNIQUE_COUNTING.
7234	//
7235	// Possible values:
7236	//   "ACTIVE_SERVER_PAGE"
7237	//   "COLD_FUSION"
7238	//   "JAVASCRIPT"
7239	//   "JSP"
7240	//   "PHP"
7241	CacheBustingType string `json:"cacheBustingType,omitempty"`
7242
7243	// CountingMethod: Counting method for conversions for this floodlight
7244	// activity. This is a required field.
7245	//
7246	// Possible values:
7247	//   "ITEMS_SOLD_COUNTING"
7248	//   "SESSION_COUNTING"
7249	//   "STANDARD_COUNTING"
7250	//   "TRANSACTIONS_COUNTING"
7251	//   "UNIQUE_COUNTING"
7252	CountingMethod string `json:"countingMethod,omitempty"`
7253
7254	// DefaultTags: Dynamic floodlight tags.
7255	DefaultTags []*FloodlightActivityDynamicTag `json:"defaultTags,omitempty"`
7256
7257	// ExpectedUrl: URL where this tag will be deployed. If specified, must
7258	// be less than 256 characters long.
7259	ExpectedUrl string `json:"expectedUrl,omitempty"`
7260
7261	// FloodlightActivityGroupId: Floodlight activity group ID of this
7262	// floodlight activity. This is a required field.
7263	FloodlightActivityGroupId int64 `json:"floodlightActivityGroupId,omitempty,string"`
7264
7265	// FloodlightActivityGroupName: Name of the associated floodlight
7266	// activity group. This is a read-only field.
7267	FloodlightActivityGroupName string `json:"floodlightActivityGroupName,omitempty"`
7268
7269	// FloodlightActivityGroupTagString: Tag string of the associated
7270	// floodlight activity group. This is a read-only field.
7271	FloodlightActivityGroupTagString string `json:"floodlightActivityGroupTagString,omitempty"`
7272
7273	// FloodlightActivityGroupType: Type of the associated floodlight
7274	// activity group. This is a read-only field.
7275	//
7276	// Possible values:
7277	//   "COUNTER"
7278	//   "SALE"
7279	FloodlightActivityGroupType string `json:"floodlightActivityGroupType,omitempty"`
7280
7281	// FloodlightConfigurationId: Floodlight configuration ID of this
7282	// floodlight activity. If this field is left blank, the value will be
7283	// copied over either from the activity group's floodlight configuration
7284	// or from the existing activity's floodlight configuration.
7285	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7286
7287	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
7288	// of the floodlight configuration. This is a read-only, auto-generated
7289	// field.
7290	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7291
7292	// FloodlightTagType: The type of Floodlight tag this activity will
7293	// generate. This is a required field.
7294	//
7295	// Possible values:
7296	//   "GLOBAL_SITE_TAG"
7297	//   "IFRAME"
7298	//   "IMAGE"
7299	FloodlightTagType string `json:"floodlightTagType,omitempty"`
7300
7301	// Id: ID of this floodlight activity. This is a read-only,
7302	// auto-generated field.
7303	Id int64 `json:"id,omitempty,string"`
7304
7305	// IdDimensionValue: Dimension value for the ID of this floodlight
7306	// activity. This is a read-only, auto-generated field.
7307	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7308
7309	// Kind: Identifies what kind of resource this is. Value: the fixed
7310	// string "dfareporting#floodlightActivity".
7311	Kind string `json:"kind,omitempty"`
7312
7313	// Name: Name of this floodlight activity. This is a required field.
7314	// Must be less than 129 characters long and cannot contain quotes.
7315	Name string `json:"name,omitempty"`
7316
7317	// Notes: General notes or implementation instructions for the tag.
7318	Notes string `json:"notes,omitempty"`
7319
7320	// PublisherTags: Publisher dynamic floodlight tags.
7321	PublisherTags []*FloodlightActivityPublisherDynamicTag `json:"publisherTags,omitempty"`
7322
7323	// Secure: Whether this tag should use SSL.
7324	Secure bool `json:"secure,omitempty"`
7325
7326	// SslCompliant: Whether the floodlight activity is SSL-compliant. This
7327	// is a read-only field, its value detected by the system from the
7328	// floodlight tags.
7329	SslCompliant bool `json:"sslCompliant,omitempty"`
7330
7331	// SslRequired: Whether this floodlight activity must be SSL-compliant.
7332	SslRequired bool `json:"sslRequired,omitempty"`
7333
7334	// SubaccountId: Subaccount ID of this floodlight activity. This is a
7335	// read-only field that can be left blank.
7336	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7337
7338	// TagFormat: Tag format type for the floodlight activity. If left
7339	// blank, the tag format will default to HTML.
7340	//
7341	// Possible values:
7342	//   "HTML"
7343	//   "XHTML"
7344	TagFormat string `json:"tagFormat,omitempty"`
7345
7346	// TagString: Value of the cat= parameter in the floodlight tag, which
7347	// the ad servers use to identify the activity. This is optional: if
7348	// empty, a new tag string will be generated for you. This string must
7349	// be 1 to 8 characters long, with valid characters being
7350	// [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique among
7351	// activities of the same activity group. This field is read-only after
7352	// insertion.
7353	TagString string `json:"tagString,omitempty"`
7354
7355	// UserDefinedVariableTypes: List of the user-defined variables used by
7356	// this conversion tag. These map to the "u[1-100]=" in the tags. Each
7357	// of these can have a user defined type.
7358	// Acceptable values are U1 to U100, inclusive.
7359	//
7360	// Possible values:
7361	//   "U1"
7362	//   "U10"
7363	//   "U100"
7364	//   "U11"
7365	//   "U12"
7366	//   "U13"
7367	//   "U14"
7368	//   "U15"
7369	//   "U16"
7370	//   "U17"
7371	//   "U18"
7372	//   "U19"
7373	//   "U2"
7374	//   "U20"
7375	//   "U21"
7376	//   "U22"
7377	//   "U23"
7378	//   "U24"
7379	//   "U25"
7380	//   "U26"
7381	//   "U27"
7382	//   "U28"
7383	//   "U29"
7384	//   "U3"
7385	//   "U30"
7386	//   "U31"
7387	//   "U32"
7388	//   "U33"
7389	//   "U34"
7390	//   "U35"
7391	//   "U36"
7392	//   "U37"
7393	//   "U38"
7394	//   "U39"
7395	//   "U4"
7396	//   "U40"
7397	//   "U41"
7398	//   "U42"
7399	//   "U43"
7400	//   "U44"
7401	//   "U45"
7402	//   "U46"
7403	//   "U47"
7404	//   "U48"
7405	//   "U49"
7406	//   "U5"
7407	//   "U50"
7408	//   "U51"
7409	//   "U52"
7410	//   "U53"
7411	//   "U54"
7412	//   "U55"
7413	//   "U56"
7414	//   "U57"
7415	//   "U58"
7416	//   "U59"
7417	//   "U6"
7418	//   "U60"
7419	//   "U61"
7420	//   "U62"
7421	//   "U63"
7422	//   "U64"
7423	//   "U65"
7424	//   "U66"
7425	//   "U67"
7426	//   "U68"
7427	//   "U69"
7428	//   "U7"
7429	//   "U70"
7430	//   "U71"
7431	//   "U72"
7432	//   "U73"
7433	//   "U74"
7434	//   "U75"
7435	//   "U76"
7436	//   "U77"
7437	//   "U78"
7438	//   "U79"
7439	//   "U8"
7440	//   "U80"
7441	//   "U81"
7442	//   "U82"
7443	//   "U83"
7444	//   "U84"
7445	//   "U85"
7446	//   "U86"
7447	//   "U87"
7448	//   "U88"
7449	//   "U89"
7450	//   "U9"
7451	//   "U90"
7452	//   "U91"
7453	//   "U92"
7454	//   "U93"
7455	//   "U94"
7456	//   "U95"
7457	//   "U96"
7458	//   "U97"
7459	//   "U98"
7460	//   "U99"
7461	UserDefinedVariableTypes []string `json:"userDefinedVariableTypes,omitempty"`
7462
7463	// ServerResponse contains the HTTP response code and headers from the
7464	// server.
7465	googleapi.ServerResponse `json:"-"`
7466
7467	// ForceSendFields is a list of field names (e.g. "AccountId") to
7468	// unconditionally include in API requests. By default, fields with
7469	// empty values are omitted from API requests. However, any non-pointer,
7470	// non-interface field appearing in ForceSendFields will be sent to the
7471	// server regardless of whether the field is empty or not. This may be
7472	// used to include empty fields in Patch requests.
7473	ForceSendFields []string `json:"-"`
7474
7475	// NullFields is a list of field names (e.g. "AccountId") to include in
7476	// API requests with the JSON null value. By default, fields with empty
7477	// values are omitted from API requests. However, any field with an
7478	// empty value appearing in NullFields will be sent to the server as
7479	// null. It is an error if a field in this list has a non-empty value.
7480	// This may be used to include null fields in Patch requests.
7481	NullFields []string `json:"-"`
7482}
7483
7484func (s *FloodlightActivity) MarshalJSON() ([]byte, error) {
7485	type NoMethod FloodlightActivity
7486	raw := NoMethod(*s)
7487	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7488}
7489
7490// FloodlightActivityDynamicTag: Dynamic Tag
7491type FloodlightActivityDynamicTag struct {
7492	// Id: ID of this dynamic tag. This is a read-only, auto-generated
7493	// field.
7494	Id int64 `json:"id,omitempty,string"`
7495
7496	// Name: Name of this tag.
7497	Name string `json:"name,omitempty"`
7498
7499	// Tag: Tag code.
7500	Tag string `json:"tag,omitempty"`
7501
7502	// ForceSendFields is a list of field names (e.g. "Id") to
7503	// unconditionally include in API requests. By default, fields with
7504	// empty values are omitted from API requests. However, any non-pointer,
7505	// non-interface field appearing in ForceSendFields will be sent to the
7506	// server regardless of whether the field is empty or not. This may be
7507	// used to include empty fields in Patch requests.
7508	ForceSendFields []string `json:"-"`
7509
7510	// NullFields is a list of field names (e.g. "Id") to include in API
7511	// requests with the JSON null value. By default, fields with empty
7512	// values are omitted from API requests. However, any field with an
7513	// empty value appearing in NullFields will be sent to the server as
7514	// null. It is an error if a field in this list has a non-empty value.
7515	// This may be used to include null fields in Patch requests.
7516	NullFields []string `json:"-"`
7517}
7518
7519func (s *FloodlightActivityDynamicTag) MarshalJSON() ([]byte, error) {
7520	type NoMethod FloodlightActivityDynamicTag
7521	raw := NoMethod(*s)
7522	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7523}
7524
7525// FloodlightActivityGroup: Contains properties of a Floodlight activity
7526// group.
7527type FloodlightActivityGroup struct {
7528	// AccountId: Account ID of this floodlight activity group. This is a
7529	// read-only field that can be left blank.
7530	AccountId int64 `json:"accountId,omitempty,string"`
7531
7532	// AdvertiserId: Advertiser ID of this floodlight activity group. If
7533	// this field is left blank, the value will be copied over either from
7534	// the floodlight configuration's advertiser or from the existing
7535	// activity group's advertiser.
7536	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7537
7538	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7539	// advertiser. This is a read-only, auto-generated field.
7540	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7541
7542	// FloodlightConfigurationId: Floodlight configuration ID of this
7543	// floodlight activity group. This is a required field.
7544	FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7545
7546	// FloodlightConfigurationIdDimensionValue: Dimension value for the ID
7547	// of the floodlight configuration. This is a read-only, auto-generated
7548	// field.
7549	FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7550
7551	// Id: ID of this floodlight activity group. This is a read-only,
7552	// auto-generated field.
7553	Id int64 `json:"id,omitempty,string"`
7554
7555	// IdDimensionValue: Dimension value for the ID of this floodlight
7556	// activity group. This is a read-only, auto-generated field.
7557	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7558
7559	// Kind: Identifies what kind of resource this is. Value: the fixed
7560	// string "dfareporting#floodlightActivityGroup".
7561	Kind string `json:"kind,omitempty"`
7562
7563	// Name: Name of this floodlight activity group. This is a required
7564	// field. Must be less than 65 characters long and cannot contain
7565	// quotes.
7566	Name string `json:"name,omitempty"`
7567
7568	// SubaccountId: Subaccount ID of this floodlight activity group. This
7569	// is a read-only field that can be left blank.
7570	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7571
7572	// TagString: Value of the type= parameter in the floodlight tag, which
7573	// the ad servers use to identify the activity group that the activity
7574	// belongs to. This is optional: if empty, a new tag string will be
7575	// generated for you. This string must be 1 to 8 characters long, with
7576	// valid characters being [a-z][A-Z][0-9][-][ _ ]. This tag string must
7577	// also be unique among activity groups of the same floodlight
7578	// configuration. This field is read-only after insertion.
7579	TagString string `json:"tagString,omitempty"`
7580
7581	// Type: Type of the floodlight activity group. This is a required field
7582	// that is read-only after insertion.
7583	//
7584	// Possible values:
7585	//   "COUNTER"
7586	//   "SALE"
7587	Type string `json:"type,omitempty"`
7588
7589	// ServerResponse contains the HTTP response code and headers from the
7590	// server.
7591	googleapi.ServerResponse `json:"-"`
7592
7593	// ForceSendFields is a list of field names (e.g. "AccountId") to
7594	// unconditionally include in API requests. By default, fields with
7595	// empty values are omitted from API requests. However, any non-pointer,
7596	// non-interface field appearing in ForceSendFields will be sent to the
7597	// server regardless of whether the field is empty or not. This may be
7598	// used to include empty fields in Patch requests.
7599	ForceSendFields []string `json:"-"`
7600
7601	// NullFields is a list of field names (e.g. "AccountId") to include in
7602	// API requests with the JSON null value. By default, fields with empty
7603	// values are omitted from API requests. However, any field with an
7604	// empty value appearing in NullFields will be sent to the server as
7605	// null. It is an error if a field in this list has a non-empty value.
7606	// This may be used to include null fields in Patch requests.
7607	NullFields []string `json:"-"`
7608}
7609
7610func (s *FloodlightActivityGroup) MarshalJSON() ([]byte, error) {
7611	type NoMethod FloodlightActivityGroup
7612	raw := NoMethod(*s)
7613	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7614}
7615
7616// FloodlightActivityGroupsListResponse: Floodlight Activity Group List
7617// Response
7618type FloodlightActivityGroupsListResponse struct {
7619	// FloodlightActivityGroups: Floodlight activity group collection.
7620	FloodlightActivityGroups []*FloodlightActivityGroup `json:"floodlightActivityGroups,omitempty"`
7621
7622	// Kind: Identifies what kind of resource this is. Value: the fixed
7623	// string "dfareporting#floodlightActivityGroupsListResponse".
7624	Kind string `json:"kind,omitempty"`
7625
7626	// NextPageToken: Pagination token to be used for the next list
7627	// operation.
7628	NextPageToken string `json:"nextPageToken,omitempty"`
7629
7630	// ServerResponse contains the HTTP response code and headers from the
7631	// server.
7632	googleapi.ServerResponse `json:"-"`
7633
7634	// ForceSendFields is a list of field names (e.g.
7635	// "FloodlightActivityGroups") to unconditionally include in API
7636	// requests. By default, fields with empty values are omitted from API
7637	// requests. However, any non-pointer, non-interface field appearing in
7638	// ForceSendFields will be sent to the server regardless of whether the
7639	// field is empty or not. This may be used to include empty fields in
7640	// Patch requests.
7641	ForceSendFields []string `json:"-"`
7642
7643	// NullFields is a list of field names (e.g. "FloodlightActivityGroups")
7644	// to include in API requests with the JSON null value. By default,
7645	// fields with empty values are omitted from API requests. However, any
7646	// field with an empty value appearing in NullFields will be sent to the
7647	// server as null. It is an error if a field in this list has a
7648	// non-empty value. This may be used to include null fields in Patch
7649	// requests.
7650	NullFields []string `json:"-"`
7651}
7652
7653func (s *FloodlightActivityGroupsListResponse) MarshalJSON() ([]byte, error) {
7654	type NoMethod FloodlightActivityGroupsListResponse
7655	raw := NoMethod(*s)
7656	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7657}
7658
7659// FloodlightActivityPublisherDynamicTag: Publisher Dynamic Tag
7660type FloodlightActivityPublisherDynamicTag struct {
7661	// ClickThrough: Whether this tag is applicable only for click-throughs.
7662	ClickThrough bool `json:"clickThrough,omitempty"`
7663
7664	// DirectorySiteId: Directory site ID of this dynamic tag. This is a
7665	// write-only field that can be used as an alternative to the siteId
7666	// field. When this resource is retrieved, only the siteId field will be
7667	// populated.
7668	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
7669
7670	// DynamicTag: Dynamic floodlight tag.
7671	DynamicTag *FloodlightActivityDynamicTag `json:"dynamicTag,omitempty"`
7672
7673	// SiteId: Site ID of this dynamic tag.
7674	SiteId int64 `json:"siteId,omitempty,string"`
7675
7676	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
7677	// a read-only, auto-generated field.
7678	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
7679
7680	// ViewThrough: Whether this tag is applicable only for view-throughs.
7681	ViewThrough bool `json:"viewThrough,omitempty"`
7682
7683	// ForceSendFields is a list of field names (e.g. "ClickThrough") to
7684	// unconditionally include in API requests. By default, fields with
7685	// empty values are omitted from API requests. However, any non-pointer,
7686	// non-interface field appearing in ForceSendFields will be sent to the
7687	// server regardless of whether the field is empty or not. This may be
7688	// used to include empty fields in Patch requests.
7689	ForceSendFields []string `json:"-"`
7690
7691	// NullFields is a list of field names (e.g. "ClickThrough") to include
7692	// in API requests with the JSON null value. By default, fields with
7693	// empty values are omitted from API requests. However, any field with
7694	// an empty value appearing in NullFields will be sent to the server as
7695	// null. It is an error if a field in this list has a non-empty value.
7696	// This may be used to include null fields in Patch requests.
7697	NullFields []string `json:"-"`
7698}
7699
7700func (s *FloodlightActivityPublisherDynamicTag) MarshalJSON() ([]byte, error) {
7701	type NoMethod FloodlightActivityPublisherDynamicTag
7702	raw := NoMethod(*s)
7703	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7704}
7705
7706// FloodlightConfiguration: Contains properties of a Floodlight
7707// configuration.
7708type FloodlightConfiguration struct {
7709	// AccountId: Account ID of this floodlight configuration. This is a
7710	// read-only field that can be left blank.
7711	AccountId int64 `json:"accountId,omitempty,string"`
7712
7713	// AdvertiserId: Advertiser ID of the parent advertiser of this
7714	// floodlight configuration.
7715	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7716
7717	// AdvertiserIdDimensionValue: Dimension value for the ID of the
7718	// advertiser. This is a read-only, auto-generated field.
7719	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7720
7721	// AnalyticsDataSharingEnabled: Whether advertiser data is shared with
7722	// Google Analytics.
7723	AnalyticsDataSharingEnabled bool `json:"analyticsDataSharingEnabled,omitempty"`
7724
7725	// ExposureToConversionEnabled: Whether the exposure-to-conversion
7726	// report is enabled. This report shows detailed pathway information on
7727	// up to 10 of the most recent ad exposures seen by a user before
7728	// converting.
7729	ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
7730
7731	// FirstDayOfWeek: Day that will be counted as the first day of the week
7732	// in reports. This is a required field.
7733	//
7734	// Possible values:
7735	//   "MONDAY"
7736	//   "SUNDAY"
7737	FirstDayOfWeek string `json:"firstDayOfWeek,omitempty"`
7738
7739	// Id: ID of this floodlight configuration. This is a read-only,
7740	// auto-generated field.
7741	Id int64 `json:"id,omitempty,string"`
7742
7743	// IdDimensionValue: Dimension value for the ID of this floodlight
7744	// configuration. This is a read-only, auto-generated field.
7745	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7746
7747	// InAppAttributionTrackingEnabled: Whether in-app attribution tracking
7748	// is enabled.
7749	InAppAttributionTrackingEnabled bool `json:"inAppAttributionTrackingEnabled,omitempty"`
7750
7751	// Kind: Identifies what kind of resource this is. Value: the fixed
7752	// string "dfareporting#floodlightConfiguration".
7753	Kind string `json:"kind,omitempty"`
7754
7755	// LookbackConfiguration: Lookback window settings for this floodlight
7756	// configuration.
7757	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
7758
7759	// NaturalSearchConversionAttributionOption: Types of attribution
7760	// options for natural search conversions.
7761	//
7762	// Possible values:
7763	//   "EXCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
7764	//   "INCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
7765	//   "INCLUDE_NATURAL_SEARCH_TIERED_CONVERSION_ATTRIBUTION"
7766	NaturalSearchConversionAttributionOption string `json:"naturalSearchConversionAttributionOption,omitempty"`
7767
7768	// OmnitureSettings: Settings for Campaign Manager Omniture integration.
7769	OmnitureSettings *OmnitureSettings `json:"omnitureSettings,omitempty"`
7770
7771	// SubaccountId: Subaccount ID of this floodlight configuration. This is
7772	// a read-only field that can be left blank.
7773	SubaccountId int64 `json:"subaccountId,omitempty,string"`
7774
7775	// TagSettings: Configuration settings for dynamic and image floodlight
7776	// tags.
7777	TagSettings *TagSettings `json:"tagSettings,omitempty"`
7778
7779	// ThirdPartyAuthenticationTokens: List of third-party authentication
7780	// tokens enabled for this configuration.
7781	ThirdPartyAuthenticationTokens []*ThirdPartyAuthenticationToken `json:"thirdPartyAuthenticationTokens,omitempty"`
7782
7783	// UserDefinedVariableConfigurations: List of user defined variables
7784	// enabled for this configuration.
7785	UserDefinedVariableConfigurations []*UserDefinedVariableConfiguration `json:"userDefinedVariableConfigurations,omitempty"`
7786
7787	// ServerResponse contains the HTTP response code and headers from the
7788	// server.
7789	googleapi.ServerResponse `json:"-"`
7790
7791	// ForceSendFields is a list of field names (e.g. "AccountId") to
7792	// unconditionally include in API requests. By default, fields with
7793	// empty values are omitted from API requests. However, any non-pointer,
7794	// non-interface field appearing in ForceSendFields will be sent to the
7795	// server regardless of whether the field is empty or not. This may be
7796	// used to include empty fields in Patch requests.
7797	ForceSendFields []string `json:"-"`
7798
7799	// NullFields is a list of field names (e.g. "AccountId") to include in
7800	// API requests with the JSON null value. By default, fields with empty
7801	// values are omitted from API requests. However, any field with an
7802	// empty value appearing in NullFields will be sent to the server as
7803	// null. It is an error if a field in this list has a non-empty value.
7804	// This may be used to include null fields in Patch requests.
7805	NullFields []string `json:"-"`
7806}
7807
7808func (s *FloodlightConfiguration) MarshalJSON() ([]byte, error) {
7809	type NoMethod FloodlightConfiguration
7810	raw := NoMethod(*s)
7811	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7812}
7813
7814// FloodlightConfigurationsListResponse: Floodlight Configuration List
7815// Response
7816type FloodlightConfigurationsListResponse struct {
7817	// FloodlightConfigurations: Floodlight configuration collection.
7818	FloodlightConfigurations []*FloodlightConfiguration `json:"floodlightConfigurations,omitempty"`
7819
7820	// Kind: Identifies what kind of resource this is. Value: the fixed
7821	// string "dfareporting#floodlightConfigurationsListResponse".
7822	Kind string `json:"kind,omitempty"`
7823
7824	// ServerResponse contains the HTTP response code and headers from the
7825	// server.
7826	googleapi.ServerResponse `json:"-"`
7827
7828	// ForceSendFields is a list of field names (e.g.
7829	// "FloodlightConfigurations") to unconditionally include in API
7830	// requests. By default, fields with empty values are omitted from API
7831	// requests. However, any non-pointer, non-interface field appearing in
7832	// ForceSendFields will be sent to the server regardless of whether the
7833	// field is empty or not. This may be used to include empty fields in
7834	// Patch requests.
7835	ForceSendFields []string `json:"-"`
7836
7837	// NullFields is a list of field names (e.g. "FloodlightConfigurations")
7838	// to include in API requests with the JSON null value. By default,
7839	// fields with empty values are omitted from API requests. However, any
7840	// field with an empty value appearing in NullFields will be sent to the
7841	// server as null. It is an error if a field in this list has a
7842	// non-empty value. This may be used to include null fields in Patch
7843	// requests.
7844	NullFields []string `json:"-"`
7845}
7846
7847func (s *FloodlightConfigurationsListResponse) MarshalJSON() ([]byte, error) {
7848	type NoMethod FloodlightConfigurationsListResponse
7849	raw := NoMethod(*s)
7850	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7851}
7852
7853// FloodlightReportCompatibleFields: Represents fields that are
7854// compatible to be selected for a report of type "FlOODLIGHT".
7855type FloodlightReportCompatibleFields struct {
7856	// DimensionFilters: Dimensions which are compatible to be selected in
7857	// the "dimensionFilters" section of the report.
7858	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
7859
7860	// Dimensions: Dimensions which are compatible to be selected in the
7861	// "dimensions" section of the report.
7862	Dimensions []*Dimension `json:"dimensions,omitempty"`
7863
7864	// Kind: The kind of resource this is, in this case
7865	// dfareporting#floodlightReportCompatibleFields.
7866	Kind string `json:"kind,omitempty"`
7867
7868	// Metrics: Metrics which are compatible to be selected in the
7869	// "metricNames" section of the report.
7870	Metrics []*Metric `json:"metrics,omitempty"`
7871
7872	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
7873	// unconditionally include in API requests. By default, fields with
7874	// empty values are omitted from API requests. However, any non-pointer,
7875	// non-interface field appearing in ForceSendFields will be sent to the
7876	// server regardless of whether the field is empty or not. This may be
7877	// used to include empty fields in Patch requests.
7878	ForceSendFields []string `json:"-"`
7879
7880	// NullFields is a list of field names (e.g. "DimensionFilters") to
7881	// include in API requests with the JSON null value. By default, fields
7882	// with empty values are omitted from API requests. However, any field
7883	// with an empty value appearing in NullFields will be sent to the
7884	// server as null. It is an error if a field in this list has a
7885	// non-empty value. This may be used to include null fields in Patch
7886	// requests.
7887	NullFields []string `json:"-"`
7888}
7889
7890func (s *FloodlightReportCompatibleFields) MarshalJSON() ([]byte, error) {
7891	type NoMethod FloodlightReportCompatibleFields
7892	raw := NoMethod(*s)
7893	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7894}
7895
7896// FrequencyCap: Frequency Cap.
7897type FrequencyCap struct {
7898	// Duration: Duration of time, in seconds, for this frequency cap. The
7899	// maximum duration is 90 days. Acceptable values are 1 to 7776000,
7900	// inclusive.
7901	Duration int64 `json:"duration,omitempty,string"`
7902
7903	// Impressions: Number of times an individual user can be served the ad
7904	// within the specified duration. Acceptable values are 1 to 15,
7905	// inclusive.
7906	Impressions int64 `json:"impressions,omitempty,string"`
7907
7908	// ForceSendFields is a list of field names (e.g. "Duration") to
7909	// unconditionally include in API requests. By default, fields with
7910	// empty values are omitted from API requests. However, any non-pointer,
7911	// non-interface field appearing in ForceSendFields will be sent to the
7912	// server regardless of whether the field is empty or not. This may be
7913	// used to include empty fields in Patch requests.
7914	ForceSendFields []string `json:"-"`
7915
7916	// NullFields is a list of field names (e.g. "Duration") to include in
7917	// API requests with the JSON null value. By default, fields with empty
7918	// values are omitted from API requests. However, any field with an
7919	// empty value appearing in NullFields will be sent to the server as
7920	// null. It is an error if a field in this list has a non-empty value.
7921	// This may be used to include null fields in Patch requests.
7922	NullFields []string `json:"-"`
7923}
7924
7925func (s *FrequencyCap) MarshalJSON() ([]byte, error) {
7926	type NoMethod FrequencyCap
7927	raw := NoMethod(*s)
7928	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7929}
7930
7931// FsCommand: FsCommand.
7932type FsCommand struct {
7933	// Left: Distance from the left of the browser.Applicable when
7934	// positionOption is DISTANCE_FROM_TOP_LEFT_CORNER.
7935	Left int64 `json:"left,omitempty"`
7936
7937	// PositionOption: Position in the browser where the window will open.
7938	//
7939	// Possible values:
7940	//   "CENTERED"
7941	//   "DISTANCE_FROM_TOP_LEFT_CORNER"
7942	PositionOption string `json:"positionOption,omitempty"`
7943
7944	// Top: Distance from the top of the browser. Applicable when
7945	// positionOption is DISTANCE_FROM_TOP_LEFT_CORNER.
7946	Top int64 `json:"top,omitempty"`
7947
7948	// WindowHeight: Height of the window.
7949	WindowHeight int64 `json:"windowHeight,omitempty"`
7950
7951	// WindowWidth: Width of the window.
7952	WindowWidth int64 `json:"windowWidth,omitempty"`
7953
7954	// ForceSendFields is a list of field names (e.g. "Left") to
7955	// unconditionally include in API requests. By default, fields with
7956	// empty values are omitted from API requests. However, any non-pointer,
7957	// non-interface field appearing in ForceSendFields will be sent to the
7958	// server regardless of whether the field is empty or not. This may be
7959	// used to include empty fields in Patch requests.
7960	ForceSendFields []string `json:"-"`
7961
7962	// NullFields is a list of field names (e.g. "Left") to include in API
7963	// requests with the JSON null value. By default, fields with empty
7964	// values are omitted from API requests. However, any field with an
7965	// empty value appearing in NullFields will be sent to the server as
7966	// null. It is an error if a field in this list has a non-empty value.
7967	// This may be used to include null fields in Patch requests.
7968	NullFields []string `json:"-"`
7969}
7970
7971func (s *FsCommand) MarshalJSON() ([]byte, error) {
7972	type NoMethod FsCommand
7973	raw := NoMethod(*s)
7974	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7975}
7976
7977// GeoTargeting: Geographical Targeting.
7978type GeoTargeting struct {
7979	// Cities: Cities to be targeted. For each city only dartId is required.
7980	// The other fields are populated automatically when the ad is inserted
7981	// or updated. If targeting a city, do not target or exclude the country
7982	// of the city, and do not target the metro or region of the city.
7983	Cities []*City `json:"cities,omitempty"`
7984
7985	// Countries: Countries to be targeted or excluded from targeting,
7986	// depending on the setting of the excludeCountries field. For each
7987	// country only dartId is required. The other fields are populated
7988	// automatically when the ad is inserted or updated. If targeting or
7989	// excluding a country, do not target regions, cities, metros, or postal
7990	// codes in the same country.
7991	Countries []*Country `json:"countries,omitempty"`
7992
7993	// ExcludeCountries: Whether or not to exclude the countries in the
7994	// countries field from targeting. If false, the countries field refers
7995	// to countries which will be targeted by the ad.
7996	ExcludeCountries bool `json:"excludeCountries,omitempty"`
7997
7998	// Metros: Metros to be targeted. For each metro only dmaId is required.
7999	// The other fields are populated automatically when the ad is inserted
8000	// or updated. If targeting a metro, do not target or exclude the
8001	// country of the metro.
8002	Metros []*Metro `json:"metros,omitempty"`
8003
8004	// PostalCodes: Postal codes to be targeted. For each postal code only
8005	// id is required. The other fields are populated automatically when the
8006	// ad is inserted or updated. If targeting a postal code, do not target
8007	// or exclude the country of the postal code.
8008	PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
8009
8010	// Regions: Regions to be targeted. For each region only dartId is
8011	// required. The other fields are populated automatically when the ad is
8012	// inserted or updated. If targeting a region, do not target or exclude
8013	// the country of the region.
8014	Regions []*Region `json:"regions,omitempty"`
8015
8016	// ForceSendFields is a list of field names (e.g. "Cities") to
8017	// unconditionally include in API requests. By default, fields with
8018	// empty values are omitted from API requests. However, any non-pointer,
8019	// non-interface field appearing in ForceSendFields will be sent to the
8020	// server regardless of whether the field is empty or not. This may be
8021	// used to include empty fields in Patch requests.
8022	ForceSendFields []string `json:"-"`
8023
8024	// NullFields is a list of field names (e.g. "Cities") to include in API
8025	// requests with the JSON null value. By default, fields with empty
8026	// values are omitted from API requests. However, any field with an
8027	// empty value appearing in NullFields will be sent to the server as
8028	// null. It is an error if a field in this list has a non-empty value.
8029	// This may be used to include null fields in Patch requests.
8030	NullFields []string `json:"-"`
8031}
8032
8033func (s *GeoTargeting) MarshalJSON() ([]byte, error) {
8034	type NoMethod GeoTargeting
8035	raw := NoMethod(*s)
8036	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8037}
8038
8039// InventoryItem: Represents a buy from the Planning inventory store.
8040type InventoryItem struct {
8041	// AccountId: Account ID of this inventory item.
8042	AccountId int64 `json:"accountId,omitempty,string"`
8043
8044	// AdSlots: Ad slots of this inventory item. If this inventory item
8045	// represents a standalone placement, there will be exactly one ad slot.
8046	// If this inventory item represents a placement group, there will be
8047	// more than one ad slot, each representing one child placement in that
8048	// placement group.
8049	AdSlots []*AdSlot `json:"adSlots,omitempty"`
8050
8051	// AdvertiserId: Advertiser ID of this inventory item.
8052	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8053
8054	// ContentCategoryId: Content category ID of this inventory item.
8055	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
8056
8057	// EstimatedClickThroughRate: Estimated click-through rate of this
8058	// inventory item.
8059	EstimatedClickThroughRate int64 `json:"estimatedClickThroughRate,omitempty,string"`
8060
8061	// EstimatedConversionRate: Estimated conversion rate of this inventory
8062	// item.
8063	EstimatedConversionRate int64 `json:"estimatedConversionRate,omitempty,string"`
8064
8065	// Id: ID of this inventory item.
8066	Id int64 `json:"id,omitempty,string"`
8067
8068	// InPlan: Whether this inventory item is in plan.
8069	InPlan bool `json:"inPlan,omitempty"`
8070
8071	// Kind: Identifies what kind of resource this is. Value: the fixed
8072	// string "dfareporting#inventoryItem".
8073	Kind string `json:"kind,omitempty"`
8074
8075	// LastModifiedInfo: Information about the most recent modification of
8076	// this inventory item.
8077	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
8078
8079	// Name: Name of this inventory item. For standalone inventory items,
8080	// this is the same name as that of its only ad slot. For group
8081	// inventory items, this can differ from the name of any of its ad
8082	// slots.
8083	Name string `json:"name,omitempty"`
8084
8085	// NegotiationChannelId: Negotiation channel ID of this inventory item.
8086	NegotiationChannelId int64 `json:"negotiationChannelId,omitempty,string"`
8087
8088	// OrderId: Order ID of this inventory item.
8089	OrderId int64 `json:"orderId,omitempty,string"`
8090
8091	// PlacementStrategyId: Placement strategy ID of this inventory item.
8092	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
8093
8094	// Pricing: Pricing of this inventory item.
8095	Pricing *Pricing `json:"pricing,omitempty"`
8096
8097	// ProjectId: Project ID of this inventory item.
8098	ProjectId int64 `json:"projectId,omitempty,string"`
8099
8100	// RfpId: RFP ID of this inventory item.
8101	RfpId int64 `json:"rfpId,omitempty,string"`
8102
8103	// SiteId: ID of the site this inventory item is associated with.
8104	SiteId int64 `json:"siteId,omitempty,string"`
8105
8106	// SubaccountId: Subaccount ID of this inventory item.
8107	SubaccountId int64 `json:"subaccountId,omitempty,string"`
8108
8109	// Type: Type of inventory item.
8110	//
8111	// Possible values:
8112	//   "PLANNING_PLACEMENT_TYPE_CREDIT"
8113	//   "PLANNING_PLACEMENT_TYPE_REGULAR"
8114	Type string `json:"type,omitempty"`
8115
8116	// ServerResponse contains the HTTP response code and headers from the
8117	// server.
8118	googleapi.ServerResponse `json:"-"`
8119
8120	// ForceSendFields is a list of field names (e.g. "AccountId") to
8121	// unconditionally include in API requests. By default, fields with
8122	// empty values are omitted from API requests. However, any non-pointer,
8123	// non-interface field appearing in ForceSendFields will be sent to the
8124	// server regardless of whether the field is empty or not. This may be
8125	// used to include empty fields in Patch requests.
8126	ForceSendFields []string `json:"-"`
8127
8128	// NullFields is a list of field names (e.g. "AccountId") to include in
8129	// API requests with the JSON null value. By default, fields with empty
8130	// values are omitted from API requests. However, any field with an
8131	// empty value appearing in NullFields will be sent to the server as
8132	// null. It is an error if a field in this list has a non-empty value.
8133	// This may be used to include null fields in Patch requests.
8134	NullFields []string `json:"-"`
8135}
8136
8137func (s *InventoryItem) MarshalJSON() ([]byte, error) {
8138	type NoMethod InventoryItem
8139	raw := NoMethod(*s)
8140	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8141}
8142
8143// InventoryItemsListResponse: Inventory item List Response
8144type InventoryItemsListResponse struct {
8145	// InventoryItems: Inventory item collection
8146	InventoryItems []*InventoryItem `json:"inventoryItems,omitempty"`
8147
8148	// Kind: Identifies what kind of resource this is. Value: the fixed
8149	// string "dfareporting#inventoryItemsListResponse".
8150	Kind string `json:"kind,omitempty"`
8151
8152	// NextPageToken: Pagination token to be used for the next list
8153	// operation.
8154	NextPageToken string `json:"nextPageToken,omitempty"`
8155
8156	// ServerResponse contains the HTTP response code and headers from the
8157	// server.
8158	googleapi.ServerResponse `json:"-"`
8159
8160	// ForceSendFields is a list of field names (e.g. "InventoryItems") to
8161	// unconditionally include in API requests. By default, fields with
8162	// empty values are omitted from API requests. However, any non-pointer,
8163	// non-interface field appearing in ForceSendFields will be sent to the
8164	// server regardless of whether the field is empty or not. This may be
8165	// used to include empty fields in Patch requests.
8166	ForceSendFields []string `json:"-"`
8167
8168	// NullFields is a list of field names (e.g. "InventoryItems") to
8169	// include in API requests with the JSON null value. By default, fields
8170	// with empty values are omitted from API requests. However, any field
8171	// with an empty value appearing in NullFields will be sent to the
8172	// server as null. It is an error if a field in this list has a
8173	// non-empty value. This may be used to include null fields in Patch
8174	// requests.
8175	NullFields []string `json:"-"`
8176}
8177
8178func (s *InventoryItemsListResponse) MarshalJSON() ([]byte, error) {
8179	type NoMethod InventoryItemsListResponse
8180	raw := NoMethod(*s)
8181	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8182}
8183
8184// KeyValueTargetingExpression: Key Value Targeting Expression.
8185type KeyValueTargetingExpression struct {
8186	// Expression: Keyword expression being targeted by the ad.
8187	Expression string `json:"expression,omitempty"`
8188
8189	// ForceSendFields is a list of field names (e.g. "Expression") to
8190	// unconditionally include in API requests. By default, fields with
8191	// empty values are omitted from API requests. However, any non-pointer,
8192	// non-interface field appearing in ForceSendFields will be sent to the
8193	// server regardless of whether the field is empty or not. This may be
8194	// used to include empty fields in Patch requests.
8195	ForceSendFields []string `json:"-"`
8196
8197	// NullFields is a list of field names (e.g. "Expression") to include in
8198	// API requests with the JSON null value. By default, fields with empty
8199	// values are omitted from API requests. However, any field with an
8200	// empty value appearing in NullFields will be sent to the server as
8201	// null. It is an error if a field in this list has a non-empty value.
8202	// This may be used to include null fields in Patch requests.
8203	NullFields []string `json:"-"`
8204}
8205
8206func (s *KeyValueTargetingExpression) MarshalJSON() ([]byte, error) {
8207	type NoMethod KeyValueTargetingExpression
8208	raw := NoMethod(*s)
8209	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8210}
8211
8212// LandingPage: Contains information about where a user's browser is
8213// taken after the user clicks an ad.
8214type LandingPage struct {
8215	// AdvertiserId: Advertiser ID of this landing page. This is a required
8216	// field.
8217	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8218
8219	// Archived: Whether this landing page has been archived.
8220	Archived bool `json:"archived,omitempty"`
8221
8222	// DeepLinks: Links that will direct the user to a mobile app, if
8223	// installed.
8224	DeepLinks []*DeepLink `json:"deepLinks,omitempty"`
8225
8226	// Id: ID of this landing page. This is a read-only, auto-generated
8227	// field.
8228	Id int64 `json:"id,omitempty,string"`
8229
8230	// Kind: Identifies what kind of resource this is. Value: the fixed
8231	// string "dfareporting#landingPage".
8232	Kind string `json:"kind,omitempty"`
8233
8234	// Name: Name of this landing page. This is a required field. It must be
8235	// less than 256 characters long.
8236	Name string `json:"name,omitempty"`
8237
8238	// Url: URL of this landing page. This is a required field.
8239	Url string `json:"url,omitempty"`
8240
8241	// ServerResponse contains the HTTP response code and headers from the
8242	// server.
8243	googleapi.ServerResponse `json:"-"`
8244
8245	// ForceSendFields is a list of field names (e.g. "AdvertiserId") to
8246	// unconditionally include in API requests. By default, fields with
8247	// empty values are omitted from API requests. However, any non-pointer,
8248	// non-interface field appearing in ForceSendFields will be sent to the
8249	// server regardless of whether the field is empty or not. This may be
8250	// used to include empty fields in Patch requests.
8251	ForceSendFields []string `json:"-"`
8252
8253	// NullFields is a list of field names (e.g. "AdvertiserId") to include
8254	// in API requests with the JSON null value. By default, fields with
8255	// empty values are omitted from API requests. However, any field with
8256	// an empty value appearing in NullFields will be sent to the server as
8257	// null. It is an error if a field in this list has a non-empty value.
8258	// This may be used to include null fields in Patch requests.
8259	NullFields []string `json:"-"`
8260}
8261
8262func (s *LandingPage) MarshalJSON() ([]byte, error) {
8263	type NoMethod LandingPage
8264	raw := NoMethod(*s)
8265	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8266}
8267
8268// Language: Contains information about a language that can be targeted
8269// by ads.
8270type Language struct {
8271	// Id: Language ID of this language. This is the ID used for targeting
8272	// and generating reports.
8273	Id int64 `json:"id,omitempty,string"`
8274
8275	// Kind: Identifies what kind of resource this is. Value: the fixed
8276	// string "dfareporting#language".
8277	Kind string `json:"kind,omitempty"`
8278
8279	// LanguageCode: Format of language code is an ISO 639 two-letter
8280	// language code optionally followed by an underscore followed by an ISO
8281	// 3166 code. Examples are "en" for English or "zh_CN" for Simplified
8282	// Chinese.
8283	LanguageCode string `json:"languageCode,omitempty"`
8284
8285	// Name: Name of this language.
8286	Name string `json:"name,omitempty"`
8287
8288	// ForceSendFields is a list of field names (e.g. "Id") to
8289	// unconditionally include in API requests. By default, fields with
8290	// empty values are omitted from API requests. However, any non-pointer,
8291	// non-interface field appearing in ForceSendFields will be sent to the
8292	// server regardless of whether the field is empty or not. This may be
8293	// used to include empty fields in Patch requests.
8294	ForceSendFields []string `json:"-"`
8295
8296	// NullFields is a list of field names (e.g. "Id") to include in API
8297	// requests with the JSON null value. By default, fields with empty
8298	// values are omitted from API requests. However, any field with an
8299	// empty value appearing in NullFields will be sent to the server as
8300	// null. It is an error if a field in this list has a non-empty value.
8301	// This may be used to include null fields in Patch requests.
8302	NullFields []string `json:"-"`
8303}
8304
8305func (s *Language) MarshalJSON() ([]byte, error) {
8306	type NoMethod Language
8307	raw := NoMethod(*s)
8308	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8309}
8310
8311// LanguageTargeting: Language Targeting.
8312type LanguageTargeting struct {
8313	// Languages: Languages that this ad targets. For each language only
8314	// languageId is required. The other fields are populated automatically
8315	// when the ad is inserted or updated.
8316	Languages []*Language `json:"languages,omitempty"`
8317
8318	// ForceSendFields is a list of field names (e.g. "Languages") to
8319	// unconditionally include in API requests. By default, fields with
8320	// empty values are omitted from API requests. However, any non-pointer,
8321	// non-interface field appearing in ForceSendFields will be sent to the
8322	// server regardless of whether the field is empty or not. This may be
8323	// used to include empty fields in Patch requests.
8324	ForceSendFields []string `json:"-"`
8325
8326	// NullFields is a list of field names (e.g. "Languages") to include in
8327	// API requests with the JSON null value. By default, fields with empty
8328	// values are omitted from API requests. However, any field with an
8329	// empty value appearing in NullFields will be sent to the server as
8330	// null. It is an error if a field in this list has a non-empty value.
8331	// This may be used to include null fields in Patch requests.
8332	NullFields []string `json:"-"`
8333}
8334
8335func (s *LanguageTargeting) MarshalJSON() ([]byte, error) {
8336	type NoMethod LanguageTargeting
8337	raw := NoMethod(*s)
8338	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8339}
8340
8341// LanguagesListResponse: Language List Response
8342type LanguagesListResponse struct {
8343	// Kind: Identifies what kind of resource this is. Value: the fixed
8344	// string "dfareporting#languagesListResponse".
8345	Kind string `json:"kind,omitempty"`
8346
8347	// Languages: Language collection.
8348	Languages []*Language `json:"languages,omitempty"`
8349
8350	// ServerResponse contains the HTTP response code and headers from the
8351	// server.
8352	googleapi.ServerResponse `json:"-"`
8353
8354	// ForceSendFields is a list of field names (e.g. "Kind") to
8355	// unconditionally include in API requests. By default, fields with
8356	// empty values are omitted from API requests. However, any non-pointer,
8357	// non-interface field appearing in ForceSendFields will be sent to the
8358	// server regardless of whether the field is empty or not. This may be
8359	// used to include empty fields in Patch requests.
8360	ForceSendFields []string `json:"-"`
8361
8362	// NullFields is a list of field names (e.g. "Kind") to include in API
8363	// requests with the JSON null value. By default, fields with empty
8364	// values are omitted from API requests. However, any field with an
8365	// empty value appearing in NullFields will be sent to the server as
8366	// null. It is an error if a field in this list has a non-empty value.
8367	// This may be used to include null fields in Patch requests.
8368	NullFields []string `json:"-"`
8369}
8370
8371func (s *LanguagesListResponse) MarshalJSON() ([]byte, error) {
8372	type NoMethod LanguagesListResponse
8373	raw := NoMethod(*s)
8374	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8375}
8376
8377// LastModifiedInfo: Modification timestamp.
8378type LastModifiedInfo struct {
8379	// Time: Timestamp of the last change in milliseconds since epoch.
8380	Time int64 `json:"time,omitempty,string"`
8381
8382	// ForceSendFields is a list of field names (e.g. "Time") to
8383	// unconditionally include in API requests. By default, fields with
8384	// empty values are omitted from API requests. However, any non-pointer,
8385	// non-interface field appearing in ForceSendFields will be sent to the
8386	// server regardless of whether the field is empty or not. This may be
8387	// used to include empty fields in Patch requests.
8388	ForceSendFields []string `json:"-"`
8389
8390	// NullFields is a list of field names (e.g. "Time") to include in API
8391	// requests with the JSON null value. By default, fields with empty
8392	// values are omitted from API requests. However, any field with an
8393	// empty value appearing in NullFields will be sent to the server as
8394	// null. It is an error if a field in this list has a non-empty value.
8395	// This may be used to include null fields in Patch requests.
8396	NullFields []string `json:"-"`
8397}
8398
8399func (s *LastModifiedInfo) MarshalJSON() ([]byte, error) {
8400	type NoMethod LastModifiedInfo
8401	raw := NoMethod(*s)
8402	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8403}
8404
8405// ListPopulationClause: A group clause made up of list population terms
8406// representing constraints joined by ORs.
8407type ListPopulationClause struct {
8408	// Terms: Terms of this list population clause. Each clause is made up
8409	// of list population terms representing constraints and are joined by
8410	// ORs.
8411	Terms []*ListPopulationTerm `json:"terms,omitempty"`
8412
8413	// ForceSendFields is a list of field names (e.g. "Terms") to
8414	// unconditionally include in API requests. By default, fields with
8415	// empty values are omitted from API requests. However, any non-pointer,
8416	// non-interface field appearing in ForceSendFields will be sent to the
8417	// server regardless of whether the field is empty or not. This may be
8418	// used to include empty fields in Patch requests.
8419	ForceSendFields []string `json:"-"`
8420
8421	// NullFields is a list of field names (e.g. "Terms") to include in API
8422	// requests with the JSON null value. By default, fields with empty
8423	// values are omitted from API requests. However, any field with an
8424	// empty value appearing in NullFields will be sent to the server as
8425	// null. It is an error if a field in this list has a non-empty value.
8426	// This may be used to include null fields in Patch requests.
8427	NullFields []string `json:"-"`
8428}
8429
8430func (s *ListPopulationClause) MarshalJSON() ([]byte, error) {
8431	type NoMethod ListPopulationClause
8432	raw := NoMethod(*s)
8433	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8434}
8435
8436// ListPopulationRule: Remarketing List Population Rule.
8437type ListPopulationRule struct {
8438	// FloodlightActivityId: Floodlight activity ID associated with this
8439	// rule. This field can be left blank.
8440	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
8441
8442	// FloodlightActivityName: Name of floodlight activity associated with
8443	// this rule. This is a read-only, auto-generated field.
8444	FloodlightActivityName string `json:"floodlightActivityName,omitempty"`
8445
8446	// ListPopulationClauses: Clauses that make up this list population
8447	// rule. Clauses are joined by ANDs, and the clauses themselves are made
8448	// up of list population terms which are joined by ORs.
8449	ListPopulationClauses []*ListPopulationClause `json:"listPopulationClauses,omitempty"`
8450
8451	// ForceSendFields is a list of field names (e.g.
8452	// "FloodlightActivityId") to unconditionally include in API requests.
8453	// By default, fields with empty values are omitted from API requests.
8454	// However, any non-pointer, non-interface field appearing in
8455	// ForceSendFields will be sent to the server regardless of whether the
8456	// field is empty or not. This may be used to include empty fields in
8457	// Patch requests.
8458	ForceSendFields []string `json:"-"`
8459
8460	// NullFields is a list of field names (e.g. "FloodlightActivityId") to
8461	// include in API requests with the JSON null value. By default, fields
8462	// with empty values are omitted from API requests. However, any field
8463	// with an empty value appearing in NullFields will be sent to the
8464	// server as null. It is an error if a field in this list has a
8465	// non-empty value. This may be used to include null fields in Patch
8466	// requests.
8467	NullFields []string `json:"-"`
8468}
8469
8470func (s *ListPopulationRule) MarshalJSON() ([]byte, error) {
8471	type NoMethod ListPopulationRule
8472	raw := NoMethod(*s)
8473	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8474}
8475
8476// ListPopulationTerm: Remarketing List Population Rule Term.
8477type ListPopulationTerm struct {
8478	// Contains: Will be true if the term should check if the user is in the
8479	// list and false if the term should check if the user is not in the
8480	// list. This field is only relevant when type is set to
8481	// LIST_MEMBERSHIP_TERM. False by default.
8482	Contains bool `json:"contains,omitempty"`
8483
8484	// Negation: Whether to negate the comparison result of this term during
8485	// rule evaluation. This field is only relevant when type is left unset
8486	// or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM.
8487	Negation bool `json:"negation,omitempty"`
8488
8489	// Operator: Comparison operator of this term. This field is only
8490	// relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or
8491	// REFERRER_TERM.
8492	//
8493	// Possible values:
8494	//   "NUM_EQUALS"
8495	//   "NUM_GREATER_THAN"
8496	//   "NUM_GREATER_THAN_EQUAL"
8497	//   "NUM_LESS_THAN"
8498	//   "NUM_LESS_THAN_EQUAL"
8499	//   "STRING_CONTAINS"
8500	//   "STRING_EQUALS"
8501	Operator string `json:"operator,omitempty"`
8502
8503	// RemarketingListId: ID of the list in question. This field is only
8504	// relevant when type is set to LIST_MEMBERSHIP_TERM.
8505	RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
8506
8507	// Type: List population term type determines the applicable fields in
8508	// this object. If left unset or set to CUSTOM_VARIABLE_TERM, then
8509	// variableName, variableFriendlyName, operator, value, and negation are
8510	// applicable. If set to LIST_MEMBERSHIP_TERM then remarketingListId and
8511	// contains are applicable. If set to REFERRER_TERM then operator,
8512	// value, and negation are applicable.
8513	//
8514	// Possible values:
8515	//   "CUSTOM_VARIABLE_TERM"
8516	//   "LIST_MEMBERSHIP_TERM"
8517	//   "REFERRER_TERM"
8518	Type string `json:"type,omitempty"`
8519
8520	// Value: Literal to compare the variable to. This field is only
8521	// relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or
8522	// REFERRER_TERM.
8523	Value string `json:"value,omitempty"`
8524
8525	// VariableFriendlyName: Friendly name of this term's variable. This is
8526	// a read-only, auto-generated field. This field is only relevant when
8527	// type is left unset or set to CUSTOM_VARIABLE_TERM.
8528	VariableFriendlyName string `json:"variableFriendlyName,omitempty"`
8529
8530	// VariableName: Name of the variable (U1, U2, etc.) being compared in
8531	// this term. This field is only relevant when type is set to null,
8532	// CUSTOM_VARIABLE_TERM or REFERRER_TERM.
8533	VariableName string `json:"variableName,omitempty"`
8534
8535	// ForceSendFields is a list of field names (e.g. "Contains") to
8536	// unconditionally include in API requests. By default, fields with
8537	// empty values are omitted from API requests. However, any non-pointer,
8538	// non-interface field appearing in ForceSendFields will be sent to the
8539	// server regardless of whether the field is empty or not. This may be
8540	// used to include empty fields in Patch requests.
8541	ForceSendFields []string `json:"-"`
8542
8543	// NullFields is a list of field names (e.g. "Contains") to include in
8544	// API requests with the JSON null value. By default, fields with empty
8545	// values are omitted from API requests. However, any field with an
8546	// empty value appearing in NullFields will be sent to the server as
8547	// null. It is an error if a field in this list has a non-empty value.
8548	// This may be used to include null fields in Patch requests.
8549	NullFields []string `json:"-"`
8550}
8551
8552func (s *ListPopulationTerm) MarshalJSON() ([]byte, error) {
8553	type NoMethod ListPopulationTerm
8554	raw := NoMethod(*s)
8555	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8556}
8557
8558// ListTargetingExpression: Remarketing List Targeting Expression.
8559type ListTargetingExpression struct {
8560	// Expression: Expression describing which lists are being targeted by
8561	// the ad.
8562	Expression string `json:"expression,omitempty"`
8563
8564	// ForceSendFields is a list of field names (e.g. "Expression") to
8565	// unconditionally include in API requests. By default, fields with
8566	// empty values are omitted from API requests. However, any non-pointer,
8567	// non-interface field appearing in ForceSendFields will be sent to the
8568	// server regardless of whether the field is empty or not. This may be
8569	// used to include empty fields in Patch requests.
8570	ForceSendFields []string `json:"-"`
8571
8572	// NullFields is a list of field names (e.g. "Expression") to include in
8573	// API requests with the JSON null value. By default, fields with empty
8574	// values are omitted from API requests. However, any field with an
8575	// empty value appearing in NullFields will be sent to the server as
8576	// null. It is an error if a field in this list has a non-empty value.
8577	// This may be used to include null fields in Patch requests.
8578	NullFields []string `json:"-"`
8579}
8580
8581func (s *ListTargetingExpression) MarshalJSON() ([]byte, error) {
8582	type NoMethod ListTargetingExpression
8583	raw := NoMethod(*s)
8584	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8585}
8586
8587// LookbackConfiguration: Lookback configuration settings.
8588type LookbackConfiguration struct {
8589	// ClickDuration: Lookback window, in days, from the last time a given
8590	// user clicked on one of your ads. If you enter 0, clicks will not be
8591	// considered as triggering events for floodlight tracking. If you leave
8592	// this field blank, the default value for your account will be used.
8593	// Acceptable values are 0 to 90, inclusive.
8594	ClickDuration int64 `json:"clickDuration,omitempty"`
8595
8596	// PostImpressionActivitiesDuration: Lookback window, in days, from the
8597	// last time a given user viewed one of your ads. If you enter 0,
8598	// impressions will not be considered as triggering events for
8599	// floodlight tracking. If you leave this field blank, the default value
8600	// for your account will be used. Acceptable values are 0 to 90,
8601	// inclusive.
8602	PostImpressionActivitiesDuration int64 `json:"postImpressionActivitiesDuration,omitempty"`
8603
8604	// ForceSendFields is a list of field names (e.g. "ClickDuration") to
8605	// unconditionally include in API requests. By default, fields with
8606	// empty values are omitted from API requests. However, any non-pointer,
8607	// non-interface field appearing in ForceSendFields will be sent to the
8608	// server regardless of whether the field is empty or not. This may be
8609	// used to include empty fields in Patch requests.
8610	ForceSendFields []string `json:"-"`
8611
8612	// NullFields is a list of field names (e.g. "ClickDuration") to include
8613	// in API requests with the JSON null value. By default, fields with
8614	// empty values are omitted from API requests. However, any field with
8615	// an empty value appearing in NullFields will be sent to the server as
8616	// null. It is an error if a field in this list has a non-empty value.
8617	// This may be used to include null fields in Patch requests.
8618	NullFields []string `json:"-"`
8619}
8620
8621func (s *LookbackConfiguration) MarshalJSON() ([]byte, error) {
8622	type NoMethod LookbackConfiguration
8623	raw := NoMethod(*s)
8624	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8625}
8626
8627// Metric: Represents a metric.
8628type Metric struct {
8629	// Kind: The kind of resource this is, in this case dfareporting#metric.
8630	Kind string `json:"kind,omitempty"`
8631
8632	// Name: The metric name, e.g. dfa:impressions
8633	Name string `json:"name,omitempty"`
8634
8635	// ForceSendFields is a list of field names (e.g. "Kind") to
8636	// unconditionally include in API requests. By default, fields with
8637	// empty values are omitted from API requests. However, any non-pointer,
8638	// non-interface field appearing in ForceSendFields will be sent to the
8639	// server regardless of whether the field is empty or not. This may be
8640	// used to include empty fields in Patch requests.
8641	ForceSendFields []string `json:"-"`
8642
8643	// NullFields is a list of field names (e.g. "Kind") to include in API
8644	// requests with the JSON null value. By default, fields with empty
8645	// values are omitted from API requests. However, any field with an
8646	// empty value appearing in NullFields will be sent to the server as
8647	// null. It is an error if a field in this list has a non-empty value.
8648	// This may be used to include null fields in Patch requests.
8649	NullFields []string `json:"-"`
8650}
8651
8652func (s *Metric) MarshalJSON() ([]byte, error) {
8653	type NoMethod Metric
8654	raw := NoMethod(*s)
8655	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8656}
8657
8658// Metro: Contains information about a metro region that can be targeted
8659// by ads.
8660type Metro struct {
8661	// CountryCode: Country code of the country to which this metro region
8662	// belongs.
8663	CountryCode string `json:"countryCode,omitempty"`
8664
8665	// CountryDartId: DART ID of the country to which this metro region
8666	// belongs.
8667	CountryDartId int64 `json:"countryDartId,omitempty,string"`
8668
8669	// DartId: DART ID of this metro region.
8670	DartId int64 `json:"dartId,omitempty,string"`
8671
8672	// DmaId: DMA ID of this metro region. This is the ID used for targeting
8673	// and generating reports, and is equivalent to metro_code.
8674	DmaId int64 `json:"dmaId,omitempty,string"`
8675
8676	// Kind: Identifies what kind of resource this is. Value: the fixed
8677	// string "dfareporting#metro".
8678	Kind string `json:"kind,omitempty"`
8679
8680	// MetroCode: Metro code of this metro region. This is equivalent to
8681	// dma_id.
8682	MetroCode string `json:"metroCode,omitempty"`
8683
8684	// Name: Name of this metro region.
8685	Name string `json:"name,omitempty"`
8686
8687	// ForceSendFields is a list of field names (e.g. "CountryCode") to
8688	// unconditionally include in API requests. By default, fields with
8689	// empty values are omitted from API requests. However, any non-pointer,
8690	// non-interface field appearing in ForceSendFields will be sent to the
8691	// server regardless of whether the field is empty or not. This may be
8692	// used to include empty fields in Patch requests.
8693	ForceSendFields []string `json:"-"`
8694
8695	// NullFields is a list of field names (e.g. "CountryCode") to include
8696	// in API requests with the JSON null value. By default, fields with
8697	// empty values are omitted from API requests. However, any field with
8698	// an empty value appearing in NullFields will be sent to the server as
8699	// null. It is an error if a field in this list has a non-empty value.
8700	// This may be used to include null fields in Patch requests.
8701	NullFields []string `json:"-"`
8702}
8703
8704func (s *Metro) MarshalJSON() ([]byte, error) {
8705	type NoMethod Metro
8706	raw := NoMethod(*s)
8707	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8708}
8709
8710// MetrosListResponse: Metro List Response
8711type MetrosListResponse struct {
8712	// Kind: Identifies what kind of resource this is. Value: the fixed
8713	// string "dfareporting#metrosListResponse".
8714	Kind string `json:"kind,omitempty"`
8715
8716	// Metros: Metro collection.
8717	Metros []*Metro `json:"metros,omitempty"`
8718
8719	// ServerResponse contains the HTTP response code and headers from the
8720	// server.
8721	googleapi.ServerResponse `json:"-"`
8722
8723	// ForceSendFields is a list of field names (e.g. "Kind") to
8724	// unconditionally include in API requests. By default, fields with
8725	// empty values are omitted from API requests. However, any non-pointer,
8726	// non-interface field appearing in ForceSendFields will be sent to the
8727	// server regardless of whether the field is empty or not. This may be
8728	// used to include empty fields in Patch requests.
8729	ForceSendFields []string `json:"-"`
8730
8731	// NullFields is a list of field names (e.g. "Kind") to include in API
8732	// requests with the JSON null value. By default, fields with empty
8733	// values are omitted from API requests. However, any field with an
8734	// empty value appearing in NullFields will be sent to the server as
8735	// null. It is an error if a field in this list has a non-empty value.
8736	// This may be used to include null fields in Patch requests.
8737	NullFields []string `json:"-"`
8738}
8739
8740func (s *MetrosListResponse) MarshalJSON() ([]byte, error) {
8741	type NoMethod MetrosListResponse
8742	raw := NoMethod(*s)
8743	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8744}
8745
8746// MobileApp: Contains information about a mobile app. Used as a landing
8747// page deep link.
8748type MobileApp struct {
8749	// Directory: Mobile app directory.
8750	//
8751	// Possible values:
8752	//   "APPLE_APP_STORE"
8753	//   "GOOGLE_PLAY_STORE"
8754	//   "UNKNOWN"
8755	Directory string `json:"directory,omitempty"`
8756
8757	// Id: ID of this mobile app.
8758	Id string `json:"id,omitempty"`
8759
8760	// Kind: Identifies what kind of resource this is. Value: the fixed
8761	// string "dfareporting#mobileApp".
8762	Kind string `json:"kind,omitempty"`
8763
8764	// PublisherName: Publisher name.
8765	PublisherName string `json:"publisherName,omitempty"`
8766
8767	// Title: Title of this mobile app.
8768	Title string `json:"title,omitempty"`
8769
8770	// ServerResponse contains the HTTP response code and headers from the
8771	// server.
8772	googleapi.ServerResponse `json:"-"`
8773
8774	// ForceSendFields is a list of field names (e.g. "Directory") to
8775	// unconditionally include in API requests. By default, fields with
8776	// empty values are omitted from API requests. However, any non-pointer,
8777	// non-interface field appearing in ForceSendFields will be sent to the
8778	// server regardless of whether the field is empty or not. This may be
8779	// used to include empty fields in Patch requests.
8780	ForceSendFields []string `json:"-"`
8781
8782	// NullFields is a list of field names (e.g. "Directory") to include in
8783	// API requests with the JSON null value. By default, fields with empty
8784	// values are omitted from API requests. However, any field with an
8785	// empty value appearing in NullFields will be sent to the server as
8786	// null. It is an error if a field in this list has a non-empty value.
8787	// This may be used to include null fields in Patch requests.
8788	NullFields []string `json:"-"`
8789}
8790
8791func (s *MobileApp) MarshalJSON() ([]byte, error) {
8792	type NoMethod MobileApp
8793	raw := NoMethod(*s)
8794	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8795}
8796
8797// MobileAppsListResponse: Mobile app List Response
8798type MobileAppsListResponse struct {
8799	// Kind: Identifies what kind of resource this is. Value: the fixed
8800	// string "dfareporting#mobileAppsListResponse".
8801	Kind string `json:"kind,omitempty"`
8802
8803	// MobileApps: Mobile apps collection.
8804	MobileApps []*MobileApp `json:"mobileApps,omitempty"`
8805
8806	// NextPageToken: Pagination token to be used for the next list
8807	// operation.
8808	NextPageToken string `json:"nextPageToken,omitempty"`
8809
8810	// ServerResponse contains the HTTP response code and headers from the
8811	// server.
8812	googleapi.ServerResponse `json:"-"`
8813
8814	// ForceSendFields is a list of field names (e.g. "Kind") to
8815	// unconditionally include in API requests. By default, fields with
8816	// empty values are omitted from API requests. However, any non-pointer,
8817	// non-interface field appearing in ForceSendFields will be sent to the
8818	// server regardless of whether the field is empty or not. This may be
8819	// used to include empty fields in Patch requests.
8820	ForceSendFields []string `json:"-"`
8821
8822	// NullFields is a list of field names (e.g. "Kind") to include in API
8823	// requests with the JSON null value. By default, fields with empty
8824	// values are omitted from API requests. However, any field with an
8825	// empty value appearing in NullFields will be sent to the server as
8826	// null. It is an error if a field in this list has a non-empty value.
8827	// This may be used to include null fields in Patch requests.
8828	NullFields []string `json:"-"`
8829}
8830
8831func (s *MobileAppsListResponse) MarshalJSON() ([]byte, error) {
8832	type NoMethod MobileAppsListResponse
8833	raw := NoMethod(*s)
8834	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8835}
8836
8837// MobileCarrier: Contains information about a mobile carrier that can
8838// be targeted by ads.
8839type MobileCarrier struct {
8840	// CountryCode: Country code of the country to which this mobile carrier
8841	// belongs.
8842	CountryCode string `json:"countryCode,omitempty"`
8843
8844	// CountryDartId: DART ID of the country to which this mobile carrier
8845	// belongs.
8846	CountryDartId int64 `json:"countryDartId,omitempty,string"`
8847
8848	// Id: ID of this mobile carrier.
8849	Id int64 `json:"id,omitempty,string"`
8850
8851	// Kind: Identifies what kind of resource this is. Value: the fixed
8852	// string "dfareporting#mobileCarrier".
8853	Kind string `json:"kind,omitempty"`
8854
8855	// Name: Name of this mobile carrier.
8856	Name string `json:"name,omitempty"`
8857
8858	// ServerResponse contains the HTTP response code and headers from the
8859	// server.
8860	googleapi.ServerResponse `json:"-"`
8861
8862	// ForceSendFields is a list of field names (e.g. "CountryCode") to
8863	// unconditionally include in API requests. By default, fields with
8864	// empty values are omitted from API requests. However, any non-pointer,
8865	// non-interface field appearing in ForceSendFields will be sent to the
8866	// server regardless of whether the field is empty or not. This may be
8867	// used to include empty fields in Patch requests.
8868	ForceSendFields []string `json:"-"`
8869
8870	// NullFields is a list of field names (e.g. "CountryCode") to include
8871	// in API requests with the JSON null value. By default, fields with
8872	// empty values are omitted from API requests. However, any field with
8873	// an empty value appearing in NullFields will be sent to the server as
8874	// null. It is an error if a field in this list has a non-empty value.
8875	// This may be used to include null fields in Patch requests.
8876	NullFields []string `json:"-"`
8877}
8878
8879func (s *MobileCarrier) MarshalJSON() ([]byte, error) {
8880	type NoMethod MobileCarrier
8881	raw := NoMethod(*s)
8882	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8883}
8884
8885// MobileCarriersListResponse: Mobile Carrier List Response
8886type MobileCarriersListResponse struct {
8887	// Kind: Identifies what kind of resource this is. Value: the fixed
8888	// string "dfareporting#mobileCarriersListResponse".
8889	Kind string `json:"kind,omitempty"`
8890
8891	// MobileCarriers: Mobile carrier collection.
8892	MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
8893
8894	// ServerResponse contains the HTTP response code and headers from the
8895	// server.
8896	googleapi.ServerResponse `json:"-"`
8897
8898	// ForceSendFields is a list of field names (e.g. "Kind") to
8899	// unconditionally include in API requests. By default, fields with
8900	// empty values are omitted from API requests. However, any non-pointer,
8901	// non-interface field appearing in ForceSendFields will be sent to the
8902	// server regardless of whether the field is empty or not. This may be
8903	// used to include empty fields in Patch requests.
8904	ForceSendFields []string `json:"-"`
8905
8906	// NullFields is a list of field names (e.g. "Kind") to include in API
8907	// requests with the JSON null value. By default, fields with empty
8908	// values are omitted from API requests. However, any field with an
8909	// empty value appearing in NullFields will be sent to the server as
8910	// null. It is an error if a field in this list has a non-empty value.
8911	// This may be used to include null fields in Patch requests.
8912	NullFields []string `json:"-"`
8913}
8914
8915func (s *MobileCarriersListResponse) MarshalJSON() ([]byte, error) {
8916	type NoMethod MobileCarriersListResponse
8917	raw := NoMethod(*s)
8918	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8919}
8920
8921// ObjectFilter: Object Filter.
8922type ObjectFilter struct {
8923	// Kind: Identifies what kind of resource this is. Value: the fixed
8924	// string "dfareporting#objectFilter".
8925	Kind string `json:"kind,omitempty"`
8926
8927	// ObjectIds: Applicable when status is ASSIGNED. The user has access to
8928	// objects with these object IDs.
8929	ObjectIds googleapi.Int64s `json:"objectIds,omitempty"`
8930
8931	// Status: Status of the filter. NONE means the user has access to none
8932	// of the objects. ALL means the user has access to all objects.
8933	// ASSIGNED means the user has access to the objects with IDs in the
8934	// objectIds list.
8935	//
8936	// Possible values:
8937	//   "ALL"
8938	//   "ASSIGNED"
8939	//   "NONE"
8940	Status string `json:"status,omitempty"`
8941
8942	// ForceSendFields is a list of field names (e.g. "Kind") to
8943	// unconditionally include in API requests. By default, fields with
8944	// empty values are omitted from API requests. However, any non-pointer,
8945	// non-interface field appearing in ForceSendFields will be sent to the
8946	// server regardless of whether the field is empty or not. This may be
8947	// used to include empty fields in Patch requests.
8948	ForceSendFields []string `json:"-"`
8949
8950	// NullFields is a list of field names (e.g. "Kind") to include in API
8951	// requests with the JSON null value. By default, fields with empty
8952	// values are omitted from API requests. However, any field with an
8953	// empty value appearing in NullFields will be sent to the server as
8954	// null. It is an error if a field in this list has a non-empty value.
8955	// This may be used to include null fields in Patch requests.
8956	NullFields []string `json:"-"`
8957}
8958
8959func (s *ObjectFilter) MarshalJSON() ([]byte, error) {
8960	type NoMethod ObjectFilter
8961	raw := NoMethod(*s)
8962	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8963}
8964
8965// OffsetPosition: Offset Position.
8966type OffsetPosition struct {
8967	// Left: Offset distance from left side of an asset or a window.
8968	Left int64 `json:"left,omitempty"`
8969
8970	// Top: Offset distance from top side of an asset or a window.
8971	Top int64 `json:"top,omitempty"`
8972
8973	// ForceSendFields is a list of field names (e.g. "Left") to
8974	// unconditionally include in API requests. By default, fields with
8975	// empty values are omitted from API requests. However, any non-pointer,
8976	// non-interface field appearing in ForceSendFields will be sent to the
8977	// server regardless of whether the field is empty or not. This may be
8978	// used to include empty fields in Patch requests.
8979	ForceSendFields []string `json:"-"`
8980
8981	// NullFields is a list of field names (e.g. "Left") to include in API
8982	// requests with the JSON null value. By default, fields with empty
8983	// values are omitted from API requests. However, any field with an
8984	// empty value appearing in NullFields will be sent to the server as
8985	// null. It is an error if a field in this list has a non-empty value.
8986	// This may be used to include null fields in Patch requests.
8987	NullFields []string `json:"-"`
8988}
8989
8990func (s *OffsetPosition) MarshalJSON() ([]byte, error) {
8991	type NoMethod OffsetPosition
8992	raw := NoMethod(*s)
8993	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8994}
8995
8996// OmnitureSettings: Omniture Integration Settings.
8997type OmnitureSettings struct {
8998	// OmnitureCostDataEnabled: Whether placement cost data will be sent to
8999	// Omniture. This property can be enabled only if
9000	// omnitureIntegrationEnabled is true.
9001	OmnitureCostDataEnabled bool `json:"omnitureCostDataEnabled,omitempty"`
9002
9003	// OmnitureIntegrationEnabled: Whether Omniture integration is enabled.
9004	// This property can be enabled only when the "Advanced Ad Serving"
9005	// account setting is enabled.
9006	OmnitureIntegrationEnabled bool `json:"omnitureIntegrationEnabled,omitempty"`
9007
9008	// ForceSendFields is a list of field names (e.g.
9009	// "OmnitureCostDataEnabled") to unconditionally include in API
9010	// requests. By default, fields with empty values are omitted from API
9011	// requests. However, any non-pointer, non-interface field appearing in
9012	// ForceSendFields will be sent to the server regardless of whether the
9013	// field is empty or not. This may be used to include empty fields in
9014	// Patch requests.
9015	ForceSendFields []string `json:"-"`
9016
9017	// NullFields is a list of field names (e.g. "OmnitureCostDataEnabled")
9018	// to include in API requests with the JSON null value. By default,
9019	// fields with empty values are omitted from API requests. However, any
9020	// field with an empty value appearing in NullFields will be sent to the
9021	// server as null. It is an error if a field in this list has a
9022	// non-empty value. This may be used to include null fields in Patch
9023	// requests.
9024	NullFields []string `json:"-"`
9025}
9026
9027func (s *OmnitureSettings) MarshalJSON() ([]byte, error) {
9028	type NoMethod OmnitureSettings
9029	raw := NoMethod(*s)
9030	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9031}
9032
9033// OperatingSystem: Contains information about an operating system that
9034// can be targeted by ads.
9035type OperatingSystem struct {
9036	// DartId: DART ID of this operating system. This is the ID used for
9037	// targeting.
9038	DartId int64 `json:"dartId,omitempty,string"`
9039
9040	// Desktop: Whether this operating system is for desktop.
9041	Desktop bool `json:"desktop,omitempty"`
9042
9043	// Kind: Identifies what kind of resource this is. Value: the fixed
9044	// string "dfareporting#operatingSystem".
9045	Kind string `json:"kind,omitempty"`
9046
9047	// Mobile: Whether this operating system is for mobile.
9048	Mobile bool `json:"mobile,omitempty"`
9049
9050	// Name: Name of this operating system.
9051	Name string `json:"name,omitempty"`
9052
9053	// ServerResponse contains the HTTP response code and headers from the
9054	// server.
9055	googleapi.ServerResponse `json:"-"`
9056
9057	// ForceSendFields is a list of field names (e.g. "DartId") to
9058	// unconditionally include in API requests. By default, fields with
9059	// empty values are omitted from API requests. However, any non-pointer,
9060	// non-interface field appearing in ForceSendFields will be sent to the
9061	// server regardless of whether the field is empty or not. This may be
9062	// used to include empty fields in Patch requests.
9063	ForceSendFields []string `json:"-"`
9064
9065	// NullFields is a list of field names (e.g. "DartId") to include in API
9066	// requests with the JSON null value. By default, fields with empty
9067	// values are omitted from API requests. However, any field with an
9068	// empty value appearing in NullFields will be sent to the server as
9069	// null. It is an error if a field in this list has a non-empty value.
9070	// This may be used to include null fields in Patch requests.
9071	NullFields []string `json:"-"`
9072}
9073
9074func (s *OperatingSystem) MarshalJSON() ([]byte, error) {
9075	type NoMethod OperatingSystem
9076	raw := NoMethod(*s)
9077	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9078}
9079
9080// OperatingSystemVersion: Contains information about a particular
9081// version of an operating system that can be targeted by ads.
9082type OperatingSystemVersion struct {
9083	// Id: ID of this operating system version.
9084	Id int64 `json:"id,omitempty,string"`
9085
9086	// Kind: Identifies what kind of resource this is. Value: the fixed
9087	// string "dfareporting#operatingSystemVersion".
9088	Kind string `json:"kind,omitempty"`
9089
9090	// MajorVersion: Major version (leftmost number) of this operating
9091	// system version.
9092	MajorVersion string `json:"majorVersion,omitempty"`
9093
9094	// MinorVersion: Minor version (number after the first dot) of this
9095	// operating system version.
9096	MinorVersion string `json:"minorVersion,omitempty"`
9097
9098	// Name: Name of this operating system version.
9099	Name string `json:"name,omitempty"`
9100
9101	// OperatingSystem: Operating system of this operating system version.
9102	OperatingSystem *OperatingSystem `json:"operatingSystem,omitempty"`
9103
9104	// ServerResponse contains the HTTP response code and headers from the
9105	// server.
9106	googleapi.ServerResponse `json:"-"`
9107
9108	// ForceSendFields is a list of field names (e.g. "Id") to
9109	// unconditionally include in API requests. By default, fields with
9110	// empty values are omitted from API requests. However, any non-pointer,
9111	// non-interface field appearing in ForceSendFields will be sent to the
9112	// server regardless of whether the field is empty or not. This may be
9113	// used to include empty fields in Patch requests.
9114	ForceSendFields []string `json:"-"`
9115
9116	// NullFields is a list of field names (e.g. "Id") to include in API
9117	// requests with the JSON null value. By default, fields with empty
9118	// values are omitted from API requests. However, any field with an
9119	// empty value appearing in NullFields will be sent to the server as
9120	// null. It is an error if a field in this list has a non-empty value.
9121	// This may be used to include null fields in Patch requests.
9122	NullFields []string `json:"-"`
9123}
9124
9125func (s *OperatingSystemVersion) MarshalJSON() ([]byte, error) {
9126	type NoMethod OperatingSystemVersion
9127	raw := NoMethod(*s)
9128	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9129}
9130
9131// OperatingSystemVersionsListResponse: Operating System Version List
9132// Response
9133type OperatingSystemVersionsListResponse struct {
9134	// Kind: Identifies what kind of resource this is. Value: the fixed
9135	// string "dfareporting#operatingSystemVersionsListResponse".
9136	Kind string `json:"kind,omitempty"`
9137
9138	// OperatingSystemVersions: Operating system version collection.
9139	OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
9140
9141	// ServerResponse contains the HTTP response code and headers from the
9142	// server.
9143	googleapi.ServerResponse `json:"-"`
9144
9145	// ForceSendFields is a list of field names (e.g. "Kind") to
9146	// unconditionally include in API requests. By default, fields with
9147	// empty values are omitted from API requests. However, any non-pointer,
9148	// non-interface field appearing in ForceSendFields will be sent to the
9149	// server regardless of whether the field is empty or not. This may be
9150	// used to include empty fields in Patch requests.
9151	ForceSendFields []string `json:"-"`
9152
9153	// NullFields is a list of field names (e.g. "Kind") to include in API
9154	// requests with the JSON null value. By default, fields with empty
9155	// values are omitted from API requests. However, any field with an
9156	// empty value appearing in NullFields will be sent to the server as
9157	// null. It is an error if a field in this list has a non-empty value.
9158	// This may be used to include null fields in Patch requests.
9159	NullFields []string `json:"-"`
9160}
9161
9162func (s *OperatingSystemVersionsListResponse) MarshalJSON() ([]byte, error) {
9163	type NoMethod OperatingSystemVersionsListResponse
9164	raw := NoMethod(*s)
9165	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9166}
9167
9168// OperatingSystemsListResponse: Operating System List Response
9169type OperatingSystemsListResponse struct {
9170	// Kind: Identifies what kind of resource this is. Value: the fixed
9171	// string "dfareporting#operatingSystemsListResponse".
9172	Kind string `json:"kind,omitempty"`
9173
9174	// OperatingSystems: Operating system collection.
9175	OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
9176
9177	// ServerResponse contains the HTTP response code and headers from the
9178	// server.
9179	googleapi.ServerResponse `json:"-"`
9180
9181	// ForceSendFields is a list of field names (e.g. "Kind") to
9182	// unconditionally include in API requests. By default, fields with
9183	// empty values are omitted from API requests. However, any non-pointer,
9184	// non-interface field appearing in ForceSendFields will be sent to the
9185	// server regardless of whether the field is empty or not. This may be
9186	// used to include empty fields in Patch requests.
9187	ForceSendFields []string `json:"-"`
9188
9189	// NullFields is a list of field names (e.g. "Kind") to include in API
9190	// requests with the JSON null value. By default, fields with empty
9191	// values are omitted from API requests. However, any field with an
9192	// empty value appearing in NullFields will be sent to the server as
9193	// null. It is an error if a field in this list has a non-empty value.
9194	// This may be used to include null fields in Patch requests.
9195	NullFields []string `json:"-"`
9196}
9197
9198func (s *OperatingSystemsListResponse) MarshalJSON() ([]byte, error) {
9199	type NoMethod OperatingSystemsListResponse
9200	raw := NoMethod(*s)
9201	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9202}
9203
9204// OptimizationActivity: Creative optimization activity.
9205type OptimizationActivity struct {
9206	// FloodlightActivityId: Floodlight activity ID of this optimization
9207	// activity. This is a required field.
9208	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
9209
9210	// FloodlightActivityIdDimensionValue: Dimension value for the ID of the
9211	// floodlight activity. This is a read-only, auto-generated field.
9212	FloodlightActivityIdDimensionValue *DimensionValue `json:"floodlightActivityIdDimensionValue,omitempty"`
9213
9214	// Weight: Weight associated with this optimization. The weight assigned
9215	// will be understood in proportion to the weights assigned to the other
9216	// optimization activities. Value must be greater than or equal to 1.
9217	Weight int64 `json:"weight,omitempty"`
9218
9219	// ForceSendFields is a list of field names (e.g.
9220	// "FloodlightActivityId") to unconditionally include in API requests.
9221	// By default, fields with empty values are omitted from API requests.
9222	// However, any non-pointer, non-interface field appearing in
9223	// ForceSendFields will be sent to the server regardless of whether the
9224	// field is empty or not. This may be used to include empty fields in
9225	// Patch requests.
9226	ForceSendFields []string `json:"-"`
9227
9228	// NullFields is a list of field names (e.g. "FloodlightActivityId") to
9229	// include in API requests with the JSON null value. By default, fields
9230	// with empty values are omitted from API requests. However, any field
9231	// with an empty value appearing in NullFields will be sent to the
9232	// server as null. It is an error if a field in this list has a
9233	// non-empty value. This may be used to include null fields in Patch
9234	// requests.
9235	NullFields []string `json:"-"`
9236}
9237
9238func (s *OptimizationActivity) MarshalJSON() ([]byte, error) {
9239	type NoMethod OptimizationActivity
9240	raw := NoMethod(*s)
9241	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9242}
9243
9244// Order: Describes properties of a Planning order.
9245type Order struct {
9246	// AccountId: Account ID of this order.
9247	AccountId int64 `json:"accountId,omitempty,string"`
9248
9249	// AdvertiserId: Advertiser ID of this order.
9250	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9251
9252	// ApproverUserProfileIds: IDs for users that have to approve documents
9253	// created for this order.
9254	ApproverUserProfileIds googleapi.Int64s `json:"approverUserProfileIds,omitempty"`
9255
9256	// BuyerInvoiceId: Buyer invoice ID associated with this order.
9257	BuyerInvoiceId string `json:"buyerInvoiceId,omitempty"`
9258
9259	// BuyerOrganizationName: Name of the buyer organization.
9260	BuyerOrganizationName string `json:"buyerOrganizationName,omitempty"`
9261
9262	// Comments: Comments in this order.
9263	Comments string `json:"comments,omitempty"`
9264
9265	// Contacts: Contacts for this order.
9266	Contacts []*OrderContact `json:"contacts,omitempty"`
9267
9268	// Id: ID of this order. This is a read-only, auto-generated field.
9269	Id int64 `json:"id,omitempty,string"`
9270
9271	// Kind: Identifies what kind of resource this is. Value: the fixed
9272	// string "dfareporting#order".
9273	Kind string `json:"kind,omitempty"`
9274
9275	// LastModifiedInfo: Information about the most recent modification of
9276	// this order.
9277	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9278
9279	// Name: Name of this order.
9280	Name string `json:"name,omitempty"`
9281
9282	// Notes: Notes of this order.
9283	Notes string `json:"notes,omitempty"`
9284
9285	// PlanningTermId: ID of the terms and conditions template used in this
9286	// order.
9287	PlanningTermId int64 `json:"planningTermId,omitempty,string"`
9288
9289	// ProjectId: Project ID of this order.
9290	ProjectId int64 `json:"projectId,omitempty,string"`
9291
9292	// SellerOrderId: Seller order ID associated with this order.
9293	SellerOrderId string `json:"sellerOrderId,omitempty"`
9294
9295	// SellerOrganizationName: Name of the seller organization.
9296	SellerOrganizationName string `json:"sellerOrganizationName,omitempty"`
9297
9298	// SiteId: Site IDs this order is associated with.
9299	SiteId googleapi.Int64s `json:"siteId,omitempty"`
9300
9301	// SiteNames: Free-form site names this order is associated with.
9302	SiteNames []string `json:"siteNames,omitempty"`
9303
9304	// SubaccountId: Subaccount ID of this order.
9305	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9306
9307	// TermsAndConditions: Terms and conditions of this order.
9308	TermsAndConditions string `json:"termsAndConditions,omitempty"`
9309
9310	// ServerResponse contains the HTTP response code and headers from the
9311	// server.
9312	googleapi.ServerResponse `json:"-"`
9313
9314	// ForceSendFields is a list of field names (e.g. "AccountId") to
9315	// unconditionally include in API requests. By default, fields with
9316	// empty values are omitted from API requests. However, any non-pointer,
9317	// non-interface field appearing in ForceSendFields will be sent to the
9318	// server regardless of whether the field is empty or not. This may be
9319	// used to include empty fields in Patch requests.
9320	ForceSendFields []string `json:"-"`
9321
9322	// NullFields is a list of field names (e.g. "AccountId") to include in
9323	// API requests with the JSON null value. By default, fields with empty
9324	// values are omitted from API requests. However, any field with an
9325	// empty value appearing in NullFields will be sent to the server as
9326	// null. It is an error if a field in this list has a non-empty value.
9327	// This may be used to include null fields in Patch requests.
9328	NullFields []string `json:"-"`
9329}
9330
9331func (s *Order) MarshalJSON() ([]byte, error) {
9332	type NoMethod Order
9333	raw := NoMethod(*s)
9334	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9335}
9336
9337// OrderContact: Contact of an order.
9338type OrderContact struct {
9339	// ContactInfo: Free-form information about this contact. It could be
9340	// any information related to this contact in addition to type, title,
9341	// name, and signature user profile ID.
9342	ContactInfo string `json:"contactInfo,omitempty"`
9343
9344	// ContactName: Name of this contact.
9345	ContactName string `json:"contactName,omitempty"`
9346
9347	// ContactTitle: Title of this contact.
9348	ContactTitle string `json:"contactTitle,omitempty"`
9349
9350	// ContactType: Type of this contact.
9351	//
9352	// Possible values:
9353	//   "PLANNING_ORDER_CONTACT_BUYER_BILLING_CONTACT"
9354	//   "PLANNING_ORDER_CONTACT_BUYER_CONTACT"
9355	//   "PLANNING_ORDER_CONTACT_SELLER_CONTACT"
9356	ContactType string `json:"contactType,omitempty"`
9357
9358	// SignatureUserProfileId: ID of the user profile containing the
9359	// signature that will be embedded into order documents.
9360	SignatureUserProfileId int64 `json:"signatureUserProfileId,omitempty,string"`
9361
9362	// ForceSendFields is a list of field names (e.g. "ContactInfo") to
9363	// unconditionally include in API requests. By default, fields with
9364	// empty values are omitted from API requests. However, any non-pointer,
9365	// non-interface field appearing in ForceSendFields will be sent to the
9366	// server regardless of whether the field is empty or not. This may be
9367	// used to include empty fields in Patch requests.
9368	ForceSendFields []string `json:"-"`
9369
9370	// NullFields is a list of field names (e.g. "ContactInfo") to include
9371	// in API requests with the JSON null value. By default, fields with
9372	// empty values are omitted from API requests. However, any field with
9373	// an empty value appearing in NullFields will be sent to the server as
9374	// null. It is an error if a field in this list has a non-empty value.
9375	// This may be used to include null fields in Patch requests.
9376	NullFields []string `json:"-"`
9377}
9378
9379func (s *OrderContact) MarshalJSON() ([]byte, error) {
9380	type NoMethod OrderContact
9381	raw := NoMethod(*s)
9382	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9383}
9384
9385// OrderDocument: Contains properties of a Planning order document.
9386type OrderDocument struct {
9387	// AccountId: Account ID of this order document.
9388	AccountId int64 `json:"accountId,omitempty,string"`
9389
9390	// AdvertiserId: Advertiser ID of this order document.
9391	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9392
9393	// AmendedOrderDocumentId: The amended order document ID of this order
9394	// document. An order document can be created by optionally amending
9395	// another order document so that the change history can be preserved.
9396	AmendedOrderDocumentId int64 `json:"amendedOrderDocumentId,omitempty,string"`
9397
9398	// ApprovedByUserProfileIds: IDs of users who have approved this order
9399	// document.
9400	ApprovedByUserProfileIds googleapi.Int64s `json:"approvedByUserProfileIds,omitempty"`
9401
9402	// Cancelled: Whether this order document is cancelled.
9403	Cancelled bool `json:"cancelled,omitempty"`
9404
9405	// CreatedInfo: Information about the creation of this order document.
9406	CreatedInfo *LastModifiedInfo `json:"createdInfo,omitempty"`
9407
9408	// EffectiveDate: Effective date of this order document.
9409	EffectiveDate string `json:"effectiveDate,omitempty"`
9410
9411	// Id: ID of this order document.
9412	Id int64 `json:"id,omitempty,string"`
9413
9414	// Kind: Identifies what kind of resource this is. Value: the fixed
9415	// string "dfareporting#orderDocument".
9416	Kind string `json:"kind,omitempty"`
9417
9418	// LastSentRecipients: List of email addresses that received the last
9419	// sent document.
9420	LastSentRecipients []string `json:"lastSentRecipients,omitempty"`
9421
9422	// LastSentTime: Timestamp of the last email sent with this order
9423	// document.
9424	LastSentTime string `json:"lastSentTime,omitempty"`
9425
9426	// OrderId: ID of the order from which this order document is created.
9427	OrderId int64 `json:"orderId,omitempty,string"`
9428
9429	// ProjectId: Project ID of this order document.
9430	ProjectId int64 `json:"projectId,omitempty,string"`
9431
9432	// Signed: Whether this order document has been signed.
9433	Signed bool `json:"signed,omitempty"`
9434
9435	// SubaccountId: Subaccount ID of this order document.
9436	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9437
9438	// Title: Title of this order document.
9439	Title string `json:"title,omitempty"`
9440
9441	// Type: Type of this order document
9442	//
9443	// Possible values:
9444	//   "PLANNING_ORDER_TYPE_CHANGE_ORDER"
9445	//   "PLANNING_ORDER_TYPE_INSERTION_ORDER"
9446	Type string `json:"type,omitempty"`
9447
9448	// ServerResponse contains the HTTP response code and headers from the
9449	// server.
9450	googleapi.ServerResponse `json:"-"`
9451
9452	// ForceSendFields is a list of field names (e.g. "AccountId") to
9453	// unconditionally include in API requests. By default, fields with
9454	// empty values are omitted from API requests. However, any non-pointer,
9455	// non-interface field appearing in ForceSendFields will be sent to the
9456	// server regardless of whether the field is empty or not. This may be
9457	// used to include empty fields in Patch requests.
9458	ForceSendFields []string `json:"-"`
9459
9460	// NullFields is a list of field names (e.g. "AccountId") to include in
9461	// API requests with the JSON null value. By default, fields with empty
9462	// values are omitted from API requests. However, any field with an
9463	// empty value appearing in NullFields will be sent to the server as
9464	// null. It is an error if a field in this list has a non-empty value.
9465	// This may be used to include null fields in Patch requests.
9466	NullFields []string `json:"-"`
9467}
9468
9469func (s *OrderDocument) MarshalJSON() ([]byte, error) {
9470	type NoMethod OrderDocument
9471	raw := NoMethod(*s)
9472	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9473}
9474
9475// OrderDocumentsListResponse: Order document List Response
9476type OrderDocumentsListResponse struct {
9477	// Kind: Identifies what kind of resource this is. Value: the fixed
9478	// string "dfareporting#orderDocumentsListResponse".
9479	Kind string `json:"kind,omitempty"`
9480
9481	// NextPageToken: Pagination token to be used for the next list
9482	// operation.
9483	NextPageToken string `json:"nextPageToken,omitempty"`
9484
9485	// OrderDocuments: Order document collection
9486	OrderDocuments []*OrderDocument `json:"orderDocuments,omitempty"`
9487
9488	// ServerResponse contains the HTTP response code and headers from the
9489	// server.
9490	googleapi.ServerResponse `json:"-"`
9491
9492	// ForceSendFields is a list of field names (e.g. "Kind") to
9493	// unconditionally include in API requests. By default, fields with
9494	// empty values are omitted from API requests. However, any non-pointer,
9495	// non-interface field appearing in ForceSendFields will be sent to the
9496	// server regardless of whether the field is empty or not. This may be
9497	// used to include empty fields in Patch requests.
9498	ForceSendFields []string `json:"-"`
9499
9500	// NullFields is a list of field names (e.g. "Kind") to include in API
9501	// requests with the JSON null value. By default, fields with empty
9502	// values are omitted from API requests. However, any field with an
9503	// empty value appearing in NullFields will be sent to the server as
9504	// null. It is an error if a field in this list has a non-empty value.
9505	// This may be used to include null fields in Patch requests.
9506	NullFields []string `json:"-"`
9507}
9508
9509func (s *OrderDocumentsListResponse) MarshalJSON() ([]byte, error) {
9510	type NoMethod OrderDocumentsListResponse
9511	raw := NoMethod(*s)
9512	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9513}
9514
9515// OrdersListResponse: Order List Response
9516type OrdersListResponse struct {
9517	// Kind: Identifies what kind of resource this is. Value: the fixed
9518	// string "dfareporting#ordersListResponse".
9519	Kind string `json:"kind,omitempty"`
9520
9521	// NextPageToken: Pagination token to be used for the next list
9522	// operation.
9523	NextPageToken string `json:"nextPageToken,omitempty"`
9524
9525	// Orders: Order collection.
9526	Orders []*Order `json:"orders,omitempty"`
9527
9528	// ServerResponse contains the HTTP response code and headers from the
9529	// server.
9530	googleapi.ServerResponse `json:"-"`
9531
9532	// ForceSendFields is a list of field names (e.g. "Kind") to
9533	// unconditionally include in API requests. By default, fields with
9534	// empty values are omitted from API requests. However, any non-pointer,
9535	// non-interface field appearing in ForceSendFields will be sent to the
9536	// server regardless of whether the field is empty or not. This may be
9537	// used to include empty fields in Patch requests.
9538	ForceSendFields []string `json:"-"`
9539
9540	// NullFields is a list of field names (e.g. "Kind") to include in API
9541	// requests with the JSON null value. By default, fields with empty
9542	// values are omitted from API requests. However, any field with an
9543	// empty value appearing in NullFields will be sent to the server as
9544	// null. It is an error if a field in this list has a non-empty value.
9545	// This may be used to include null fields in Patch requests.
9546	NullFields []string `json:"-"`
9547}
9548
9549func (s *OrdersListResponse) MarshalJSON() ([]byte, error) {
9550	type NoMethod OrdersListResponse
9551	raw := NoMethod(*s)
9552	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9553}
9554
9555// PathToConversionReportCompatibleFields: Represents fields that are
9556// compatible to be selected for a report of type "PATH_TO_CONVERSION".
9557type PathToConversionReportCompatibleFields struct {
9558	// ConversionDimensions: Conversion dimensions which are compatible to
9559	// be selected in the "conversionDimensions" section of the report.
9560	ConversionDimensions []*Dimension `json:"conversionDimensions,omitempty"`
9561
9562	// CustomFloodlightVariables: Custom floodlight variables which are
9563	// compatible to be selected in the "customFloodlightVariables" section
9564	// of the report.
9565	CustomFloodlightVariables []*Dimension `json:"customFloodlightVariables,omitempty"`
9566
9567	// Kind: The kind of resource this is, in this case
9568	// dfareporting#pathToConversionReportCompatibleFields.
9569	Kind string `json:"kind,omitempty"`
9570
9571	// Metrics: Metrics which are compatible to be selected in the
9572	// "metricNames" section of the report.
9573	Metrics []*Metric `json:"metrics,omitempty"`
9574
9575	// PerInteractionDimensions: Per-interaction dimensions which are
9576	// compatible to be selected in the "perInteractionDimensions" section
9577	// of the report.
9578	PerInteractionDimensions []*Dimension `json:"perInteractionDimensions,omitempty"`
9579
9580	// ForceSendFields is a list of field names (e.g.
9581	// "ConversionDimensions") to unconditionally include in API requests.
9582	// By default, fields with empty values are omitted from API requests.
9583	// However, any non-pointer, non-interface field appearing in
9584	// ForceSendFields will be sent to the server regardless of whether the
9585	// field is empty or not. This may be used to include empty fields in
9586	// Patch requests.
9587	ForceSendFields []string `json:"-"`
9588
9589	// NullFields is a list of field names (e.g. "ConversionDimensions") to
9590	// include in API requests with the JSON null value. By default, fields
9591	// with empty values are omitted from API requests. However, any field
9592	// with an empty value appearing in NullFields will be sent to the
9593	// server as null. It is an error if a field in this list has a
9594	// non-empty value. This may be used to include null fields in Patch
9595	// requests.
9596	NullFields []string `json:"-"`
9597}
9598
9599func (s *PathToConversionReportCompatibleFields) MarshalJSON() ([]byte, error) {
9600	type NoMethod PathToConversionReportCompatibleFields
9601	raw := NoMethod(*s)
9602	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9603}
9604
9605// Placement: Contains properties of a placement.
9606type Placement struct {
9607	// AccountId: Account ID of this placement. This field can be left
9608	// blank.
9609	AccountId int64 `json:"accountId,omitempty,string"`
9610
9611	// AdBlockingOptOut: Whether this placement opts out of ad blocking.
9612	// When true, ad blocking is disabled for this placement. When false,
9613	// the campaign and site settings take effect.
9614	AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
9615
9616	// AdditionalSizes: Additional sizes associated with this placement.
9617	// When inserting or updating a placement, only the size ID field is
9618	// used.
9619	AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
9620
9621	// AdvertiserId: Advertiser ID of this placement. This field can be left
9622	// blank.
9623	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9624
9625	// AdvertiserIdDimensionValue: Dimension value for the ID of the
9626	// advertiser. This is a read-only, auto-generated field.
9627	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
9628
9629	// Archived: Whether this placement is archived.
9630	Archived bool `json:"archived,omitempty"`
9631
9632	// CampaignId: Campaign ID of this placement. This field is a required
9633	// field on insertion.
9634	CampaignId int64 `json:"campaignId,omitempty,string"`
9635
9636	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
9637	// This is a read-only, auto-generated field.
9638	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
9639
9640	// Comment: Comments for this placement.
9641	Comment string `json:"comment,omitempty"`
9642
9643	// Compatibility: Placement compatibility. DISPLAY and
9644	// DISPLAY_INTERSTITIAL refer to rendering on desktop, on mobile devices
9645	// or in mobile apps for regular or interstitial ads respectively. APP
9646	// and APP_INTERSTITIAL are no longer allowed for new placement
9647	// insertions. Instead, use DISPLAY or DISPLAY_INTERSTITIAL.
9648	// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
9649	// with the VAST standard. This field is required on insertion.
9650	//
9651	// Possible values:
9652	//   "APP"
9653	//   "APP_INTERSTITIAL"
9654	//   "DISPLAY"
9655	//   "DISPLAY_INTERSTITIAL"
9656	//   "IN_STREAM_AUDIO"
9657	//   "IN_STREAM_VIDEO"
9658	Compatibility string `json:"compatibility,omitempty"`
9659
9660	// ContentCategoryId: ID of the content category assigned to this
9661	// placement.
9662	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
9663
9664	// CreateInfo: Information about the creation of this placement. This is
9665	// a read-only field.
9666	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
9667
9668	// DirectorySiteId: Directory site ID of this placement. On insert, you
9669	// must set either this field or the siteId field to specify the site
9670	// associated with this placement. This is a required field that is
9671	// read-only after insertion.
9672	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
9673
9674	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
9675	// directory site. This is a read-only, auto-generated field.
9676	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
9677
9678	// ExternalId: External ID for this placement.
9679	ExternalId string `json:"externalId,omitempty"`
9680
9681	// Id: ID of this placement. This is a read-only, auto-generated field.
9682	Id int64 `json:"id,omitempty,string"`
9683
9684	// IdDimensionValue: Dimension value for the ID of this placement. This
9685	// is a read-only, auto-generated field.
9686	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
9687
9688	// KeyName: Key name of this placement. This is a read-only,
9689	// auto-generated field.
9690	KeyName string `json:"keyName,omitempty"`
9691
9692	// Kind: Identifies what kind of resource this is. Value: the fixed
9693	// string "dfareporting#placement".
9694	Kind string `json:"kind,omitempty"`
9695
9696	// LastModifiedInfo: Information about the most recent modification of
9697	// this placement. This is a read-only field.
9698	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9699
9700	// LookbackConfiguration: Lookback window settings for this placement.
9701	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
9702
9703	// Name: Name of this placement.This is a required field and must be
9704	// less than 256 characters long.
9705	Name string `json:"name,omitempty"`
9706
9707	// PaymentApproved: Whether payment was approved for this placement.
9708	// This is a read-only field relevant only to publisher-paid placements.
9709	PaymentApproved bool `json:"paymentApproved,omitempty"`
9710
9711	// PaymentSource: Payment source for this placement. This is a required
9712	// field that is read-only after insertion.
9713	//
9714	// Possible values:
9715	//   "PLACEMENT_AGENCY_PAID"
9716	//   "PLACEMENT_PUBLISHER_PAID"
9717	PaymentSource string `json:"paymentSource,omitempty"`
9718
9719	// PlacementGroupId: ID of this placement's group, if applicable.
9720	PlacementGroupId int64 `json:"placementGroupId,omitempty,string"`
9721
9722	// PlacementGroupIdDimensionValue: Dimension value for the ID of the
9723	// placement group. This is a read-only, auto-generated field.
9724	PlacementGroupIdDimensionValue *DimensionValue `json:"placementGroupIdDimensionValue,omitempty"`
9725
9726	// PlacementStrategyId: ID of the placement strategy assigned to this
9727	// placement.
9728	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
9729
9730	// PricingSchedule: Pricing schedule of this placement. This field is
9731	// required on insertion, specifically subfields startDate, endDate and
9732	// pricingType.
9733	PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
9734
9735	// Primary: Whether this placement is the primary placement of a
9736	// roadblock (placement group). You cannot change this field from true
9737	// to false. Setting this field to true will automatically set the
9738	// primary field on the original primary placement of the roadblock to
9739	// false, and it will automatically set the roadblock's
9740	// primaryPlacementId field to the ID of this placement.
9741	Primary bool `json:"primary,omitempty"`
9742
9743	// PublisherUpdateInfo: Information about the last publisher update.
9744	// This is a read-only field.
9745	PublisherUpdateInfo *LastModifiedInfo `json:"publisherUpdateInfo,omitempty"`
9746
9747	// SiteId: Site ID associated with this placement. On insert, you must
9748	// set either this field or the directorySiteId field to specify the
9749	// site associated with this placement. This is a required field that is
9750	// read-only after insertion.
9751	SiteId int64 `json:"siteId,omitempty,string"`
9752
9753	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
9754	// a read-only, auto-generated field.
9755	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
9756
9757	// Size: Size associated with this placement. When inserting or updating
9758	// a placement, only the size ID field is used. This field is required
9759	// on insertion.
9760	Size *Size `json:"size,omitempty"`
9761
9762	// SslRequired: Whether creatives assigned to this placement must be
9763	// SSL-compliant.
9764	SslRequired bool `json:"sslRequired,omitempty"`
9765
9766	// Status: Third-party placement status.
9767	//
9768	// Possible values:
9769	//   "ACKNOWLEDGE_ACCEPTANCE"
9770	//   "ACKNOWLEDGE_REJECTION"
9771	//   "DRAFT"
9772	//   "PAYMENT_ACCEPTED"
9773	//   "PAYMENT_REJECTED"
9774	//   "PENDING_REVIEW"
9775	Status string `json:"status,omitempty"`
9776
9777	// SubaccountId: Subaccount ID of this placement. This field can be left
9778	// blank.
9779	SubaccountId int64 `json:"subaccountId,omitempty,string"`
9780
9781	// TagFormats: Tag formats to generate for this placement. This field is
9782	// required on insertion.
9783	// Acceptable values are:
9784	// - "PLACEMENT_TAG_STANDARD"
9785	// - "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
9786	// - "PLACEMENT_TAG_IFRAME_ILAYER"
9787	// - "PLACEMENT_TAG_INTERNAL_REDIRECT"
9788	// - "PLACEMENT_TAG_JAVASCRIPT"
9789	// - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
9790	// - "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
9791	// - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
9792	// - "PLACEMENT_TAG_CLICK_COMMANDS"
9793	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
9794	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
9795	// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
9796	// - "PLACEMENT_TAG_TRACKING"
9797	// - "PLACEMENT_TAG_TRACKING_IFRAME"
9798	// - "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
9799	//
9800	// Possible values:
9801	//   "PLACEMENT_TAG_CLICK_COMMANDS"
9802	//   "PLACEMENT_TAG_IFRAME_ILAYER"
9803	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
9804	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
9805	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
9806	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
9807	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
9808	//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
9809	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
9810	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
9811	//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
9812	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
9813	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
9814	//   "PLACEMENT_TAG_JAVASCRIPT"
9815	//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
9816	//   "PLACEMENT_TAG_STANDARD"
9817	//   "PLACEMENT_TAG_TRACKING"
9818	//   "PLACEMENT_TAG_TRACKING_IFRAME"
9819	//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
9820	TagFormats []string `json:"tagFormats,omitempty"`
9821
9822	// TagSetting: Tag settings for this placement.
9823	TagSetting *TagSetting `json:"tagSetting,omitempty"`
9824
9825	// VideoActiveViewOptOut: Whether Verification and ActiveView are
9826	// disabled for in-stream video creatives for this placement. The same
9827	// setting videoActiveViewOptOut exists on the site level -- the opt out
9828	// occurs if either of these settings are true. These settings are
9829	// distinct from DirectorySites.settings.activeViewOptOut or
9830	// Sites.siteSettings.activeViewOptOut which only apply to display ads.
9831	// However, Accounts.activeViewOptOut opts out both video traffic, as
9832	// well as display ads, from Verification and ActiveView.
9833	VideoActiveViewOptOut bool `json:"videoActiveViewOptOut,omitempty"`
9834
9835	// VideoSettings: A collection of settings which affect video creatives
9836	// served through this placement. Applicable to placements with
9837	// IN_STREAM_VIDEO compatibility.
9838	VideoSettings *VideoSettings `json:"videoSettings,omitempty"`
9839
9840	// VpaidAdapterChoice: VPAID adapter setting for this placement.
9841	// Controls which VPAID format the measurement adapter will use for
9842	// in-stream video creatives assigned to this placement.
9843	//
9844	// Note: Flash is no longer supported. This field now defaults to HTML5
9845	// when the following values are provided: FLASH, BOTH.
9846	//
9847	// Possible values:
9848	//   "BOTH"
9849	//   "DEFAULT"
9850	//   "FLASH"
9851	//   "HTML5"
9852	VpaidAdapterChoice string `json:"vpaidAdapterChoice,omitempty"`
9853
9854	// ServerResponse contains the HTTP response code and headers from the
9855	// server.
9856	googleapi.ServerResponse `json:"-"`
9857
9858	// ForceSendFields is a list of field names (e.g. "AccountId") to
9859	// unconditionally include in API requests. By default, fields with
9860	// empty values are omitted from API requests. However, any non-pointer,
9861	// non-interface field appearing in ForceSendFields will be sent to the
9862	// server regardless of whether the field is empty or not. This may be
9863	// used to include empty fields in Patch requests.
9864	ForceSendFields []string `json:"-"`
9865
9866	// NullFields is a list of field names (e.g. "AccountId") to include in
9867	// API requests with the JSON null value. By default, fields with empty
9868	// values are omitted from API requests. However, any field with an
9869	// empty value appearing in NullFields will be sent to the server as
9870	// null. It is an error if a field in this list has a non-empty value.
9871	// This may be used to include null fields in Patch requests.
9872	NullFields []string `json:"-"`
9873}
9874
9875func (s *Placement) MarshalJSON() ([]byte, error) {
9876	type NoMethod Placement
9877	raw := NoMethod(*s)
9878	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9879}
9880
9881// PlacementAssignment: Placement Assignment.
9882type PlacementAssignment struct {
9883	// Active: Whether this placement assignment is active. When true, the
9884	// placement will be included in the ad's rotation.
9885	Active bool `json:"active,omitempty"`
9886
9887	// PlacementId: ID of the placement to be assigned. This is a required
9888	// field.
9889	PlacementId int64 `json:"placementId,omitempty,string"`
9890
9891	// PlacementIdDimensionValue: Dimension value for the ID of the
9892	// placement. This is a read-only, auto-generated field.
9893	PlacementIdDimensionValue *DimensionValue `json:"placementIdDimensionValue,omitempty"`
9894
9895	// SslRequired: Whether the placement to be assigned requires SSL. This
9896	// is a read-only field that is auto-generated when the ad is inserted
9897	// or updated.
9898	SslRequired bool `json:"sslRequired,omitempty"`
9899
9900	// ForceSendFields is a list of field names (e.g. "Active") to
9901	// unconditionally include in API requests. By default, fields with
9902	// empty values are omitted from API requests. However, any non-pointer,
9903	// non-interface field appearing in ForceSendFields will be sent to the
9904	// server regardless of whether the field is empty or not. This may be
9905	// used to include empty fields in Patch requests.
9906	ForceSendFields []string `json:"-"`
9907
9908	// NullFields is a list of field names (e.g. "Active") to include in API
9909	// requests with the JSON null value. By default, fields with empty
9910	// values are omitted from API requests. However, any field with an
9911	// empty value appearing in NullFields will be sent to the server as
9912	// null. It is an error if a field in this list has a non-empty value.
9913	// This may be used to include null fields in Patch requests.
9914	NullFields []string `json:"-"`
9915}
9916
9917func (s *PlacementAssignment) MarshalJSON() ([]byte, error) {
9918	type NoMethod PlacementAssignment
9919	raw := NoMethod(*s)
9920	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9921}
9922
9923// PlacementGroup: Contains properties of a package or roadblock.
9924type PlacementGroup struct {
9925	// AccountId: Account ID of this placement group. This is a read-only
9926	// field that can be left blank.
9927	AccountId int64 `json:"accountId,omitempty,string"`
9928
9929	// AdvertiserId: Advertiser ID of this placement group. This is a
9930	// required field on insertion.
9931	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9932
9933	// AdvertiserIdDimensionValue: Dimension value for the ID of the
9934	// advertiser. This is a read-only, auto-generated field.
9935	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
9936
9937	// Archived: Whether this placement group is archived.
9938	Archived bool `json:"archived,omitempty"`
9939
9940	// CampaignId: Campaign ID of this placement group. This field is
9941	// required on insertion.
9942	CampaignId int64 `json:"campaignId,omitempty,string"`
9943
9944	// CampaignIdDimensionValue: Dimension value for the ID of the campaign.
9945	// This is a read-only, auto-generated field.
9946	CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
9947
9948	// ChildPlacementIds: IDs of placements which are assigned to this
9949	// placement group. This is a read-only, auto-generated field.
9950	ChildPlacementIds googleapi.Int64s `json:"childPlacementIds,omitempty"`
9951
9952	// Comment: Comments for this placement group.
9953	Comment string `json:"comment,omitempty"`
9954
9955	// ContentCategoryId: ID of the content category assigned to this
9956	// placement group.
9957	ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
9958
9959	// CreateInfo: Information about the creation of this placement group.
9960	// This is a read-only field.
9961	CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
9962
9963	// DirectorySiteId: Directory site ID associated with this placement
9964	// group. On insert, you must set either this field or the site_id field
9965	// to specify the site associated with this placement group. This is a
9966	// required field that is read-only after insertion.
9967	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
9968
9969	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
9970	// directory site. This is a read-only, auto-generated field.
9971	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
9972
9973	// ExternalId: External ID for this placement.
9974	ExternalId string `json:"externalId,omitempty"`
9975
9976	// Id: ID of this placement group. This is a read-only, auto-generated
9977	// field.
9978	Id int64 `json:"id,omitempty,string"`
9979
9980	// IdDimensionValue: Dimension value for the ID of this placement group.
9981	// This is a read-only, auto-generated field.
9982	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
9983
9984	// Kind: Identifies what kind of resource this is. Value: the fixed
9985	// string "dfareporting#placementGroup".
9986	Kind string `json:"kind,omitempty"`
9987
9988	// LastModifiedInfo: Information about the most recent modification of
9989	// this placement group. This is a read-only field.
9990	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9991
9992	// Name: Name of this placement group. This is a required field and must
9993	// be less than 256 characters long.
9994	Name string `json:"name,omitempty"`
9995
9996	// PlacementGroupType: Type of this placement group. A package is a
9997	// simple group of placements that acts as a single pricing point for a
9998	// group of tags. A roadblock is a group of placements that not only
9999	// acts as a single pricing point, but also assumes that all the tags in
10000	// it will be served at the same time. A roadblock requires one of its
10001	// assigned placements to be marked as primary for reporting. This field
10002	// is required on insertion.
10003	//
10004	// Possible values:
10005	//   "PLACEMENT_PACKAGE"
10006	//   "PLACEMENT_ROADBLOCK"
10007	PlacementGroupType string `json:"placementGroupType,omitempty"`
10008
10009	// PlacementStrategyId: ID of the placement strategy assigned to this
10010	// placement group.
10011	PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
10012
10013	// PricingSchedule: Pricing schedule of this placement group. This field
10014	// is required on insertion.
10015	PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
10016
10017	// PrimaryPlacementId: ID of the primary placement, used to calculate
10018	// the media cost of a roadblock (placement group). Modifying this field
10019	// will automatically modify the primary field on all affected roadblock
10020	// child placements.
10021	PrimaryPlacementId int64 `json:"primaryPlacementId,omitempty,string"`
10022
10023	// PrimaryPlacementIdDimensionValue: Dimension value for the ID of the
10024	// primary placement. This is a read-only, auto-generated field.
10025	PrimaryPlacementIdDimensionValue *DimensionValue `json:"primaryPlacementIdDimensionValue,omitempty"`
10026
10027	// SiteId: Site ID associated with this placement group. On insert, you
10028	// must set either this field or the directorySiteId field to specify
10029	// the site associated with this placement group. This is a required
10030	// field that is read-only after insertion.
10031	SiteId int64 `json:"siteId,omitempty,string"`
10032
10033	// SiteIdDimensionValue: Dimension value for the ID of the site. This is
10034	// a read-only, auto-generated field.
10035	SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
10036
10037	// SubaccountId: Subaccount ID of this placement group. This is a
10038	// read-only field that can be left blank.
10039	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10040
10041	// ServerResponse contains the HTTP response code and headers from the
10042	// server.
10043	googleapi.ServerResponse `json:"-"`
10044
10045	// ForceSendFields is a list of field names (e.g. "AccountId") to
10046	// unconditionally include in API requests. By default, fields with
10047	// empty values are omitted from API requests. However, any non-pointer,
10048	// non-interface field appearing in ForceSendFields will be sent to the
10049	// server regardless of whether the field is empty or not. This may be
10050	// used to include empty fields in Patch requests.
10051	ForceSendFields []string `json:"-"`
10052
10053	// NullFields is a list of field names (e.g. "AccountId") to include in
10054	// API requests with the JSON null value. By default, fields with empty
10055	// values are omitted from API requests. However, any field with an
10056	// empty value appearing in NullFields will be sent to the server as
10057	// null. It is an error if a field in this list has a non-empty value.
10058	// This may be used to include null fields in Patch requests.
10059	NullFields []string `json:"-"`
10060}
10061
10062func (s *PlacementGroup) MarshalJSON() ([]byte, error) {
10063	type NoMethod PlacementGroup
10064	raw := NoMethod(*s)
10065	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10066}
10067
10068// PlacementGroupsListResponse: Placement Group List Response
10069type PlacementGroupsListResponse struct {
10070	// Kind: Identifies what kind of resource this is. Value: the fixed
10071	// string "dfareporting#placementGroupsListResponse".
10072	Kind string `json:"kind,omitempty"`
10073
10074	// NextPageToken: Pagination token to be used for the next list
10075	// operation.
10076	NextPageToken string `json:"nextPageToken,omitempty"`
10077
10078	// PlacementGroups: Placement group collection.
10079	PlacementGroups []*PlacementGroup `json:"placementGroups,omitempty"`
10080
10081	// ServerResponse contains the HTTP response code and headers from the
10082	// server.
10083	googleapi.ServerResponse `json:"-"`
10084
10085	// ForceSendFields is a list of field names (e.g. "Kind") to
10086	// unconditionally include in API requests. By default, fields with
10087	// empty values are omitted from API requests. However, any non-pointer,
10088	// non-interface field appearing in ForceSendFields will be sent to the
10089	// server regardless of whether the field is empty or not. This may be
10090	// used to include empty fields in Patch requests.
10091	ForceSendFields []string `json:"-"`
10092
10093	// NullFields is a list of field names (e.g. "Kind") to include in API
10094	// requests with the JSON null value. By default, fields with empty
10095	// values are omitted from API requests. However, any field with an
10096	// empty value appearing in NullFields will be sent to the server as
10097	// null. It is an error if a field in this list has a non-empty value.
10098	// This may be used to include null fields in Patch requests.
10099	NullFields []string `json:"-"`
10100}
10101
10102func (s *PlacementGroupsListResponse) MarshalJSON() ([]byte, error) {
10103	type NoMethod PlacementGroupsListResponse
10104	raw := NoMethod(*s)
10105	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10106}
10107
10108// PlacementStrategiesListResponse: Placement Strategy List Response
10109type PlacementStrategiesListResponse struct {
10110	// Kind: Identifies what kind of resource this is. Value: the fixed
10111	// string "dfareporting#placementStrategiesListResponse".
10112	Kind string `json:"kind,omitempty"`
10113
10114	// NextPageToken: Pagination token to be used for the next list
10115	// operation.
10116	NextPageToken string `json:"nextPageToken,omitempty"`
10117
10118	// PlacementStrategies: Placement strategy collection.
10119	PlacementStrategies []*PlacementStrategy `json:"placementStrategies,omitempty"`
10120
10121	// ServerResponse contains the HTTP response code and headers from the
10122	// server.
10123	googleapi.ServerResponse `json:"-"`
10124
10125	// ForceSendFields is a list of field names (e.g. "Kind") to
10126	// unconditionally include in API requests. By default, fields with
10127	// empty values are omitted from API requests. However, any non-pointer,
10128	// non-interface field appearing in ForceSendFields will be sent to the
10129	// server regardless of whether the field is empty or not. This may be
10130	// used to include empty fields in Patch requests.
10131	ForceSendFields []string `json:"-"`
10132
10133	// NullFields is a list of field names (e.g. "Kind") to include in API
10134	// requests with the JSON null value. By default, fields with empty
10135	// values are omitted from API requests. However, any field with an
10136	// empty value appearing in NullFields will be sent to the server as
10137	// null. It is an error if a field in this list has a non-empty value.
10138	// This may be used to include null fields in Patch requests.
10139	NullFields []string `json:"-"`
10140}
10141
10142func (s *PlacementStrategiesListResponse) MarshalJSON() ([]byte, error) {
10143	type NoMethod PlacementStrategiesListResponse
10144	raw := NoMethod(*s)
10145	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10146}
10147
10148// PlacementStrategy: Contains properties of a placement strategy.
10149type PlacementStrategy struct {
10150	// AccountId: Account ID of this placement strategy.This is a read-only
10151	// field that can be left blank.
10152	AccountId int64 `json:"accountId,omitempty,string"`
10153
10154	// Id: ID of this placement strategy. This is a read-only,
10155	// auto-generated field.
10156	Id int64 `json:"id,omitempty,string"`
10157
10158	// Kind: Identifies what kind of resource this is. Value: the fixed
10159	// string "dfareporting#placementStrategy".
10160	Kind string `json:"kind,omitempty"`
10161
10162	// Name: Name of this placement strategy. This is a required field. It
10163	// must be less than 256 characters long and unique among placement
10164	// strategies of the same account.
10165	Name string `json:"name,omitempty"`
10166
10167	// ServerResponse contains the HTTP response code and headers from the
10168	// server.
10169	googleapi.ServerResponse `json:"-"`
10170
10171	// ForceSendFields is a list of field names (e.g. "AccountId") to
10172	// unconditionally include in API requests. By default, fields with
10173	// empty values are omitted from API requests. However, any non-pointer,
10174	// non-interface field appearing in ForceSendFields will be sent to the
10175	// server regardless of whether the field is empty or not. This may be
10176	// used to include empty fields in Patch requests.
10177	ForceSendFields []string `json:"-"`
10178
10179	// NullFields is a list of field names (e.g. "AccountId") to include in
10180	// API requests with the JSON null value. By default, fields with empty
10181	// values are omitted from API requests. However, any field with an
10182	// empty value appearing in NullFields will be sent to the server as
10183	// null. It is an error if a field in this list has a non-empty value.
10184	// This may be used to include null fields in Patch requests.
10185	NullFields []string `json:"-"`
10186}
10187
10188func (s *PlacementStrategy) MarshalJSON() ([]byte, error) {
10189	type NoMethod PlacementStrategy
10190	raw := NoMethod(*s)
10191	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10192}
10193
10194// PlacementTag: Placement Tag
10195type PlacementTag struct {
10196	// PlacementId: Placement ID
10197	PlacementId int64 `json:"placementId,omitempty,string"`
10198
10199	// TagDatas: Tags generated for this placement.
10200	TagDatas []*TagData `json:"tagDatas,omitempty"`
10201
10202	// ForceSendFields is a list of field names (e.g. "PlacementId") to
10203	// unconditionally include in API requests. By default, fields with
10204	// empty values are omitted from API requests. However, any non-pointer,
10205	// non-interface field appearing in ForceSendFields will be sent to the
10206	// server regardless of whether the field is empty or not. This may be
10207	// used to include empty fields in Patch requests.
10208	ForceSendFields []string `json:"-"`
10209
10210	// NullFields is a list of field names (e.g. "PlacementId") to include
10211	// in API requests with the JSON null value. By default, fields with
10212	// empty values are omitted from API requests. However, any field with
10213	// an empty value appearing in NullFields will be sent to the server as
10214	// null. It is an error if a field in this list has a non-empty value.
10215	// This may be used to include null fields in Patch requests.
10216	NullFields []string `json:"-"`
10217}
10218
10219func (s *PlacementTag) MarshalJSON() ([]byte, error) {
10220	type NoMethod PlacementTag
10221	raw := NoMethod(*s)
10222	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10223}
10224
10225// PlacementsGenerateTagsResponse: Placement GenerateTags Response
10226type PlacementsGenerateTagsResponse struct {
10227	// Kind: Identifies what kind of resource this is. Value: the fixed
10228	// string "dfareporting#placementsGenerateTagsResponse".
10229	Kind string `json:"kind,omitempty"`
10230
10231	// PlacementTags: Set of generated tags for the specified placements.
10232	PlacementTags []*PlacementTag `json:"placementTags,omitempty"`
10233
10234	// ServerResponse contains the HTTP response code and headers from the
10235	// server.
10236	googleapi.ServerResponse `json:"-"`
10237
10238	// ForceSendFields is a list of field names (e.g. "Kind") to
10239	// unconditionally include in API requests. By default, fields with
10240	// empty values are omitted from API requests. However, any non-pointer,
10241	// non-interface field appearing in ForceSendFields will be sent to the
10242	// server regardless of whether the field is empty or not. This may be
10243	// used to include empty fields in Patch requests.
10244	ForceSendFields []string `json:"-"`
10245
10246	// NullFields is a list of field names (e.g. "Kind") to include in API
10247	// requests with the JSON null value. By default, fields with empty
10248	// values are omitted from API requests. However, any field with an
10249	// empty value appearing in NullFields will be sent to the server as
10250	// null. It is an error if a field in this list has a non-empty value.
10251	// This may be used to include null fields in Patch requests.
10252	NullFields []string `json:"-"`
10253}
10254
10255func (s *PlacementsGenerateTagsResponse) MarshalJSON() ([]byte, error) {
10256	type NoMethod PlacementsGenerateTagsResponse
10257	raw := NoMethod(*s)
10258	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10259}
10260
10261// PlacementsListResponse: Placement List Response
10262type PlacementsListResponse struct {
10263	// Kind: Identifies what kind of resource this is. Value: the fixed
10264	// string "dfareporting#placementsListResponse".
10265	Kind string `json:"kind,omitempty"`
10266
10267	// NextPageToken: Pagination token to be used for the next list
10268	// operation.
10269	NextPageToken string `json:"nextPageToken,omitempty"`
10270
10271	// Placements: Placement collection.
10272	Placements []*Placement `json:"placements,omitempty"`
10273
10274	// ServerResponse contains the HTTP response code and headers from the
10275	// server.
10276	googleapi.ServerResponse `json:"-"`
10277
10278	// ForceSendFields is a list of field names (e.g. "Kind") to
10279	// unconditionally include in API requests. By default, fields with
10280	// empty values are omitted from API requests. However, any non-pointer,
10281	// non-interface field appearing in ForceSendFields will be sent to the
10282	// server regardless of whether the field is empty or not. This may be
10283	// used to include empty fields in Patch requests.
10284	ForceSendFields []string `json:"-"`
10285
10286	// NullFields is a list of field names (e.g. "Kind") to include in API
10287	// requests with the JSON null value. By default, fields with empty
10288	// values are omitted from API requests. However, any field with an
10289	// empty value appearing in NullFields will be sent to the server as
10290	// null. It is an error if a field in this list has a non-empty value.
10291	// This may be used to include null fields in Patch requests.
10292	NullFields []string `json:"-"`
10293}
10294
10295func (s *PlacementsListResponse) MarshalJSON() ([]byte, error) {
10296	type NoMethod PlacementsListResponse
10297	raw := NoMethod(*s)
10298	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10299}
10300
10301// PlatformType: Contains information about a platform type that can be
10302// targeted by ads.
10303type PlatformType struct {
10304	// Id: ID of this platform type.
10305	Id int64 `json:"id,omitempty,string"`
10306
10307	// Kind: Identifies what kind of resource this is. Value: the fixed
10308	// string "dfareporting#platformType".
10309	Kind string `json:"kind,omitempty"`
10310
10311	// Name: Name of this platform type.
10312	Name string `json:"name,omitempty"`
10313
10314	// ServerResponse contains the HTTP response code and headers from the
10315	// server.
10316	googleapi.ServerResponse `json:"-"`
10317
10318	// ForceSendFields is a list of field names (e.g. "Id") to
10319	// unconditionally include in API requests. By default, fields with
10320	// empty values are omitted from API requests. However, any non-pointer,
10321	// non-interface field appearing in ForceSendFields will be sent to the
10322	// server regardless of whether the field is empty or not. This may be
10323	// used to include empty fields in Patch requests.
10324	ForceSendFields []string `json:"-"`
10325
10326	// NullFields is a list of field names (e.g. "Id") to include in API
10327	// requests with the JSON null value. By default, fields with empty
10328	// values are omitted from API requests. However, any field with an
10329	// empty value appearing in NullFields will be sent to the server as
10330	// null. It is an error if a field in this list has a non-empty value.
10331	// This may be used to include null fields in Patch requests.
10332	NullFields []string `json:"-"`
10333}
10334
10335func (s *PlatformType) MarshalJSON() ([]byte, error) {
10336	type NoMethod PlatformType
10337	raw := NoMethod(*s)
10338	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10339}
10340
10341// PlatformTypesListResponse: Platform Type List Response
10342type PlatformTypesListResponse struct {
10343	// Kind: Identifies what kind of resource this is. Value: the fixed
10344	// string "dfareporting#platformTypesListResponse".
10345	Kind string `json:"kind,omitempty"`
10346
10347	// PlatformTypes: Platform type collection.
10348	PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
10349
10350	// ServerResponse contains the HTTP response code and headers from the
10351	// server.
10352	googleapi.ServerResponse `json:"-"`
10353
10354	// ForceSendFields is a list of field names (e.g. "Kind") to
10355	// unconditionally include in API requests. By default, fields with
10356	// empty values are omitted from API requests. However, any non-pointer,
10357	// non-interface field appearing in ForceSendFields will be sent to the
10358	// server regardless of whether the field is empty or not. This may be
10359	// used to include empty fields in Patch requests.
10360	ForceSendFields []string `json:"-"`
10361
10362	// NullFields is a list of field names (e.g. "Kind") to include in API
10363	// requests with the JSON null value. By default, fields with empty
10364	// values are omitted from API requests. However, any field with an
10365	// empty value appearing in NullFields will be sent to the server as
10366	// null. It is an error if a field in this list has a non-empty value.
10367	// This may be used to include null fields in Patch requests.
10368	NullFields []string `json:"-"`
10369}
10370
10371func (s *PlatformTypesListResponse) MarshalJSON() ([]byte, error) {
10372	type NoMethod PlatformTypesListResponse
10373	raw := NoMethod(*s)
10374	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10375}
10376
10377// PopupWindowProperties: Popup Window Properties.
10378type PopupWindowProperties struct {
10379	// Dimension: Popup dimension for a creative. This is a read-only field.
10380	// Applicable to the following creative types: all RICH_MEDIA and all
10381	// VPAID
10382	Dimension *Size `json:"dimension,omitempty"`
10383
10384	// Offset: Upper-left corner coordinates of the popup window. Applicable
10385	// if positionType is COORDINATES.
10386	Offset *OffsetPosition `json:"offset,omitempty"`
10387
10388	// PositionType: Popup window position either centered or at specific
10389	// coordinate.
10390	//
10391	// Possible values:
10392	//   "CENTER"
10393	//   "COORDINATES"
10394	PositionType string `json:"positionType,omitempty"`
10395
10396	// ShowAddressBar: Whether to display the browser address bar.
10397	ShowAddressBar bool `json:"showAddressBar,omitempty"`
10398
10399	// ShowMenuBar: Whether to display the browser menu bar.
10400	ShowMenuBar bool `json:"showMenuBar,omitempty"`
10401
10402	// ShowScrollBar: Whether to display the browser scroll bar.
10403	ShowScrollBar bool `json:"showScrollBar,omitempty"`
10404
10405	// ShowStatusBar: Whether to display the browser status bar.
10406	ShowStatusBar bool `json:"showStatusBar,omitempty"`
10407
10408	// ShowToolBar: Whether to display the browser tool bar.
10409	ShowToolBar bool `json:"showToolBar,omitempty"`
10410
10411	// Title: Title of popup window.
10412	Title string `json:"title,omitempty"`
10413
10414	// ForceSendFields is a list of field names (e.g. "Dimension") to
10415	// unconditionally include in API requests. By default, fields with
10416	// empty values are omitted from API requests. However, any non-pointer,
10417	// non-interface field appearing in ForceSendFields will be sent to the
10418	// server regardless of whether the field is empty or not. This may be
10419	// used to include empty fields in Patch requests.
10420	ForceSendFields []string `json:"-"`
10421
10422	// NullFields is a list of field names (e.g. "Dimension") to include in
10423	// API requests with the JSON null value. By default, fields with empty
10424	// values are omitted from API requests. However, any field with an
10425	// empty value appearing in NullFields will be sent to the server as
10426	// null. It is an error if a field in this list has a non-empty value.
10427	// This may be used to include null fields in Patch requests.
10428	NullFields []string `json:"-"`
10429}
10430
10431func (s *PopupWindowProperties) MarshalJSON() ([]byte, error) {
10432	type NoMethod PopupWindowProperties
10433	raw := NoMethod(*s)
10434	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10435}
10436
10437// PostalCode: Contains information about a postal code that can be
10438// targeted by ads.
10439type PostalCode struct {
10440	// Code: Postal code. This is equivalent to the id field.
10441	Code string `json:"code,omitempty"`
10442
10443	// CountryCode: Country code of the country to which this postal code
10444	// belongs.
10445	CountryCode string `json:"countryCode,omitempty"`
10446
10447	// CountryDartId: DART ID of the country to which this postal code
10448	// belongs.
10449	CountryDartId int64 `json:"countryDartId,omitempty,string"`
10450
10451	// Id: ID of this postal code.
10452	Id string `json:"id,omitempty"`
10453
10454	// Kind: Identifies what kind of resource this is. Value: the fixed
10455	// string "dfareporting#postalCode".
10456	Kind string `json:"kind,omitempty"`
10457
10458	// ServerResponse contains the HTTP response code and headers from the
10459	// server.
10460	googleapi.ServerResponse `json:"-"`
10461
10462	// ForceSendFields is a list of field names (e.g. "Code") to
10463	// unconditionally include in API requests. By default, fields with
10464	// empty values are omitted from API requests. However, any non-pointer,
10465	// non-interface field appearing in ForceSendFields will be sent to the
10466	// server regardless of whether the field is empty or not. This may be
10467	// used to include empty fields in Patch requests.
10468	ForceSendFields []string `json:"-"`
10469
10470	// NullFields is a list of field names (e.g. "Code") to include in API
10471	// requests with the JSON null value. By default, fields with empty
10472	// values are omitted from API requests. However, any field with an
10473	// empty value appearing in NullFields will be sent to the server as
10474	// null. It is an error if a field in this list has a non-empty value.
10475	// This may be used to include null fields in Patch requests.
10476	NullFields []string `json:"-"`
10477}
10478
10479func (s *PostalCode) MarshalJSON() ([]byte, error) {
10480	type NoMethod PostalCode
10481	raw := NoMethod(*s)
10482	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10483}
10484
10485// PostalCodesListResponse: Postal Code List Response
10486type PostalCodesListResponse struct {
10487	// Kind: Identifies what kind of resource this is. Value: the fixed
10488	// string "dfareporting#postalCodesListResponse".
10489	Kind string `json:"kind,omitempty"`
10490
10491	// PostalCodes: Postal code collection.
10492	PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
10493
10494	// ServerResponse contains the HTTP response code and headers from the
10495	// server.
10496	googleapi.ServerResponse `json:"-"`
10497
10498	// ForceSendFields is a list of field names (e.g. "Kind") to
10499	// unconditionally include in API requests. By default, fields with
10500	// empty values are omitted from API requests. However, any non-pointer,
10501	// non-interface field appearing in ForceSendFields will be sent to the
10502	// server regardless of whether the field is empty or not. This may be
10503	// used to include empty fields in Patch requests.
10504	ForceSendFields []string `json:"-"`
10505
10506	// NullFields is a list of field names (e.g. "Kind") to include in API
10507	// requests with the JSON null value. By default, fields with empty
10508	// values are omitted from API requests. However, any field with an
10509	// empty value appearing in NullFields will be sent to the server as
10510	// null. It is an error if a field in this list has a non-empty value.
10511	// This may be used to include null fields in Patch requests.
10512	NullFields []string `json:"-"`
10513}
10514
10515func (s *PostalCodesListResponse) MarshalJSON() ([]byte, error) {
10516	type NoMethod PostalCodesListResponse
10517	raw := NoMethod(*s)
10518	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10519}
10520
10521// Pricing: Pricing Information
10522type Pricing struct {
10523	// CapCostType: Cap cost type of this inventory item.
10524	//
10525	// Possible values:
10526	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_CUMULATIVE"
10527	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_MONTHLY"
10528	//   "PLANNING_PLACEMENT_CAP_COST_TYPE_NONE"
10529	CapCostType string `json:"capCostType,omitempty"`
10530
10531	// EndDate: End date of this inventory item.
10532	EndDate string `json:"endDate,omitempty"`
10533
10534	// Flights: Flights of this inventory item. A flight (a.k.a. pricing
10535	// period) represents the inventory item pricing information for a
10536	// specific period of time.
10537	Flights []*Flight `json:"flights,omitempty"`
10538
10539	// GroupType: Group type of this inventory item if it represents a
10540	// placement group. Is null otherwise. There are two type of placement
10541	// groups: PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE is a simple group of
10542	// inventory items that acts as a single pricing point for a group of
10543	// tags. PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK is a group of inventory
10544	// items that not only acts as a single pricing point, but also assumes
10545	// that all the tags in it will be served at the same time. A roadblock
10546	// requires one of its assigned inventory items to be marked as primary.
10547	//
10548	// Possible values:
10549	//   "PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE"
10550	//   "PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK"
10551	GroupType string `json:"groupType,omitempty"`
10552
10553	// PricingType: Pricing type of this inventory item.
10554	//
10555	// Possible values:
10556	//   "PLANNING_PLACEMENT_PRICING_TYPE_CLICKS"
10557	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPA"
10558	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPC"
10559	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPM"
10560	//   "PLANNING_PLACEMENT_PRICING_TYPE_CPM_ACTIVEVIEW"
10561	//   "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_CLICKS"
10562	//   "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
10563	//   "PLANNING_PLACEMENT_PRICING_TYPE_IMPRESSIONS"
10564	PricingType string `json:"pricingType,omitempty"`
10565
10566	// StartDate: Start date of this inventory item.
10567	StartDate string `json:"startDate,omitempty"`
10568
10569	// ForceSendFields is a list of field names (e.g. "CapCostType") to
10570	// unconditionally include in API requests. By default, fields with
10571	// empty values are omitted from API requests. However, any non-pointer,
10572	// non-interface field appearing in ForceSendFields will be sent to the
10573	// server regardless of whether the field is empty or not. This may be
10574	// used to include empty fields in Patch requests.
10575	ForceSendFields []string `json:"-"`
10576
10577	// NullFields is a list of field names (e.g. "CapCostType") to include
10578	// in API requests with the JSON null value. By default, fields with
10579	// empty values are omitted from API requests. However, any field with
10580	// an empty value appearing in NullFields will be sent to the server as
10581	// null. It is an error if a field in this list has a non-empty value.
10582	// This may be used to include null fields in Patch requests.
10583	NullFields []string `json:"-"`
10584}
10585
10586func (s *Pricing) MarshalJSON() ([]byte, error) {
10587	type NoMethod Pricing
10588	raw := NoMethod(*s)
10589	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10590}
10591
10592// PricingSchedule: Pricing Schedule
10593type PricingSchedule struct {
10594	// CapCostOption: Placement cap cost option.
10595	//
10596	// Possible values:
10597	//   "CAP_COST_CUMULATIVE"
10598	//   "CAP_COST_MONTHLY"
10599	//   "CAP_COST_NONE"
10600	CapCostOption string `json:"capCostOption,omitempty"`
10601
10602	// EndDate: Placement end date. This date must be later than, or the
10603	// same day as, the placement start date, but not later than the
10604	// campaign end date. If, for example, you set 6/25/2015 as both the
10605	// start and end dates, the effective placement date is just that day
10606	// only, 6/25/2015. The hours, minutes, and seconds of the end date
10607	// should not be set, as doing so will result in an error. This field is
10608	// required on insertion.
10609	EndDate string `json:"endDate,omitempty"`
10610
10611	// Flighted: Whether this placement is flighted. If true, pricing
10612	// periods will be computed automatically.
10613	Flighted bool `json:"flighted,omitempty"`
10614
10615	// FloodlightActivityId: Floodlight activity ID associated with this
10616	// placement. This field should be set when placement pricing type is
10617	// set to PRICING_TYPE_CPA.
10618	FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
10619
10620	// PricingPeriods: Pricing periods for this placement.
10621	PricingPeriods []*PricingSchedulePricingPeriod `json:"pricingPeriods,omitempty"`
10622
10623	// PricingType: Placement pricing type. This field is required on
10624	// insertion.
10625	//
10626	// Possible values:
10627	//   "PRICING_TYPE_CPA"
10628	//   "PRICING_TYPE_CPC"
10629	//   "PRICING_TYPE_CPM"
10630	//   "PRICING_TYPE_CPM_ACTIVEVIEW"
10631	//   "PRICING_TYPE_FLAT_RATE_CLICKS"
10632	//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
10633	PricingType string `json:"pricingType,omitempty"`
10634
10635	// StartDate: Placement start date. This date must be later than, or the
10636	// same day as, the campaign start date. The hours, minutes, and seconds
10637	// of the start date should not be set, as doing so will result in an
10638	// error. This field is required on insertion.
10639	StartDate string `json:"startDate,omitempty"`
10640
10641	// TestingStartDate: Testing start date of this placement. The hours,
10642	// minutes, and seconds of the start date should not be set, as doing so
10643	// will result in an error.
10644	TestingStartDate string `json:"testingStartDate,omitempty"`
10645
10646	// ForceSendFields is a list of field names (e.g. "CapCostOption") to
10647	// unconditionally include in API requests. By default, fields with
10648	// empty values are omitted from API requests. However, any non-pointer,
10649	// non-interface field appearing in ForceSendFields will be sent to the
10650	// server regardless of whether the field is empty or not. This may be
10651	// used to include empty fields in Patch requests.
10652	ForceSendFields []string `json:"-"`
10653
10654	// NullFields is a list of field names (e.g. "CapCostOption") to include
10655	// in API requests with the JSON null value. By default, fields with
10656	// empty values are omitted from API requests. However, any field with
10657	// an empty value appearing in NullFields will be sent to the server as
10658	// null. It is an error if a field in this list has a non-empty value.
10659	// This may be used to include null fields in Patch requests.
10660	NullFields []string `json:"-"`
10661}
10662
10663func (s *PricingSchedule) MarshalJSON() ([]byte, error) {
10664	type NoMethod PricingSchedule
10665	raw := NoMethod(*s)
10666	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10667}
10668
10669// PricingSchedulePricingPeriod: Pricing Period
10670type PricingSchedulePricingPeriod struct {
10671	// EndDate: Pricing period end date. This date must be later than, or
10672	// the same day as, the pricing period start date, but not later than
10673	// the placement end date. The period end date can be the same date as
10674	// the period start date. If, for example, you set 6/25/2015 as both the
10675	// start and end dates, the effective pricing period date is just that
10676	// day only, 6/25/2015. The hours, minutes, and seconds of the end date
10677	// should not be set, as doing so will result in an error.
10678	EndDate string `json:"endDate,omitempty"`
10679
10680	// PricingComment: Comments for this pricing period.
10681	PricingComment string `json:"pricingComment,omitempty"`
10682
10683	// RateOrCostNanos: Rate or cost of this pricing period in nanos (i.e.,
10684	// multipled by 1000000000). Acceptable values are 0 to
10685	// 1000000000000000000, inclusive.
10686	RateOrCostNanos int64 `json:"rateOrCostNanos,omitempty,string"`
10687
10688	// StartDate: Pricing period start date. This date must be later than,
10689	// or the same day as, the placement start date. The hours, minutes, and
10690	// seconds of the start date should not be set, as doing so will result
10691	// in an error.
10692	StartDate string `json:"startDate,omitempty"`
10693
10694	// Units: Units of this pricing period. Acceptable values are 0 to
10695	// 10000000000, inclusive.
10696	Units int64 `json:"units,omitempty,string"`
10697
10698	// ForceSendFields is a list of field names (e.g. "EndDate") to
10699	// unconditionally include in API requests. By default, fields with
10700	// empty values are omitted from API requests. However, any non-pointer,
10701	// non-interface field appearing in ForceSendFields will be sent to the
10702	// server regardless of whether the field is empty or not. This may be
10703	// used to include empty fields in Patch requests.
10704	ForceSendFields []string `json:"-"`
10705
10706	// NullFields is a list of field names (e.g. "EndDate") to include in
10707	// API requests with the JSON null value. By default, fields with empty
10708	// values are omitted from API requests. However, any field with an
10709	// empty value appearing in NullFields will be sent to the server as
10710	// null. It is an error if a field in this list has a non-empty value.
10711	// This may be used to include null fields in Patch requests.
10712	NullFields []string `json:"-"`
10713}
10714
10715func (s *PricingSchedulePricingPeriod) MarshalJSON() ([]byte, error) {
10716	type NoMethod PricingSchedulePricingPeriod
10717	raw := NoMethod(*s)
10718	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10719}
10720
10721// Project: Contains properties of a Planning project.
10722type Project struct {
10723	// AccountId: Account ID of this project.
10724	AccountId int64 `json:"accountId,omitempty,string"`
10725
10726	// AdvertiserId: Advertiser ID of this project.
10727	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10728
10729	// AudienceAgeGroup: Audience age group of this project.
10730	//
10731	// Possible values:
10732	//   "PLANNING_AUDIENCE_AGE_18_24"
10733	//   "PLANNING_AUDIENCE_AGE_25_34"
10734	//   "PLANNING_AUDIENCE_AGE_35_44"
10735	//   "PLANNING_AUDIENCE_AGE_45_54"
10736	//   "PLANNING_AUDIENCE_AGE_55_64"
10737	//   "PLANNING_AUDIENCE_AGE_65_OR_MORE"
10738	//   "PLANNING_AUDIENCE_AGE_UNKNOWN"
10739	AudienceAgeGroup string `json:"audienceAgeGroup,omitempty"`
10740
10741	// AudienceGender: Audience gender of this project.
10742	//
10743	// Possible values:
10744	//   "PLANNING_AUDIENCE_GENDER_FEMALE"
10745	//   "PLANNING_AUDIENCE_GENDER_MALE"
10746	AudienceGender string `json:"audienceGender,omitempty"`
10747
10748	// Budget: Budget of this project in the currency specified by the
10749	// current account. The value stored in this field represents only the
10750	// non-fractional amount. For example, for USD, the smallest value that
10751	// can be represented by this field is 1 US dollar.
10752	Budget int64 `json:"budget,omitempty,string"`
10753
10754	// ClientBillingCode: Client billing code of this project.
10755	ClientBillingCode string `json:"clientBillingCode,omitempty"`
10756
10757	// ClientName: Name of the project client.
10758	ClientName string `json:"clientName,omitempty"`
10759
10760	// EndDate: End date of the project.
10761	EndDate string `json:"endDate,omitempty"`
10762
10763	// Id: ID of this project. This is a read-only, auto-generated field.
10764	Id int64 `json:"id,omitempty,string"`
10765
10766	// Kind: Identifies what kind of resource this is. Value: the fixed
10767	// string "dfareporting#project".
10768	Kind string `json:"kind,omitempty"`
10769
10770	// LastModifiedInfo: Information about the most recent modification of
10771	// this project.
10772	LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
10773
10774	// Name: Name of this project.
10775	Name string `json:"name,omitempty"`
10776
10777	// Overview: Overview of this project.
10778	Overview string `json:"overview,omitempty"`
10779
10780	// StartDate: Start date of the project.
10781	StartDate string `json:"startDate,omitempty"`
10782
10783	// SubaccountId: Subaccount ID of this project.
10784	SubaccountId int64 `json:"subaccountId,omitempty,string"`
10785
10786	// TargetClicks: Number of clicks that the advertiser is targeting.
10787	TargetClicks int64 `json:"targetClicks,omitempty,string"`
10788
10789	// TargetConversions: Number of conversions that the advertiser is
10790	// targeting.
10791	TargetConversions int64 `json:"targetConversions,omitempty,string"`
10792
10793	// TargetCpaNanos: CPA that the advertiser is targeting.
10794	TargetCpaNanos int64 `json:"targetCpaNanos,omitempty,string"`
10795
10796	// TargetCpcNanos: CPC that the advertiser is targeting.
10797	TargetCpcNanos int64 `json:"targetCpcNanos,omitempty,string"`
10798
10799	// TargetCpmActiveViewNanos: vCPM from Active View that the advertiser
10800	// is targeting.
10801	TargetCpmActiveViewNanos int64 `json:"targetCpmActiveViewNanos,omitempty,string"`
10802
10803	// TargetCpmNanos: CPM that the advertiser is targeting.
10804	TargetCpmNanos int64 `json:"targetCpmNanos,omitempty,string"`
10805
10806	// TargetImpressions: Number of impressions that the advertiser is
10807	// targeting.
10808	TargetImpressions int64 `json:"targetImpressions,omitempty,string"`
10809
10810	// ServerResponse contains the HTTP response code and headers from the
10811	// server.
10812	googleapi.ServerResponse `json:"-"`
10813
10814	// ForceSendFields is a list of field names (e.g. "AccountId") to
10815	// unconditionally include in API requests. By default, fields with
10816	// empty values are omitted from API requests. However, any non-pointer,
10817	// non-interface field appearing in ForceSendFields will be sent to the
10818	// server regardless of whether the field is empty or not. This may be
10819	// used to include empty fields in Patch requests.
10820	ForceSendFields []string `json:"-"`
10821
10822	// NullFields is a list of field names (e.g. "AccountId") to include in
10823	// API requests with the JSON null value. By default, fields with empty
10824	// values are omitted from API requests. However, any field with an
10825	// empty value appearing in NullFields will be sent to the server as
10826	// null. It is an error if a field in this list has a non-empty value.
10827	// This may be used to include null fields in Patch requests.
10828	NullFields []string `json:"-"`
10829}
10830
10831func (s *Project) MarshalJSON() ([]byte, error) {
10832	type NoMethod Project
10833	raw := NoMethod(*s)
10834	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10835}
10836
10837// ProjectsListResponse: Project List Response
10838type ProjectsListResponse struct {
10839	// Kind: Identifies what kind of resource this is. Value: the fixed
10840	// string "dfareporting#projectsListResponse".
10841	Kind string `json:"kind,omitempty"`
10842
10843	// NextPageToken: Pagination token to be used for the next list
10844	// operation.
10845	NextPageToken string `json:"nextPageToken,omitempty"`
10846
10847	// Projects: Project collection.
10848	Projects []*Project `json:"projects,omitempty"`
10849
10850	// ServerResponse contains the HTTP response code and headers from the
10851	// server.
10852	googleapi.ServerResponse `json:"-"`
10853
10854	// ForceSendFields is a list of field names (e.g. "Kind") to
10855	// unconditionally include in API requests. By default, fields with
10856	// empty values are omitted from API requests. However, any non-pointer,
10857	// non-interface field appearing in ForceSendFields will be sent to the
10858	// server regardless of whether the field is empty or not. This may be
10859	// used to include empty fields in Patch requests.
10860	ForceSendFields []string `json:"-"`
10861
10862	// NullFields is a list of field names (e.g. "Kind") to include in API
10863	// requests with the JSON null value. By default, fields with empty
10864	// values are omitted from API requests. However, any field with an
10865	// empty value appearing in NullFields will be sent to the server as
10866	// null. It is an error if a field in this list has a non-empty value.
10867	// This may be used to include null fields in Patch requests.
10868	NullFields []string `json:"-"`
10869}
10870
10871func (s *ProjectsListResponse) MarshalJSON() ([]byte, error) {
10872	type NoMethod ProjectsListResponse
10873	raw := NoMethod(*s)
10874	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10875}
10876
10877// ReachReportCompatibleFields: Represents fields that are compatible to
10878// be selected for a report of type "REACH".
10879type ReachReportCompatibleFields struct {
10880	// DimensionFilters: Dimensions which are compatible to be selected in
10881	// the "dimensionFilters" section of the report.
10882	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
10883
10884	// Dimensions: Dimensions which are compatible to be selected in the
10885	// "dimensions" section of the report.
10886	Dimensions []*Dimension `json:"dimensions,omitempty"`
10887
10888	// Kind: The kind of resource this is, in this case
10889	// dfareporting#reachReportCompatibleFields.
10890	Kind string `json:"kind,omitempty"`
10891
10892	// Metrics: Metrics which are compatible to be selected in the
10893	// "metricNames" section of the report.
10894	Metrics []*Metric `json:"metrics,omitempty"`
10895
10896	// PivotedActivityMetrics: Metrics which are compatible to be selected
10897	// as activity metrics to pivot on in the "activities" section of the
10898	// report.
10899	PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
10900
10901	// ReachByFrequencyMetrics: Metrics which are compatible to be selected
10902	// in the "reachByFrequencyMetricNames" section of the report.
10903	ReachByFrequencyMetrics []*Metric `json:"reachByFrequencyMetrics,omitempty"`
10904
10905	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
10906	// unconditionally include in API requests. By default, fields with
10907	// empty values are omitted from API requests. However, any non-pointer,
10908	// non-interface field appearing in ForceSendFields will be sent to the
10909	// server regardless of whether the field is empty or not. This may be
10910	// used to include empty fields in Patch requests.
10911	ForceSendFields []string `json:"-"`
10912
10913	// NullFields is a list of field names (e.g. "DimensionFilters") to
10914	// include in API requests with the JSON null value. By default, fields
10915	// with empty values are omitted from API requests. However, any field
10916	// with an empty value appearing in NullFields will be sent to the
10917	// server as null. It is an error if a field in this list has a
10918	// non-empty value. This may be used to include null fields in Patch
10919	// requests.
10920	NullFields []string `json:"-"`
10921}
10922
10923func (s *ReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
10924	type NoMethod ReachReportCompatibleFields
10925	raw := NoMethod(*s)
10926	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10927}
10928
10929// Recipient: Represents a recipient.
10930type Recipient struct {
10931	// DeliveryType: The delivery type for the recipient.
10932	//
10933	// Possible values:
10934	//   "ATTACHMENT"
10935	//   "LINK"
10936	DeliveryType string `json:"deliveryType,omitempty"`
10937
10938	// Email: The email address of the recipient.
10939	Email string `json:"email,omitempty"`
10940
10941	// Kind: The kind of resource this is, in this case
10942	// dfareporting#recipient.
10943	Kind string `json:"kind,omitempty"`
10944
10945	// ForceSendFields is a list of field names (e.g. "DeliveryType") to
10946	// unconditionally include in API requests. By default, fields with
10947	// empty values are omitted from API requests. However, any non-pointer,
10948	// non-interface field appearing in ForceSendFields will be sent to the
10949	// server regardless of whether the field is empty or not. This may be
10950	// used to include empty fields in Patch requests.
10951	ForceSendFields []string `json:"-"`
10952
10953	// NullFields is a list of field names (e.g. "DeliveryType") to include
10954	// in API requests with the JSON null value. By default, fields with
10955	// empty values are omitted from API requests. However, any field with
10956	// an empty value appearing in NullFields will be sent to the server as
10957	// null. It is an error if a field in this list has a non-empty value.
10958	// This may be used to include null fields in Patch requests.
10959	NullFields []string `json:"-"`
10960}
10961
10962func (s *Recipient) MarshalJSON() ([]byte, error) {
10963	type NoMethod Recipient
10964	raw := NoMethod(*s)
10965	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10966}
10967
10968// Region: Contains information about a region that can be targeted by
10969// ads.
10970type Region struct {
10971	// CountryCode: Country code of the country to which this region
10972	// belongs.
10973	CountryCode string `json:"countryCode,omitempty"`
10974
10975	// CountryDartId: DART ID of the country to which this region belongs.
10976	CountryDartId int64 `json:"countryDartId,omitempty,string"`
10977
10978	// DartId: DART ID of this region.
10979	DartId int64 `json:"dartId,omitempty,string"`
10980
10981	// Kind: Identifies what kind of resource this is. Value: the fixed
10982	// string "dfareporting#region".
10983	Kind string `json:"kind,omitempty"`
10984
10985	// Name: Name of this region.
10986	Name string `json:"name,omitempty"`
10987
10988	// RegionCode: Region code.
10989	RegionCode string `json:"regionCode,omitempty"`
10990
10991	// ForceSendFields is a list of field names (e.g. "CountryCode") to
10992	// unconditionally include in API requests. By default, fields with
10993	// empty values are omitted from API requests. However, any non-pointer,
10994	// non-interface field appearing in ForceSendFields will be sent to the
10995	// server regardless of whether the field is empty or not. This may be
10996	// used to include empty fields in Patch requests.
10997	ForceSendFields []string `json:"-"`
10998
10999	// NullFields is a list of field names (e.g. "CountryCode") to include
11000	// in API requests with the JSON null value. By default, fields with
11001	// empty values are omitted from API requests. However, any field with
11002	// an empty value appearing in NullFields will be sent to the server as
11003	// null. It is an error if a field in this list has a non-empty value.
11004	// This may be used to include null fields in Patch requests.
11005	NullFields []string `json:"-"`
11006}
11007
11008func (s *Region) MarshalJSON() ([]byte, error) {
11009	type NoMethod Region
11010	raw := NoMethod(*s)
11011	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11012}
11013
11014// RegionsListResponse: Region List Response
11015type RegionsListResponse struct {
11016	// Kind: Identifies what kind of resource this is. Value: the fixed
11017	// string "dfareporting#regionsListResponse".
11018	Kind string `json:"kind,omitempty"`
11019
11020	// Regions: Region collection.
11021	Regions []*Region `json:"regions,omitempty"`
11022
11023	// ServerResponse contains the HTTP response code and headers from the
11024	// server.
11025	googleapi.ServerResponse `json:"-"`
11026
11027	// ForceSendFields is a list of field names (e.g. "Kind") to
11028	// unconditionally include in API requests. By default, fields with
11029	// empty values are omitted from API requests. However, any non-pointer,
11030	// non-interface field appearing in ForceSendFields will be sent to the
11031	// server regardless of whether the field is empty or not. This may be
11032	// used to include empty fields in Patch requests.
11033	ForceSendFields []string `json:"-"`
11034
11035	// NullFields is a list of field names (e.g. "Kind") to include in API
11036	// requests with the JSON null value. By default, fields with empty
11037	// values are omitted from API requests. However, any field with an
11038	// empty value appearing in NullFields will be sent to the server as
11039	// null. It is an error if a field in this list has a non-empty value.
11040	// This may be used to include null fields in Patch requests.
11041	NullFields []string `json:"-"`
11042}
11043
11044func (s *RegionsListResponse) MarshalJSON() ([]byte, error) {
11045	type NoMethod RegionsListResponse
11046	raw := NoMethod(*s)
11047	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11048}
11049
11050// RemarketingList: Contains properties of a remarketing list.
11051// Remarketing enables you to create lists of users who have performed
11052// specific actions on a site, then target ads to members of those
11053// lists. This resource can be used to manage remarketing lists that are
11054// owned by your advertisers. To see all remarketing lists that are
11055// visible to your advertisers, including those that are shared to your
11056// advertiser or account, use the TargetableRemarketingLists resource.
11057type RemarketingList struct {
11058	// AccountId: Account ID of this remarketing list. This is a read-only,
11059	// auto-generated field that is only returned in GET requests.
11060	AccountId int64 `json:"accountId,omitempty,string"`
11061
11062	// Active: Whether this remarketing list is active.
11063	Active bool `json:"active,omitempty"`
11064
11065	// AdvertiserId: Dimension value for the advertiser ID that owns this
11066	// remarketing list. This is a required field.
11067	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
11068
11069	// AdvertiserIdDimensionValue: Dimension value for the ID of the
11070	// advertiser. This is a read-only, auto-generated field.
11071	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
11072
11073	// Description: Remarketing list description.
11074	Description string `json:"description,omitempty"`
11075
11076	// Id: Remarketing list ID. This is a read-only, auto-generated field.
11077	Id int64 `json:"id,omitempty,string"`
11078
11079	// Kind: Identifies what kind of resource this is. Value: the fixed
11080	// string "dfareporting#remarketingList".
11081	Kind string `json:"kind,omitempty"`
11082
11083	// LifeSpan: Number of days that a user should remain in the remarketing
11084	// list without an impression. Acceptable values are 1 to 540,
11085	// inclusive.
11086	LifeSpan int64 `json:"lifeSpan,omitempty,string"`
11087
11088	// ListPopulationRule: Rule used to populate the remarketing list with
11089	// users.
11090	ListPopulationRule *ListPopulationRule `json:"listPopulationRule,omitempty"`
11091
11092	// ListSize: Number of users currently in the list. This is a read-only
11093	// field.
11094	ListSize int64 `json:"listSize,omitempty,string"`
11095
11096	// ListSource: Product from which this remarketing list was originated.
11097	//
11098	// Possible values:
11099	//   "REMARKETING_LIST_SOURCE_ADX"
11100	//   "REMARKETING_LIST_SOURCE_DBM"
11101	//   "REMARKETING_LIST_SOURCE_DFA"
11102	//   "REMARKETING_LIST_SOURCE_DFP"
11103	//   "REMARKETING_LIST_SOURCE_DMP"
11104	//   "REMARKETING_LIST_SOURCE_GA"
11105	//   "REMARKETING_LIST_SOURCE_GPLUS"
11106	//   "REMARKETING_LIST_SOURCE_OTHER"
11107	//   "REMARKETING_LIST_SOURCE_PLAY_STORE"
11108	//   "REMARKETING_LIST_SOURCE_XFP"
11109	//   "REMARKETING_LIST_SOURCE_YOUTUBE"
11110	ListSource string `json:"listSource,omitempty"`
11111
11112	// Name: Name of the remarketing list. This is a required field. Must be
11113	// no greater than 128 characters long.
11114	Name string `json:"name,omitempty"`
11115
11116	// SubaccountId: Subaccount ID of this remarketing list. This is a
11117	// read-only, auto-generated field that is only returned in GET
11118	// requests.
11119	SubaccountId int64 `json:"subaccountId,omitempty,string"`
11120
11121	// ServerResponse contains the HTTP response code and headers from the
11122	// server.
11123	googleapi.ServerResponse `json:"-"`
11124
11125	// ForceSendFields is a list of field names (e.g. "AccountId") to
11126	// unconditionally include in API requests. By default, fields with
11127	// empty values are omitted from API requests. However, any non-pointer,
11128	// non-interface field appearing in ForceSendFields will be sent to the
11129	// server regardless of whether the field is empty or not. This may be
11130	// used to include empty fields in Patch requests.
11131	ForceSendFields []string `json:"-"`
11132
11133	// NullFields is a list of field names (e.g. "AccountId") to include in
11134	// API requests with the JSON null value. By default, fields with empty
11135	// values are omitted from API requests. However, any field with an
11136	// empty value appearing in NullFields will be sent to the server as
11137	// null. It is an error if a field in this list has a non-empty value.
11138	// This may be used to include null fields in Patch requests.
11139	NullFields []string `json:"-"`
11140}
11141
11142func (s *RemarketingList) MarshalJSON() ([]byte, error) {
11143	type NoMethod RemarketingList
11144	raw := NoMethod(*s)
11145	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11146}
11147
11148// RemarketingListShare: Contains properties of a remarketing list's
11149// sharing information. Sharing allows other accounts or advertisers to
11150// target to your remarketing lists. This resource can be used to manage
11151// remarketing list sharing to other accounts and advertisers.
11152type RemarketingListShare struct {
11153	// Kind: Identifies what kind of resource this is. Value: the fixed
11154	// string "dfareporting#remarketingListShare".
11155	Kind string `json:"kind,omitempty"`
11156
11157	// RemarketingListId: Remarketing list ID. This is a read-only,
11158	// auto-generated field.
11159	RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
11160
11161	// SharedAccountIds: Accounts that the remarketing list is shared with.
11162	SharedAccountIds googleapi.Int64s `json:"sharedAccountIds,omitempty"`
11163
11164	// SharedAdvertiserIds: Advertisers that the remarketing list is shared
11165	// with.
11166	SharedAdvertiserIds googleapi.Int64s `json:"sharedAdvertiserIds,omitempty"`
11167
11168	// ServerResponse contains the HTTP response code and headers from the
11169	// server.
11170	googleapi.ServerResponse `json:"-"`
11171
11172	// ForceSendFields is a list of field names (e.g. "Kind") to
11173	// unconditionally include in API requests. By default, fields with
11174	// empty values are omitted from API requests. However, any non-pointer,
11175	// non-interface field appearing in ForceSendFields will be sent to the
11176	// server regardless of whether the field is empty or not. This may be
11177	// used to include empty fields in Patch requests.
11178	ForceSendFields []string `json:"-"`
11179
11180	// NullFields is a list of field names (e.g. "Kind") to include in API
11181	// requests with the JSON null value. By default, fields with empty
11182	// values are omitted from API requests. However, any field with an
11183	// empty value appearing in NullFields will be sent to the server as
11184	// null. It is an error if a field in this list has a non-empty value.
11185	// This may be used to include null fields in Patch requests.
11186	NullFields []string `json:"-"`
11187}
11188
11189func (s *RemarketingListShare) MarshalJSON() ([]byte, error) {
11190	type NoMethod RemarketingListShare
11191	raw := NoMethod(*s)
11192	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11193}
11194
11195// RemarketingListsListResponse: Remarketing list response
11196type RemarketingListsListResponse struct {
11197	// Kind: Identifies what kind of resource this is. Value: the fixed
11198	// string "dfareporting#remarketingListsListResponse".
11199	Kind string `json:"kind,omitempty"`
11200
11201	// NextPageToken: Pagination token to be used for the next list
11202	// operation.
11203	NextPageToken string `json:"nextPageToken,omitempty"`
11204
11205	// RemarketingLists: Remarketing list collection.
11206	RemarketingLists []*RemarketingList `json:"remarketingLists,omitempty"`
11207
11208	// ServerResponse contains the HTTP response code and headers from the
11209	// server.
11210	googleapi.ServerResponse `json:"-"`
11211
11212	// ForceSendFields is a list of field names (e.g. "Kind") to
11213	// unconditionally include in API requests. By default, fields with
11214	// empty values are omitted from API requests. However, any non-pointer,
11215	// non-interface field appearing in ForceSendFields will be sent to the
11216	// server regardless of whether the field is empty or not. This may be
11217	// used to include empty fields in Patch requests.
11218	ForceSendFields []string `json:"-"`
11219
11220	// NullFields is a list of field names (e.g. "Kind") to include in API
11221	// requests with the JSON null value. By default, fields with empty
11222	// values are omitted from API requests. However, any field with an
11223	// empty value appearing in NullFields will be sent to the server as
11224	// null. It is an error if a field in this list has a non-empty value.
11225	// This may be used to include null fields in Patch requests.
11226	NullFields []string `json:"-"`
11227}
11228
11229func (s *RemarketingListsListResponse) MarshalJSON() ([]byte, error) {
11230	type NoMethod RemarketingListsListResponse
11231	raw := NoMethod(*s)
11232	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11233}
11234
11235// Report: Represents a Report resource.
11236type Report struct {
11237	// AccountId: The account ID to which this report belongs.
11238	AccountId int64 `json:"accountId,omitempty,string"`
11239
11240	// Criteria: The report criteria for a report of type "STANDARD".
11241	Criteria *ReportCriteria `json:"criteria,omitempty"`
11242
11243	// CrossDimensionReachCriteria: The report criteria for a report of type
11244	// "CROSS_DIMENSION_REACH".
11245	CrossDimensionReachCriteria *ReportCrossDimensionReachCriteria `json:"crossDimensionReachCriteria,omitempty"`
11246
11247	// Delivery: The report's email delivery settings.
11248	Delivery *ReportDelivery `json:"delivery,omitempty"`
11249
11250	// Etag: The eTag of this response for caching purposes.
11251	Etag string `json:"etag,omitempty"`
11252
11253	// FileName: The filename used when generating report files for this
11254	// report.
11255	FileName string `json:"fileName,omitempty"`
11256
11257	// FloodlightCriteria: The report criteria for a report of type
11258	// "FLOODLIGHT".
11259	FloodlightCriteria *ReportFloodlightCriteria `json:"floodlightCriteria,omitempty"`
11260
11261	// Format: The output format of the report. If not specified, default
11262	// format is "CSV". Note that the actual format in the completed report
11263	// file might differ if for instance the report's size exceeds the
11264	// format's capabilities. "CSV" will then be the fallback format.
11265	//
11266	// Possible values:
11267	//   "CSV"
11268	//   "EXCEL"
11269	Format string `json:"format,omitempty"`
11270
11271	// Id: The unique ID identifying this report resource.
11272	Id int64 `json:"id,omitempty,string"`
11273
11274	// Kind: The kind of resource this is, in this case dfareporting#report.
11275	Kind string `json:"kind,omitempty"`
11276
11277	// LastModifiedTime: The timestamp (in milliseconds since epoch) of when
11278	// this report was last modified.
11279	LastModifiedTime uint64 `json:"lastModifiedTime,omitempty,string"`
11280
11281	// Name: The name of the report.
11282	Name string `json:"name,omitempty"`
11283
11284	// OwnerProfileId: The user profile id of the owner of this report.
11285	OwnerProfileId int64 `json:"ownerProfileId,omitempty,string"`
11286
11287	// PathToConversionCriteria: The report criteria for a report of type
11288	// "PATH_TO_CONVERSION".
11289	PathToConversionCriteria *ReportPathToConversionCriteria `json:"pathToConversionCriteria,omitempty"`
11290
11291	// ReachCriteria: The report criteria for a report of type "REACH".
11292	ReachCriteria *ReportReachCriteria `json:"reachCriteria,omitempty"`
11293
11294	// Schedule: The report's schedule. Can only be set if the report's
11295	// 'dateRange' is a relative date range and the relative date range is
11296	// not "TODAY".
11297	Schedule *ReportSchedule `json:"schedule,omitempty"`
11298
11299	// SubAccountId: The subaccount ID to which this report belongs if
11300	// applicable.
11301	SubAccountId int64 `json:"subAccountId,omitempty,string"`
11302
11303	// Type: The type of the report.
11304	//
11305	// Possible values:
11306	//   "CROSS_DIMENSION_REACH"
11307	//   "FLOODLIGHT"
11308	//   "PATH_TO_CONVERSION"
11309	//   "REACH"
11310	//   "STANDARD"
11311	Type string `json:"type,omitempty"`
11312
11313	// ServerResponse contains the HTTP response code and headers from the
11314	// server.
11315	googleapi.ServerResponse `json:"-"`
11316
11317	// ForceSendFields is a list of field names (e.g. "AccountId") to
11318	// unconditionally include in API requests. By default, fields with
11319	// empty values are omitted from API requests. However, any non-pointer,
11320	// non-interface field appearing in ForceSendFields will be sent to the
11321	// server regardless of whether the field is empty or not. This may be
11322	// used to include empty fields in Patch requests.
11323	ForceSendFields []string `json:"-"`
11324
11325	// NullFields is a list of field names (e.g. "AccountId") to include in
11326	// API requests with the JSON null value. By default, fields with empty
11327	// values are omitted from API requests. However, any field with an
11328	// empty value appearing in NullFields will be sent to the server as
11329	// null. It is an error if a field in this list has a non-empty value.
11330	// This may be used to include null fields in Patch requests.
11331	NullFields []string `json:"-"`
11332}
11333
11334func (s *Report) MarshalJSON() ([]byte, error) {
11335	type NoMethod Report
11336	raw := NoMethod(*s)
11337	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11338}
11339
11340// ReportCriteria: The report criteria for a report of type "STANDARD".
11341type ReportCriteria struct {
11342	// Activities: Activity group.
11343	Activities *Activities `json:"activities,omitempty"`
11344
11345	// CustomRichMediaEvents: Custom Rich Media Events group.
11346	CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
11347
11348	// DateRange: The date range for which this report should be run.
11349	DateRange *DateRange `json:"dateRange,omitempty"`
11350
11351	// DimensionFilters: The list of filters on which dimensions are
11352	// filtered.
11353	// Filters for different dimensions are ANDed, filters for the same
11354	// dimension are grouped together and ORed.
11355	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11356
11357	// Dimensions: The list of standard dimensions the report should
11358	// include.
11359	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11360
11361	// MetricNames: The list of names of metrics the report should include.
11362	MetricNames []string `json:"metricNames,omitempty"`
11363
11364	// ForceSendFields is a list of field names (e.g. "Activities") to
11365	// unconditionally include in API requests. By default, fields with
11366	// empty values are omitted from API requests. However, any non-pointer,
11367	// non-interface field appearing in ForceSendFields will be sent to the
11368	// server regardless of whether the field is empty or not. This may be
11369	// used to include empty fields in Patch requests.
11370	ForceSendFields []string `json:"-"`
11371
11372	// NullFields is a list of field names (e.g. "Activities") to include in
11373	// API requests with the JSON null value. By default, fields with empty
11374	// values are omitted from API requests. However, any field with an
11375	// empty value appearing in NullFields will be sent to the server as
11376	// null. It is an error if a field in this list has a non-empty value.
11377	// This may be used to include null fields in Patch requests.
11378	NullFields []string `json:"-"`
11379}
11380
11381func (s *ReportCriteria) MarshalJSON() ([]byte, error) {
11382	type NoMethod ReportCriteria
11383	raw := NoMethod(*s)
11384	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11385}
11386
11387// ReportCrossDimensionReachCriteria: The report criteria for a report
11388// of type "CROSS_DIMENSION_REACH".
11389type ReportCrossDimensionReachCriteria struct {
11390	// Breakdown: The list of dimensions the report should include.
11391	Breakdown []*SortedDimension `json:"breakdown,omitempty"`
11392
11393	// DateRange: The date range this report should be run for.
11394	DateRange *DateRange `json:"dateRange,omitempty"`
11395
11396	// Dimension: The dimension option.
11397	//
11398	// Possible values:
11399	//   "ADVERTISER"
11400	//   "CAMPAIGN"
11401	//   "SITE_BY_ADVERTISER"
11402	//   "SITE_BY_CAMPAIGN"
11403	Dimension string `json:"dimension,omitempty"`
11404
11405	// DimensionFilters: The list of filters on which dimensions are
11406	// filtered.
11407	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11408
11409	// MetricNames: The list of names of metrics the report should include.
11410	MetricNames []string `json:"metricNames,omitempty"`
11411
11412	// OverlapMetricNames: The list of names of overlap metrics the report
11413	// should include.
11414	OverlapMetricNames []string `json:"overlapMetricNames,omitempty"`
11415
11416	// Pivoted: Whether the report is pivoted or not. Defaults to true.
11417	Pivoted bool `json:"pivoted,omitempty"`
11418
11419	// ForceSendFields is a list of field names (e.g. "Breakdown") to
11420	// unconditionally include in API requests. By default, fields with
11421	// empty values are omitted from API requests. However, any non-pointer,
11422	// non-interface field appearing in ForceSendFields will be sent to the
11423	// server regardless of whether the field is empty or not. This may be
11424	// used to include empty fields in Patch requests.
11425	ForceSendFields []string `json:"-"`
11426
11427	// NullFields is a list of field names (e.g. "Breakdown") to include in
11428	// API requests with the JSON null value. By default, fields with empty
11429	// values are omitted from API requests. However, any field with an
11430	// empty value appearing in NullFields will be sent to the server as
11431	// null. It is an error if a field in this list has a non-empty value.
11432	// This may be used to include null fields in Patch requests.
11433	NullFields []string `json:"-"`
11434}
11435
11436func (s *ReportCrossDimensionReachCriteria) MarshalJSON() ([]byte, error) {
11437	type NoMethod ReportCrossDimensionReachCriteria
11438	raw := NoMethod(*s)
11439	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11440}
11441
11442// ReportDelivery: The report's email delivery settings.
11443type ReportDelivery struct {
11444	// EmailOwner: Whether the report should be emailed to the report owner.
11445	EmailOwner bool `json:"emailOwner,omitempty"`
11446
11447	// EmailOwnerDeliveryType: The type of delivery for the owner to
11448	// receive, if enabled.
11449	//
11450	// Possible values:
11451	//   "ATTACHMENT"
11452	//   "LINK"
11453	EmailOwnerDeliveryType string `json:"emailOwnerDeliveryType,omitempty"`
11454
11455	// Message: The message to be sent with each email.
11456	Message string `json:"message,omitempty"`
11457
11458	// Recipients: The list of recipients to which to email the report.
11459	Recipients []*Recipient `json:"recipients,omitempty"`
11460
11461	// ForceSendFields is a list of field names (e.g. "EmailOwner") to
11462	// unconditionally include in API requests. By default, fields with
11463	// empty values are omitted from API requests. However, any non-pointer,
11464	// non-interface field appearing in ForceSendFields will be sent to the
11465	// server regardless of whether the field is empty or not. This may be
11466	// used to include empty fields in Patch requests.
11467	ForceSendFields []string `json:"-"`
11468
11469	// NullFields is a list of field names (e.g. "EmailOwner") to include in
11470	// API requests with the JSON null value. By default, fields with empty
11471	// values are omitted from API requests. However, any field with an
11472	// empty value appearing in NullFields will be sent to the server as
11473	// null. It is an error if a field in this list has a non-empty value.
11474	// This may be used to include null fields in Patch requests.
11475	NullFields []string `json:"-"`
11476}
11477
11478func (s *ReportDelivery) MarshalJSON() ([]byte, error) {
11479	type NoMethod ReportDelivery
11480	raw := NoMethod(*s)
11481	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11482}
11483
11484// ReportFloodlightCriteria: The report criteria for a report of type
11485// "FLOODLIGHT".
11486type ReportFloodlightCriteria struct {
11487	// CustomRichMediaEvents: The list of custom rich media events to
11488	// include.
11489	CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
11490
11491	// DateRange: The date range this report should be run for.
11492	DateRange *DateRange `json:"dateRange,omitempty"`
11493
11494	// DimensionFilters: The list of filters on which dimensions are
11495	// filtered.
11496	// Filters for different dimensions are ANDed, filters for the same
11497	// dimension are grouped together and ORed.
11498	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11499
11500	// Dimensions: The list of dimensions the report should include.
11501	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11502
11503	// FloodlightConfigId: The floodlight ID for which to show data in this
11504	// report. All advertisers associated with that ID will automatically be
11505	// added. The dimension of the value needs to be
11506	// 'dfa:floodlightConfigId'.
11507	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
11508
11509	// MetricNames: The list of names of metrics the report should include.
11510	MetricNames []string `json:"metricNames,omitempty"`
11511
11512	// ReportProperties: The properties of the report.
11513	ReportProperties *ReportFloodlightCriteriaReportProperties `json:"reportProperties,omitempty"`
11514
11515	// ForceSendFields is a list of field names (e.g.
11516	// "CustomRichMediaEvents") to unconditionally include in API requests.
11517	// By default, fields with empty values are omitted from API requests.
11518	// However, any non-pointer, non-interface field appearing in
11519	// ForceSendFields will be sent to the server regardless of whether the
11520	// field is empty or not. This may be used to include empty fields in
11521	// Patch requests.
11522	ForceSendFields []string `json:"-"`
11523
11524	// NullFields is a list of field names (e.g. "CustomRichMediaEvents") to
11525	// include in API requests with the JSON null value. By default, fields
11526	// with empty values are omitted from API requests. However, any field
11527	// with an empty value appearing in NullFields will be sent to the
11528	// server as null. It is an error if a field in this list has a
11529	// non-empty value. This may be used to include null fields in Patch
11530	// requests.
11531	NullFields []string `json:"-"`
11532}
11533
11534func (s *ReportFloodlightCriteria) MarshalJSON() ([]byte, error) {
11535	type NoMethod ReportFloodlightCriteria
11536	raw := NoMethod(*s)
11537	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11538}
11539
11540// ReportFloodlightCriteriaReportProperties: The properties of the
11541// report.
11542type ReportFloodlightCriteriaReportProperties struct {
11543	// IncludeAttributedIPConversions: Include conversions that have no
11544	// cookie, but do have an exposure path.
11545	IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
11546
11547	// IncludeUnattributedCookieConversions: Include conversions of users
11548	// with a DoubleClick cookie but without an exposure. That means the
11549	// user did not click or see an ad from the advertiser within the
11550	// Floodlight group, or that the interaction happened outside the
11551	// lookback window.
11552	IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
11553
11554	// IncludeUnattributedIPConversions: Include conversions that have no
11555	// associated cookies and no exposures. It’s therefore impossible to
11556	// know how the user was exposed to your ads during the lookback window
11557	// prior to a conversion.
11558	IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
11559
11560	// ForceSendFields is a list of field names (e.g.
11561	// "IncludeAttributedIPConversions") to unconditionally include in API
11562	// requests. By default, fields with empty values are omitted from API
11563	// requests. However, any non-pointer, non-interface field appearing in
11564	// ForceSendFields will be sent to the server regardless of whether the
11565	// field is empty or not. This may be used to include empty fields in
11566	// Patch requests.
11567	ForceSendFields []string `json:"-"`
11568
11569	// NullFields is a list of field names (e.g.
11570	// "IncludeAttributedIPConversions") to include in API requests with the
11571	// JSON null value. By default, fields with empty values are omitted
11572	// from API requests. However, any field with an empty value appearing
11573	// in NullFields will be sent to the server as null. It is an error if a
11574	// field in this list has a non-empty value. This may be used to include
11575	// null fields in Patch requests.
11576	NullFields []string `json:"-"`
11577}
11578
11579func (s *ReportFloodlightCriteriaReportProperties) MarshalJSON() ([]byte, error) {
11580	type NoMethod ReportFloodlightCriteriaReportProperties
11581	raw := NoMethod(*s)
11582	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11583}
11584
11585// ReportPathToConversionCriteria: The report criteria for a report of
11586// type "PATH_TO_CONVERSION".
11587type ReportPathToConversionCriteria struct {
11588	// ActivityFilters: The list of 'dfa:activity' values to filter on.
11589	ActivityFilters []*DimensionValue `json:"activityFilters,omitempty"`
11590
11591	// ConversionDimensions: The list of conversion dimensions the report
11592	// should include.
11593	ConversionDimensions []*SortedDimension `json:"conversionDimensions,omitempty"`
11594
11595	// CustomFloodlightVariables: The list of custom floodlight variables
11596	// the report should include.
11597	CustomFloodlightVariables []*SortedDimension `json:"customFloodlightVariables,omitempty"`
11598
11599	// CustomRichMediaEvents: The list of custom rich media events to
11600	// include.
11601	CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
11602
11603	// DateRange: The date range this report should be run for.
11604	DateRange *DateRange `json:"dateRange,omitempty"`
11605
11606	// FloodlightConfigId: The floodlight ID for which to show data in this
11607	// report. All advertisers associated with that ID will automatically be
11608	// added. The dimension of the value needs to be
11609	// 'dfa:floodlightConfigId'.
11610	FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
11611
11612	// MetricNames: The list of names of metrics the report should include.
11613	MetricNames []string `json:"metricNames,omitempty"`
11614
11615	// PerInteractionDimensions: The list of per interaction dimensions the
11616	// report should include.
11617	PerInteractionDimensions []*SortedDimension `json:"perInteractionDimensions,omitempty"`
11618
11619	// ReportProperties: The properties of the report.
11620	ReportProperties *ReportPathToConversionCriteriaReportProperties `json:"reportProperties,omitempty"`
11621
11622	// ForceSendFields is a list of field names (e.g. "ActivityFilters") to
11623	// unconditionally include in API requests. By default, fields with
11624	// empty values are omitted from API requests. However, any non-pointer,
11625	// non-interface field appearing in ForceSendFields will be sent to the
11626	// server regardless of whether the field is empty or not. This may be
11627	// used to include empty fields in Patch requests.
11628	ForceSendFields []string `json:"-"`
11629
11630	// NullFields is a list of field names (e.g. "ActivityFilters") to
11631	// include in API requests with the JSON null value. By default, fields
11632	// with empty values are omitted from API requests. However, any field
11633	// with an empty value appearing in NullFields will be sent to the
11634	// server as null. It is an error if a field in this list has a
11635	// non-empty value. This may be used to include null fields in Patch
11636	// requests.
11637	NullFields []string `json:"-"`
11638}
11639
11640func (s *ReportPathToConversionCriteria) MarshalJSON() ([]byte, error) {
11641	type NoMethod ReportPathToConversionCriteria
11642	raw := NoMethod(*s)
11643	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11644}
11645
11646// ReportPathToConversionCriteriaReportProperties: The properties of the
11647// report.
11648type ReportPathToConversionCriteriaReportProperties struct {
11649	// ClicksLookbackWindow: DFA checks to see if a click interaction
11650	// occurred within the specified period of time before a conversion. By
11651	// default the value is pulled from Floodlight or you can manually enter
11652	// a custom value. Valid values: 1-90.
11653	ClicksLookbackWindow int64 `json:"clicksLookbackWindow,omitempty"`
11654
11655	// ImpressionsLookbackWindow: DFA checks to see if an impression
11656	// interaction occurred within the specified period of time before a
11657	// conversion. By default the value is pulled from Floodlight or you can
11658	// manually enter a custom value. Valid values: 1-90.
11659	ImpressionsLookbackWindow int64 `json:"impressionsLookbackWindow,omitempty"`
11660
11661	// IncludeAttributedIPConversions: Deprecated: has no effect.
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	// MaximumClickInteractions: The maximum number of click interactions to
11678	// include in the report. Advertisers currently paying for E2C reports
11679	// get up to 200 (100 clicks, 100 impressions). If another advertiser in
11680	// your network is paying for E2C, you can have up to 5 total exposures
11681	// per report.
11682	MaximumClickInteractions int64 `json:"maximumClickInteractions,omitempty"`
11683
11684	// MaximumImpressionInteractions: The maximum number of click
11685	// interactions to include in the report. Advertisers currently paying
11686	// for E2C reports get up to 200 (100 clicks, 100 impressions). If
11687	// another advertiser in your network is paying for E2C, you can have up
11688	// to 5 total exposures per report.
11689	MaximumImpressionInteractions int64 `json:"maximumImpressionInteractions,omitempty"`
11690
11691	// MaximumInteractionGap: The maximum amount of time that can take place
11692	// between interactions (clicks or impressions) by the same user. Valid
11693	// values: 1-90.
11694	MaximumInteractionGap int64 `json:"maximumInteractionGap,omitempty"`
11695
11696	// PivotOnInteractionPath: Enable pivoting on interaction path.
11697	PivotOnInteractionPath bool `json:"pivotOnInteractionPath,omitempty"`
11698
11699	// ForceSendFields is a list of field names (e.g.
11700	// "ClicksLookbackWindow") to unconditionally include in API requests.
11701	// By default, fields with empty values are omitted from API requests.
11702	// However, any non-pointer, non-interface field appearing in
11703	// ForceSendFields will be sent to the server regardless of whether the
11704	// field is empty or not. This may be used to include empty fields in
11705	// Patch requests.
11706	ForceSendFields []string `json:"-"`
11707
11708	// NullFields is a list of field names (e.g. "ClicksLookbackWindow") to
11709	// include in API requests with the JSON null value. By default, fields
11710	// with empty values are omitted from API requests. However, any field
11711	// with an empty value appearing in NullFields will be sent to the
11712	// server as null. It is an error if a field in this list has a
11713	// non-empty value. This may be used to include null fields in Patch
11714	// requests.
11715	NullFields []string `json:"-"`
11716}
11717
11718func (s *ReportPathToConversionCriteriaReportProperties) MarshalJSON() ([]byte, error) {
11719	type NoMethod ReportPathToConversionCriteriaReportProperties
11720	raw := NoMethod(*s)
11721	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11722}
11723
11724// ReportReachCriteria: The report criteria for a report of type
11725// "REACH".
11726type ReportReachCriteria struct {
11727	// Activities: Activity group.
11728	Activities *Activities `json:"activities,omitempty"`
11729
11730	// CustomRichMediaEvents: Custom Rich Media Events group.
11731	CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
11732
11733	// DateRange: The date range this report should be run for.
11734	DateRange *DateRange `json:"dateRange,omitempty"`
11735
11736	// DimensionFilters: The list of filters on which dimensions are
11737	// filtered.
11738	// Filters for different dimensions are ANDed, filters for the same
11739	// dimension are grouped together and ORed.
11740	DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11741
11742	// Dimensions: The list of dimensions the report should include.
11743	Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11744
11745	// EnableAllDimensionCombinations: Whether to enable all reach dimension
11746	// combinations in the report. Defaults to false. If enabled, the date
11747	// range of the report should be within the last 42 days.
11748	EnableAllDimensionCombinations bool `json:"enableAllDimensionCombinations,omitempty"`
11749
11750	// MetricNames: The list of names of metrics the report should include.
11751	MetricNames []string `json:"metricNames,omitempty"`
11752
11753	// ReachByFrequencyMetricNames: The list of names of  Reach By Frequency
11754	// metrics the report should include.
11755	ReachByFrequencyMetricNames []string `json:"reachByFrequencyMetricNames,omitempty"`
11756
11757	// ForceSendFields is a list of field names (e.g. "Activities") to
11758	// unconditionally include in API requests. By default, fields with
11759	// empty values are omitted from API requests. However, any non-pointer,
11760	// non-interface field appearing in ForceSendFields will be sent to the
11761	// server regardless of whether the field is empty or not. This may be
11762	// used to include empty fields in Patch requests.
11763	ForceSendFields []string `json:"-"`
11764
11765	// NullFields is a list of field names (e.g. "Activities") to include in
11766	// API requests with the JSON null value. By default, fields with empty
11767	// values are omitted from API requests. However, any field with an
11768	// empty value appearing in NullFields will be sent to the server as
11769	// null. It is an error if a field in this list has a non-empty value.
11770	// This may be used to include null fields in Patch requests.
11771	NullFields []string `json:"-"`
11772}
11773
11774func (s *ReportReachCriteria) MarshalJSON() ([]byte, error) {
11775	type NoMethod ReportReachCriteria
11776	raw := NoMethod(*s)
11777	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11778}
11779
11780// ReportSchedule: The report's schedule. Can only be set if the
11781// report's 'dateRange' is a relative date range and the relative date
11782// range is not "TODAY".
11783type ReportSchedule struct {
11784	// Active: Whether the schedule is active or not. Must be set to either
11785	// true or false.
11786	Active bool `json:"active,omitempty"`
11787
11788	// Every: Defines every how many days, weeks or months the report should
11789	// be run. Needs to be set when "repeats" is either "DAILY", "WEEKLY" or
11790	// "MONTHLY".
11791	Every int64 `json:"every,omitempty"`
11792
11793	// ExpirationDate: The expiration date when the scheduled report stops
11794	// running.
11795	ExpirationDate string `json:"expirationDate,omitempty"`
11796
11797	// Repeats: The interval for which the report is repeated. Note:
11798	// - "DAILY" also requires field "every" to be set.
11799	// - "WEEKLY" also requires fields "every" and "repeatsOnWeekDays" to be
11800	// set.
11801	// - "MONTHLY" also requires fields "every" and "runsOnDayOfMonth" to be
11802	// set.
11803	Repeats string `json:"repeats,omitempty"`
11804
11805	// RepeatsOnWeekDays: List of week days "WEEKLY" on which scheduled
11806	// reports should run.
11807	//
11808	// Possible values:
11809	//   "FRIDAY"
11810	//   "MONDAY"
11811	//   "SATURDAY"
11812	//   "SUNDAY"
11813	//   "THURSDAY"
11814	//   "TUESDAY"
11815	//   "WEDNESDAY"
11816	RepeatsOnWeekDays []string `json:"repeatsOnWeekDays,omitempty"`
11817
11818	// RunsOnDayOfMonth: Enum to define for "MONTHLY" scheduled reports
11819	// whether reports should be repeated on the same day of the month as
11820	// "startDate" or the same day of the week of the month.
11821	// Example: If 'startDate' is Monday, April 2nd 2012 (2012-04-02),
11822	// "DAY_OF_MONTH" would run subsequent reports on the 2nd of every
11823	// Month, and "WEEK_OF_MONTH" would run subsequent reports on the first
11824	// Monday of the month.
11825	//
11826	// Possible values:
11827	//   "DAY_OF_MONTH"
11828	//   "WEEK_OF_MONTH"
11829	RunsOnDayOfMonth string `json:"runsOnDayOfMonth,omitempty"`
11830
11831	// StartDate: Start date of date range for which scheduled reports
11832	// should be run.
11833	StartDate string `json:"startDate,omitempty"`
11834
11835	// ForceSendFields is a list of field names (e.g. "Active") to
11836	// unconditionally include in API requests. By default, fields with
11837	// empty values are omitted from API requests. However, any non-pointer,
11838	// non-interface field appearing in ForceSendFields will be sent to the
11839	// server regardless of whether the field is empty or not. This may be
11840	// used to include empty fields in Patch requests.
11841	ForceSendFields []string `json:"-"`
11842
11843	// NullFields is a list of field names (e.g. "Active") to include in API
11844	// requests with the JSON null value. By default, fields with empty
11845	// values are omitted from API requests. However, any field with an
11846	// empty value appearing in NullFields will be sent to the server as
11847	// null. It is an error if a field in this list has a non-empty value.
11848	// This may be used to include null fields in Patch requests.
11849	NullFields []string `json:"-"`
11850}
11851
11852func (s *ReportSchedule) MarshalJSON() ([]byte, error) {
11853	type NoMethod ReportSchedule
11854	raw := NoMethod(*s)
11855	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11856}
11857
11858// ReportCompatibleFields: Represents fields that are compatible to be
11859// selected for a report of type "STANDARD".
11860type ReportCompatibleFields struct {
11861	// DimensionFilters: Dimensions which are compatible to be selected in
11862	// the "dimensionFilters" section of the report.
11863	DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
11864
11865	// Dimensions: Dimensions which are compatible to be selected in the
11866	// "dimensions" section of the report.
11867	Dimensions []*Dimension `json:"dimensions,omitempty"`
11868
11869	// Kind: The kind of resource this is, in this case
11870	// dfareporting#reportCompatibleFields.
11871	Kind string `json:"kind,omitempty"`
11872
11873	// Metrics: Metrics which are compatible to be selected in the
11874	// "metricNames" section of the report.
11875	Metrics []*Metric `json:"metrics,omitempty"`
11876
11877	// PivotedActivityMetrics: Metrics which are compatible to be selected
11878	// as activity metrics to pivot on in the "activities" section of the
11879	// report.
11880	PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
11881
11882	// ForceSendFields is a list of field names (e.g. "DimensionFilters") to
11883	// unconditionally include in API requests. By default, fields with
11884	// empty values are omitted from API requests. However, any non-pointer,
11885	// non-interface field appearing in ForceSendFields will be sent to the
11886	// server regardless of whether the field is empty or not. This may be
11887	// used to include empty fields in Patch requests.
11888	ForceSendFields []string `json:"-"`
11889
11890	// NullFields is a list of field names (e.g. "DimensionFilters") to
11891	// include in API requests with the JSON null value. By default, fields
11892	// with empty values are omitted from API requests. However, any field
11893	// with an empty value appearing in NullFields will be sent to the
11894	// server as null. It is an error if a field in this list has a
11895	// non-empty value. This may be used to include null fields in Patch
11896	// requests.
11897	NullFields []string `json:"-"`
11898}
11899
11900func (s *ReportCompatibleFields) MarshalJSON() ([]byte, error) {
11901	type NoMethod ReportCompatibleFields
11902	raw := NoMethod(*s)
11903	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11904}
11905
11906// ReportList: Represents the list of reports.
11907type ReportList struct {
11908	// Etag: The eTag of this response for caching purposes.
11909	Etag string `json:"etag,omitempty"`
11910
11911	// Items: The reports returned in this response.
11912	Items []*Report `json:"items,omitempty"`
11913
11914	// Kind: The kind of list this is, in this case dfareporting#reportList.
11915	Kind string `json:"kind,omitempty"`
11916
11917	// NextPageToken: Continuation token used to page through reports. To
11918	// retrieve the next page of results, set the next request's "pageToken"
11919	// to the value of this field. The page token is only valid for a
11920	// limited amount of time and should not be persisted.
11921	NextPageToken string `json:"nextPageToken,omitempty"`
11922
11923	// ServerResponse contains the HTTP response code and headers from the
11924	// server.
11925	googleapi.ServerResponse `json:"-"`
11926
11927	// ForceSendFields is a list of field names (e.g. "Etag") to
11928	// unconditionally include in API requests. By default, fields with
11929	// empty values are omitted from API requests. However, any non-pointer,
11930	// non-interface field appearing in ForceSendFields will be sent to the
11931	// server regardless of whether the field is empty or not. This may be
11932	// used to include empty fields in Patch requests.
11933	ForceSendFields []string `json:"-"`
11934
11935	// NullFields is a list of field names (e.g. "Etag") to include in API
11936	// requests with the JSON null value. By default, fields with empty
11937	// values are omitted from API requests. However, any field with an
11938	// empty value appearing in NullFields will be sent to the server as
11939	// null. It is an error if a field in this list has a non-empty value.
11940	// This may be used to include null fields in Patch requests.
11941	NullFields []string `json:"-"`
11942}
11943
11944func (s *ReportList) MarshalJSON() ([]byte, error) {
11945	type NoMethod ReportList
11946	raw := NoMethod(*s)
11947	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11948}
11949
11950// ReportsConfiguration: Reporting Configuration
11951type ReportsConfiguration struct {
11952	// ExposureToConversionEnabled: Whether the exposure to conversion
11953	// report is enabled. This report shows detailed pathway information on
11954	// up to 10 of the most recent ad exposures seen by a user before
11955	// converting.
11956	ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
11957
11958	// LookbackConfiguration: Default lookback windows for new advertisers
11959	// in this account.
11960	LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
11961
11962	// ReportGenerationTimeZoneId: Report generation time zone ID of this
11963	// account. This is a required field that can only be changed by a
11964	// superuser.
11965	// Acceptable values are:
11966	//
11967	// - "1" for "America/New_York"
11968	// - "2" for "Europe/London"
11969	// - "3" for "Europe/Paris"
11970	// - "4" for "Africa/Johannesburg"
11971	// - "5" for "Asia/Jerusalem"
11972	// - "6" for "Asia/Shanghai"
11973	// - "7" for "Asia/Hong_Kong"
11974	// - "8" for "Asia/Tokyo"
11975	// - "9" for "Australia/Sydney"
11976	// - "10" for "Asia/Dubai"
11977	// - "11" for "America/Los_Angeles"
11978	// - "12" for "Pacific/Auckland"
11979	// - "13" for "America/Sao_Paulo"
11980	ReportGenerationTimeZoneId int64 `json:"reportGenerationTimeZoneId,omitempty,string"`
11981
11982	// ForceSendFields is a list of field names (e.g.
11983	// "ExposureToConversionEnabled") to unconditionally include in API
11984	// requests. By default, fields with empty values are omitted from API
11985	// requests. However, any non-pointer, non-interface field appearing in
11986	// ForceSendFields will be sent to the server regardless of whether the
11987	// field is empty or not. This may be used to include empty fields in
11988	// Patch requests.
11989	ForceSendFields []string `json:"-"`
11990
11991	// NullFields is a list of field names (e.g.
11992	// "ExposureToConversionEnabled") to include in API requests with the
11993	// JSON null value. By default, fields with empty values are omitted
11994	// from API requests. However, any field with an empty value appearing
11995	// in NullFields will be sent to the server as null. It is an error if a
11996	// field in this list has a non-empty value. This may be used to include
11997	// null fields in Patch requests.
11998	NullFields []string `json:"-"`
11999}
12000
12001func (s *ReportsConfiguration) MarshalJSON() ([]byte, error) {
12002	type NoMethod ReportsConfiguration
12003	raw := NoMethod(*s)
12004	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12005}
12006
12007// RichMediaExitOverride: Rich Media Exit Override.
12008type RichMediaExitOverride struct {
12009	// ClickThroughUrl: Click-through URL of this rich media exit override.
12010	// Applicable if the enabled field is set to true.
12011	ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
12012
12013	// Enabled: Whether to use the clickThroughUrl. If false, the
12014	// creative-level exit will be used.
12015	Enabled bool `json:"enabled,omitempty"`
12016
12017	// ExitId: ID for the override to refer to a specific exit in the
12018	// creative.
12019	ExitId int64 `json:"exitId,omitempty,string"`
12020
12021	// ForceSendFields is a list of field names (e.g. "ClickThroughUrl") to
12022	// unconditionally include in API requests. By default, fields with
12023	// empty values are omitted from API requests. However, any non-pointer,
12024	// non-interface field appearing in ForceSendFields will be sent to the
12025	// server regardless of whether the field is empty or not. This may be
12026	// used to include empty fields in Patch requests.
12027	ForceSendFields []string `json:"-"`
12028
12029	// NullFields is a list of field names (e.g. "ClickThroughUrl") to
12030	// include in API requests with the JSON null value. By default, fields
12031	// with empty values are omitted from API requests. However, any field
12032	// with an empty value appearing in NullFields will be sent to the
12033	// server as null. It is an error if a field in this list has a
12034	// non-empty value. This may be used to include null fields in Patch
12035	// requests.
12036	NullFields []string `json:"-"`
12037}
12038
12039func (s *RichMediaExitOverride) MarshalJSON() ([]byte, error) {
12040	type NoMethod RichMediaExitOverride
12041	raw := NoMethod(*s)
12042	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12043}
12044
12045// Rule: A rule associates an asset with a targeting template for
12046// asset-level targeting. Applicable to INSTREAM_VIDEO creatives.
12047type Rule struct {
12048	// AssetId: A creativeAssets[].id. This should refer to one of the
12049	// parent assets in this creative. This is a required field.
12050	AssetId int64 `json:"assetId,omitempty,string"`
12051
12052	// Name: A user-friendly name for this rule. This is a required field.
12053	Name string `json:"name,omitempty"`
12054
12055	// TargetingTemplateId: A targeting template ID. The targeting from the
12056	// targeting template will be used to determine whether this asset
12057	// should be served. This is a required field.
12058	TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
12059
12060	// ForceSendFields is a list of field names (e.g. "AssetId") to
12061	// unconditionally include in API requests. By default, fields with
12062	// empty values are omitted from API requests. However, any non-pointer,
12063	// non-interface field appearing in ForceSendFields will be sent to the
12064	// server regardless of whether the field is empty or not. This may be
12065	// used to include empty fields in Patch requests.
12066	ForceSendFields []string `json:"-"`
12067
12068	// NullFields is a list of field names (e.g. "AssetId") to include in
12069	// API requests with the JSON null value. By default, fields with empty
12070	// values are omitted from API requests. However, any field with an
12071	// empty value appearing in NullFields will be sent to the server as
12072	// null. It is an error if a field in this list has a non-empty value.
12073	// This may be used to include null fields in Patch requests.
12074	NullFields []string `json:"-"`
12075}
12076
12077func (s *Rule) MarshalJSON() ([]byte, error) {
12078	type NoMethod Rule
12079	raw := NoMethod(*s)
12080	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12081}
12082
12083// Site: Contains properties of a site.
12084type Site struct {
12085	// AccountId: Account ID of this site. This is a read-only field that
12086	// can be left blank.
12087	AccountId int64 `json:"accountId,omitempty,string"`
12088
12089	// Approved: Whether this site is approved.
12090	Approved bool `json:"approved,omitempty"`
12091
12092	// DirectorySiteId: Directory site associated with this site. This is a
12093	// required field that is read-only after insertion.
12094	DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
12095
12096	// DirectorySiteIdDimensionValue: Dimension value for the ID of the
12097	// directory site. This is a read-only, auto-generated field.
12098	DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
12099
12100	// Id: ID of this site. This is a read-only, auto-generated field.
12101	Id int64 `json:"id,omitempty,string"`
12102
12103	// IdDimensionValue: Dimension value for the ID of this site. This is a
12104	// read-only, auto-generated field.
12105	IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
12106
12107	// KeyName: Key name of this site. This is a read-only, auto-generated
12108	// field.
12109	KeyName string `json:"keyName,omitempty"`
12110
12111	// Kind: Identifies what kind of resource this is. Value: the fixed
12112	// string "dfareporting#site".
12113	Kind string `json:"kind,omitempty"`
12114
12115	// Name: Name of this site.This is a required field. Must be less than
12116	// 128 characters long. If this site is under a subaccount, the name
12117	// must be unique among sites of the same subaccount. Otherwise, this
12118	// site is a top-level site, and the name must be unique among top-level
12119	// sites of the same account.
12120	Name string `json:"name,omitempty"`
12121
12122	// SiteContacts: Site contacts.
12123	SiteContacts []*SiteContact `json:"siteContacts,omitempty"`
12124
12125	// SiteSettings: Site-wide settings.
12126	SiteSettings *SiteSettings `json:"siteSettings,omitempty"`
12127
12128	// SubaccountId: Subaccount ID of this site. This is a read-only field
12129	// that can be left blank.
12130	SubaccountId int64 `json:"subaccountId,omitempty,string"`
12131
12132	// ServerResponse contains the HTTP response code and headers from the
12133	// server.
12134	googleapi.ServerResponse `json:"-"`
12135
12136	// ForceSendFields is a list of field names (e.g. "AccountId") to
12137	// unconditionally include in API requests. By default, fields with
12138	// empty values are omitted from API requests. However, any non-pointer,
12139	// non-interface field appearing in ForceSendFields will be sent to the
12140	// server regardless of whether the field is empty or not. This may be
12141	// used to include empty fields in Patch requests.
12142	ForceSendFields []string `json:"-"`
12143
12144	// NullFields is a list of field names (e.g. "AccountId") to include in
12145	// API requests with the JSON null value. By default, fields with empty
12146	// values are omitted from API requests. However, any field with an
12147	// empty value appearing in NullFields will be sent to the server as
12148	// null. It is an error if a field in this list has a non-empty value.
12149	// This may be used to include null fields in Patch requests.
12150	NullFields []string `json:"-"`
12151}
12152
12153func (s *Site) MarshalJSON() ([]byte, error) {
12154	type NoMethod Site
12155	raw := NoMethod(*s)
12156	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12157}
12158
12159// SiteContact: Site Contact
12160type SiteContact struct {
12161	// Address: Address of this site contact.
12162	Address string `json:"address,omitempty"`
12163
12164	// ContactType: Site contact type.
12165	//
12166	// Possible values:
12167	//   "SALES_PERSON"
12168	//   "TRAFFICKER"
12169	ContactType string `json:"contactType,omitempty"`
12170
12171	// Email: Email address of this site contact. This is a required field.
12172	Email string `json:"email,omitempty"`
12173
12174	// FirstName: First name of this site contact.
12175	FirstName string `json:"firstName,omitempty"`
12176
12177	// Id: ID of this site contact. This is a read-only, auto-generated
12178	// field.
12179	Id int64 `json:"id,omitempty,string"`
12180
12181	// LastName: Last name of this site contact.
12182	LastName string `json:"lastName,omitempty"`
12183
12184	// Phone: Primary phone number of this site contact.
12185	Phone string `json:"phone,omitempty"`
12186
12187	// Title: Title or designation of this site contact.
12188	Title string `json:"title,omitempty"`
12189
12190	// ForceSendFields is a list of field names (e.g. "Address") to
12191	// unconditionally include in API requests. By default, fields with
12192	// empty values are omitted from API requests. However, any non-pointer,
12193	// non-interface field appearing in ForceSendFields will be sent to the
12194	// server regardless of whether the field is empty or not. This may be
12195	// used to include empty fields in Patch requests.
12196	ForceSendFields []string `json:"-"`
12197
12198	// NullFields is a list of field names (e.g. "Address") to include in
12199	// API requests with the JSON null value. By default, fields with empty
12200	// values are omitted from API requests. However, any field with an
12201	// empty value appearing in NullFields will be sent to the server as
12202	// null. It is an error if a field in this list has a non-empty value.
12203	// This may be used to include null fields in Patch requests.
12204	NullFields []string `json:"-"`
12205}
12206
12207func (s *SiteContact) MarshalJSON() ([]byte, error) {
12208	type NoMethod SiteContact
12209	raw := NoMethod(*s)
12210	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12211}
12212
12213// SiteSettings: Site Settings
12214type SiteSettings struct {
12215	// ActiveViewOptOut: Whether active view creatives are disabled for this
12216	// site.
12217	ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
12218
12219	// AdBlockingOptOut: Whether this site opts out of ad blocking. When
12220	// true, ad blocking is disabled for all placements under the site,
12221	// regardless of the individual placement settings. When false, the
12222	// campaign and placement settings take effect.
12223	AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
12224
12225	// DisableNewCookie: Whether new cookies are disabled for this site.
12226	DisableNewCookie bool `json:"disableNewCookie,omitempty"`
12227
12228	// TagSetting: Configuration settings for dynamic and image floodlight
12229	// tags.
12230	TagSetting *TagSetting `json:"tagSetting,omitempty"`
12231
12232	// VideoActiveViewOptOutTemplate: Whether Verification and ActiveView
12233	// for in-stream video creatives are disabled by default for new
12234	// placements created under this site. This value will be used to
12235	// populate the placement.videoActiveViewOptOut field, when no value is
12236	// specified for the new placement.
12237	VideoActiveViewOptOutTemplate bool `json:"videoActiveViewOptOutTemplate,omitempty"`
12238
12239	// VpaidAdapterChoiceTemplate: Default VPAID adapter setting for new
12240	// placements created under this site. This value will be used to
12241	// populate the placements.vpaidAdapterChoice field, when no value is
12242	// specified for the new placement. Controls which VPAID format the
12243	// measurement adapter will use for in-stream video creatives assigned
12244	// to the placement. The publisher's specifications will typically
12245	// determine this setting. For VPAID creatives, the adapter format will
12246	// match the VPAID format (HTML5 VPAID creatives use the HTML5
12247	// adapter).
12248	//
12249	// Note: Flash is no longer supported. This field now defaults to HTML5
12250	// when the following values are provided: FLASH, BOTH.
12251	//
12252	// Possible values:
12253	//   "BOTH"
12254	//   "DEFAULT"
12255	//   "FLASH"
12256	//   "HTML5"
12257	VpaidAdapterChoiceTemplate string `json:"vpaidAdapterChoiceTemplate,omitempty"`
12258
12259	// ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to
12260	// unconditionally include in API requests. By default, fields with
12261	// empty values are omitted from API requests. However, any non-pointer,
12262	// non-interface field appearing in ForceSendFields will be sent to the
12263	// server regardless of whether the field is empty or not. This may be
12264	// used to include empty fields in Patch requests.
12265	ForceSendFields []string `json:"-"`
12266
12267	// NullFields is a list of field names (e.g. "ActiveViewOptOut") to
12268	// include in API requests with the JSON null value. By default, fields
12269	// with empty values are omitted from API requests. However, any field
12270	// with an empty value appearing in NullFields will be sent to the
12271	// server as null. It is an error if a field in this list has a
12272	// non-empty value. This may be used to include null fields in Patch
12273	// requests.
12274	NullFields []string `json:"-"`
12275}
12276
12277func (s *SiteSettings) MarshalJSON() ([]byte, error) {
12278	type NoMethod SiteSettings
12279	raw := NoMethod(*s)
12280	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12281}
12282
12283// SitesListResponse: Site List Response
12284type SitesListResponse struct {
12285	// Kind: Identifies what kind of resource this is. Value: the fixed
12286	// string "dfareporting#sitesListResponse".
12287	Kind string `json:"kind,omitempty"`
12288
12289	// NextPageToken: Pagination token to be used for the next list
12290	// operation.
12291	NextPageToken string `json:"nextPageToken,omitempty"`
12292
12293	// Sites: Site collection.
12294	Sites []*Site `json:"sites,omitempty"`
12295
12296	// ServerResponse contains the HTTP response code and headers from the
12297	// server.
12298	googleapi.ServerResponse `json:"-"`
12299
12300	// ForceSendFields is a list of field names (e.g. "Kind") to
12301	// unconditionally include in API requests. By default, fields with
12302	// empty values are omitted from API requests. However, any non-pointer,
12303	// non-interface field appearing in ForceSendFields will be sent to the
12304	// server regardless of whether the field is empty or not. This may be
12305	// used to include empty fields in Patch requests.
12306	ForceSendFields []string `json:"-"`
12307
12308	// NullFields is a list of field names (e.g. "Kind") to include in API
12309	// requests with the JSON null value. By default, fields with empty
12310	// values are omitted from API requests. However, any field with an
12311	// empty value appearing in NullFields will be sent to the server as
12312	// null. It is an error if a field in this list has a non-empty value.
12313	// This may be used to include null fields in Patch requests.
12314	NullFields []string `json:"-"`
12315}
12316
12317func (s *SitesListResponse) MarshalJSON() ([]byte, error) {
12318	type NoMethod SitesListResponse
12319	raw := NoMethod(*s)
12320	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12321}
12322
12323// Size: Represents the dimensions of ads, placements, creatives, or
12324// creative assets.
12325type Size struct {
12326	// Height: Height of this size. Acceptable values are 0 to 32767,
12327	// inclusive.
12328	Height int64 `json:"height,omitempty"`
12329
12330	// Iab: IAB standard size. This is a read-only, auto-generated field.
12331	Iab bool `json:"iab,omitempty"`
12332
12333	// Id: ID of this size. This is a read-only, auto-generated field.
12334	Id int64 `json:"id,omitempty,string"`
12335
12336	// Kind: Identifies what kind of resource this is. Value: the fixed
12337	// string "dfareporting#size".
12338	Kind string `json:"kind,omitempty"`
12339
12340	// Width: Width of this size. Acceptable values are 0 to 32767,
12341	// inclusive.
12342	Width int64 `json:"width,omitempty"`
12343
12344	// ServerResponse contains the HTTP response code and headers from the
12345	// server.
12346	googleapi.ServerResponse `json:"-"`
12347
12348	// ForceSendFields is a list of field names (e.g. "Height") to
12349	// unconditionally include in API requests. By default, fields with
12350	// empty values are omitted from API requests. However, any non-pointer,
12351	// non-interface field appearing in ForceSendFields will be sent to the
12352	// server regardless of whether the field is empty or not. This may be
12353	// used to include empty fields in Patch requests.
12354	ForceSendFields []string `json:"-"`
12355
12356	// NullFields is a list of field names (e.g. "Height") to include in API
12357	// requests with the JSON null value. By default, fields with empty
12358	// values are omitted from API requests. However, any field with an
12359	// empty value appearing in NullFields will be sent to the server as
12360	// null. It is an error if a field in this list has a non-empty value.
12361	// This may be used to include null fields in Patch requests.
12362	NullFields []string `json:"-"`
12363}
12364
12365func (s *Size) MarshalJSON() ([]byte, error) {
12366	type NoMethod Size
12367	raw := NoMethod(*s)
12368	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12369}
12370
12371// SizesListResponse: Size List Response
12372type SizesListResponse struct {
12373	// Kind: Identifies what kind of resource this is. Value: the fixed
12374	// string "dfareporting#sizesListResponse".
12375	Kind string `json:"kind,omitempty"`
12376
12377	// Sizes: Size collection.
12378	Sizes []*Size `json:"sizes,omitempty"`
12379
12380	// ServerResponse contains the HTTP response code and headers from the
12381	// server.
12382	googleapi.ServerResponse `json:"-"`
12383
12384	// ForceSendFields is a list of field names (e.g. "Kind") to
12385	// unconditionally include in API requests. By default, fields with
12386	// empty values are omitted from API requests. However, any non-pointer,
12387	// non-interface field appearing in ForceSendFields will be sent to the
12388	// server regardless of whether the field is empty or not. This may be
12389	// used to include empty fields in Patch requests.
12390	ForceSendFields []string `json:"-"`
12391
12392	// NullFields is a list of field names (e.g. "Kind") to include in API
12393	// requests with the JSON null value. By default, fields with empty
12394	// values are omitted from API requests. However, any field with an
12395	// empty value appearing in NullFields will be sent to the server as
12396	// null. It is an error if a field in this list has a non-empty value.
12397	// This may be used to include null fields in Patch requests.
12398	NullFields []string `json:"-"`
12399}
12400
12401func (s *SizesListResponse) MarshalJSON() ([]byte, error) {
12402	type NoMethod SizesListResponse
12403	raw := NoMethod(*s)
12404	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12405}
12406
12407// SkippableSetting: Skippable Settings
12408type SkippableSetting struct {
12409	// Kind: Identifies what kind of resource this is. Value: the fixed
12410	// string "dfareporting#skippableSetting".
12411	Kind string `json:"kind,omitempty"`
12412
12413	// ProgressOffset: Amount of time to play videos served to this
12414	// placement before counting a view. Applicable when skippable is true.
12415	ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
12416
12417	// SkipOffset: Amount of time to play videos served to this placement
12418	// before the skip button should appear. Applicable when skippable is
12419	// true.
12420	SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
12421
12422	// Skippable: Whether the user can skip creatives served to this
12423	// placement.
12424	Skippable bool `json:"skippable,omitempty"`
12425
12426	// ForceSendFields is a list of field names (e.g. "Kind") to
12427	// unconditionally include in API requests. By default, fields with
12428	// empty values are omitted from API requests. However, any non-pointer,
12429	// non-interface field appearing in ForceSendFields will be sent to the
12430	// server regardless of whether the field is empty or not. This may be
12431	// used to include empty fields in Patch requests.
12432	ForceSendFields []string `json:"-"`
12433
12434	// NullFields is a list of field names (e.g. "Kind") to include in API
12435	// requests with the JSON null value. By default, fields with empty
12436	// values are omitted from API requests. However, any field with an
12437	// empty value appearing in NullFields will be sent to the server as
12438	// null. It is an error if a field in this list has a non-empty value.
12439	// This may be used to include null fields in Patch requests.
12440	NullFields []string `json:"-"`
12441}
12442
12443func (s *SkippableSetting) MarshalJSON() ([]byte, error) {
12444	type NoMethod SkippableSetting
12445	raw := NoMethod(*s)
12446	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12447}
12448
12449// SortedDimension: Represents a sorted dimension.
12450type SortedDimension struct {
12451	// Kind: The kind of resource this is, in this case
12452	// dfareporting#sortedDimension.
12453	Kind string `json:"kind,omitempty"`
12454
12455	// Name: The name of the dimension.
12456	Name string `json:"name,omitempty"`
12457
12458	// SortOrder: An optional sort order for the dimension column.
12459	//
12460	// Possible values:
12461	//   "ASCENDING"
12462	//   "DESCENDING"
12463	SortOrder string `json:"sortOrder,omitempty"`
12464
12465	// ForceSendFields is a list of field names (e.g. "Kind") to
12466	// unconditionally include in API requests. By default, fields with
12467	// empty values are omitted from API requests. However, any non-pointer,
12468	// non-interface field appearing in ForceSendFields will be sent to the
12469	// server regardless of whether the field is empty or not. This may be
12470	// used to include empty fields in Patch requests.
12471	ForceSendFields []string `json:"-"`
12472
12473	// NullFields is a list of field names (e.g. "Kind") to include in API
12474	// requests with the JSON null value. By default, fields with empty
12475	// values are omitted from API requests. However, any field with an
12476	// empty value appearing in NullFields will be sent to the server as
12477	// null. It is an error if a field in this list has a non-empty value.
12478	// This may be used to include null fields in Patch requests.
12479	NullFields []string `json:"-"`
12480}
12481
12482func (s *SortedDimension) MarshalJSON() ([]byte, error) {
12483	type NoMethod SortedDimension
12484	raw := NoMethod(*s)
12485	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12486}
12487
12488// Subaccount: Contains properties of a Campaign Manager subaccount.
12489type Subaccount struct {
12490	// AccountId: ID of the account that contains this subaccount. This is a
12491	// read-only field that can be left blank.
12492	AccountId int64 `json:"accountId,omitempty,string"`
12493
12494	// AvailablePermissionIds: IDs of the available user role permissions
12495	// for this subaccount.
12496	AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
12497
12498	// Id: ID of this subaccount. This is a read-only, auto-generated field.
12499	Id int64 `json:"id,omitempty,string"`
12500
12501	// Kind: Identifies what kind of resource this is. Value: the fixed
12502	// string "dfareporting#subaccount".
12503	Kind string `json:"kind,omitempty"`
12504
12505	// Name: Name of this subaccount. This is a required field. Must be less
12506	// than 128 characters long and be unique among subaccounts of the same
12507	// account.
12508	Name string `json:"name,omitempty"`
12509
12510	// ServerResponse contains the HTTP response code and headers from the
12511	// server.
12512	googleapi.ServerResponse `json:"-"`
12513
12514	// ForceSendFields is a list of field names (e.g. "AccountId") to
12515	// unconditionally include in API requests. By default, fields with
12516	// empty values are omitted from API requests. However, any non-pointer,
12517	// non-interface field appearing in ForceSendFields will be sent to the
12518	// server regardless of whether the field is empty or not. This may be
12519	// used to include empty fields in Patch requests.
12520	ForceSendFields []string `json:"-"`
12521
12522	// NullFields is a list of field names (e.g. "AccountId") to include in
12523	// API requests with the JSON null value. By default, fields with empty
12524	// values are omitted from API requests. However, any field with an
12525	// empty value appearing in NullFields will be sent to the server as
12526	// null. It is an error if a field in this list has a non-empty value.
12527	// This may be used to include null fields in Patch requests.
12528	NullFields []string `json:"-"`
12529}
12530
12531func (s *Subaccount) MarshalJSON() ([]byte, error) {
12532	type NoMethod Subaccount
12533	raw := NoMethod(*s)
12534	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12535}
12536
12537// SubaccountsListResponse: Subaccount List Response
12538type SubaccountsListResponse struct {
12539	// Kind: Identifies what kind of resource this is. Value: the fixed
12540	// string "dfareporting#subaccountsListResponse".
12541	Kind string `json:"kind,omitempty"`
12542
12543	// NextPageToken: Pagination token to be used for the next list
12544	// operation.
12545	NextPageToken string `json:"nextPageToken,omitempty"`
12546
12547	// Subaccounts: Subaccount collection.
12548	Subaccounts []*Subaccount `json:"subaccounts,omitempty"`
12549
12550	// ServerResponse contains the HTTP response code and headers from the
12551	// server.
12552	googleapi.ServerResponse `json:"-"`
12553
12554	// ForceSendFields is a list of field names (e.g. "Kind") to
12555	// unconditionally include in API requests. By default, fields with
12556	// empty values are omitted from API requests. However, any non-pointer,
12557	// non-interface field appearing in ForceSendFields will be sent to the
12558	// server regardless of whether the field is empty or not. This may be
12559	// used to include empty fields in Patch requests.
12560	ForceSendFields []string `json:"-"`
12561
12562	// NullFields is a list of field names (e.g. "Kind") to include in API
12563	// requests with the JSON null value. By default, fields with empty
12564	// values are omitted from API requests. However, any field with an
12565	// empty value appearing in NullFields will be sent to the server as
12566	// null. It is an error if a field in this list has a non-empty value.
12567	// This may be used to include null fields in Patch requests.
12568	NullFields []string `json:"-"`
12569}
12570
12571func (s *SubaccountsListResponse) MarshalJSON() ([]byte, error) {
12572	type NoMethod SubaccountsListResponse
12573	raw := NoMethod(*s)
12574	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12575}
12576
12577// TagData: Placement Tag Data
12578type TagData struct {
12579	// AdId: Ad associated with this placement tag. Applicable only when
12580	// format is PLACEMENT_TAG_TRACKING.
12581	AdId int64 `json:"adId,omitempty,string"`
12582
12583	// ClickTag: Tag string to record a click.
12584	ClickTag string `json:"clickTag,omitempty"`
12585
12586	// CreativeId: Creative associated with this placement tag. Applicable
12587	// only when format is PLACEMENT_TAG_TRACKING.
12588	CreativeId int64 `json:"creativeId,omitempty,string"`
12589
12590	// Format: TagData tag format of this tag.
12591	//
12592	// Possible values:
12593	//   "PLACEMENT_TAG_CLICK_COMMANDS"
12594	//   "PLACEMENT_TAG_IFRAME_ILAYER"
12595	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
12596	//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
12597	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
12598	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
12599	//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
12600	//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
12601	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
12602	//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
12603	//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
12604	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
12605	//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
12606	//   "PLACEMENT_TAG_JAVASCRIPT"
12607	//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
12608	//   "PLACEMENT_TAG_STANDARD"
12609	//   "PLACEMENT_TAG_TRACKING"
12610	//   "PLACEMENT_TAG_TRACKING_IFRAME"
12611	//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
12612	Format string `json:"format,omitempty"`
12613
12614	// ImpressionTag: Tag string for serving an ad.
12615	ImpressionTag string `json:"impressionTag,omitempty"`
12616
12617	// ForceSendFields is a list of field names (e.g. "AdId") to
12618	// unconditionally include in API requests. By default, fields with
12619	// empty values are omitted from API requests. However, any non-pointer,
12620	// non-interface field appearing in ForceSendFields will be sent to the
12621	// server regardless of whether the field is empty or not. This may be
12622	// used to include empty fields in Patch requests.
12623	ForceSendFields []string `json:"-"`
12624
12625	// NullFields is a list of field names (e.g. "AdId") to include in API
12626	// requests with the JSON null value. By default, fields with empty
12627	// values are omitted from API requests. However, any field with an
12628	// empty value appearing in NullFields will be sent to the server as
12629	// null. It is an error if a field in this list has a non-empty value.
12630	// This may be used to include null fields in Patch requests.
12631	NullFields []string `json:"-"`
12632}
12633
12634func (s *TagData) MarshalJSON() ([]byte, error) {
12635	type NoMethod TagData
12636	raw := NoMethod(*s)
12637	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12638}
12639
12640// TagSetting: Tag Settings
12641type TagSetting struct {
12642	// AdditionalKeyValues: Additional key-values to be included in tags.
12643	// Each key-value pair must be of the form key=value, and pairs must be
12644	// separated by a semicolon (;). Keys and values must not contain
12645	// commas. For example, id=2;color=red is a valid value for this field.
12646	AdditionalKeyValues string `json:"additionalKeyValues,omitempty"`
12647
12648	// IncludeClickThroughUrls: Whether static landing page URLs should be
12649	// included in the tags. This setting applies only to placements.
12650	IncludeClickThroughUrls bool `json:"includeClickThroughUrls,omitempty"`
12651
12652	// IncludeClickTracking: Whether click-tracking string should be
12653	// included in the tags.
12654	IncludeClickTracking bool `json:"includeClickTracking,omitempty"`
12655
12656	// KeywordOption: Option specifying how keywords are embedded in ad
12657	// tags. This setting can be used to specify whether keyword
12658	// placeholders are inserted in placement tags for this site. Publishers
12659	// can then add keywords to those placeholders.
12660	//
12661	// Possible values:
12662	//   "GENERATE_SEPARATE_TAG_FOR_EACH_KEYWORD"
12663	//   "IGNORE"
12664	//   "PLACEHOLDER_WITH_LIST_OF_KEYWORDS"
12665	KeywordOption string `json:"keywordOption,omitempty"`
12666
12667	// ForceSendFields is a list of field names (e.g. "AdditionalKeyValues")
12668	// to unconditionally include in API requests. By default, fields with
12669	// empty values are omitted from API requests. However, any non-pointer,
12670	// non-interface field appearing in ForceSendFields will be sent to the
12671	// server regardless of whether the field is empty or not. This may be
12672	// used to include empty fields in Patch requests.
12673	ForceSendFields []string `json:"-"`
12674
12675	// NullFields is a list of field names (e.g. "AdditionalKeyValues") to
12676	// include in API requests with the JSON null value. By default, fields
12677	// with empty values are omitted from API requests. However, any field
12678	// with an empty value appearing in NullFields will be sent to the
12679	// server as null. It is an error if a field in this list has a
12680	// non-empty value. This may be used to include null fields in Patch
12681	// requests.
12682	NullFields []string `json:"-"`
12683}
12684
12685func (s *TagSetting) MarshalJSON() ([]byte, error) {
12686	type NoMethod TagSetting
12687	raw := NoMethod(*s)
12688	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12689}
12690
12691// TagSettings: Dynamic and Image Tag Settings.
12692type TagSettings struct {
12693	// DynamicTagEnabled: Whether dynamic floodlight tags are enabled.
12694	DynamicTagEnabled bool `json:"dynamicTagEnabled,omitempty"`
12695
12696	// ImageTagEnabled: Whether image tags are enabled.
12697	ImageTagEnabled bool `json:"imageTagEnabled,omitempty"`
12698
12699	// ForceSendFields is a list of field names (e.g. "DynamicTagEnabled")
12700	// to unconditionally include in API requests. By default, fields with
12701	// empty values are omitted from API requests. However, any non-pointer,
12702	// non-interface field appearing in ForceSendFields will be sent to the
12703	// server regardless of whether the field is empty or not. This may be
12704	// used to include empty fields in Patch requests.
12705	ForceSendFields []string `json:"-"`
12706
12707	// NullFields is a list of field names (e.g. "DynamicTagEnabled") to
12708	// include in API requests with the JSON null value. By default, fields
12709	// with empty values are omitted from API requests. However, any field
12710	// with an empty value appearing in NullFields will be sent to the
12711	// server as null. It is an error if a field in this list has a
12712	// non-empty value. This may be used to include null fields in Patch
12713	// requests.
12714	NullFields []string `json:"-"`
12715}
12716
12717func (s *TagSettings) MarshalJSON() ([]byte, error) {
12718	type NoMethod TagSettings
12719	raw := NoMethod(*s)
12720	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12721}
12722
12723// TargetWindow: Target Window.
12724type TargetWindow struct {
12725	// CustomHtml: User-entered value.
12726	CustomHtml string `json:"customHtml,omitempty"`
12727
12728	// TargetWindowOption: Type of browser window for which the backup image
12729	// of the flash creative can be displayed.
12730	//
12731	// Possible values:
12732	//   "CURRENT_WINDOW"
12733	//   "CUSTOM"
12734	//   "NEW_WINDOW"
12735	TargetWindowOption string `json:"targetWindowOption,omitempty"`
12736
12737	// ForceSendFields is a list of field names (e.g. "CustomHtml") to
12738	// unconditionally include in API requests. By default, fields with
12739	// empty values are omitted from API requests. However, any non-pointer,
12740	// non-interface field appearing in ForceSendFields will be sent to the
12741	// server regardless of whether the field is empty or not. This may be
12742	// used to include empty fields in Patch requests.
12743	ForceSendFields []string `json:"-"`
12744
12745	// NullFields is a list of field names (e.g. "CustomHtml") to include in
12746	// API requests with the JSON null value. By default, fields with empty
12747	// values are omitted from API requests. However, any field with an
12748	// empty value appearing in NullFields will be sent to the server as
12749	// null. It is an error if a field in this list has a non-empty value.
12750	// This may be used to include null fields in Patch requests.
12751	NullFields []string `json:"-"`
12752}
12753
12754func (s *TargetWindow) MarshalJSON() ([]byte, error) {
12755	type NoMethod TargetWindow
12756	raw := NoMethod(*s)
12757	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12758}
12759
12760// TargetableRemarketingList: Contains properties of a targetable
12761// remarketing list. Remarketing enables you to create lists of users
12762// who have performed specific actions on a site, then target ads to
12763// members of those lists. This resource is a read-only view of a
12764// remarketing list to be used to faciliate targeting ads to specific
12765// lists. Remarketing lists that are owned by your advertisers and those
12766// that are shared to your advertisers or account are accessible via
12767// this resource. To manage remarketing lists that are owned by your
12768// advertisers, use the RemarketingLists resource.
12769type TargetableRemarketingList struct {
12770	// AccountId: Account ID of this remarketing list. This is a read-only,
12771	// auto-generated field that is only returned in GET requests.
12772	AccountId int64 `json:"accountId,omitempty,string"`
12773
12774	// Active: Whether this targetable remarketing list is active.
12775	Active bool `json:"active,omitempty"`
12776
12777	// AdvertiserId: Dimension value for the advertiser ID that owns this
12778	// targetable remarketing list.
12779	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
12780
12781	// AdvertiserIdDimensionValue: Dimension value for the ID of the
12782	// advertiser.
12783	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
12784
12785	// Description: Targetable remarketing list description.
12786	Description string `json:"description,omitempty"`
12787
12788	// Id: Targetable remarketing list ID.
12789	Id int64 `json:"id,omitempty,string"`
12790
12791	// Kind: Identifies what kind of resource this is. Value: the fixed
12792	// string "dfareporting#targetableRemarketingList".
12793	Kind string `json:"kind,omitempty"`
12794
12795	// LifeSpan: Number of days that a user should remain in the targetable
12796	// remarketing list without an impression.
12797	LifeSpan int64 `json:"lifeSpan,omitempty,string"`
12798
12799	// ListSize: Number of users currently in the list. This is a read-only
12800	// field.
12801	ListSize int64 `json:"listSize,omitempty,string"`
12802
12803	// ListSource: Product from which this targetable remarketing list was
12804	// originated.
12805	//
12806	// Possible values:
12807	//   "REMARKETING_LIST_SOURCE_ADX"
12808	//   "REMARKETING_LIST_SOURCE_DBM"
12809	//   "REMARKETING_LIST_SOURCE_DFA"
12810	//   "REMARKETING_LIST_SOURCE_DFP"
12811	//   "REMARKETING_LIST_SOURCE_DMP"
12812	//   "REMARKETING_LIST_SOURCE_GA"
12813	//   "REMARKETING_LIST_SOURCE_GPLUS"
12814	//   "REMARKETING_LIST_SOURCE_OTHER"
12815	//   "REMARKETING_LIST_SOURCE_PLAY_STORE"
12816	//   "REMARKETING_LIST_SOURCE_XFP"
12817	//   "REMARKETING_LIST_SOURCE_YOUTUBE"
12818	ListSource string `json:"listSource,omitempty"`
12819
12820	// Name: Name of the targetable remarketing list. Is no greater than 128
12821	// characters long.
12822	Name string `json:"name,omitempty"`
12823
12824	// SubaccountId: Subaccount ID of this remarketing list. This is a
12825	// read-only, auto-generated field that is only returned in GET
12826	// requests.
12827	SubaccountId int64 `json:"subaccountId,omitempty,string"`
12828
12829	// ServerResponse contains the HTTP response code and headers from the
12830	// server.
12831	googleapi.ServerResponse `json:"-"`
12832
12833	// ForceSendFields is a list of field names (e.g. "AccountId") to
12834	// unconditionally include in API requests. By default, fields with
12835	// empty values are omitted from API requests. However, any non-pointer,
12836	// non-interface field appearing in ForceSendFields will be sent to the
12837	// server regardless of whether the field is empty or not. This may be
12838	// used to include empty fields in Patch requests.
12839	ForceSendFields []string `json:"-"`
12840
12841	// NullFields is a list of field names (e.g. "AccountId") to include in
12842	// API requests with the JSON null value. By default, fields with empty
12843	// values are omitted from API requests. However, any field with an
12844	// empty value appearing in NullFields will be sent to the server as
12845	// null. It is an error if a field in this list has a non-empty value.
12846	// This may be used to include null fields in Patch requests.
12847	NullFields []string `json:"-"`
12848}
12849
12850func (s *TargetableRemarketingList) MarshalJSON() ([]byte, error) {
12851	type NoMethod TargetableRemarketingList
12852	raw := NoMethod(*s)
12853	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12854}
12855
12856// TargetableRemarketingListsListResponse: Targetable remarketing list
12857// response
12858type TargetableRemarketingListsListResponse struct {
12859	// Kind: Identifies what kind of resource this is. Value: the fixed
12860	// string "dfareporting#targetableRemarketingListsListResponse".
12861	Kind string `json:"kind,omitempty"`
12862
12863	// NextPageToken: Pagination token to be used for the next list
12864	// operation.
12865	NextPageToken string `json:"nextPageToken,omitempty"`
12866
12867	// TargetableRemarketingLists: Targetable remarketing list collection.
12868	TargetableRemarketingLists []*TargetableRemarketingList `json:"targetableRemarketingLists,omitempty"`
12869
12870	// ServerResponse contains the HTTP response code and headers from the
12871	// server.
12872	googleapi.ServerResponse `json:"-"`
12873
12874	// ForceSendFields is a list of field names (e.g. "Kind") to
12875	// unconditionally include in API requests. By default, fields with
12876	// empty values are omitted from API requests. However, any non-pointer,
12877	// non-interface field appearing in ForceSendFields will be sent to the
12878	// server regardless of whether the field is empty or not. This may be
12879	// used to include empty fields in Patch requests.
12880	ForceSendFields []string `json:"-"`
12881
12882	// NullFields is a list of field names (e.g. "Kind") to include in API
12883	// requests with the JSON null value. By default, fields with empty
12884	// values are omitted from API requests. However, any field with an
12885	// empty value appearing in NullFields will be sent to the server as
12886	// null. It is an error if a field in this list has a non-empty value.
12887	// This may be used to include null fields in Patch requests.
12888	NullFields []string `json:"-"`
12889}
12890
12891func (s *TargetableRemarketingListsListResponse) MarshalJSON() ([]byte, error) {
12892	type NoMethod TargetableRemarketingListsListResponse
12893	raw := NoMethod(*s)
12894	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12895}
12896
12897// TargetingTemplate: Contains properties of a targeting template. A
12898// targeting template encapsulates targeting information which can be
12899// reused across multiple ads.
12900type TargetingTemplate struct {
12901	// AccountId: Account ID of this targeting template. This field, if left
12902	// unset, will be auto-generated on insert and is read-only after
12903	// insert.
12904	AccountId int64 `json:"accountId,omitempty,string"`
12905
12906	// AdvertiserId: Advertiser ID of this targeting template. This is a
12907	// required field on insert and is read-only after insert.
12908	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
12909
12910	// AdvertiserIdDimensionValue: Dimension value for the ID of the
12911	// advertiser. This is a read-only, auto-generated field.
12912	AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
12913
12914	// DayPartTargeting: Time and day targeting criteria.
12915	DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
12916
12917	// GeoTargeting: Geographical targeting criteria.
12918	GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
12919
12920	// Id: ID of this targeting template. This is a read-only,
12921	// auto-generated field.
12922	Id int64 `json:"id,omitempty,string"`
12923
12924	// KeyValueTargetingExpression: Key-value targeting criteria.
12925	KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
12926
12927	// Kind: Identifies what kind of resource this is. Value: the fixed
12928	// string "dfareporting#targetingTemplate".
12929	Kind string `json:"kind,omitempty"`
12930
12931	// LanguageTargeting: Language targeting criteria.
12932	LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
12933
12934	// ListTargetingExpression: Remarketing list targeting criteria.
12935	ListTargetingExpression *ListTargetingExpression `json:"listTargetingExpression,omitempty"`
12936
12937	// Name: Name of this targeting template. This field is required. It
12938	// must be less than 256 characters long and unique within an
12939	// advertiser.
12940	Name string `json:"name,omitempty"`
12941
12942	// SubaccountId: Subaccount ID of this targeting template. This field,
12943	// if left unset, will be auto-generated on insert and is read-only
12944	// after insert.
12945	SubaccountId int64 `json:"subaccountId,omitempty,string"`
12946
12947	// TechnologyTargeting: Technology platform targeting criteria.
12948	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
12949
12950	// ServerResponse contains the HTTP response code and headers from the
12951	// server.
12952	googleapi.ServerResponse `json:"-"`
12953
12954	// ForceSendFields is a list of field names (e.g. "AccountId") to
12955	// unconditionally include in API requests. By default, fields with
12956	// empty values are omitted from API requests. However, any non-pointer,
12957	// non-interface field appearing in ForceSendFields will be sent to the
12958	// server regardless of whether the field is empty or not. This may be
12959	// used to include empty fields in Patch requests.
12960	ForceSendFields []string `json:"-"`
12961
12962	// NullFields is a list of field names (e.g. "AccountId") to include in
12963	// API requests with the JSON null value. By default, fields with empty
12964	// values are omitted from API requests. However, any field with an
12965	// empty value appearing in NullFields will be sent to the server as
12966	// null. It is an error if a field in this list has a non-empty value.
12967	// This may be used to include null fields in Patch requests.
12968	NullFields []string `json:"-"`
12969}
12970
12971func (s *TargetingTemplate) MarshalJSON() ([]byte, error) {
12972	type NoMethod TargetingTemplate
12973	raw := NoMethod(*s)
12974	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12975}
12976
12977// TargetingTemplatesListResponse: Targeting Template List Response
12978type TargetingTemplatesListResponse struct {
12979	// Kind: Identifies what kind of resource this is. Value: the fixed
12980	// string "dfareporting#targetingTemplatesListResponse".
12981	Kind string `json:"kind,omitempty"`
12982
12983	// NextPageToken: Pagination token to be used for the next list
12984	// operation.
12985	NextPageToken string `json:"nextPageToken,omitempty"`
12986
12987	// TargetingTemplates: Targeting template collection.
12988	TargetingTemplates []*TargetingTemplate `json:"targetingTemplates,omitempty"`
12989
12990	// ServerResponse contains the HTTP response code and headers from the
12991	// server.
12992	googleapi.ServerResponse `json:"-"`
12993
12994	// ForceSendFields is a list of field names (e.g. "Kind") to
12995	// unconditionally include in API requests. By default, fields with
12996	// empty values are omitted from API requests. However, any non-pointer,
12997	// non-interface field appearing in ForceSendFields will be sent to the
12998	// server regardless of whether the field is empty or not. This may be
12999	// used to include empty fields in Patch requests.
13000	ForceSendFields []string `json:"-"`
13001
13002	// NullFields is a list of field names (e.g. "Kind") to include in API
13003	// requests with the JSON null value. By default, fields with empty
13004	// values are omitted from API requests. However, any field with an
13005	// empty value appearing in NullFields will be sent to the server as
13006	// null. It is an error if a field in this list has a non-empty value.
13007	// This may be used to include null fields in Patch requests.
13008	NullFields []string `json:"-"`
13009}
13010
13011func (s *TargetingTemplatesListResponse) MarshalJSON() ([]byte, error) {
13012	type NoMethod TargetingTemplatesListResponse
13013	raw := NoMethod(*s)
13014	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13015}
13016
13017// TechnologyTargeting: Technology Targeting.
13018type TechnologyTargeting struct {
13019	// Browsers: Browsers that this ad targets. For each browser either set
13020	// browserVersionId or dartId along with the version numbers. If both
13021	// are specified, only browserVersionId will be used. The other fields
13022	// are populated automatically when the ad is inserted or updated.
13023	Browsers []*Browser `json:"browsers,omitempty"`
13024
13025	// ConnectionTypes: Connection types that this ad targets. For each
13026	// connection type only id is required. The other fields are populated
13027	// automatically when the ad is inserted or updated.
13028	ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
13029
13030	// MobileCarriers: Mobile carriers that this ad targets. For each mobile
13031	// carrier only id is required, and the other fields are populated
13032	// automatically when the ad is inserted or updated. If targeting a
13033	// mobile carrier, do not set targeting for any zip codes.
13034	MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
13035
13036	// OperatingSystemVersions: Operating system versions that this ad
13037	// targets. To target all versions, use operatingSystems. For each
13038	// operating system version, only id is required. The other fields are
13039	// populated automatically when the ad is inserted or updated. If
13040	// targeting an operating system version, do not set targeting for the
13041	// corresponding operating system in operatingSystems.
13042	OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
13043
13044	// OperatingSystems: Operating systems that this ad targets. To target
13045	// specific versions, use operatingSystemVersions. For each operating
13046	// system only dartId is required. The other fields are populated
13047	// automatically when the ad is inserted or updated. If targeting an
13048	// operating system, do not set targeting for operating system versions
13049	// for the same operating system.
13050	OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
13051
13052	// PlatformTypes: Platform types that this ad targets. For example,
13053	// desktop, mobile, or tablet. For each platform type, only id is
13054	// required, and the other fields are populated automatically when the
13055	// ad is inserted or updated.
13056	PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
13057
13058	// ForceSendFields is a list of field names (e.g. "Browsers") to
13059	// unconditionally include in API requests. By default, fields with
13060	// empty values are omitted from API requests. However, any non-pointer,
13061	// non-interface field appearing in ForceSendFields will be sent to the
13062	// server regardless of whether the field is empty or not. This may be
13063	// used to include empty fields in Patch requests.
13064	ForceSendFields []string `json:"-"`
13065
13066	// NullFields is a list of field names (e.g. "Browsers") to include in
13067	// API requests with the JSON null value. By default, fields with empty
13068	// values are omitted from API requests. However, any field with an
13069	// empty value appearing in NullFields will be sent to the server as
13070	// null. It is an error if a field in this list has a non-empty value.
13071	// This may be used to include null fields in Patch requests.
13072	NullFields []string `json:"-"`
13073}
13074
13075func (s *TechnologyTargeting) MarshalJSON() ([]byte, error) {
13076	type NoMethod TechnologyTargeting
13077	raw := NoMethod(*s)
13078	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13079}
13080
13081// ThirdPartyAuthenticationToken: Third Party Authentication Token
13082type ThirdPartyAuthenticationToken struct {
13083	// Name: Name of the third-party authentication token.
13084	Name string `json:"name,omitempty"`
13085
13086	// Value: Value of the third-party authentication token. This is a
13087	// read-only, auto-generated field.
13088	Value string `json:"value,omitempty"`
13089
13090	// ForceSendFields is a list of field names (e.g. "Name") to
13091	// unconditionally include in API requests. By default, fields with
13092	// empty values are omitted from API requests. However, any non-pointer,
13093	// non-interface field appearing in ForceSendFields will be sent to the
13094	// server regardless of whether the field is empty or not. This may be
13095	// used to include empty fields in Patch requests.
13096	ForceSendFields []string `json:"-"`
13097
13098	// NullFields is a list of field names (e.g. "Name") to include in API
13099	// requests with the JSON null value. By default, fields with empty
13100	// values are omitted from API requests. However, any field with an
13101	// empty value appearing in NullFields will be sent to the server as
13102	// null. It is an error if a field in this list has a non-empty value.
13103	// This may be used to include null fields in Patch requests.
13104	NullFields []string `json:"-"`
13105}
13106
13107func (s *ThirdPartyAuthenticationToken) MarshalJSON() ([]byte, error) {
13108	type NoMethod ThirdPartyAuthenticationToken
13109	raw := NoMethod(*s)
13110	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13111}
13112
13113// ThirdPartyTrackingUrl: Third-party Tracking URL.
13114type ThirdPartyTrackingUrl struct {
13115	// ThirdPartyUrlType: Third-party URL type for in-stream video and
13116	// in-stream audio creatives.
13117	//
13118	// Possible values:
13119	//   "CLICK_TRACKING"
13120	//   "IMPRESSION"
13121	//   "RICH_MEDIA_BACKUP_IMPRESSION"
13122	//   "RICH_MEDIA_IMPRESSION"
13123	//   "RICH_MEDIA_RM_IMPRESSION"
13124	//   "SURVEY"
13125	//   "VIDEO_COMPLETE"
13126	//   "VIDEO_CUSTOM"
13127	//   "VIDEO_FIRST_QUARTILE"
13128	//   "VIDEO_FULLSCREEN"
13129	//   "VIDEO_MIDPOINT"
13130	//   "VIDEO_MUTE"
13131	//   "VIDEO_PAUSE"
13132	//   "VIDEO_PROGRESS"
13133	//   "VIDEO_REWIND"
13134	//   "VIDEO_SKIP"
13135	//   "VIDEO_START"
13136	//   "VIDEO_STOP"
13137	//   "VIDEO_THIRD_QUARTILE"
13138	ThirdPartyUrlType string `json:"thirdPartyUrlType,omitempty"`
13139
13140	// Url: URL for the specified third-party URL type.
13141	Url string `json:"url,omitempty"`
13142
13143	// ForceSendFields is a list of field names (e.g. "ThirdPartyUrlType")
13144	// to unconditionally include in API requests. By default, fields with
13145	// empty values are omitted from API requests. However, any non-pointer,
13146	// non-interface field appearing in ForceSendFields will be sent to the
13147	// server regardless of whether the field is empty or not. This may be
13148	// used to include empty fields in Patch requests.
13149	ForceSendFields []string `json:"-"`
13150
13151	// NullFields is a list of field names (e.g. "ThirdPartyUrlType") to
13152	// include in API requests with the JSON null value. By default, fields
13153	// with empty values are omitted from API requests. However, any field
13154	// with an empty value appearing in NullFields will be sent to the
13155	// server as null. It is an error if a field in this list has a
13156	// non-empty value. This may be used to include null fields in Patch
13157	// requests.
13158	NullFields []string `json:"-"`
13159}
13160
13161func (s *ThirdPartyTrackingUrl) MarshalJSON() ([]byte, error) {
13162	type NoMethod ThirdPartyTrackingUrl
13163	raw := NoMethod(*s)
13164	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13165}
13166
13167// TranscodeSetting: Transcode Settings
13168type TranscodeSetting struct {
13169	// EnabledVideoFormats: Whitelist of video formats to be served to this
13170	// placement. Set this list to null or empty to serve all video formats.
13171	EnabledVideoFormats []int64 `json:"enabledVideoFormats,omitempty"`
13172
13173	// Kind: Identifies what kind of resource this is. Value: the fixed
13174	// string "dfareporting#transcodeSetting".
13175	Kind string `json:"kind,omitempty"`
13176
13177	// ForceSendFields is a list of field names (e.g. "EnabledVideoFormats")
13178	// to unconditionally include in API requests. By default, fields with
13179	// empty values are omitted from API requests. However, any non-pointer,
13180	// non-interface field appearing in ForceSendFields will be sent to the
13181	// server regardless of whether the field is empty or not. This may be
13182	// used to include empty fields in Patch requests.
13183	ForceSendFields []string `json:"-"`
13184
13185	// NullFields is a list of field names (e.g. "EnabledVideoFormats") to
13186	// include in API requests with the JSON null value. By default, fields
13187	// with empty values are omitted from API requests. However, any field
13188	// with an empty value appearing in NullFields will be sent to the
13189	// server as null. It is an error if a field in this list has a
13190	// non-empty value. This may be used to include null fields in Patch
13191	// requests.
13192	NullFields []string `json:"-"`
13193}
13194
13195func (s *TranscodeSetting) MarshalJSON() ([]byte, error) {
13196	type NoMethod TranscodeSetting
13197	raw := NoMethod(*s)
13198	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13199}
13200
13201// UniversalAdId: A Universal Ad ID as per the VAST 4.0 spec. Applicable
13202// to the following creative types: INSTREAM_AUDIO, INSTREAM_VIDEO and
13203// VPAID.
13204type UniversalAdId struct {
13205	// Registry: Registry used for the Ad ID value.
13206	//
13207	// Possible values:
13208	//   "AD_ID.ORG"
13209	//   "CLEARCAST"
13210	//   "DCM"
13211	//   "OTHER"
13212	Registry string `json:"registry,omitempty"`
13213
13214	// Value: ID value for this creative. Only alphanumeric characters and
13215	// the following symbols are valid: "_/\-". Maximum length is 64
13216	// characters. Read only when registry is DCM.
13217	Value string `json:"value,omitempty"`
13218
13219	// ForceSendFields is a list of field names (e.g. "Registry") to
13220	// unconditionally include in API requests. By default, fields with
13221	// empty values are omitted from API requests. However, any non-pointer,
13222	// non-interface field appearing in ForceSendFields will be sent to the
13223	// server regardless of whether the field is empty or not. This may be
13224	// used to include empty fields in Patch requests.
13225	ForceSendFields []string `json:"-"`
13226
13227	// NullFields is a list of field names (e.g. "Registry") to include in
13228	// API requests with the JSON null value. By default, fields with empty
13229	// values are omitted from API requests. However, any field with an
13230	// empty value appearing in NullFields will be sent to the server as
13231	// null. It is an error if a field in this list has a non-empty value.
13232	// This may be used to include null fields in Patch requests.
13233	NullFields []string `json:"-"`
13234}
13235
13236func (s *UniversalAdId) MarshalJSON() ([]byte, error) {
13237	type NoMethod UniversalAdId
13238	raw := NoMethod(*s)
13239	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13240}
13241
13242// UserDefinedVariableConfiguration: User Defined Variable
13243// configuration.
13244type UserDefinedVariableConfiguration struct {
13245	// DataType: Data type for the variable. This is a required field.
13246	//
13247	// Possible values:
13248	//   "NUMBER"
13249	//   "STRING"
13250	DataType string `json:"dataType,omitempty"`
13251
13252	// ReportName: User-friendly name for the variable which will appear in
13253	// reports. This is a required field, must be less than 64 characters
13254	// long, and cannot contain the following characters: ""<>".
13255	ReportName string `json:"reportName,omitempty"`
13256
13257	// VariableType: Variable name in the tag. This is a required field.
13258	//
13259	// Possible values:
13260	//   "U1"
13261	//   "U10"
13262	//   "U100"
13263	//   "U11"
13264	//   "U12"
13265	//   "U13"
13266	//   "U14"
13267	//   "U15"
13268	//   "U16"
13269	//   "U17"
13270	//   "U18"
13271	//   "U19"
13272	//   "U2"
13273	//   "U20"
13274	//   "U21"
13275	//   "U22"
13276	//   "U23"
13277	//   "U24"
13278	//   "U25"
13279	//   "U26"
13280	//   "U27"
13281	//   "U28"
13282	//   "U29"
13283	//   "U3"
13284	//   "U30"
13285	//   "U31"
13286	//   "U32"
13287	//   "U33"
13288	//   "U34"
13289	//   "U35"
13290	//   "U36"
13291	//   "U37"
13292	//   "U38"
13293	//   "U39"
13294	//   "U4"
13295	//   "U40"
13296	//   "U41"
13297	//   "U42"
13298	//   "U43"
13299	//   "U44"
13300	//   "U45"
13301	//   "U46"
13302	//   "U47"
13303	//   "U48"
13304	//   "U49"
13305	//   "U5"
13306	//   "U50"
13307	//   "U51"
13308	//   "U52"
13309	//   "U53"
13310	//   "U54"
13311	//   "U55"
13312	//   "U56"
13313	//   "U57"
13314	//   "U58"
13315	//   "U59"
13316	//   "U6"
13317	//   "U60"
13318	//   "U61"
13319	//   "U62"
13320	//   "U63"
13321	//   "U64"
13322	//   "U65"
13323	//   "U66"
13324	//   "U67"
13325	//   "U68"
13326	//   "U69"
13327	//   "U7"
13328	//   "U70"
13329	//   "U71"
13330	//   "U72"
13331	//   "U73"
13332	//   "U74"
13333	//   "U75"
13334	//   "U76"
13335	//   "U77"
13336	//   "U78"
13337	//   "U79"
13338	//   "U8"
13339	//   "U80"
13340	//   "U81"
13341	//   "U82"
13342	//   "U83"
13343	//   "U84"
13344	//   "U85"
13345	//   "U86"
13346	//   "U87"
13347	//   "U88"
13348	//   "U89"
13349	//   "U9"
13350	//   "U90"
13351	//   "U91"
13352	//   "U92"
13353	//   "U93"
13354	//   "U94"
13355	//   "U95"
13356	//   "U96"
13357	//   "U97"
13358	//   "U98"
13359	//   "U99"
13360	VariableType string `json:"variableType,omitempty"`
13361
13362	// ForceSendFields is a list of field names (e.g. "DataType") to
13363	// unconditionally include in API requests. By default, fields with
13364	// empty values are omitted from API requests. However, any non-pointer,
13365	// non-interface field appearing in ForceSendFields will be sent to the
13366	// server regardless of whether the field is empty or not. This may be
13367	// used to include empty fields in Patch requests.
13368	ForceSendFields []string `json:"-"`
13369
13370	// NullFields is a list of field names (e.g. "DataType") to include in
13371	// API requests with the JSON null value. By default, fields with empty
13372	// values are omitted from API requests. However, any field with an
13373	// empty value appearing in NullFields will be sent to the server as
13374	// null. It is an error if a field in this list has a non-empty value.
13375	// This may be used to include null fields in Patch requests.
13376	NullFields []string `json:"-"`
13377}
13378
13379func (s *UserDefinedVariableConfiguration) MarshalJSON() ([]byte, error) {
13380	type NoMethod UserDefinedVariableConfiguration
13381	raw := NoMethod(*s)
13382	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13383}
13384
13385// UserProfile: Represents a UserProfile resource.
13386type UserProfile struct {
13387	// AccountId: The account ID to which this profile belongs.
13388	AccountId int64 `json:"accountId,omitempty,string"`
13389
13390	// AccountName: The account name this profile belongs to.
13391	AccountName string `json:"accountName,omitempty"`
13392
13393	// Etag: The eTag of this response for caching purposes.
13394	Etag string `json:"etag,omitempty"`
13395
13396	// Kind: The kind of resource this is, in this case
13397	// dfareporting#userProfile.
13398	Kind string `json:"kind,omitempty"`
13399
13400	// ProfileId: The unique ID of the user profile.
13401	ProfileId int64 `json:"profileId,omitempty,string"`
13402
13403	// SubAccountId: The sub account ID this profile belongs to if
13404	// applicable.
13405	SubAccountId int64 `json:"subAccountId,omitempty,string"`
13406
13407	// SubAccountName: The sub account name this profile belongs to if
13408	// applicable.
13409	SubAccountName string `json:"subAccountName,omitempty"`
13410
13411	// UserName: The user name.
13412	UserName string `json:"userName,omitempty"`
13413
13414	// ServerResponse contains the HTTP response code and headers from the
13415	// server.
13416	googleapi.ServerResponse `json:"-"`
13417
13418	// ForceSendFields is a list of field names (e.g. "AccountId") to
13419	// unconditionally include in API requests. By default, fields with
13420	// empty values are omitted from API requests. However, any non-pointer,
13421	// non-interface field appearing in ForceSendFields will be sent to the
13422	// server regardless of whether the field is empty or not. This may be
13423	// used to include empty fields in Patch requests.
13424	ForceSendFields []string `json:"-"`
13425
13426	// NullFields is a list of field names (e.g. "AccountId") to include in
13427	// API requests with the JSON null value. By default, fields with empty
13428	// values are omitted from API requests. However, any field with an
13429	// empty value appearing in NullFields will be sent to the server as
13430	// null. It is an error if a field in this list has a non-empty value.
13431	// This may be used to include null fields in Patch requests.
13432	NullFields []string `json:"-"`
13433}
13434
13435func (s *UserProfile) MarshalJSON() ([]byte, error) {
13436	type NoMethod UserProfile
13437	raw := NoMethod(*s)
13438	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13439}
13440
13441// UserProfileList: Represents the list of user profiles.
13442type UserProfileList struct {
13443	// Etag: The eTag of this response for caching purposes.
13444	Etag string `json:"etag,omitempty"`
13445
13446	// Items: The user profiles returned in this response.
13447	Items []*UserProfile `json:"items,omitempty"`
13448
13449	// Kind: The kind of list this is, in this case
13450	// dfareporting#userProfileList.
13451	Kind string `json:"kind,omitempty"`
13452
13453	// ServerResponse contains the HTTP response code and headers from the
13454	// server.
13455	googleapi.ServerResponse `json:"-"`
13456
13457	// ForceSendFields is a list of field names (e.g. "Etag") to
13458	// unconditionally include in API requests. By default, fields with
13459	// empty values are omitted from API requests. However, any non-pointer,
13460	// non-interface field appearing in ForceSendFields will be sent to the
13461	// server regardless of whether the field is empty or not. This may be
13462	// used to include empty fields in Patch requests.
13463	ForceSendFields []string `json:"-"`
13464
13465	// NullFields is a list of field names (e.g. "Etag") to include in API
13466	// requests with the JSON null value. By default, fields with empty
13467	// values are omitted from API requests. However, any field with an
13468	// empty value appearing in NullFields will be sent to the server as
13469	// null. It is an error if a field in this list has a non-empty value.
13470	// This may be used to include null fields in Patch requests.
13471	NullFields []string `json:"-"`
13472}
13473
13474func (s *UserProfileList) MarshalJSON() ([]byte, error) {
13475	type NoMethod UserProfileList
13476	raw := NoMethod(*s)
13477	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13478}
13479
13480// UserRole: Contains properties of auser role, which is used to manage
13481// user access.
13482type UserRole struct {
13483	// AccountId: Account ID of this user role. This is a read-only field
13484	// that can be left blank.
13485	AccountId int64 `json:"accountId,omitempty,string"`
13486
13487	// DefaultUserRole: Whether this is a default user role. Default user
13488	// roles are created by the system for the account/subaccount and cannot
13489	// be modified or deleted. Each default user role comes with a basic set
13490	// of preassigned permissions.
13491	DefaultUserRole bool `json:"defaultUserRole,omitempty"`
13492
13493	// Id: ID of this user role. This is a read-only, auto-generated field.
13494	Id int64 `json:"id,omitempty,string"`
13495
13496	// Kind: Identifies what kind of resource this is. Value: the fixed
13497	// string "dfareporting#userRole".
13498	Kind string `json:"kind,omitempty"`
13499
13500	// Name: Name of this user role. This is a required field. Must be less
13501	// than 256 characters long. If this user role is under a subaccount,
13502	// the name must be unique among sites of the same subaccount.
13503	// Otherwise, this user role is a top-level user role, and the name must
13504	// be unique among top-level user roles of the same account.
13505	Name string `json:"name,omitempty"`
13506
13507	// ParentUserRoleId: ID of the user role that this user role is based on
13508	// or copied from. This is a required field.
13509	ParentUserRoleId int64 `json:"parentUserRoleId,omitempty,string"`
13510
13511	// Permissions: List of permissions associated with this user role.
13512	Permissions []*UserRolePermission `json:"permissions,omitempty"`
13513
13514	// SubaccountId: Subaccount ID of this user role. This is a read-only
13515	// field that can be left blank.
13516	SubaccountId int64 `json:"subaccountId,omitempty,string"`
13517
13518	// ServerResponse contains the HTTP response code and headers from the
13519	// server.
13520	googleapi.ServerResponse `json:"-"`
13521
13522	// ForceSendFields is a list of field names (e.g. "AccountId") to
13523	// unconditionally include in API requests. By default, fields with
13524	// empty values are omitted from API requests. However, any non-pointer,
13525	// non-interface field appearing in ForceSendFields will be sent to the
13526	// server regardless of whether the field is empty or not. This may be
13527	// used to include empty fields in Patch requests.
13528	ForceSendFields []string `json:"-"`
13529
13530	// NullFields is a list of field names (e.g. "AccountId") to include in
13531	// API requests with the JSON null value. By default, fields with empty
13532	// values are omitted from API requests. However, any field with an
13533	// empty value appearing in NullFields will be sent to the server as
13534	// null. It is an error if a field in this list has a non-empty value.
13535	// This may be used to include null fields in Patch requests.
13536	NullFields []string `json:"-"`
13537}
13538
13539func (s *UserRole) MarshalJSON() ([]byte, error) {
13540	type NoMethod UserRole
13541	raw := NoMethod(*s)
13542	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13543}
13544
13545// UserRolePermission: Contains properties of a user role permission.
13546type UserRolePermission struct {
13547	// Availability: Levels of availability for a user role permission.
13548	//
13549	// Possible values:
13550	//   "ACCOUNT_ALWAYS"
13551	//   "ACCOUNT_BY_DEFAULT"
13552	//   "NOT_AVAILABLE_BY_DEFAULT"
13553	//   "SUBACCOUNT_AND_ACCOUNT_ALWAYS"
13554	//   "SUBACCOUNT_AND_ACCOUNT_BY_DEFAULT"
13555	Availability string `json:"availability,omitempty"`
13556
13557	// Id: ID of this user role permission.
13558	Id int64 `json:"id,omitempty,string"`
13559
13560	// Kind: Identifies what kind of resource this is. Value: the fixed
13561	// string "dfareporting#userRolePermission".
13562	Kind string `json:"kind,omitempty"`
13563
13564	// Name: Name of this user role permission.
13565	Name string `json:"name,omitempty"`
13566
13567	// PermissionGroupId: ID of the permission group that this user role
13568	// permission belongs to.
13569	PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
13570
13571	// ServerResponse contains the HTTP response code and headers from the
13572	// server.
13573	googleapi.ServerResponse `json:"-"`
13574
13575	// ForceSendFields is a list of field names (e.g. "Availability") to
13576	// unconditionally include in API requests. By default, fields with
13577	// empty values are omitted from API requests. However, any non-pointer,
13578	// non-interface field appearing in ForceSendFields will be sent to the
13579	// server regardless of whether the field is empty or not. This may be
13580	// used to include empty fields in Patch requests.
13581	ForceSendFields []string `json:"-"`
13582
13583	// NullFields is a list of field names (e.g. "Availability") to include
13584	// in API requests with the JSON null value. By default, fields with
13585	// empty values are omitted from API requests. However, any field with
13586	// an empty value appearing in NullFields will be sent to the server as
13587	// null. It is an error if a field in this list has a non-empty value.
13588	// This may be used to include null fields in Patch requests.
13589	NullFields []string `json:"-"`
13590}
13591
13592func (s *UserRolePermission) MarshalJSON() ([]byte, error) {
13593	type NoMethod UserRolePermission
13594	raw := NoMethod(*s)
13595	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13596}
13597
13598// UserRolePermissionGroup: Represents a grouping of related user role
13599// permissions.
13600type UserRolePermissionGroup struct {
13601	// Id: ID of this user role permission.
13602	Id int64 `json:"id,omitempty,string"`
13603
13604	// Kind: Identifies what kind of resource this is. Value: the fixed
13605	// string "dfareporting#userRolePermissionGroup".
13606	Kind string `json:"kind,omitempty"`
13607
13608	// Name: Name of this user role permission group.
13609	Name string `json:"name,omitempty"`
13610
13611	// ServerResponse contains the HTTP response code and headers from the
13612	// server.
13613	googleapi.ServerResponse `json:"-"`
13614
13615	// ForceSendFields is a list of field names (e.g. "Id") to
13616	// unconditionally include in API requests. By default, fields with
13617	// empty values are omitted from API requests. However, any non-pointer,
13618	// non-interface field appearing in ForceSendFields will be sent to the
13619	// server regardless of whether the field is empty or not. This may be
13620	// used to include empty fields in Patch requests.
13621	ForceSendFields []string `json:"-"`
13622
13623	// NullFields is a list of field names (e.g. "Id") to include in API
13624	// requests with the JSON null value. By default, fields with empty
13625	// values are omitted from API requests. However, any field with an
13626	// empty value appearing in NullFields will be sent to the server as
13627	// null. It is an error if a field in this list has a non-empty value.
13628	// This may be used to include null fields in Patch requests.
13629	NullFields []string `json:"-"`
13630}
13631
13632func (s *UserRolePermissionGroup) MarshalJSON() ([]byte, error) {
13633	type NoMethod UserRolePermissionGroup
13634	raw := NoMethod(*s)
13635	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13636}
13637
13638// UserRolePermissionGroupsListResponse: User Role Permission Group List
13639// Response
13640type UserRolePermissionGroupsListResponse struct {
13641	// Kind: Identifies what kind of resource this is. Value: the fixed
13642	// string "dfareporting#userRolePermissionGroupsListResponse".
13643	Kind string `json:"kind,omitempty"`
13644
13645	// UserRolePermissionGroups: User role permission group collection.
13646	UserRolePermissionGroups []*UserRolePermissionGroup `json:"userRolePermissionGroups,omitempty"`
13647
13648	// ServerResponse contains the HTTP response code and headers from the
13649	// server.
13650	googleapi.ServerResponse `json:"-"`
13651
13652	// ForceSendFields is a list of field names (e.g. "Kind") to
13653	// unconditionally include in API requests. By default, fields with
13654	// empty values are omitted from API requests. However, any non-pointer,
13655	// non-interface field appearing in ForceSendFields will be sent to the
13656	// server regardless of whether the field is empty or not. This may be
13657	// used to include empty fields in Patch requests.
13658	ForceSendFields []string `json:"-"`
13659
13660	// NullFields is a list of field names (e.g. "Kind") to include in API
13661	// requests with the JSON null value. By default, fields with empty
13662	// values are omitted from API requests. However, any field with an
13663	// empty value appearing in NullFields will be sent to the server as
13664	// null. It is an error if a field in this list has a non-empty value.
13665	// This may be used to include null fields in Patch requests.
13666	NullFields []string `json:"-"`
13667}
13668
13669func (s *UserRolePermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
13670	type NoMethod UserRolePermissionGroupsListResponse
13671	raw := NoMethod(*s)
13672	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13673}
13674
13675// UserRolePermissionsListResponse: User Role Permission List Response
13676type UserRolePermissionsListResponse struct {
13677	// Kind: Identifies what kind of resource this is. Value: the fixed
13678	// string "dfareporting#userRolePermissionsListResponse".
13679	Kind string `json:"kind,omitempty"`
13680
13681	// UserRolePermissions: User role permission collection.
13682	UserRolePermissions []*UserRolePermission `json:"userRolePermissions,omitempty"`
13683
13684	// ServerResponse contains the HTTP response code and headers from the
13685	// server.
13686	googleapi.ServerResponse `json:"-"`
13687
13688	// ForceSendFields is a list of field names (e.g. "Kind") to
13689	// unconditionally include in API requests. By default, fields with
13690	// empty values are omitted from API requests. However, any non-pointer,
13691	// non-interface field appearing in ForceSendFields will be sent to the
13692	// server regardless of whether the field is empty or not. This may be
13693	// used to include empty fields in Patch requests.
13694	ForceSendFields []string `json:"-"`
13695
13696	// NullFields is a list of field names (e.g. "Kind") to include in API
13697	// requests with the JSON null value. By default, fields with empty
13698	// values are omitted from API requests. However, any field with an
13699	// empty value appearing in NullFields will be sent to the server as
13700	// null. It is an error if a field in this list has a non-empty value.
13701	// This may be used to include null fields in Patch requests.
13702	NullFields []string `json:"-"`
13703}
13704
13705func (s *UserRolePermissionsListResponse) MarshalJSON() ([]byte, error) {
13706	type NoMethod UserRolePermissionsListResponse
13707	raw := NoMethod(*s)
13708	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13709}
13710
13711// UserRolesListResponse: User Role List Response
13712type UserRolesListResponse struct {
13713	// Kind: Identifies what kind of resource this is. Value: the fixed
13714	// string "dfareporting#userRolesListResponse".
13715	Kind string `json:"kind,omitempty"`
13716
13717	// NextPageToken: Pagination token to be used for the next list
13718	// operation.
13719	NextPageToken string `json:"nextPageToken,omitempty"`
13720
13721	// UserRoles: User role collection.
13722	UserRoles []*UserRole `json:"userRoles,omitempty"`
13723
13724	// ServerResponse contains the HTTP response code and headers from the
13725	// server.
13726	googleapi.ServerResponse `json:"-"`
13727
13728	// ForceSendFields is a list of field names (e.g. "Kind") to
13729	// unconditionally include in API requests. By default, fields with
13730	// empty values are omitted from API requests. However, any non-pointer,
13731	// non-interface field appearing in ForceSendFields will be sent to the
13732	// server regardless of whether the field is empty or not. This may be
13733	// used to include empty fields in Patch requests.
13734	ForceSendFields []string `json:"-"`
13735
13736	// NullFields is a list of field names (e.g. "Kind") to include in API
13737	// requests with the JSON null value. By default, fields with empty
13738	// values are omitted from API requests. However, any field with an
13739	// empty value appearing in NullFields will be sent to the server as
13740	// null. It is an error if a field in this list has a non-empty value.
13741	// This may be used to include null fields in Patch requests.
13742	NullFields []string `json:"-"`
13743}
13744
13745func (s *UserRolesListResponse) MarshalJSON() ([]byte, error) {
13746	type NoMethod UserRolesListResponse
13747	raw := NoMethod(*s)
13748	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13749}
13750
13751// VideoFormat: Contains information about supported video formats.
13752type VideoFormat struct {
13753	// FileType: File type of the video format.
13754	//
13755	// Possible values:
13756	//   "FLV"
13757	//   "M3U8"
13758	//   "MP4"
13759	//   "THREEGPP"
13760	//   "WEBM"
13761	FileType string `json:"fileType,omitempty"`
13762
13763	// Id: ID of the video format.
13764	Id int64 `json:"id,omitempty"`
13765
13766	// Kind: Identifies what kind of resource this is. Value: the fixed
13767	// string "dfareporting#videoFormat".
13768	Kind string `json:"kind,omitempty"`
13769
13770	// Resolution: The resolution of this video format.
13771	Resolution *Size `json:"resolution,omitempty"`
13772
13773	// TargetBitRate: The target bit rate of this video format.
13774	TargetBitRate int64 `json:"targetBitRate,omitempty"`
13775
13776	// ServerResponse contains the HTTP response code and headers from the
13777	// server.
13778	googleapi.ServerResponse `json:"-"`
13779
13780	// ForceSendFields is a list of field names (e.g. "FileType") to
13781	// unconditionally include in API requests. By default, fields with
13782	// empty values are omitted from API requests. However, any non-pointer,
13783	// non-interface field appearing in ForceSendFields will be sent to the
13784	// server regardless of whether the field is empty or not. This may be
13785	// used to include empty fields in Patch requests.
13786	ForceSendFields []string `json:"-"`
13787
13788	// NullFields is a list of field names (e.g. "FileType") to include in
13789	// API requests with the JSON null value. By default, fields with empty
13790	// values are omitted from API requests. However, any field with an
13791	// empty value appearing in NullFields will be sent to the server as
13792	// null. It is an error if a field in this list has a non-empty value.
13793	// This may be used to include null fields in Patch requests.
13794	NullFields []string `json:"-"`
13795}
13796
13797func (s *VideoFormat) MarshalJSON() ([]byte, error) {
13798	type NoMethod VideoFormat
13799	raw := NoMethod(*s)
13800	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13801}
13802
13803// VideoFormatsListResponse: Video Format List Response
13804type VideoFormatsListResponse struct {
13805	// Kind: Identifies what kind of resource this is. Value: the fixed
13806	// string "dfareporting#videoFormatsListResponse".
13807	Kind string `json:"kind,omitempty"`
13808
13809	// VideoFormats: Video format collection.
13810	VideoFormats []*VideoFormat `json:"videoFormats,omitempty"`
13811
13812	// ServerResponse contains the HTTP response code and headers from the
13813	// server.
13814	googleapi.ServerResponse `json:"-"`
13815
13816	// ForceSendFields is a list of field names (e.g. "Kind") to
13817	// unconditionally include in API requests. By default, fields with
13818	// empty values are omitted from API requests. However, any non-pointer,
13819	// non-interface field appearing in ForceSendFields will be sent to the
13820	// server regardless of whether the field is empty or not. This may be
13821	// used to include empty fields in Patch requests.
13822	ForceSendFields []string `json:"-"`
13823
13824	// NullFields is a list of field names (e.g. "Kind") to include in API
13825	// requests with the JSON null value. By default, fields with empty
13826	// values are omitted from API requests. However, any field with an
13827	// empty value appearing in NullFields will be sent to the server as
13828	// null. It is an error if a field in this list has a non-empty value.
13829	// This may be used to include null fields in Patch requests.
13830	NullFields []string `json:"-"`
13831}
13832
13833func (s *VideoFormatsListResponse) MarshalJSON() ([]byte, error) {
13834	type NoMethod VideoFormatsListResponse
13835	raw := NoMethod(*s)
13836	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13837}
13838
13839// VideoOffset: Video Offset
13840type VideoOffset struct {
13841	// OffsetPercentage: Duration, as a percentage of video duration. Do not
13842	// set when offsetSeconds is set. Acceptable values are 0 to 100,
13843	// inclusive.
13844	OffsetPercentage int64 `json:"offsetPercentage,omitempty"`
13845
13846	// OffsetSeconds: Duration, in seconds. Do not set when offsetPercentage
13847	// is set. Acceptable values are 0 to 86399, inclusive.
13848	OffsetSeconds int64 `json:"offsetSeconds,omitempty"`
13849
13850	// ForceSendFields is a list of field names (e.g. "OffsetPercentage") to
13851	// unconditionally include in API requests. By default, fields with
13852	// empty values are omitted from API requests. However, any non-pointer,
13853	// non-interface field appearing in ForceSendFields will be sent to the
13854	// server regardless of whether the field is empty or not. This may be
13855	// used to include empty fields in Patch requests.
13856	ForceSendFields []string `json:"-"`
13857
13858	// NullFields is a list of field names (e.g. "OffsetPercentage") to
13859	// include in API requests with the JSON null value. By default, fields
13860	// with empty values are omitted from API requests. However, any field
13861	// with an empty value appearing in NullFields will be sent to the
13862	// server as null. It is an error if a field in this list has a
13863	// non-empty value. This may be used to include null fields in Patch
13864	// requests.
13865	NullFields []string `json:"-"`
13866}
13867
13868func (s *VideoOffset) MarshalJSON() ([]byte, error) {
13869	type NoMethod VideoOffset
13870	raw := NoMethod(*s)
13871	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13872}
13873
13874// VideoSettings: Video Settings
13875type VideoSettings struct {
13876	// CompanionSettings: Settings for the companion creatives of video
13877	// creatives served to this placement.
13878	CompanionSettings *CompanionSetting `json:"companionSettings,omitempty"`
13879
13880	// Kind: Identifies what kind of resource this is. Value: the fixed
13881	// string "dfareporting#videoSettings".
13882	Kind string `json:"kind,omitempty"`
13883
13884	// Orientation: Orientation of a video placement. If this value is set,
13885	// placement will return assets matching the specified orientation.
13886	//
13887	// Possible values:
13888	//   "ANY"
13889	//   "LANDSCAPE"
13890	//   "PORTRAIT"
13891	Orientation string `json:"orientation,omitempty"`
13892
13893	// SkippableSettings: Settings for the skippability of video creatives
13894	// served to this placement. If this object is provided, the
13895	// creative-level skippable settings will be overridden.
13896	SkippableSettings *SkippableSetting `json:"skippableSettings,omitempty"`
13897
13898	// TranscodeSettings: Settings for the transcodes of video creatives
13899	// served to this placement. If this object is provided, the
13900	// creative-level transcode settings will be overridden.
13901	TranscodeSettings *TranscodeSetting `json:"transcodeSettings,omitempty"`
13902
13903	// ForceSendFields is a list of field names (e.g. "CompanionSettings")
13904	// to unconditionally include in API requests. By default, fields with
13905	// empty values are omitted from API requests. However, any non-pointer,
13906	// non-interface field appearing in ForceSendFields will be sent to the
13907	// server regardless of whether the field is empty or not. This may be
13908	// used to include empty fields in Patch requests.
13909	ForceSendFields []string `json:"-"`
13910
13911	// NullFields is a list of field names (e.g. "CompanionSettings") to
13912	// include in API requests with the JSON null value. By default, fields
13913	// with empty values are omitted from API requests. However, any field
13914	// with an empty value appearing in NullFields will be sent to the
13915	// server as null. It is an error if a field in this list has a
13916	// non-empty value. This may be used to include null fields in Patch
13917	// requests.
13918	NullFields []string `json:"-"`
13919}
13920
13921func (s *VideoSettings) MarshalJSON() ([]byte, error) {
13922	type NoMethod VideoSettings
13923	raw := NoMethod(*s)
13924	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13925}
13926
13927// method id "dfareporting.accountActiveAdSummaries.get":
13928
13929type AccountActiveAdSummariesGetCall struct {
13930	s                *Service
13931	profileId        int64
13932	summaryAccountId int64
13933	urlParams_       gensupport.URLParams
13934	ifNoneMatch_     string
13935	ctx_             context.Context
13936	header_          http.Header
13937}
13938
13939// Get: Gets the account's active ad summary by account ID.
13940func (r *AccountActiveAdSummariesService) Get(profileId int64, summaryAccountId int64) *AccountActiveAdSummariesGetCall {
13941	c := &AccountActiveAdSummariesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13942	c.profileId = profileId
13943	c.summaryAccountId = summaryAccountId
13944	return c
13945}
13946
13947// Fields allows partial responses to be retrieved. See
13948// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13949// for more information.
13950func (c *AccountActiveAdSummariesGetCall) Fields(s ...googleapi.Field) *AccountActiveAdSummariesGetCall {
13951	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13952	return c
13953}
13954
13955// IfNoneMatch sets the optional parameter which makes the operation
13956// fail if the object's ETag matches the given value. This is useful for
13957// getting updates only after the object has changed since the last
13958// request. Use googleapi.IsNotModified to check whether the response
13959// error from Do is the result of In-None-Match.
13960func (c *AccountActiveAdSummariesGetCall) IfNoneMatch(entityTag string) *AccountActiveAdSummariesGetCall {
13961	c.ifNoneMatch_ = entityTag
13962	return c
13963}
13964
13965// Context sets the context to be used in this call's Do method. Any
13966// pending HTTP request will be aborted if the provided context is
13967// canceled.
13968func (c *AccountActiveAdSummariesGetCall) Context(ctx context.Context) *AccountActiveAdSummariesGetCall {
13969	c.ctx_ = ctx
13970	return c
13971}
13972
13973// Header returns an http.Header that can be modified by the caller to
13974// add HTTP headers to the request.
13975func (c *AccountActiveAdSummariesGetCall) Header() http.Header {
13976	if c.header_ == nil {
13977		c.header_ = make(http.Header)
13978	}
13979	return c.header_
13980}
13981
13982func (c *AccountActiveAdSummariesGetCall) doRequest(alt string) (*http.Response, error) {
13983	reqHeaders := make(http.Header)
13984	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
13985	for k, v := range c.header_ {
13986		reqHeaders[k] = v
13987	}
13988	reqHeaders.Set("User-Agent", c.s.userAgent())
13989	if c.ifNoneMatch_ != "" {
13990		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13991	}
13992	var body io.Reader = nil
13993	c.urlParams_.Set("alt", alt)
13994	c.urlParams_.Set("prettyPrint", "false")
13995	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}")
13996	urls += "?" + c.urlParams_.Encode()
13997	req, err := http.NewRequest("GET", urls, body)
13998	if err != nil {
13999		return nil, err
14000	}
14001	req.Header = reqHeaders
14002	googleapi.Expand(req.URL, map[string]string{
14003		"profileId":        strconv.FormatInt(c.profileId, 10),
14004		"summaryAccountId": strconv.FormatInt(c.summaryAccountId, 10),
14005	})
14006	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14007}
14008
14009// Do executes the "dfareporting.accountActiveAdSummaries.get" call.
14010// Exactly one of *AccountActiveAdSummary or error will be non-nil. Any
14011// non-2xx status code is an error. Response headers are in either
14012// *AccountActiveAdSummary.ServerResponse.Header or (if a response was
14013// returned at all) in error.(*googleapi.Error).Header. Use
14014// googleapi.IsNotModified to check whether the returned error was
14015// because http.StatusNotModified was returned.
14016func (c *AccountActiveAdSummariesGetCall) Do(opts ...googleapi.CallOption) (*AccountActiveAdSummary, error) {
14017	gensupport.SetOptions(c.urlParams_, opts...)
14018	res, err := c.doRequest("json")
14019	if res != nil && res.StatusCode == http.StatusNotModified {
14020		if res.Body != nil {
14021			res.Body.Close()
14022		}
14023		return nil, &googleapi.Error{
14024			Code:   res.StatusCode,
14025			Header: res.Header,
14026		}
14027	}
14028	if err != nil {
14029		return nil, err
14030	}
14031	defer googleapi.CloseBody(res)
14032	if err := googleapi.CheckResponse(res); err != nil {
14033		return nil, err
14034	}
14035	ret := &AccountActiveAdSummary{
14036		ServerResponse: googleapi.ServerResponse{
14037			Header:         res.Header,
14038			HTTPStatusCode: res.StatusCode,
14039		},
14040	}
14041	target := &ret
14042	if err := gensupport.DecodeResponse(target, res); err != nil {
14043		return nil, err
14044	}
14045	return ret, nil
14046	// {
14047	//   "description": "Gets the account's active ad summary by account ID.",
14048	//   "httpMethod": "GET",
14049	//   "id": "dfareporting.accountActiveAdSummaries.get",
14050	//   "parameterOrder": [
14051	//     "profileId",
14052	//     "summaryAccountId"
14053	//   ],
14054	//   "parameters": {
14055	//     "profileId": {
14056	//       "description": "User profile ID associated with this request.",
14057	//       "format": "int64",
14058	//       "location": "path",
14059	//       "required": true,
14060	//       "type": "string"
14061	//     },
14062	//     "summaryAccountId": {
14063	//       "description": "Account ID.",
14064	//       "format": "int64",
14065	//       "location": "path",
14066	//       "required": true,
14067	//       "type": "string"
14068	//     }
14069	//   },
14070	//   "path": "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}",
14071	//   "response": {
14072	//     "$ref": "AccountActiveAdSummary"
14073	//   },
14074	//   "scopes": [
14075	//     "https://www.googleapis.com/auth/dfatrafficking"
14076	//   ]
14077	// }
14078
14079}
14080
14081// method id "dfareporting.accountPermissionGroups.get":
14082
14083type AccountPermissionGroupsGetCall struct {
14084	s            *Service
14085	profileId    int64
14086	id           int64
14087	urlParams_   gensupport.URLParams
14088	ifNoneMatch_ string
14089	ctx_         context.Context
14090	header_      http.Header
14091}
14092
14093// Get: Gets one account permission group by ID.
14094func (r *AccountPermissionGroupsService) Get(profileId int64, id int64) *AccountPermissionGroupsGetCall {
14095	c := &AccountPermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14096	c.profileId = profileId
14097	c.id = id
14098	return c
14099}
14100
14101// Fields allows partial responses to be retrieved. See
14102// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14103// for more information.
14104func (c *AccountPermissionGroupsGetCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsGetCall {
14105	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14106	return c
14107}
14108
14109// IfNoneMatch sets the optional parameter which makes the operation
14110// fail if the object's ETag matches the given value. This is useful for
14111// getting updates only after the object has changed since the last
14112// request. Use googleapi.IsNotModified to check whether the response
14113// error from Do is the result of In-None-Match.
14114func (c *AccountPermissionGroupsGetCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsGetCall {
14115	c.ifNoneMatch_ = entityTag
14116	return c
14117}
14118
14119// Context sets the context to be used in this call's Do method. Any
14120// pending HTTP request will be aborted if the provided context is
14121// canceled.
14122func (c *AccountPermissionGroupsGetCall) Context(ctx context.Context) *AccountPermissionGroupsGetCall {
14123	c.ctx_ = ctx
14124	return c
14125}
14126
14127// Header returns an http.Header that can be modified by the caller to
14128// add HTTP headers to the request.
14129func (c *AccountPermissionGroupsGetCall) Header() http.Header {
14130	if c.header_ == nil {
14131		c.header_ = make(http.Header)
14132	}
14133	return c.header_
14134}
14135
14136func (c *AccountPermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
14137	reqHeaders := make(http.Header)
14138	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
14139	for k, v := range c.header_ {
14140		reqHeaders[k] = v
14141	}
14142	reqHeaders.Set("User-Agent", c.s.userAgent())
14143	if c.ifNoneMatch_ != "" {
14144		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14145	}
14146	var body io.Reader = nil
14147	c.urlParams_.Set("alt", alt)
14148	c.urlParams_.Set("prettyPrint", "false")
14149	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups/{id}")
14150	urls += "?" + c.urlParams_.Encode()
14151	req, err := http.NewRequest("GET", urls, body)
14152	if err != nil {
14153		return nil, err
14154	}
14155	req.Header = reqHeaders
14156	googleapi.Expand(req.URL, map[string]string{
14157		"profileId": strconv.FormatInt(c.profileId, 10),
14158		"id":        strconv.FormatInt(c.id, 10),
14159	})
14160	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14161}
14162
14163// Do executes the "dfareporting.accountPermissionGroups.get" call.
14164// Exactly one of *AccountPermissionGroup or error will be non-nil. Any
14165// non-2xx status code is an error. Response headers are in either
14166// *AccountPermissionGroup.ServerResponse.Header or (if a response was
14167// returned at all) in error.(*googleapi.Error).Header. Use
14168// googleapi.IsNotModified to check whether the returned error was
14169// because http.StatusNotModified was returned.
14170func (c *AccountPermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroup, error) {
14171	gensupport.SetOptions(c.urlParams_, opts...)
14172	res, err := c.doRequest("json")
14173	if res != nil && res.StatusCode == http.StatusNotModified {
14174		if res.Body != nil {
14175			res.Body.Close()
14176		}
14177		return nil, &googleapi.Error{
14178			Code:   res.StatusCode,
14179			Header: res.Header,
14180		}
14181	}
14182	if err != nil {
14183		return nil, err
14184	}
14185	defer googleapi.CloseBody(res)
14186	if err := googleapi.CheckResponse(res); err != nil {
14187		return nil, err
14188	}
14189	ret := &AccountPermissionGroup{
14190		ServerResponse: googleapi.ServerResponse{
14191			Header:         res.Header,
14192			HTTPStatusCode: res.StatusCode,
14193		},
14194	}
14195	target := &ret
14196	if err := gensupport.DecodeResponse(target, res); err != nil {
14197		return nil, err
14198	}
14199	return ret, nil
14200	// {
14201	//   "description": "Gets one account permission group by ID.",
14202	//   "httpMethod": "GET",
14203	//   "id": "dfareporting.accountPermissionGroups.get",
14204	//   "parameterOrder": [
14205	//     "profileId",
14206	//     "id"
14207	//   ],
14208	//   "parameters": {
14209	//     "id": {
14210	//       "description": "Account permission group ID.",
14211	//       "format": "int64",
14212	//       "location": "path",
14213	//       "required": true,
14214	//       "type": "string"
14215	//     },
14216	//     "profileId": {
14217	//       "description": "User profile ID associated with this request.",
14218	//       "format": "int64",
14219	//       "location": "path",
14220	//       "required": true,
14221	//       "type": "string"
14222	//     }
14223	//   },
14224	//   "path": "userprofiles/{profileId}/accountPermissionGroups/{id}",
14225	//   "response": {
14226	//     "$ref": "AccountPermissionGroup"
14227	//   },
14228	//   "scopes": [
14229	//     "https://www.googleapis.com/auth/dfatrafficking"
14230	//   ]
14231	// }
14232
14233}
14234
14235// method id "dfareporting.accountPermissionGroups.list":
14236
14237type AccountPermissionGroupsListCall struct {
14238	s            *Service
14239	profileId    int64
14240	urlParams_   gensupport.URLParams
14241	ifNoneMatch_ string
14242	ctx_         context.Context
14243	header_      http.Header
14244}
14245
14246// List: Retrieves the list of account permission groups.
14247func (r *AccountPermissionGroupsService) List(profileId int64) *AccountPermissionGroupsListCall {
14248	c := &AccountPermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14249	c.profileId = profileId
14250	return c
14251}
14252
14253// Fields allows partial responses to be retrieved. See
14254// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14255// for more information.
14256func (c *AccountPermissionGroupsListCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsListCall {
14257	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14258	return c
14259}
14260
14261// IfNoneMatch sets the optional parameter which makes the operation
14262// fail if the object's ETag matches the given value. This is useful for
14263// getting updates only after the object has changed since the last
14264// request. Use googleapi.IsNotModified to check whether the response
14265// error from Do is the result of In-None-Match.
14266func (c *AccountPermissionGroupsListCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsListCall {
14267	c.ifNoneMatch_ = entityTag
14268	return c
14269}
14270
14271// Context sets the context to be used in this call's Do method. Any
14272// pending HTTP request will be aborted if the provided context is
14273// canceled.
14274func (c *AccountPermissionGroupsListCall) Context(ctx context.Context) *AccountPermissionGroupsListCall {
14275	c.ctx_ = ctx
14276	return c
14277}
14278
14279// Header returns an http.Header that can be modified by the caller to
14280// add HTTP headers to the request.
14281func (c *AccountPermissionGroupsListCall) Header() http.Header {
14282	if c.header_ == nil {
14283		c.header_ = make(http.Header)
14284	}
14285	return c.header_
14286}
14287
14288func (c *AccountPermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
14289	reqHeaders := make(http.Header)
14290	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
14291	for k, v := range c.header_ {
14292		reqHeaders[k] = v
14293	}
14294	reqHeaders.Set("User-Agent", c.s.userAgent())
14295	if c.ifNoneMatch_ != "" {
14296		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14297	}
14298	var body io.Reader = nil
14299	c.urlParams_.Set("alt", alt)
14300	c.urlParams_.Set("prettyPrint", "false")
14301	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups")
14302	urls += "?" + c.urlParams_.Encode()
14303	req, err := http.NewRequest("GET", urls, body)
14304	if err != nil {
14305		return nil, err
14306	}
14307	req.Header = reqHeaders
14308	googleapi.Expand(req.URL, map[string]string{
14309		"profileId": strconv.FormatInt(c.profileId, 10),
14310	})
14311	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14312}
14313
14314// Do executes the "dfareporting.accountPermissionGroups.list" call.
14315// Exactly one of *AccountPermissionGroupsListResponse or error will be
14316// non-nil. Any non-2xx status code is an error. Response headers are in
14317// either *AccountPermissionGroupsListResponse.ServerResponse.Header or
14318// (if a response was returned at all) in
14319// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14320// whether the returned error was because http.StatusNotModified was
14321// returned.
14322func (c *AccountPermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroupsListResponse, error) {
14323	gensupport.SetOptions(c.urlParams_, opts...)
14324	res, err := c.doRequest("json")
14325	if res != nil && res.StatusCode == http.StatusNotModified {
14326		if res.Body != nil {
14327			res.Body.Close()
14328		}
14329		return nil, &googleapi.Error{
14330			Code:   res.StatusCode,
14331			Header: res.Header,
14332		}
14333	}
14334	if err != nil {
14335		return nil, err
14336	}
14337	defer googleapi.CloseBody(res)
14338	if err := googleapi.CheckResponse(res); err != nil {
14339		return nil, err
14340	}
14341	ret := &AccountPermissionGroupsListResponse{
14342		ServerResponse: googleapi.ServerResponse{
14343			Header:         res.Header,
14344			HTTPStatusCode: res.StatusCode,
14345		},
14346	}
14347	target := &ret
14348	if err := gensupport.DecodeResponse(target, res); err != nil {
14349		return nil, err
14350	}
14351	return ret, nil
14352	// {
14353	//   "description": "Retrieves the list of account permission groups.",
14354	//   "httpMethod": "GET",
14355	//   "id": "dfareporting.accountPermissionGroups.list",
14356	//   "parameterOrder": [
14357	//     "profileId"
14358	//   ],
14359	//   "parameters": {
14360	//     "profileId": {
14361	//       "description": "User profile ID associated with this request.",
14362	//       "format": "int64",
14363	//       "location": "path",
14364	//       "required": true,
14365	//       "type": "string"
14366	//     }
14367	//   },
14368	//   "path": "userprofiles/{profileId}/accountPermissionGroups",
14369	//   "response": {
14370	//     "$ref": "AccountPermissionGroupsListResponse"
14371	//   },
14372	//   "scopes": [
14373	//     "https://www.googleapis.com/auth/dfatrafficking"
14374	//   ]
14375	// }
14376
14377}
14378
14379// method id "dfareporting.accountPermissions.get":
14380
14381type AccountPermissionsGetCall struct {
14382	s            *Service
14383	profileId    int64
14384	id           int64
14385	urlParams_   gensupport.URLParams
14386	ifNoneMatch_ string
14387	ctx_         context.Context
14388	header_      http.Header
14389}
14390
14391// Get: Gets one account permission by ID.
14392func (r *AccountPermissionsService) Get(profileId int64, id int64) *AccountPermissionsGetCall {
14393	c := &AccountPermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14394	c.profileId = profileId
14395	c.id = id
14396	return c
14397}
14398
14399// Fields allows partial responses to be retrieved. See
14400// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14401// for more information.
14402func (c *AccountPermissionsGetCall) Fields(s ...googleapi.Field) *AccountPermissionsGetCall {
14403	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14404	return c
14405}
14406
14407// IfNoneMatch sets the optional parameter which makes the operation
14408// fail if the object's ETag matches the given value. This is useful for
14409// getting updates only after the object has changed since the last
14410// request. Use googleapi.IsNotModified to check whether the response
14411// error from Do is the result of In-None-Match.
14412func (c *AccountPermissionsGetCall) IfNoneMatch(entityTag string) *AccountPermissionsGetCall {
14413	c.ifNoneMatch_ = entityTag
14414	return c
14415}
14416
14417// Context sets the context to be used in this call's Do method. Any
14418// pending HTTP request will be aborted if the provided context is
14419// canceled.
14420func (c *AccountPermissionsGetCall) Context(ctx context.Context) *AccountPermissionsGetCall {
14421	c.ctx_ = ctx
14422	return c
14423}
14424
14425// Header returns an http.Header that can be modified by the caller to
14426// add HTTP headers to the request.
14427func (c *AccountPermissionsGetCall) Header() http.Header {
14428	if c.header_ == nil {
14429		c.header_ = make(http.Header)
14430	}
14431	return c.header_
14432}
14433
14434func (c *AccountPermissionsGetCall) doRequest(alt string) (*http.Response, error) {
14435	reqHeaders := make(http.Header)
14436	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
14437	for k, v := range c.header_ {
14438		reqHeaders[k] = v
14439	}
14440	reqHeaders.Set("User-Agent", c.s.userAgent())
14441	if c.ifNoneMatch_ != "" {
14442		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14443	}
14444	var body io.Reader = nil
14445	c.urlParams_.Set("alt", alt)
14446	c.urlParams_.Set("prettyPrint", "false")
14447	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions/{id}")
14448	urls += "?" + c.urlParams_.Encode()
14449	req, err := http.NewRequest("GET", urls, body)
14450	if err != nil {
14451		return nil, err
14452	}
14453	req.Header = reqHeaders
14454	googleapi.Expand(req.URL, map[string]string{
14455		"profileId": strconv.FormatInt(c.profileId, 10),
14456		"id":        strconv.FormatInt(c.id, 10),
14457	})
14458	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14459}
14460
14461// Do executes the "dfareporting.accountPermissions.get" call.
14462// Exactly one of *AccountPermission or error will be non-nil. Any
14463// non-2xx status code is an error. Response headers are in either
14464// *AccountPermission.ServerResponse.Header or (if a response was
14465// returned at all) in error.(*googleapi.Error).Header. Use
14466// googleapi.IsNotModified to check whether the returned error was
14467// because http.StatusNotModified was returned.
14468func (c *AccountPermissionsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermission, error) {
14469	gensupport.SetOptions(c.urlParams_, opts...)
14470	res, err := c.doRequest("json")
14471	if res != nil && res.StatusCode == http.StatusNotModified {
14472		if res.Body != nil {
14473			res.Body.Close()
14474		}
14475		return nil, &googleapi.Error{
14476			Code:   res.StatusCode,
14477			Header: res.Header,
14478		}
14479	}
14480	if err != nil {
14481		return nil, err
14482	}
14483	defer googleapi.CloseBody(res)
14484	if err := googleapi.CheckResponse(res); err != nil {
14485		return nil, err
14486	}
14487	ret := &AccountPermission{
14488		ServerResponse: googleapi.ServerResponse{
14489			Header:         res.Header,
14490			HTTPStatusCode: res.StatusCode,
14491		},
14492	}
14493	target := &ret
14494	if err := gensupport.DecodeResponse(target, res); err != nil {
14495		return nil, err
14496	}
14497	return ret, nil
14498	// {
14499	//   "description": "Gets one account permission by ID.",
14500	//   "httpMethod": "GET",
14501	//   "id": "dfareporting.accountPermissions.get",
14502	//   "parameterOrder": [
14503	//     "profileId",
14504	//     "id"
14505	//   ],
14506	//   "parameters": {
14507	//     "id": {
14508	//       "description": "Account permission ID.",
14509	//       "format": "int64",
14510	//       "location": "path",
14511	//       "required": true,
14512	//       "type": "string"
14513	//     },
14514	//     "profileId": {
14515	//       "description": "User profile ID associated with this request.",
14516	//       "format": "int64",
14517	//       "location": "path",
14518	//       "required": true,
14519	//       "type": "string"
14520	//     }
14521	//   },
14522	//   "path": "userprofiles/{profileId}/accountPermissions/{id}",
14523	//   "response": {
14524	//     "$ref": "AccountPermission"
14525	//   },
14526	//   "scopes": [
14527	//     "https://www.googleapis.com/auth/dfatrafficking"
14528	//   ]
14529	// }
14530
14531}
14532
14533// method id "dfareporting.accountPermissions.list":
14534
14535type AccountPermissionsListCall struct {
14536	s            *Service
14537	profileId    int64
14538	urlParams_   gensupport.URLParams
14539	ifNoneMatch_ string
14540	ctx_         context.Context
14541	header_      http.Header
14542}
14543
14544// List: Retrieves the list of account permissions.
14545func (r *AccountPermissionsService) List(profileId int64) *AccountPermissionsListCall {
14546	c := &AccountPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14547	c.profileId = profileId
14548	return c
14549}
14550
14551// Fields allows partial responses to be retrieved. See
14552// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14553// for more information.
14554func (c *AccountPermissionsListCall) Fields(s ...googleapi.Field) *AccountPermissionsListCall {
14555	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14556	return c
14557}
14558
14559// IfNoneMatch sets the optional parameter which makes the operation
14560// fail if the object's ETag matches the given value. This is useful for
14561// getting updates only after the object has changed since the last
14562// request. Use googleapi.IsNotModified to check whether the response
14563// error from Do is the result of In-None-Match.
14564func (c *AccountPermissionsListCall) IfNoneMatch(entityTag string) *AccountPermissionsListCall {
14565	c.ifNoneMatch_ = entityTag
14566	return c
14567}
14568
14569// Context sets the context to be used in this call's Do method. Any
14570// pending HTTP request will be aborted if the provided context is
14571// canceled.
14572func (c *AccountPermissionsListCall) Context(ctx context.Context) *AccountPermissionsListCall {
14573	c.ctx_ = ctx
14574	return c
14575}
14576
14577// Header returns an http.Header that can be modified by the caller to
14578// add HTTP headers to the request.
14579func (c *AccountPermissionsListCall) Header() http.Header {
14580	if c.header_ == nil {
14581		c.header_ = make(http.Header)
14582	}
14583	return c.header_
14584}
14585
14586func (c *AccountPermissionsListCall) doRequest(alt string) (*http.Response, error) {
14587	reqHeaders := make(http.Header)
14588	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
14589	for k, v := range c.header_ {
14590		reqHeaders[k] = v
14591	}
14592	reqHeaders.Set("User-Agent", c.s.userAgent())
14593	if c.ifNoneMatch_ != "" {
14594		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14595	}
14596	var body io.Reader = nil
14597	c.urlParams_.Set("alt", alt)
14598	c.urlParams_.Set("prettyPrint", "false")
14599	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions")
14600	urls += "?" + c.urlParams_.Encode()
14601	req, err := http.NewRequest("GET", urls, body)
14602	if err != nil {
14603		return nil, err
14604	}
14605	req.Header = reqHeaders
14606	googleapi.Expand(req.URL, map[string]string{
14607		"profileId": strconv.FormatInt(c.profileId, 10),
14608	})
14609	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14610}
14611
14612// Do executes the "dfareporting.accountPermissions.list" call.
14613// Exactly one of *AccountPermissionsListResponse or error will be
14614// non-nil. Any non-2xx status code is an error. Response headers are in
14615// either *AccountPermissionsListResponse.ServerResponse.Header or (if a
14616// response was returned at all) in error.(*googleapi.Error).Header. Use
14617// googleapi.IsNotModified to check whether the returned error was
14618// because http.StatusNotModified was returned.
14619func (c *AccountPermissionsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionsListResponse, error) {
14620	gensupport.SetOptions(c.urlParams_, opts...)
14621	res, err := c.doRequest("json")
14622	if res != nil && res.StatusCode == http.StatusNotModified {
14623		if res.Body != nil {
14624			res.Body.Close()
14625		}
14626		return nil, &googleapi.Error{
14627			Code:   res.StatusCode,
14628			Header: res.Header,
14629		}
14630	}
14631	if err != nil {
14632		return nil, err
14633	}
14634	defer googleapi.CloseBody(res)
14635	if err := googleapi.CheckResponse(res); err != nil {
14636		return nil, err
14637	}
14638	ret := &AccountPermissionsListResponse{
14639		ServerResponse: googleapi.ServerResponse{
14640			Header:         res.Header,
14641			HTTPStatusCode: res.StatusCode,
14642		},
14643	}
14644	target := &ret
14645	if err := gensupport.DecodeResponse(target, res); err != nil {
14646		return nil, err
14647	}
14648	return ret, nil
14649	// {
14650	//   "description": "Retrieves the list of account permissions.",
14651	//   "httpMethod": "GET",
14652	//   "id": "dfareporting.accountPermissions.list",
14653	//   "parameterOrder": [
14654	//     "profileId"
14655	//   ],
14656	//   "parameters": {
14657	//     "profileId": {
14658	//       "description": "User profile ID associated with this request.",
14659	//       "format": "int64",
14660	//       "location": "path",
14661	//       "required": true,
14662	//       "type": "string"
14663	//     }
14664	//   },
14665	//   "path": "userprofiles/{profileId}/accountPermissions",
14666	//   "response": {
14667	//     "$ref": "AccountPermissionsListResponse"
14668	//   },
14669	//   "scopes": [
14670	//     "https://www.googleapis.com/auth/dfatrafficking"
14671	//   ]
14672	// }
14673
14674}
14675
14676// method id "dfareporting.accountUserProfiles.get":
14677
14678type AccountUserProfilesGetCall struct {
14679	s            *Service
14680	profileId    int64
14681	id           int64
14682	urlParams_   gensupport.URLParams
14683	ifNoneMatch_ string
14684	ctx_         context.Context
14685	header_      http.Header
14686}
14687
14688// Get: Gets one account user profile by ID.
14689func (r *AccountUserProfilesService) Get(profileId int64, id int64) *AccountUserProfilesGetCall {
14690	c := &AccountUserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14691	c.profileId = profileId
14692	c.id = id
14693	return c
14694}
14695
14696// Fields allows partial responses to be retrieved. See
14697// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14698// for more information.
14699func (c *AccountUserProfilesGetCall) Fields(s ...googleapi.Field) *AccountUserProfilesGetCall {
14700	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14701	return c
14702}
14703
14704// IfNoneMatch sets the optional parameter which makes the operation
14705// fail if the object's ETag matches the given value. This is useful for
14706// getting updates only after the object has changed since the last
14707// request. Use googleapi.IsNotModified to check whether the response
14708// error from Do is the result of In-None-Match.
14709func (c *AccountUserProfilesGetCall) IfNoneMatch(entityTag string) *AccountUserProfilesGetCall {
14710	c.ifNoneMatch_ = entityTag
14711	return c
14712}
14713
14714// Context sets the context to be used in this call's Do method. Any
14715// pending HTTP request will be aborted if the provided context is
14716// canceled.
14717func (c *AccountUserProfilesGetCall) Context(ctx context.Context) *AccountUserProfilesGetCall {
14718	c.ctx_ = ctx
14719	return c
14720}
14721
14722// Header returns an http.Header that can be modified by the caller to
14723// add HTTP headers to the request.
14724func (c *AccountUserProfilesGetCall) Header() http.Header {
14725	if c.header_ == nil {
14726		c.header_ = make(http.Header)
14727	}
14728	return c.header_
14729}
14730
14731func (c *AccountUserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
14732	reqHeaders := make(http.Header)
14733	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
14734	for k, v := range c.header_ {
14735		reqHeaders[k] = v
14736	}
14737	reqHeaders.Set("User-Agent", c.s.userAgent())
14738	if c.ifNoneMatch_ != "" {
14739		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14740	}
14741	var body io.Reader = nil
14742	c.urlParams_.Set("alt", alt)
14743	c.urlParams_.Set("prettyPrint", "false")
14744	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles/{id}")
14745	urls += "?" + c.urlParams_.Encode()
14746	req, err := http.NewRequest("GET", urls, body)
14747	if err != nil {
14748		return nil, err
14749	}
14750	req.Header = reqHeaders
14751	googleapi.Expand(req.URL, map[string]string{
14752		"profileId": strconv.FormatInt(c.profileId, 10),
14753		"id":        strconv.FormatInt(c.id, 10),
14754	})
14755	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14756}
14757
14758// Do executes the "dfareporting.accountUserProfiles.get" call.
14759// Exactly one of *AccountUserProfile or error will be non-nil. Any
14760// non-2xx status code is an error. Response headers are in either
14761// *AccountUserProfile.ServerResponse.Header or (if a response was
14762// returned at all) in error.(*googleapi.Error).Header. Use
14763// googleapi.IsNotModified to check whether the returned error was
14764// because http.StatusNotModified was returned.
14765func (c *AccountUserProfilesGetCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
14766	gensupport.SetOptions(c.urlParams_, opts...)
14767	res, err := c.doRequest("json")
14768	if res != nil && res.StatusCode == http.StatusNotModified {
14769		if res.Body != nil {
14770			res.Body.Close()
14771		}
14772		return nil, &googleapi.Error{
14773			Code:   res.StatusCode,
14774			Header: res.Header,
14775		}
14776	}
14777	if err != nil {
14778		return nil, err
14779	}
14780	defer googleapi.CloseBody(res)
14781	if err := googleapi.CheckResponse(res); err != nil {
14782		return nil, err
14783	}
14784	ret := &AccountUserProfile{
14785		ServerResponse: googleapi.ServerResponse{
14786			Header:         res.Header,
14787			HTTPStatusCode: res.StatusCode,
14788		},
14789	}
14790	target := &ret
14791	if err := gensupport.DecodeResponse(target, res); err != nil {
14792		return nil, err
14793	}
14794	return ret, nil
14795	// {
14796	//   "description": "Gets one account user profile by ID.",
14797	//   "httpMethod": "GET",
14798	//   "id": "dfareporting.accountUserProfiles.get",
14799	//   "parameterOrder": [
14800	//     "profileId",
14801	//     "id"
14802	//   ],
14803	//   "parameters": {
14804	//     "id": {
14805	//       "description": "User profile ID.",
14806	//       "format": "int64",
14807	//       "location": "path",
14808	//       "required": true,
14809	//       "type": "string"
14810	//     },
14811	//     "profileId": {
14812	//       "description": "User profile ID associated with this request.",
14813	//       "format": "int64",
14814	//       "location": "path",
14815	//       "required": true,
14816	//       "type": "string"
14817	//     }
14818	//   },
14819	//   "path": "userprofiles/{profileId}/accountUserProfiles/{id}",
14820	//   "response": {
14821	//     "$ref": "AccountUserProfile"
14822	//   },
14823	//   "scopes": [
14824	//     "https://www.googleapis.com/auth/dfatrafficking"
14825	//   ]
14826	// }
14827
14828}
14829
14830// method id "dfareporting.accountUserProfiles.insert":
14831
14832type AccountUserProfilesInsertCall struct {
14833	s                  *Service
14834	profileId          int64
14835	accountuserprofile *AccountUserProfile
14836	urlParams_         gensupport.URLParams
14837	ctx_               context.Context
14838	header_            http.Header
14839}
14840
14841// Insert: Inserts a new account user profile.
14842func (r *AccountUserProfilesService) Insert(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesInsertCall {
14843	c := &AccountUserProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14844	c.profileId = profileId
14845	c.accountuserprofile = accountuserprofile
14846	return c
14847}
14848
14849// Fields allows partial responses to be retrieved. See
14850// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14851// for more information.
14852func (c *AccountUserProfilesInsertCall) Fields(s ...googleapi.Field) *AccountUserProfilesInsertCall {
14853	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14854	return c
14855}
14856
14857// Context sets the context to be used in this call's Do method. Any
14858// pending HTTP request will be aborted if the provided context is
14859// canceled.
14860func (c *AccountUserProfilesInsertCall) Context(ctx context.Context) *AccountUserProfilesInsertCall {
14861	c.ctx_ = ctx
14862	return c
14863}
14864
14865// Header returns an http.Header that can be modified by the caller to
14866// add HTTP headers to the request.
14867func (c *AccountUserProfilesInsertCall) Header() http.Header {
14868	if c.header_ == nil {
14869		c.header_ = make(http.Header)
14870	}
14871	return c.header_
14872}
14873
14874func (c *AccountUserProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
14875	reqHeaders := make(http.Header)
14876	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
14877	for k, v := range c.header_ {
14878		reqHeaders[k] = v
14879	}
14880	reqHeaders.Set("User-Agent", c.s.userAgent())
14881	var body io.Reader = nil
14882	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
14883	if err != nil {
14884		return nil, err
14885	}
14886	reqHeaders.Set("Content-Type", "application/json")
14887	c.urlParams_.Set("alt", alt)
14888	c.urlParams_.Set("prettyPrint", "false")
14889	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
14890	urls += "?" + c.urlParams_.Encode()
14891	req, err := http.NewRequest("POST", urls, body)
14892	if err != nil {
14893		return nil, err
14894	}
14895	req.Header = reqHeaders
14896	googleapi.Expand(req.URL, map[string]string{
14897		"profileId": strconv.FormatInt(c.profileId, 10),
14898	})
14899	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14900}
14901
14902// Do executes the "dfareporting.accountUserProfiles.insert" call.
14903// Exactly one of *AccountUserProfile or error will be non-nil. Any
14904// non-2xx status code is an error. Response headers are in either
14905// *AccountUserProfile.ServerResponse.Header or (if a response was
14906// returned at all) in error.(*googleapi.Error).Header. Use
14907// googleapi.IsNotModified to check whether the returned error was
14908// because http.StatusNotModified was returned.
14909func (c *AccountUserProfilesInsertCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
14910	gensupport.SetOptions(c.urlParams_, opts...)
14911	res, err := c.doRequest("json")
14912	if res != nil && res.StatusCode == http.StatusNotModified {
14913		if res.Body != nil {
14914			res.Body.Close()
14915		}
14916		return nil, &googleapi.Error{
14917			Code:   res.StatusCode,
14918			Header: res.Header,
14919		}
14920	}
14921	if err != nil {
14922		return nil, err
14923	}
14924	defer googleapi.CloseBody(res)
14925	if err := googleapi.CheckResponse(res); err != nil {
14926		return nil, err
14927	}
14928	ret := &AccountUserProfile{
14929		ServerResponse: googleapi.ServerResponse{
14930			Header:         res.Header,
14931			HTTPStatusCode: res.StatusCode,
14932		},
14933	}
14934	target := &ret
14935	if err := gensupport.DecodeResponse(target, res); err != nil {
14936		return nil, err
14937	}
14938	return ret, nil
14939	// {
14940	//   "description": "Inserts a new account user profile.",
14941	//   "httpMethod": "POST",
14942	//   "id": "dfareporting.accountUserProfiles.insert",
14943	//   "parameterOrder": [
14944	//     "profileId"
14945	//   ],
14946	//   "parameters": {
14947	//     "profileId": {
14948	//       "description": "User profile ID associated with this request.",
14949	//       "format": "int64",
14950	//       "location": "path",
14951	//       "required": true,
14952	//       "type": "string"
14953	//     }
14954	//   },
14955	//   "path": "userprofiles/{profileId}/accountUserProfiles",
14956	//   "request": {
14957	//     "$ref": "AccountUserProfile"
14958	//   },
14959	//   "response": {
14960	//     "$ref": "AccountUserProfile"
14961	//   },
14962	//   "scopes": [
14963	//     "https://www.googleapis.com/auth/dfatrafficking"
14964	//   ]
14965	// }
14966
14967}
14968
14969// method id "dfareporting.accountUserProfiles.list":
14970
14971type AccountUserProfilesListCall struct {
14972	s            *Service
14973	profileId    int64
14974	urlParams_   gensupport.URLParams
14975	ifNoneMatch_ string
14976	ctx_         context.Context
14977	header_      http.Header
14978}
14979
14980// List: Retrieves a list of account user profiles, possibly filtered.
14981// This method supports paging.
14982func (r *AccountUserProfilesService) List(profileId int64) *AccountUserProfilesListCall {
14983	c := &AccountUserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14984	c.profileId = profileId
14985	return c
14986}
14987
14988// Active sets the optional parameter "active": Select only active user
14989// profiles.
14990func (c *AccountUserProfilesListCall) Active(active bool) *AccountUserProfilesListCall {
14991	c.urlParams_.Set("active", fmt.Sprint(active))
14992	return c
14993}
14994
14995// Ids sets the optional parameter "ids": Select only user profiles with
14996// these IDs.
14997func (c *AccountUserProfilesListCall) Ids(ids ...int64) *AccountUserProfilesListCall {
14998	var ids_ []string
14999	for _, v := range ids {
15000		ids_ = append(ids_, fmt.Sprint(v))
15001	}
15002	c.urlParams_.SetMulti("ids", ids_)
15003	return c
15004}
15005
15006// MaxResults sets the optional parameter "maxResults": Maximum number
15007// of results to return.
15008func (c *AccountUserProfilesListCall) MaxResults(maxResults int64) *AccountUserProfilesListCall {
15009	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15010	return c
15011}
15012
15013// PageToken sets the optional parameter "pageToken": Value of the
15014// nextPageToken from the previous result page.
15015func (c *AccountUserProfilesListCall) PageToken(pageToken string) *AccountUserProfilesListCall {
15016	c.urlParams_.Set("pageToken", pageToken)
15017	return c
15018}
15019
15020// SearchString sets the optional parameter "searchString": Allows
15021// searching for objects by name, ID or email. Wildcards (*) are
15022// allowed. For example, "user profile*2015" will return objects with
15023// names like "user profile June 2015", "user profile April 2015", or
15024// simply "user profile 2015". Most of the searches also add wildcards
15025// implicitly at the start and the end of the search string. For
15026// example, a search string of "user profile" will match objects with
15027// name "my user profile", "user profile 2015", or simply "user
15028// profile".
15029func (c *AccountUserProfilesListCall) SearchString(searchString string) *AccountUserProfilesListCall {
15030	c.urlParams_.Set("searchString", searchString)
15031	return c
15032}
15033
15034// SortField sets the optional parameter "sortField": Field by which to
15035// sort the list.
15036//
15037// Possible values:
15038//   "ID" (default)
15039//   "NAME"
15040func (c *AccountUserProfilesListCall) SortField(sortField string) *AccountUserProfilesListCall {
15041	c.urlParams_.Set("sortField", sortField)
15042	return c
15043}
15044
15045// SortOrder sets the optional parameter "sortOrder": Order of sorted
15046// results.
15047//
15048// Possible values:
15049//   "ASCENDING" (default)
15050//   "DESCENDING"
15051func (c *AccountUserProfilesListCall) SortOrder(sortOrder string) *AccountUserProfilesListCall {
15052	c.urlParams_.Set("sortOrder", sortOrder)
15053	return c
15054}
15055
15056// SubaccountId sets the optional parameter "subaccountId": Select only
15057// user profiles with the specified subaccount ID.
15058func (c *AccountUserProfilesListCall) SubaccountId(subaccountId int64) *AccountUserProfilesListCall {
15059	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
15060	return c
15061}
15062
15063// UserRoleId sets the optional parameter "userRoleId": Select only user
15064// profiles with the specified user role ID.
15065func (c *AccountUserProfilesListCall) UserRoleId(userRoleId int64) *AccountUserProfilesListCall {
15066	c.urlParams_.Set("userRoleId", fmt.Sprint(userRoleId))
15067	return c
15068}
15069
15070// Fields allows partial responses to be retrieved. See
15071// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15072// for more information.
15073func (c *AccountUserProfilesListCall) Fields(s ...googleapi.Field) *AccountUserProfilesListCall {
15074	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15075	return c
15076}
15077
15078// IfNoneMatch sets the optional parameter which makes the operation
15079// fail if the object's ETag matches the given value. This is useful for
15080// getting updates only after the object has changed since the last
15081// request. Use googleapi.IsNotModified to check whether the response
15082// error from Do is the result of In-None-Match.
15083func (c *AccountUserProfilesListCall) IfNoneMatch(entityTag string) *AccountUserProfilesListCall {
15084	c.ifNoneMatch_ = entityTag
15085	return c
15086}
15087
15088// Context sets the context to be used in this call's Do method. Any
15089// pending HTTP request will be aborted if the provided context is
15090// canceled.
15091func (c *AccountUserProfilesListCall) Context(ctx context.Context) *AccountUserProfilesListCall {
15092	c.ctx_ = ctx
15093	return c
15094}
15095
15096// Header returns an http.Header that can be modified by the caller to
15097// add HTTP headers to the request.
15098func (c *AccountUserProfilesListCall) Header() http.Header {
15099	if c.header_ == nil {
15100		c.header_ = make(http.Header)
15101	}
15102	return c.header_
15103}
15104
15105func (c *AccountUserProfilesListCall) doRequest(alt string) (*http.Response, error) {
15106	reqHeaders := make(http.Header)
15107	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
15108	for k, v := range c.header_ {
15109		reqHeaders[k] = v
15110	}
15111	reqHeaders.Set("User-Agent", c.s.userAgent())
15112	if c.ifNoneMatch_ != "" {
15113		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15114	}
15115	var body io.Reader = nil
15116	c.urlParams_.Set("alt", alt)
15117	c.urlParams_.Set("prettyPrint", "false")
15118	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15119	urls += "?" + c.urlParams_.Encode()
15120	req, err := http.NewRequest("GET", urls, body)
15121	if err != nil {
15122		return nil, err
15123	}
15124	req.Header = reqHeaders
15125	googleapi.Expand(req.URL, map[string]string{
15126		"profileId": strconv.FormatInt(c.profileId, 10),
15127	})
15128	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15129}
15130
15131// Do executes the "dfareporting.accountUserProfiles.list" call.
15132// Exactly one of *AccountUserProfilesListResponse or error will be
15133// non-nil. Any non-2xx status code is an error. Response headers are in
15134// either *AccountUserProfilesListResponse.ServerResponse.Header or (if
15135// a response was returned at all) in error.(*googleapi.Error).Header.
15136// Use googleapi.IsNotModified to check whether the returned error was
15137// because http.StatusNotModified was returned.
15138func (c *AccountUserProfilesListCall) Do(opts ...googleapi.CallOption) (*AccountUserProfilesListResponse, error) {
15139	gensupport.SetOptions(c.urlParams_, opts...)
15140	res, err := c.doRequest("json")
15141	if res != nil && res.StatusCode == http.StatusNotModified {
15142		if res.Body != nil {
15143			res.Body.Close()
15144		}
15145		return nil, &googleapi.Error{
15146			Code:   res.StatusCode,
15147			Header: res.Header,
15148		}
15149	}
15150	if err != nil {
15151		return nil, err
15152	}
15153	defer googleapi.CloseBody(res)
15154	if err := googleapi.CheckResponse(res); err != nil {
15155		return nil, err
15156	}
15157	ret := &AccountUserProfilesListResponse{
15158		ServerResponse: googleapi.ServerResponse{
15159			Header:         res.Header,
15160			HTTPStatusCode: res.StatusCode,
15161		},
15162	}
15163	target := &ret
15164	if err := gensupport.DecodeResponse(target, res); err != nil {
15165		return nil, err
15166	}
15167	return ret, nil
15168	// {
15169	//   "description": "Retrieves a list of account user profiles, possibly filtered. This method supports paging.",
15170	//   "httpMethod": "GET",
15171	//   "id": "dfareporting.accountUserProfiles.list",
15172	//   "parameterOrder": [
15173	//     "profileId"
15174	//   ],
15175	//   "parameters": {
15176	//     "active": {
15177	//       "description": "Select only active user profiles.",
15178	//       "location": "query",
15179	//       "type": "boolean"
15180	//     },
15181	//     "ids": {
15182	//       "description": "Select only user profiles with these IDs.",
15183	//       "format": "int64",
15184	//       "location": "query",
15185	//       "repeated": true,
15186	//       "type": "string"
15187	//     },
15188	//     "maxResults": {
15189	//       "default": "1000",
15190	//       "description": "Maximum number of results to return.",
15191	//       "format": "int32",
15192	//       "location": "query",
15193	//       "maximum": "1000",
15194	//       "minimum": "0",
15195	//       "type": "integer"
15196	//     },
15197	//     "pageToken": {
15198	//       "description": "Value of the nextPageToken from the previous result page.",
15199	//       "location": "query",
15200	//       "type": "string"
15201	//     },
15202	//     "profileId": {
15203	//       "description": "User profile ID associated with this request.",
15204	//       "format": "int64",
15205	//       "location": "path",
15206	//       "required": true,
15207	//       "type": "string"
15208	//     },
15209	//     "searchString": {
15210	//       "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\".",
15211	//       "location": "query",
15212	//       "type": "string"
15213	//     },
15214	//     "sortField": {
15215	//       "default": "ID",
15216	//       "description": "Field by which to sort the list.",
15217	//       "enum": [
15218	//         "ID",
15219	//         "NAME"
15220	//       ],
15221	//       "enumDescriptions": [
15222	//         "",
15223	//         ""
15224	//       ],
15225	//       "location": "query",
15226	//       "type": "string"
15227	//     },
15228	//     "sortOrder": {
15229	//       "default": "ASCENDING",
15230	//       "description": "Order of sorted results.",
15231	//       "enum": [
15232	//         "ASCENDING",
15233	//         "DESCENDING"
15234	//       ],
15235	//       "enumDescriptions": [
15236	//         "",
15237	//         ""
15238	//       ],
15239	//       "location": "query",
15240	//       "type": "string"
15241	//     },
15242	//     "subaccountId": {
15243	//       "description": "Select only user profiles with the specified subaccount ID.",
15244	//       "format": "int64",
15245	//       "location": "query",
15246	//       "type": "string"
15247	//     },
15248	//     "userRoleId": {
15249	//       "description": "Select only user profiles with the specified user role ID.",
15250	//       "format": "int64",
15251	//       "location": "query",
15252	//       "type": "string"
15253	//     }
15254	//   },
15255	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15256	//   "response": {
15257	//     "$ref": "AccountUserProfilesListResponse"
15258	//   },
15259	//   "scopes": [
15260	//     "https://www.googleapis.com/auth/dfatrafficking"
15261	//   ]
15262	// }
15263
15264}
15265
15266// Pages invokes f for each page of results.
15267// A non-nil error returned from f will halt the iteration.
15268// The provided context supersedes any context provided to the Context method.
15269func (c *AccountUserProfilesListCall) Pages(ctx context.Context, f func(*AccountUserProfilesListResponse) error) error {
15270	c.ctx_ = ctx
15271	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15272	for {
15273		x, err := c.Do()
15274		if err != nil {
15275			return err
15276		}
15277		if err := f(x); err != nil {
15278			return err
15279		}
15280		if x.NextPageToken == "" {
15281			return nil
15282		}
15283		c.PageToken(x.NextPageToken)
15284	}
15285}
15286
15287// method id "dfareporting.accountUserProfiles.patch":
15288
15289type AccountUserProfilesPatchCall struct {
15290	s                  *Service
15291	profileId          int64
15292	accountuserprofile *AccountUserProfile
15293	urlParams_         gensupport.URLParams
15294	ctx_               context.Context
15295	header_            http.Header
15296}
15297
15298// Patch: Updates an existing account user profile. This method supports
15299// patch semantics.
15300func (r *AccountUserProfilesService) Patch(profileId int64, id int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesPatchCall {
15301	c := &AccountUserProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15302	c.profileId = profileId
15303	c.urlParams_.Set("id", fmt.Sprint(id))
15304	c.accountuserprofile = accountuserprofile
15305	return c
15306}
15307
15308// Fields allows partial responses to be retrieved. See
15309// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15310// for more information.
15311func (c *AccountUserProfilesPatchCall) Fields(s ...googleapi.Field) *AccountUserProfilesPatchCall {
15312	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15313	return c
15314}
15315
15316// Context sets the context to be used in this call's Do method. Any
15317// pending HTTP request will be aborted if the provided context is
15318// canceled.
15319func (c *AccountUserProfilesPatchCall) Context(ctx context.Context) *AccountUserProfilesPatchCall {
15320	c.ctx_ = ctx
15321	return c
15322}
15323
15324// Header returns an http.Header that can be modified by the caller to
15325// add HTTP headers to the request.
15326func (c *AccountUserProfilesPatchCall) Header() http.Header {
15327	if c.header_ == nil {
15328		c.header_ = make(http.Header)
15329	}
15330	return c.header_
15331}
15332
15333func (c *AccountUserProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
15334	reqHeaders := make(http.Header)
15335	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
15336	for k, v := range c.header_ {
15337		reqHeaders[k] = v
15338	}
15339	reqHeaders.Set("User-Agent", c.s.userAgent())
15340	var body io.Reader = nil
15341	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15342	if err != nil {
15343		return nil, err
15344	}
15345	reqHeaders.Set("Content-Type", "application/json")
15346	c.urlParams_.Set("alt", alt)
15347	c.urlParams_.Set("prettyPrint", "false")
15348	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15349	urls += "?" + c.urlParams_.Encode()
15350	req, err := http.NewRequest("PATCH", urls, body)
15351	if err != nil {
15352		return nil, err
15353	}
15354	req.Header = reqHeaders
15355	googleapi.Expand(req.URL, map[string]string{
15356		"profileId": strconv.FormatInt(c.profileId, 10),
15357	})
15358	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15359}
15360
15361// Do executes the "dfareporting.accountUserProfiles.patch" call.
15362// Exactly one of *AccountUserProfile or error will be non-nil. Any
15363// non-2xx status code is an error. Response headers are in either
15364// *AccountUserProfile.ServerResponse.Header or (if a response was
15365// returned at all) in error.(*googleapi.Error).Header. Use
15366// googleapi.IsNotModified to check whether the returned error was
15367// because http.StatusNotModified was returned.
15368func (c *AccountUserProfilesPatchCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15369	gensupport.SetOptions(c.urlParams_, opts...)
15370	res, err := c.doRequest("json")
15371	if res != nil && res.StatusCode == http.StatusNotModified {
15372		if res.Body != nil {
15373			res.Body.Close()
15374		}
15375		return nil, &googleapi.Error{
15376			Code:   res.StatusCode,
15377			Header: res.Header,
15378		}
15379	}
15380	if err != nil {
15381		return nil, err
15382	}
15383	defer googleapi.CloseBody(res)
15384	if err := googleapi.CheckResponse(res); err != nil {
15385		return nil, err
15386	}
15387	ret := &AccountUserProfile{
15388		ServerResponse: googleapi.ServerResponse{
15389			Header:         res.Header,
15390			HTTPStatusCode: res.StatusCode,
15391		},
15392	}
15393	target := &ret
15394	if err := gensupport.DecodeResponse(target, res); err != nil {
15395		return nil, err
15396	}
15397	return ret, nil
15398	// {
15399	//   "description": "Updates an existing account user profile. This method supports patch semantics.",
15400	//   "httpMethod": "PATCH",
15401	//   "id": "dfareporting.accountUserProfiles.patch",
15402	//   "parameterOrder": [
15403	//     "profileId",
15404	//     "id"
15405	//   ],
15406	//   "parameters": {
15407	//     "id": {
15408	//       "description": "User profile ID.",
15409	//       "format": "int64",
15410	//       "location": "query",
15411	//       "required": true,
15412	//       "type": "string"
15413	//     },
15414	//     "profileId": {
15415	//       "description": "User profile ID associated with this request.",
15416	//       "format": "int64",
15417	//       "location": "path",
15418	//       "required": true,
15419	//       "type": "string"
15420	//     }
15421	//   },
15422	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15423	//   "request": {
15424	//     "$ref": "AccountUserProfile"
15425	//   },
15426	//   "response": {
15427	//     "$ref": "AccountUserProfile"
15428	//   },
15429	//   "scopes": [
15430	//     "https://www.googleapis.com/auth/dfatrafficking"
15431	//   ]
15432	// }
15433
15434}
15435
15436// method id "dfareporting.accountUserProfiles.update":
15437
15438type AccountUserProfilesUpdateCall struct {
15439	s                  *Service
15440	profileId          int64
15441	accountuserprofile *AccountUserProfile
15442	urlParams_         gensupport.URLParams
15443	ctx_               context.Context
15444	header_            http.Header
15445}
15446
15447// Update: Updates an existing account user profile.
15448func (r *AccountUserProfilesService) Update(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesUpdateCall {
15449	c := &AccountUserProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15450	c.profileId = profileId
15451	c.accountuserprofile = accountuserprofile
15452	return c
15453}
15454
15455// Fields allows partial responses to be retrieved. See
15456// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15457// for more information.
15458func (c *AccountUserProfilesUpdateCall) Fields(s ...googleapi.Field) *AccountUserProfilesUpdateCall {
15459	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15460	return c
15461}
15462
15463// Context sets the context to be used in this call's Do method. Any
15464// pending HTTP request will be aborted if the provided context is
15465// canceled.
15466func (c *AccountUserProfilesUpdateCall) Context(ctx context.Context) *AccountUserProfilesUpdateCall {
15467	c.ctx_ = ctx
15468	return c
15469}
15470
15471// Header returns an http.Header that can be modified by the caller to
15472// add HTTP headers to the request.
15473func (c *AccountUserProfilesUpdateCall) Header() http.Header {
15474	if c.header_ == nil {
15475		c.header_ = make(http.Header)
15476	}
15477	return c.header_
15478}
15479
15480func (c *AccountUserProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
15481	reqHeaders := make(http.Header)
15482	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
15483	for k, v := range c.header_ {
15484		reqHeaders[k] = v
15485	}
15486	reqHeaders.Set("User-Agent", c.s.userAgent())
15487	var body io.Reader = nil
15488	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15489	if err != nil {
15490		return nil, err
15491	}
15492	reqHeaders.Set("Content-Type", "application/json")
15493	c.urlParams_.Set("alt", alt)
15494	c.urlParams_.Set("prettyPrint", "false")
15495	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15496	urls += "?" + c.urlParams_.Encode()
15497	req, err := http.NewRequest("PUT", urls, body)
15498	if err != nil {
15499		return nil, err
15500	}
15501	req.Header = reqHeaders
15502	googleapi.Expand(req.URL, map[string]string{
15503		"profileId": strconv.FormatInt(c.profileId, 10),
15504	})
15505	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15506}
15507
15508// Do executes the "dfareporting.accountUserProfiles.update" call.
15509// Exactly one of *AccountUserProfile or error will be non-nil. Any
15510// non-2xx status code is an error. Response headers are in either
15511// *AccountUserProfile.ServerResponse.Header or (if a response was
15512// returned at all) in error.(*googleapi.Error).Header. Use
15513// googleapi.IsNotModified to check whether the returned error was
15514// because http.StatusNotModified was returned.
15515func (c *AccountUserProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15516	gensupport.SetOptions(c.urlParams_, opts...)
15517	res, err := c.doRequest("json")
15518	if res != nil && res.StatusCode == http.StatusNotModified {
15519		if res.Body != nil {
15520			res.Body.Close()
15521		}
15522		return nil, &googleapi.Error{
15523			Code:   res.StatusCode,
15524			Header: res.Header,
15525		}
15526	}
15527	if err != nil {
15528		return nil, err
15529	}
15530	defer googleapi.CloseBody(res)
15531	if err := googleapi.CheckResponse(res); err != nil {
15532		return nil, err
15533	}
15534	ret := &AccountUserProfile{
15535		ServerResponse: googleapi.ServerResponse{
15536			Header:         res.Header,
15537			HTTPStatusCode: res.StatusCode,
15538		},
15539	}
15540	target := &ret
15541	if err := gensupport.DecodeResponse(target, res); err != nil {
15542		return nil, err
15543	}
15544	return ret, nil
15545	// {
15546	//   "description": "Updates an existing account user profile.",
15547	//   "httpMethod": "PUT",
15548	//   "id": "dfareporting.accountUserProfiles.update",
15549	//   "parameterOrder": [
15550	//     "profileId"
15551	//   ],
15552	//   "parameters": {
15553	//     "profileId": {
15554	//       "description": "User profile ID associated with this request.",
15555	//       "format": "int64",
15556	//       "location": "path",
15557	//       "required": true,
15558	//       "type": "string"
15559	//     }
15560	//   },
15561	//   "path": "userprofiles/{profileId}/accountUserProfiles",
15562	//   "request": {
15563	//     "$ref": "AccountUserProfile"
15564	//   },
15565	//   "response": {
15566	//     "$ref": "AccountUserProfile"
15567	//   },
15568	//   "scopes": [
15569	//     "https://www.googleapis.com/auth/dfatrafficking"
15570	//   ]
15571	// }
15572
15573}
15574
15575// method id "dfareporting.accounts.get":
15576
15577type AccountsGetCall struct {
15578	s            *Service
15579	profileId    int64
15580	id           int64
15581	urlParams_   gensupport.URLParams
15582	ifNoneMatch_ string
15583	ctx_         context.Context
15584	header_      http.Header
15585}
15586
15587// Get: Gets one account by ID.
15588func (r *AccountsService) Get(profileId int64, id int64) *AccountsGetCall {
15589	c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15590	c.profileId = profileId
15591	c.id = id
15592	return c
15593}
15594
15595// Fields allows partial responses to be retrieved. See
15596// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15597// for more information.
15598func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
15599	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15600	return c
15601}
15602
15603// IfNoneMatch sets the optional parameter which makes the operation
15604// fail if the object's ETag matches the given value. This is useful for
15605// getting updates only after the object has changed since the last
15606// request. Use googleapi.IsNotModified to check whether the response
15607// error from Do is the result of In-None-Match.
15608func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
15609	c.ifNoneMatch_ = entityTag
15610	return c
15611}
15612
15613// Context sets the context to be used in this call's Do method. Any
15614// pending HTTP request will be aborted if the provided context is
15615// canceled.
15616func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
15617	c.ctx_ = ctx
15618	return c
15619}
15620
15621// Header returns an http.Header that can be modified by the caller to
15622// add HTTP headers to the request.
15623func (c *AccountsGetCall) Header() http.Header {
15624	if c.header_ == nil {
15625		c.header_ = make(http.Header)
15626	}
15627	return c.header_
15628}
15629
15630func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
15631	reqHeaders := make(http.Header)
15632	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
15633	for k, v := range c.header_ {
15634		reqHeaders[k] = v
15635	}
15636	reqHeaders.Set("User-Agent", c.s.userAgent())
15637	if c.ifNoneMatch_ != "" {
15638		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15639	}
15640	var body io.Reader = nil
15641	c.urlParams_.Set("alt", alt)
15642	c.urlParams_.Set("prettyPrint", "false")
15643	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts/{id}")
15644	urls += "?" + c.urlParams_.Encode()
15645	req, err := http.NewRequest("GET", urls, body)
15646	if err != nil {
15647		return nil, err
15648	}
15649	req.Header = reqHeaders
15650	googleapi.Expand(req.URL, map[string]string{
15651		"profileId": strconv.FormatInt(c.profileId, 10),
15652		"id":        strconv.FormatInt(c.id, 10),
15653	})
15654	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15655}
15656
15657// Do executes the "dfareporting.accounts.get" call.
15658// Exactly one of *Account or error will be non-nil. Any non-2xx status
15659// code is an error. Response headers are in either
15660// *Account.ServerResponse.Header or (if a response was returned at all)
15661// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
15662// check whether the returned error was because http.StatusNotModified
15663// was returned.
15664func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) {
15665	gensupport.SetOptions(c.urlParams_, opts...)
15666	res, err := c.doRequest("json")
15667	if res != nil && res.StatusCode == http.StatusNotModified {
15668		if res.Body != nil {
15669			res.Body.Close()
15670		}
15671		return nil, &googleapi.Error{
15672			Code:   res.StatusCode,
15673			Header: res.Header,
15674		}
15675	}
15676	if err != nil {
15677		return nil, err
15678	}
15679	defer googleapi.CloseBody(res)
15680	if err := googleapi.CheckResponse(res); err != nil {
15681		return nil, err
15682	}
15683	ret := &Account{
15684		ServerResponse: googleapi.ServerResponse{
15685			Header:         res.Header,
15686			HTTPStatusCode: res.StatusCode,
15687		},
15688	}
15689	target := &ret
15690	if err := gensupport.DecodeResponse(target, res); err != nil {
15691		return nil, err
15692	}
15693	return ret, nil
15694	// {
15695	//   "description": "Gets one account by ID.",
15696	//   "httpMethod": "GET",
15697	//   "id": "dfareporting.accounts.get",
15698	//   "parameterOrder": [
15699	//     "profileId",
15700	//     "id"
15701	//   ],
15702	//   "parameters": {
15703	//     "id": {
15704	//       "description": "Account ID.",
15705	//       "format": "int64",
15706	//       "location": "path",
15707	//       "required": true,
15708	//       "type": "string"
15709	//     },
15710	//     "profileId": {
15711	//       "description": "User profile ID associated with this request.",
15712	//       "format": "int64",
15713	//       "location": "path",
15714	//       "required": true,
15715	//       "type": "string"
15716	//     }
15717	//   },
15718	//   "path": "userprofiles/{profileId}/accounts/{id}",
15719	//   "response": {
15720	//     "$ref": "Account"
15721	//   },
15722	//   "scopes": [
15723	//     "https://www.googleapis.com/auth/dfatrafficking"
15724	//   ]
15725	// }
15726
15727}
15728
15729// method id "dfareporting.accounts.list":
15730
15731type AccountsListCall struct {
15732	s            *Service
15733	profileId    int64
15734	urlParams_   gensupport.URLParams
15735	ifNoneMatch_ string
15736	ctx_         context.Context
15737	header_      http.Header
15738}
15739
15740// List: Retrieves the list of accounts, possibly filtered. This method
15741// supports paging.
15742func (r *AccountsService) List(profileId int64) *AccountsListCall {
15743	c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15744	c.profileId = profileId
15745	return c
15746}
15747
15748// Active sets the optional parameter "active": Select only active
15749// accounts. Don't set this field to select both active and non-active
15750// accounts.
15751func (c *AccountsListCall) Active(active bool) *AccountsListCall {
15752	c.urlParams_.Set("active", fmt.Sprint(active))
15753	return c
15754}
15755
15756// Ids sets the optional parameter "ids": Select only accounts with
15757// these IDs.
15758func (c *AccountsListCall) Ids(ids ...int64) *AccountsListCall {
15759	var ids_ []string
15760	for _, v := range ids {
15761		ids_ = append(ids_, fmt.Sprint(v))
15762	}
15763	c.urlParams_.SetMulti("ids", ids_)
15764	return c
15765}
15766
15767// MaxResults sets the optional parameter "maxResults": Maximum number
15768// of results to return.
15769func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall {
15770	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15771	return c
15772}
15773
15774// PageToken sets the optional parameter "pageToken": Value of the
15775// nextPageToken from the previous result page.
15776func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
15777	c.urlParams_.Set("pageToken", pageToken)
15778	return c
15779}
15780
15781// SearchString sets the optional parameter "searchString": Allows
15782// searching for objects by name or ID. Wildcards (*) are allowed. For
15783// example, "account*2015" will return objects with names like "account
15784// June 2015", "account April 2015", or simply "account 2015". Most of
15785// the searches also add wildcards implicitly at the start and the end
15786// of the search string. For example, a search string of "account" will
15787// match objects with name "my account", "account 2015", or simply
15788// "account".
15789func (c *AccountsListCall) SearchString(searchString string) *AccountsListCall {
15790	c.urlParams_.Set("searchString", searchString)
15791	return c
15792}
15793
15794// SortField sets the optional parameter "sortField": Field by which to
15795// sort the list.
15796//
15797// Possible values:
15798//   "ID" (default)
15799//   "NAME"
15800func (c *AccountsListCall) SortField(sortField string) *AccountsListCall {
15801	c.urlParams_.Set("sortField", sortField)
15802	return c
15803}
15804
15805// SortOrder sets the optional parameter "sortOrder": Order of sorted
15806// results.
15807//
15808// Possible values:
15809//   "ASCENDING" (default)
15810//   "DESCENDING"
15811func (c *AccountsListCall) SortOrder(sortOrder string) *AccountsListCall {
15812	c.urlParams_.Set("sortOrder", sortOrder)
15813	return c
15814}
15815
15816// Fields allows partial responses to be retrieved. See
15817// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15818// for more information.
15819func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
15820	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15821	return c
15822}
15823
15824// IfNoneMatch sets the optional parameter which makes the operation
15825// fail if the object's ETag matches the given value. This is useful for
15826// getting updates only after the object has changed since the last
15827// request. Use googleapi.IsNotModified to check whether the response
15828// error from Do is the result of In-None-Match.
15829func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
15830	c.ifNoneMatch_ = entityTag
15831	return c
15832}
15833
15834// Context sets the context to be used in this call's Do method. Any
15835// pending HTTP request will be aborted if the provided context is
15836// canceled.
15837func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
15838	c.ctx_ = ctx
15839	return c
15840}
15841
15842// Header returns an http.Header that can be modified by the caller to
15843// add HTTP headers to the request.
15844func (c *AccountsListCall) Header() http.Header {
15845	if c.header_ == nil {
15846		c.header_ = make(http.Header)
15847	}
15848	return c.header_
15849}
15850
15851func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
15852	reqHeaders := make(http.Header)
15853	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
15854	for k, v := range c.header_ {
15855		reqHeaders[k] = v
15856	}
15857	reqHeaders.Set("User-Agent", c.s.userAgent())
15858	if c.ifNoneMatch_ != "" {
15859		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15860	}
15861	var body io.Reader = nil
15862	c.urlParams_.Set("alt", alt)
15863	c.urlParams_.Set("prettyPrint", "false")
15864	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
15865	urls += "?" + c.urlParams_.Encode()
15866	req, err := http.NewRequest("GET", urls, body)
15867	if err != nil {
15868		return nil, err
15869	}
15870	req.Header = reqHeaders
15871	googleapi.Expand(req.URL, map[string]string{
15872		"profileId": strconv.FormatInt(c.profileId, 10),
15873	})
15874	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15875}
15876
15877// Do executes the "dfareporting.accounts.list" call.
15878// Exactly one of *AccountsListResponse or error will be non-nil. Any
15879// non-2xx status code is an error. Response headers are in either
15880// *AccountsListResponse.ServerResponse.Header or (if a response was
15881// returned at all) in error.(*googleapi.Error).Header. Use
15882// googleapi.IsNotModified to check whether the returned error was
15883// because http.StatusNotModified was returned.
15884func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) {
15885	gensupport.SetOptions(c.urlParams_, opts...)
15886	res, err := c.doRequest("json")
15887	if res != nil && res.StatusCode == http.StatusNotModified {
15888		if res.Body != nil {
15889			res.Body.Close()
15890		}
15891		return nil, &googleapi.Error{
15892			Code:   res.StatusCode,
15893			Header: res.Header,
15894		}
15895	}
15896	if err != nil {
15897		return nil, err
15898	}
15899	defer googleapi.CloseBody(res)
15900	if err := googleapi.CheckResponse(res); err != nil {
15901		return nil, err
15902	}
15903	ret := &AccountsListResponse{
15904		ServerResponse: googleapi.ServerResponse{
15905			Header:         res.Header,
15906			HTTPStatusCode: res.StatusCode,
15907		},
15908	}
15909	target := &ret
15910	if err := gensupport.DecodeResponse(target, res); err != nil {
15911		return nil, err
15912	}
15913	return ret, nil
15914	// {
15915	//   "description": "Retrieves the list of accounts, possibly filtered. This method supports paging.",
15916	//   "httpMethod": "GET",
15917	//   "id": "dfareporting.accounts.list",
15918	//   "parameterOrder": [
15919	//     "profileId"
15920	//   ],
15921	//   "parameters": {
15922	//     "active": {
15923	//       "description": "Select only active accounts. Don't set this field to select both active and non-active accounts.",
15924	//       "location": "query",
15925	//       "type": "boolean"
15926	//     },
15927	//     "ids": {
15928	//       "description": "Select only accounts with these IDs.",
15929	//       "format": "int64",
15930	//       "location": "query",
15931	//       "repeated": true,
15932	//       "type": "string"
15933	//     },
15934	//     "maxResults": {
15935	//       "default": "1000",
15936	//       "description": "Maximum number of results to return.",
15937	//       "format": "int32",
15938	//       "location": "query",
15939	//       "maximum": "1000",
15940	//       "minimum": "0",
15941	//       "type": "integer"
15942	//     },
15943	//     "pageToken": {
15944	//       "description": "Value of the nextPageToken from the previous result page.",
15945	//       "location": "query",
15946	//       "type": "string"
15947	//     },
15948	//     "profileId": {
15949	//       "description": "User profile ID associated with this request.",
15950	//       "format": "int64",
15951	//       "location": "path",
15952	//       "required": true,
15953	//       "type": "string"
15954	//     },
15955	//     "searchString": {
15956	//       "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\".",
15957	//       "location": "query",
15958	//       "type": "string"
15959	//     },
15960	//     "sortField": {
15961	//       "default": "ID",
15962	//       "description": "Field by which to sort the list.",
15963	//       "enum": [
15964	//         "ID",
15965	//         "NAME"
15966	//       ],
15967	//       "enumDescriptions": [
15968	//         "",
15969	//         ""
15970	//       ],
15971	//       "location": "query",
15972	//       "type": "string"
15973	//     },
15974	//     "sortOrder": {
15975	//       "default": "ASCENDING",
15976	//       "description": "Order of sorted results.",
15977	//       "enum": [
15978	//         "ASCENDING",
15979	//         "DESCENDING"
15980	//       ],
15981	//       "enumDescriptions": [
15982	//         "",
15983	//         ""
15984	//       ],
15985	//       "location": "query",
15986	//       "type": "string"
15987	//     }
15988	//   },
15989	//   "path": "userprofiles/{profileId}/accounts",
15990	//   "response": {
15991	//     "$ref": "AccountsListResponse"
15992	//   },
15993	//   "scopes": [
15994	//     "https://www.googleapis.com/auth/dfatrafficking"
15995	//   ]
15996	// }
15997
15998}
15999
16000// Pages invokes f for each page of results.
16001// A non-nil error returned from f will halt the iteration.
16002// The provided context supersedes any context provided to the Context method.
16003func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error {
16004	c.ctx_ = ctx
16005	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16006	for {
16007		x, err := c.Do()
16008		if err != nil {
16009			return err
16010		}
16011		if err := f(x); err != nil {
16012			return err
16013		}
16014		if x.NextPageToken == "" {
16015			return nil
16016		}
16017		c.PageToken(x.NextPageToken)
16018	}
16019}
16020
16021// method id "dfareporting.accounts.patch":
16022
16023type AccountsPatchCall struct {
16024	s          *Service
16025	profileId  int64
16026	account    *Account
16027	urlParams_ gensupport.URLParams
16028	ctx_       context.Context
16029	header_    http.Header
16030}
16031
16032// Patch: Updates an existing account. This method supports patch
16033// semantics.
16034func (r *AccountsService) Patch(profileId int64, id int64, account *Account) *AccountsPatchCall {
16035	c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16036	c.profileId = profileId
16037	c.urlParams_.Set("id", fmt.Sprint(id))
16038	c.account = account
16039	return c
16040}
16041
16042// Fields allows partial responses to be retrieved. See
16043// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16044// for more information.
16045func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall {
16046	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16047	return c
16048}
16049
16050// Context sets the context to be used in this call's Do method. Any
16051// pending HTTP request will be aborted if the provided context is
16052// canceled.
16053func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
16054	c.ctx_ = ctx
16055	return c
16056}
16057
16058// Header returns an http.Header that can be modified by the caller to
16059// add HTTP headers to the request.
16060func (c *AccountsPatchCall) Header() http.Header {
16061	if c.header_ == nil {
16062		c.header_ = make(http.Header)
16063	}
16064	return c.header_
16065}
16066
16067func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
16068	reqHeaders := make(http.Header)
16069	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
16070	for k, v := range c.header_ {
16071		reqHeaders[k] = v
16072	}
16073	reqHeaders.Set("User-Agent", c.s.userAgent())
16074	var body io.Reader = nil
16075	body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
16076	if err != nil {
16077		return nil, err
16078	}
16079	reqHeaders.Set("Content-Type", "application/json")
16080	c.urlParams_.Set("alt", alt)
16081	c.urlParams_.Set("prettyPrint", "false")
16082	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16083	urls += "?" + c.urlParams_.Encode()
16084	req, err := http.NewRequest("PATCH", urls, body)
16085	if err != nil {
16086		return nil, err
16087	}
16088	req.Header = reqHeaders
16089	googleapi.Expand(req.URL, map[string]string{
16090		"profileId": strconv.FormatInt(c.profileId, 10),
16091	})
16092	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16093}
16094
16095// Do executes the "dfareporting.accounts.patch" call.
16096// Exactly one of *Account or error will be non-nil. Any non-2xx status
16097// code is an error. Response headers are in either
16098// *Account.ServerResponse.Header or (if a response was returned at all)
16099// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16100// check whether the returned error was because http.StatusNotModified
16101// was returned.
16102func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error) {
16103	gensupport.SetOptions(c.urlParams_, opts...)
16104	res, err := c.doRequest("json")
16105	if res != nil && res.StatusCode == http.StatusNotModified {
16106		if res.Body != nil {
16107			res.Body.Close()
16108		}
16109		return nil, &googleapi.Error{
16110			Code:   res.StatusCode,
16111			Header: res.Header,
16112		}
16113	}
16114	if err != nil {
16115		return nil, err
16116	}
16117	defer googleapi.CloseBody(res)
16118	if err := googleapi.CheckResponse(res); err != nil {
16119		return nil, err
16120	}
16121	ret := &Account{
16122		ServerResponse: googleapi.ServerResponse{
16123			Header:         res.Header,
16124			HTTPStatusCode: res.StatusCode,
16125		},
16126	}
16127	target := &ret
16128	if err := gensupport.DecodeResponse(target, res); err != nil {
16129		return nil, err
16130	}
16131	return ret, nil
16132	// {
16133	//   "description": "Updates an existing account. This method supports patch semantics.",
16134	//   "httpMethod": "PATCH",
16135	//   "id": "dfareporting.accounts.patch",
16136	//   "parameterOrder": [
16137	//     "profileId",
16138	//     "id"
16139	//   ],
16140	//   "parameters": {
16141	//     "id": {
16142	//       "description": "Account ID.",
16143	//       "format": "int64",
16144	//       "location": "query",
16145	//       "required": true,
16146	//       "type": "string"
16147	//     },
16148	//     "profileId": {
16149	//       "description": "User profile ID associated with this request.",
16150	//       "format": "int64",
16151	//       "location": "path",
16152	//       "required": true,
16153	//       "type": "string"
16154	//     }
16155	//   },
16156	//   "path": "userprofiles/{profileId}/accounts",
16157	//   "request": {
16158	//     "$ref": "Account"
16159	//   },
16160	//   "response": {
16161	//     "$ref": "Account"
16162	//   },
16163	//   "scopes": [
16164	//     "https://www.googleapis.com/auth/dfatrafficking"
16165	//   ]
16166	// }
16167
16168}
16169
16170// method id "dfareporting.accounts.update":
16171
16172type AccountsUpdateCall struct {
16173	s          *Service
16174	profileId  int64
16175	account    *Account
16176	urlParams_ gensupport.URLParams
16177	ctx_       context.Context
16178	header_    http.Header
16179}
16180
16181// Update: Updates an existing account.
16182func (r *AccountsService) Update(profileId int64, account *Account) *AccountsUpdateCall {
16183	c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16184	c.profileId = profileId
16185	c.account = account
16186	return c
16187}
16188
16189// Fields allows partial responses to be retrieved. See
16190// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16191// for more information.
16192func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall {
16193	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16194	return c
16195}
16196
16197// Context sets the context to be used in this call's Do method. Any
16198// pending HTTP request will be aborted if the provided context is
16199// canceled.
16200func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
16201	c.ctx_ = ctx
16202	return c
16203}
16204
16205// Header returns an http.Header that can be modified by the caller to
16206// add HTTP headers to the request.
16207func (c *AccountsUpdateCall) Header() http.Header {
16208	if c.header_ == nil {
16209		c.header_ = make(http.Header)
16210	}
16211	return c.header_
16212}
16213
16214func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
16215	reqHeaders := make(http.Header)
16216	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
16217	for k, v := range c.header_ {
16218		reqHeaders[k] = v
16219	}
16220	reqHeaders.Set("User-Agent", c.s.userAgent())
16221	var body io.Reader = nil
16222	body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
16223	if err != nil {
16224		return nil, err
16225	}
16226	reqHeaders.Set("Content-Type", "application/json")
16227	c.urlParams_.Set("alt", alt)
16228	c.urlParams_.Set("prettyPrint", "false")
16229	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16230	urls += "?" + c.urlParams_.Encode()
16231	req, err := http.NewRequest("PUT", urls, body)
16232	if err != nil {
16233		return nil, err
16234	}
16235	req.Header = reqHeaders
16236	googleapi.Expand(req.URL, map[string]string{
16237		"profileId": strconv.FormatInt(c.profileId, 10),
16238	})
16239	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16240}
16241
16242// Do executes the "dfareporting.accounts.update" call.
16243// Exactly one of *Account or error will be non-nil. Any non-2xx status
16244// code is an error. Response headers are in either
16245// *Account.ServerResponse.Header or (if a response was returned at all)
16246// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16247// check whether the returned error was because http.StatusNotModified
16248// was returned.
16249func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) {
16250	gensupport.SetOptions(c.urlParams_, opts...)
16251	res, err := c.doRequest("json")
16252	if res != nil && res.StatusCode == http.StatusNotModified {
16253		if res.Body != nil {
16254			res.Body.Close()
16255		}
16256		return nil, &googleapi.Error{
16257			Code:   res.StatusCode,
16258			Header: res.Header,
16259		}
16260	}
16261	if err != nil {
16262		return nil, err
16263	}
16264	defer googleapi.CloseBody(res)
16265	if err := googleapi.CheckResponse(res); err != nil {
16266		return nil, err
16267	}
16268	ret := &Account{
16269		ServerResponse: googleapi.ServerResponse{
16270			Header:         res.Header,
16271			HTTPStatusCode: res.StatusCode,
16272		},
16273	}
16274	target := &ret
16275	if err := gensupport.DecodeResponse(target, res); err != nil {
16276		return nil, err
16277	}
16278	return ret, nil
16279	// {
16280	//   "description": "Updates an existing account.",
16281	//   "httpMethod": "PUT",
16282	//   "id": "dfareporting.accounts.update",
16283	//   "parameterOrder": [
16284	//     "profileId"
16285	//   ],
16286	//   "parameters": {
16287	//     "profileId": {
16288	//       "description": "User profile ID associated with this request.",
16289	//       "format": "int64",
16290	//       "location": "path",
16291	//       "required": true,
16292	//       "type": "string"
16293	//     }
16294	//   },
16295	//   "path": "userprofiles/{profileId}/accounts",
16296	//   "request": {
16297	//     "$ref": "Account"
16298	//   },
16299	//   "response": {
16300	//     "$ref": "Account"
16301	//   },
16302	//   "scopes": [
16303	//     "https://www.googleapis.com/auth/dfatrafficking"
16304	//   ]
16305	// }
16306
16307}
16308
16309// method id "dfareporting.ads.get":
16310
16311type AdsGetCall struct {
16312	s            *Service
16313	profileId    int64
16314	id           int64
16315	urlParams_   gensupport.URLParams
16316	ifNoneMatch_ string
16317	ctx_         context.Context
16318	header_      http.Header
16319}
16320
16321// Get: Gets one ad by ID.
16322func (r *AdsService) Get(profileId int64, id int64) *AdsGetCall {
16323	c := &AdsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16324	c.profileId = profileId
16325	c.id = id
16326	return c
16327}
16328
16329// Fields allows partial responses to be retrieved. See
16330// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16331// for more information.
16332func (c *AdsGetCall) Fields(s ...googleapi.Field) *AdsGetCall {
16333	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16334	return c
16335}
16336
16337// IfNoneMatch sets the optional parameter which makes the operation
16338// fail if the object's ETag matches the given value. This is useful for
16339// getting updates only after the object has changed since the last
16340// request. Use googleapi.IsNotModified to check whether the response
16341// error from Do is the result of In-None-Match.
16342func (c *AdsGetCall) IfNoneMatch(entityTag string) *AdsGetCall {
16343	c.ifNoneMatch_ = entityTag
16344	return c
16345}
16346
16347// Context sets the context to be used in this call's Do method. Any
16348// pending HTTP request will be aborted if the provided context is
16349// canceled.
16350func (c *AdsGetCall) Context(ctx context.Context) *AdsGetCall {
16351	c.ctx_ = ctx
16352	return c
16353}
16354
16355// Header returns an http.Header that can be modified by the caller to
16356// add HTTP headers to the request.
16357func (c *AdsGetCall) Header() http.Header {
16358	if c.header_ == nil {
16359		c.header_ = make(http.Header)
16360	}
16361	return c.header_
16362}
16363
16364func (c *AdsGetCall) doRequest(alt string) (*http.Response, error) {
16365	reqHeaders := make(http.Header)
16366	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
16367	for k, v := range c.header_ {
16368		reqHeaders[k] = v
16369	}
16370	reqHeaders.Set("User-Agent", c.s.userAgent())
16371	if c.ifNoneMatch_ != "" {
16372		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16373	}
16374	var body io.Reader = nil
16375	c.urlParams_.Set("alt", alt)
16376	c.urlParams_.Set("prettyPrint", "false")
16377	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads/{id}")
16378	urls += "?" + c.urlParams_.Encode()
16379	req, err := http.NewRequest("GET", urls, body)
16380	if err != nil {
16381		return nil, err
16382	}
16383	req.Header = reqHeaders
16384	googleapi.Expand(req.URL, map[string]string{
16385		"profileId": strconv.FormatInt(c.profileId, 10),
16386		"id":        strconv.FormatInt(c.id, 10),
16387	})
16388	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16389}
16390
16391// Do executes the "dfareporting.ads.get" call.
16392// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
16393// is an error. Response headers are in either *Ad.ServerResponse.Header
16394// or (if a response was returned at all) in
16395// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16396// whether the returned error was because http.StatusNotModified was
16397// returned.
16398func (c *AdsGetCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
16399	gensupport.SetOptions(c.urlParams_, opts...)
16400	res, err := c.doRequest("json")
16401	if res != nil && res.StatusCode == http.StatusNotModified {
16402		if res.Body != nil {
16403			res.Body.Close()
16404		}
16405		return nil, &googleapi.Error{
16406			Code:   res.StatusCode,
16407			Header: res.Header,
16408		}
16409	}
16410	if err != nil {
16411		return nil, err
16412	}
16413	defer googleapi.CloseBody(res)
16414	if err := googleapi.CheckResponse(res); err != nil {
16415		return nil, err
16416	}
16417	ret := &Ad{
16418		ServerResponse: googleapi.ServerResponse{
16419			Header:         res.Header,
16420			HTTPStatusCode: res.StatusCode,
16421		},
16422	}
16423	target := &ret
16424	if err := gensupport.DecodeResponse(target, res); err != nil {
16425		return nil, err
16426	}
16427	return ret, nil
16428	// {
16429	//   "description": "Gets one ad by ID.",
16430	//   "httpMethod": "GET",
16431	//   "id": "dfareporting.ads.get",
16432	//   "parameterOrder": [
16433	//     "profileId",
16434	//     "id"
16435	//   ],
16436	//   "parameters": {
16437	//     "id": {
16438	//       "description": "Ad ID.",
16439	//       "format": "int64",
16440	//       "location": "path",
16441	//       "required": true,
16442	//       "type": "string"
16443	//     },
16444	//     "profileId": {
16445	//       "description": "User profile ID associated with this request.",
16446	//       "format": "int64",
16447	//       "location": "path",
16448	//       "required": true,
16449	//       "type": "string"
16450	//     }
16451	//   },
16452	//   "path": "userprofiles/{profileId}/ads/{id}",
16453	//   "response": {
16454	//     "$ref": "Ad"
16455	//   },
16456	//   "scopes": [
16457	//     "https://www.googleapis.com/auth/dfatrafficking"
16458	//   ]
16459	// }
16460
16461}
16462
16463// method id "dfareporting.ads.insert":
16464
16465type AdsInsertCall struct {
16466	s          *Service
16467	profileId  int64
16468	ad         *Ad
16469	urlParams_ gensupport.URLParams
16470	ctx_       context.Context
16471	header_    http.Header
16472}
16473
16474// Insert: Inserts a new ad.
16475func (r *AdsService) Insert(profileId int64, ad *Ad) *AdsInsertCall {
16476	c := &AdsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16477	c.profileId = profileId
16478	c.ad = ad
16479	return c
16480}
16481
16482// Fields allows partial responses to be retrieved. See
16483// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16484// for more information.
16485func (c *AdsInsertCall) Fields(s ...googleapi.Field) *AdsInsertCall {
16486	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16487	return c
16488}
16489
16490// Context sets the context to be used in this call's Do method. Any
16491// pending HTTP request will be aborted if the provided context is
16492// canceled.
16493func (c *AdsInsertCall) Context(ctx context.Context) *AdsInsertCall {
16494	c.ctx_ = ctx
16495	return c
16496}
16497
16498// Header returns an http.Header that can be modified by the caller to
16499// add HTTP headers to the request.
16500func (c *AdsInsertCall) Header() http.Header {
16501	if c.header_ == nil {
16502		c.header_ = make(http.Header)
16503	}
16504	return c.header_
16505}
16506
16507func (c *AdsInsertCall) doRequest(alt string) (*http.Response, error) {
16508	reqHeaders := make(http.Header)
16509	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
16510	for k, v := range c.header_ {
16511		reqHeaders[k] = v
16512	}
16513	reqHeaders.Set("User-Agent", c.s.userAgent())
16514	var body io.Reader = nil
16515	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
16516	if err != nil {
16517		return nil, err
16518	}
16519	reqHeaders.Set("Content-Type", "application/json")
16520	c.urlParams_.Set("alt", alt)
16521	c.urlParams_.Set("prettyPrint", "false")
16522	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
16523	urls += "?" + c.urlParams_.Encode()
16524	req, err := http.NewRequest("POST", urls, body)
16525	if err != nil {
16526		return nil, err
16527	}
16528	req.Header = reqHeaders
16529	googleapi.Expand(req.URL, map[string]string{
16530		"profileId": strconv.FormatInt(c.profileId, 10),
16531	})
16532	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16533}
16534
16535// Do executes the "dfareporting.ads.insert" call.
16536// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
16537// is an error. Response headers are in either *Ad.ServerResponse.Header
16538// or (if a response was returned at all) in
16539// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16540// whether the returned error was because http.StatusNotModified was
16541// returned.
16542func (c *AdsInsertCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
16543	gensupport.SetOptions(c.urlParams_, opts...)
16544	res, err := c.doRequest("json")
16545	if res != nil && res.StatusCode == http.StatusNotModified {
16546		if res.Body != nil {
16547			res.Body.Close()
16548		}
16549		return nil, &googleapi.Error{
16550			Code:   res.StatusCode,
16551			Header: res.Header,
16552		}
16553	}
16554	if err != nil {
16555		return nil, err
16556	}
16557	defer googleapi.CloseBody(res)
16558	if err := googleapi.CheckResponse(res); err != nil {
16559		return nil, err
16560	}
16561	ret := &Ad{
16562		ServerResponse: googleapi.ServerResponse{
16563			Header:         res.Header,
16564			HTTPStatusCode: res.StatusCode,
16565		},
16566	}
16567	target := &ret
16568	if err := gensupport.DecodeResponse(target, res); err != nil {
16569		return nil, err
16570	}
16571	return ret, nil
16572	// {
16573	//   "description": "Inserts a new ad.",
16574	//   "httpMethod": "POST",
16575	//   "id": "dfareporting.ads.insert",
16576	//   "parameterOrder": [
16577	//     "profileId"
16578	//   ],
16579	//   "parameters": {
16580	//     "profileId": {
16581	//       "description": "User profile ID associated with this request.",
16582	//       "format": "int64",
16583	//       "location": "path",
16584	//       "required": true,
16585	//       "type": "string"
16586	//     }
16587	//   },
16588	//   "path": "userprofiles/{profileId}/ads",
16589	//   "request": {
16590	//     "$ref": "Ad"
16591	//   },
16592	//   "response": {
16593	//     "$ref": "Ad"
16594	//   },
16595	//   "scopes": [
16596	//     "https://www.googleapis.com/auth/dfatrafficking"
16597	//   ]
16598	// }
16599
16600}
16601
16602// method id "dfareporting.ads.list":
16603
16604type AdsListCall struct {
16605	s            *Service
16606	profileId    int64
16607	urlParams_   gensupport.URLParams
16608	ifNoneMatch_ string
16609	ctx_         context.Context
16610	header_      http.Header
16611}
16612
16613// List: Retrieves a list of ads, possibly filtered. This method
16614// supports paging.
16615func (r *AdsService) List(profileId int64) *AdsListCall {
16616	c := &AdsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16617	c.profileId = profileId
16618	return c
16619}
16620
16621// Active sets the optional parameter "active": Select only active ads.
16622func (c *AdsListCall) Active(active bool) *AdsListCall {
16623	c.urlParams_.Set("active", fmt.Sprint(active))
16624	return c
16625}
16626
16627// AdvertiserId sets the optional parameter "advertiserId": Select only
16628// ads with this advertiser ID.
16629func (c *AdsListCall) AdvertiserId(advertiserId int64) *AdsListCall {
16630	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
16631	return c
16632}
16633
16634// Archived sets the optional parameter "archived": Select only archived
16635// ads.
16636func (c *AdsListCall) Archived(archived bool) *AdsListCall {
16637	c.urlParams_.Set("archived", fmt.Sprint(archived))
16638	return c
16639}
16640
16641// AudienceSegmentIds sets the optional parameter "audienceSegmentIds":
16642// Select only ads with these audience segment IDs.
16643func (c *AdsListCall) AudienceSegmentIds(audienceSegmentIds ...int64) *AdsListCall {
16644	var audienceSegmentIds_ []string
16645	for _, v := range audienceSegmentIds {
16646		audienceSegmentIds_ = append(audienceSegmentIds_, fmt.Sprint(v))
16647	}
16648	c.urlParams_.SetMulti("audienceSegmentIds", audienceSegmentIds_)
16649	return c
16650}
16651
16652// CampaignIds sets the optional parameter "campaignIds": Select only
16653// ads with these campaign IDs.
16654func (c *AdsListCall) CampaignIds(campaignIds ...int64) *AdsListCall {
16655	var campaignIds_ []string
16656	for _, v := range campaignIds {
16657		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
16658	}
16659	c.urlParams_.SetMulti("campaignIds", campaignIds_)
16660	return c
16661}
16662
16663// Compatibility sets the optional parameter "compatibility": Select
16664// default ads with the specified compatibility. Applicable when type is
16665// AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to
16666// rendering either on desktop or on mobile devices for regular or
16667// interstitial ads, respectively. APP and APP_INTERSTITIAL are for
16668// rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an
16669// in-stream video ads developed with the VAST standard.
16670//
16671// Possible values:
16672//   "APP"
16673//   "APP_INTERSTITIAL"
16674//   "DISPLAY"
16675//   "DISPLAY_INTERSTITIAL"
16676//   "IN_STREAM_AUDIO"
16677//   "IN_STREAM_VIDEO"
16678func (c *AdsListCall) Compatibility(compatibility string) *AdsListCall {
16679	c.urlParams_.Set("compatibility", compatibility)
16680	return c
16681}
16682
16683// CreativeIds sets the optional parameter "creativeIds": Select only
16684// ads with these creative IDs assigned.
16685func (c *AdsListCall) CreativeIds(creativeIds ...int64) *AdsListCall {
16686	var creativeIds_ []string
16687	for _, v := range creativeIds {
16688		creativeIds_ = append(creativeIds_, fmt.Sprint(v))
16689	}
16690	c.urlParams_.SetMulti("creativeIds", creativeIds_)
16691	return c
16692}
16693
16694// CreativeOptimizationConfigurationIds sets the optional parameter
16695// "creativeOptimizationConfigurationIds": Select only ads with these
16696// creative optimization configuration IDs.
16697func (c *AdsListCall) CreativeOptimizationConfigurationIds(creativeOptimizationConfigurationIds ...int64) *AdsListCall {
16698	var creativeOptimizationConfigurationIds_ []string
16699	for _, v := range creativeOptimizationConfigurationIds {
16700		creativeOptimizationConfigurationIds_ = append(creativeOptimizationConfigurationIds_, fmt.Sprint(v))
16701	}
16702	c.urlParams_.SetMulti("creativeOptimizationConfigurationIds", creativeOptimizationConfigurationIds_)
16703	return c
16704}
16705
16706// DynamicClickTracker sets the optional parameter
16707// "dynamicClickTracker": Select only dynamic click trackers. Applicable
16708// when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click
16709// trackers. If false, select static click trackers. Leave unset to
16710// select both.
16711func (c *AdsListCall) DynamicClickTracker(dynamicClickTracker bool) *AdsListCall {
16712	c.urlParams_.Set("dynamicClickTracker", fmt.Sprint(dynamicClickTracker))
16713	return c
16714}
16715
16716// Ids sets the optional parameter "ids": Select only ads with these
16717// IDs.
16718func (c *AdsListCall) Ids(ids ...int64) *AdsListCall {
16719	var ids_ []string
16720	for _, v := range ids {
16721		ids_ = append(ids_, fmt.Sprint(v))
16722	}
16723	c.urlParams_.SetMulti("ids", ids_)
16724	return c
16725}
16726
16727// LandingPageIds sets the optional parameter "landingPageIds": Select
16728// only ads with these landing page IDs.
16729func (c *AdsListCall) LandingPageIds(landingPageIds ...int64) *AdsListCall {
16730	var landingPageIds_ []string
16731	for _, v := range landingPageIds {
16732		landingPageIds_ = append(landingPageIds_, fmt.Sprint(v))
16733	}
16734	c.urlParams_.SetMulti("landingPageIds", landingPageIds_)
16735	return c
16736}
16737
16738// MaxResults sets the optional parameter "maxResults": Maximum number
16739// of results to return.
16740func (c *AdsListCall) MaxResults(maxResults int64) *AdsListCall {
16741	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16742	return c
16743}
16744
16745// OverriddenEventTagId sets the optional parameter
16746// "overriddenEventTagId": Select only ads with this event tag override
16747// ID.
16748func (c *AdsListCall) OverriddenEventTagId(overriddenEventTagId int64) *AdsListCall {
16749	c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
16750	return c
16751}
16752
16753// PageToken sets the optional parameter "pageToken": Value of the
16754// nextPageToken from the previous result page.
16755func (c *AdsListCall) PageToken(pageToken string) *AdsListCall {
16756	c.urlParams_.Set("pageToken", pageToken)
16757	return c
16758}
16759
16760// PlacementIds sets the optional parameter "placementIds": Select only
16761// ads with these placement IDs assigned.
16762func (c *AdsListCall) PlacementIds(placementIds ...int64) *AdsListCall {
16763	var placementIds_ []string
16764	for _, v := range placementIds {
16765		placementIds_ = append(placementIds_, fmt.Sprint(v))
16766	}
16767	c.urlParams_.SetMulti("placementIds", placementIds_)
16768	return c
16769}
16770
16771// RemarketingListIds sets the optional parameter "remarketingListIds":
16772// Select only ads whose list targeting expression use these remarketing
16773// list IDs.
16774func (c *AdsListCall) RemarketingListIds(remarketingListIds ...int64) *AdsListCall {
16775	var remarketingListIds_ []string
16776	for _, v := range remarketingListIds {
16777		remarketingListIds_ = append(remarketingListIds_, fmt.Sprint(v))
16778	}
16779	c.urlParams_.SetMulti("remarketingListIds", remarketingListIds_)
16780	return c
16781}
16782
16783// SearchString sets the optional parameter "searchString": Allows
16784// searching for objects by name or ID. Wildcards (*) are allowed. For
16785// example, "ad*2015" will return objects with names like "ad June
16786// 2015", "ad April 2015", or simply "ad 2015". Most of the searches
16787// also add wildcards implicitly at the start and the end of the search
16788// string. For example, a search string of "ad" will match objects with
16789// name "my ad", "ad 2015", or simply "ad".
16790func (c *AdsListCall) SearchString(searchString string) *AdsListCall {
16791	c.urlParams_.Set("searchString", searchString)
16792	return c
16793}
16794
16795// SizeIds sets the optional parameter "sizeIds": Select only ads with
16796// these size IDs.
16797func (c *AdsListCall) SizeIds(sizeIds ...int64) *AdsListCall {
16798	var sizeIds_ []string
16799	for _, v := range sizeIds {
16800		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
16801	}
16802	c.urlParams_.SetMulti("sizeIds", sizeIds_)
16803	return c
16804}
16805
16806// SortField sets the optional parameter "sortField": Field by which to
16807// sort the list.
16808//
16809// Possible values:
16810//   "ID" (default)
16811//   "NAME"
16812func (c *AdsListCall) SortField(sortField string) *AdsListCall {
16813	c.urlParams_.Set("sortField", sortField)
16814	return c
16815}
16816
16817// SortOrder sets the optional parameter "sortOrder": Order of sorted
16818// results.
16819//
16820// Possible values:
16821//   "ASCENDING" (default)
16822//   "DESCENDING"
16823func (c *AdsListCall) SortOrder(sortOrder string) *AdsListCall {
16824	c.urlParams_.Set("sortOrder", sortOrder)
16825	return c
16826}
16827
16828// SslCompliant sets the optional parameter "sslCompliant": Select only
16829// ads that are SSL-compliant.
16830func (c *AdsListCall) SslCompliant(sslCompliant bool) *AdsListCall {
16831	c.urlParams_.Set("sslCompliant", fmt.Sprint(sslCompliant))
16832	return c
16833}
16834
16835// SslRequired sets the optional parameter "sslRequired": Select only
16836// ads that require SSL.
16837func (c *AdsListCall) SslRequired(sslRequired bool) *AdsListCall {
16838	c.urlParams_.Set("sslRequired", fmt.Sprint(sslRequired))
16839	return c
16840}
16841
16842// Type sets the optional parameter "type": Select only ads with these
16843// types.
16844//
16845// Possible values:
16846//   "AD_SERVING_CLICK_TRACKER"
16847//   "AD_SERVING_DEFAULT_AD"
16848//   "AD_SERVING_STANDARD_AD"
16849//   "AD_SERVING_TRACKING"
16850func (c *AdsListCall) Type(type_ ...string) *AdsListCall {
16851	c.urlParams_.SetMulti("type", append([]string{}, type_...))
16852	return c
16853}
16854
16855// Fields allows partial responses to be retrieved. See
16856// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16857// for more information.
16858func (c *AdsListCall) Fields(s ...googleapi.Field) *AdsListCall {
16859	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16860	return c
16861}
16862
16863// IfNoneMatch sets the optional parameter which makes the operation
16864// fail if the object's ETag matches the given value. This is useful for
16865// getting updates only after the object has changed since the last
16866// request. Use googleapi.IsNotModified to check whether the response
16867// error from Do is the result of In-None-Match.
16868func (c *AdsListCall) IfNoneMatch(entityTag string) *AdsListCall {
16869	c.ifNoneMatch_ = entityTag
16870	return c
16871}
16872
16873// Context sets the context to be used in this call's Do method. Any
16874// pending HTTP request will be aborted if the provided context is
16875// canceled.
16876func (c *AdsListCall) Context(ctx context.Context) *AdsListCall {
16877	c.ctx_ = ctx
16878	return c
16879}
16880
16881// Header returns an http.Header that can be modified by the caller to
16882// add HTTP headers to the request.
16883func (c *AdsListCall) Header() http.Header {
16884	if c.header_ == nil {
16885		c.header_ = make(http.Header)
16886	}
16887	return c.header_
16888}
16889
16890func (c *AdsListCall) doRequest(alt string) (*http.Response, error) {
16891	reqHeaders := make(http.Header)
16892	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
16893	for k, v := range c.header_ {
16894		reqHeaders[k] = v
16895	}
16896	reqHeaders.Set("User-Agent", c.s.userAgent())
16897	if c.ifNoneMatch_ != "" {
16898		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16899	}
16900	var body io.Reader = nil
16901	c.urlParams_.Set("alt", alt)
16902	c.urlParams_.Set("prettyPrint", "false")
16903	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
16904	urls += "?" + c.urlParams_.Encode()
16905	req, err := http.NewRequest("GET", urls, body)
16906	if err != nil {
16907		return nil, err
16908	}
16909	req.Header = reqHeaders
16910	googleapi.Expand(req.URL, map[string]string{
16911		"profileId": strconv.FormatInt(c.profileId, 10),
16912	})
16913	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16914}
16915
16916// Do executes the "dfareporting.ads.list" call.
16917// Exactly one of *AdsListResponse or error will be non-nil. Any non-2xx
16918// status code is an error. Response headers are in either
16919// *AdsListResponse.ServerResponse.Header or (if a response was returned
16920// at all) in error.(*googleapi.Error).Header. Use
16921// googleapi.IsNotModified to check whether the returned error was
16922// because http.StatusNotModified was returned.
16923func (c *AdsListCall) Do(opts ...googleapi.CallOption) (*AdsListResponse, error) {
16924	gensupport.SetOptions(c.urlParams_, opts...)
16925	res, err := c.doRequest("json")
16926	if res != nil && res.StatusCode == http.StatusNotModified {
16927		if res.Body != nil {
16928			res.Body.Close()
16929		}
16930		return nil, &googleapi.Error{
16931			Code:   res.StatusCode,
16932			Header: res.Header,
16933		}
16934	}
16935	if err != nil {
16936		return nil, err
16937	}
16938	defer googleapi.CloseBody(res)
16939	if err := googleapi.CheckResponse(res); err != nil {
16940		return nil, err
16941	}
16942	ret := &AdsListResponse{
16943		ServerResponse: googleapi.ServerResponse{
16944			Header:         res.Header,
16945			HTTPStatusCode: res.StatusCode,
16946		},
16947	}
16948	target := &ret
16949	if err := gensupport.DecodeResponse(target, res); err != nil {
16950		return nil, err
16951	}
16952	return ret, nil
16953	// {
16954	//   "description": "Retrieves a list of ads, possibly filtered. This method supports paging.",
16955	//   "httpMethod": "GET",
16956	//   "id": "dfareporting.ads.list",
16957	//   "parameterOrder": [
16958	//     "profileId"
16959	//   ],
16960	//   "parameters": {
16961	//     "active": {
16962	//       "description": "Select only active ads.",
16963	//       "location": "query",
16964	//       "type": "boolean"
16965	//     },
16966	//     "advertiserId": {
16967	//       "description": "Select only ads with this advertiser ID.",
16968	//       "format": "int64",
16969	//       "location": "query",
16970	//       "type": "string"
16971	//     },
16972	//     "archived": {
16973	//       "description": "Select only archived ads.",
16974	//       "location": "query",
16975	//       "type": "boolean"
16976	//     },
16977	//     "audienceSegmentIds": {
16978	//       "description": "Select only ads with these audience segment IDs.",
16979	//       "format": "int64",
16980	//       "location": "query",
16981	//       "repeated": true,
16982	//       "type": "string"
16983	//     },
16984	//     "campaignIds": {
16985	//       "description": "Select only ads with these campaign IDs.",
16986	//       "format": "int64",
16987	//       "location": "query",
16988	//       "repeated": true,
16989	//       "type": "string"
16990	//     },
16991	//     "compatibility": {
16992	//       "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.",
16993	//       "enum": [
16994	//         "APP",
16995	//         "APP_INTERSTITIAL",
16996	//         "DISPLAY",
16997	//         "DISPLAY_INTERSTITIAL",
16998	//         "IN_STREAM_AUDIO",
16999	//         "IN_STREAM_VIDEO"
17000	//       ],
17001	//       "enumDescriptions": [
17002	//         "",
17003	//         "",
17004	//         "",
17005	//         "",
17006	//         "",
17007	//         ""
17008	//       ],
17009	//       "location": "query",
17010	//       "type": "string"
17011	//     },
17012	//     "creativeIds": {
17013	//       "description": "Select only ads with these creative IDs assigned.",
17014	//       "format": "int64",
17015	//       "location": "query",
17016	//       "repeated": true,
17017	//       "type": "string"
17018	//     },
17019	//     "creativeOptimizationConfigurationIds": {
17020	//       "description": "Select only ads with these creative optimization configuration IDs.",
17021	//       "format": "int64",
17022	//       "location": "query",
17023	//       "repeated": true,
17024	//       "type": "string"
17025	//     },
17026	//     "dynamicClickTracker": {
17027	//       "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.",
17028	//       "location": "query",
17029	//       "type": "boolean"
17030	//     },
17031	//     "ids": {
17032	//       "description": "Select only ads with these IDs.",
17033	//       "format": "int64",
17034	//       "location": "query",
17035	//       "repeated": true,
17036	//       "type": "string"
17037	//     },
17038	//     "landingPageIds": {
17039	//       "description": "Select only ads with these landing page IDs.",
17040	//       "format": "int64",
17041	//       "location": "query",
17042	//       "repeated": true,
17043	//       "type": "string"
17044	//     },
17045	//     "maxResults": {
17046	//       "default": "1000",
17047	//       "description": "Maximum number of results to return.",
17048	//       "format": "int32",
17049	//       "location": "query",
17050	//       "maximum": "1000",
17051	//       "minimum": "0",
17052	//       "type": "integer"
17053	//     },
17054	//     "overriddenEventTagId": {
17055	//       "description": "Select only ads with this event tag override ID.",
17056	//       "format": "int64",
17057	//       "location": "query",
17058	//       "type": "string"
17059	//     },
17060	//     "pageToken": {
17061	//       "description": "Value of the nextPageToken from the previous result page.",
17062	//       "location": "query",
17063	//       "type": "string"
17064	//     },
17065	//     "placementIds": {
17066	//       "description": "Select only ads with these placement IDs assigned.",
17067	//       "format": "int64",
17068	//       "location": "query",
17069	//       "repeated": true,
17070	//       "type": "string"
17071	//     },
17072	//     "profileId": {
17073	//       "description": "User profile ID associated with this request.",
17074	//       "format": "int64",
17075	//       "location": "path",
17076	//       "required": true,
17077	//       "type": "string"
17078	//     },
17079	//     "remarketingListIds": {
17080	//       "description": "Select only ads whose list targeting expression use these remarketing list IDs.",
17081	//       "format": "int64",
17082	//       "location": "query",
17083	//       "repeated": true,
17084	//       "type": "string"
17085	//     },
17086	//     "searchString": {
17087	//       "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\".",
17088	//       "location": "query",
17089	//       "type": "string"
17090	//     },
17091	//     "sizeIds": {
17092	//       "description": "Select only ads with these size IDs.",
17093	//       "format": "int64",
17094	//       "location": "query",
17095	//       "repeated": true,
17096	//       "type": "string"
17097	//     },
17098	//     "sortField": {
17099	//       "default": "ID",
17100	//       "description": "Field by which to sort the list.",
17101	//       "enum": [
17102	//         "ID",
17103	//         "NAME"
17104	//       ],
17105	//       "enumDescriptions": [
17106	//         "",
17107	//         ""
17108	//       ],
17109	//       "location": "query",
17110	//       "type": "string"
17111	//     },
17112	//     "sortOrder": {
17113	//       "default": "ASCENDING",
17114	//       "description": "Order of sorted results.",
17115	//       "enum": [
17116	//         "ASCENDING",
17117	//         "DESCENDING"
17118	//       ],
17119	//       "enumDescriptions": [
17120	//         "",
17121	//         ""
17122	//       ],
17123	//       "location": "query",
17124	//       "type": "string"
17125	//     },
17126	//     "sslCompliant": {
17127	//       "description": "Select only ads that are SSL-compliant.",
17128	//       "location": "query",
17129	//       "type": "boolean"
17130	//     },
17131	//     "sslRequired": {
17132	//       "description": "Select only ads that require SSL.",
17133	//       "location": "query",
17134	//       "type": "boolean"
17135	//     },
17136	//     "type": {
17137	//       "description": "Select only ads with these types.",
17138	//       "enum": [
17139	//         "AD_SERVING_CLICK_TRACKER",
17140	//         "AD_SERVING_DEFAULT_AD",
17141	//         "AD_SERVING_STANDARD_AD",
17142	//         "AD_SERVING_TRACKING"
17143	//       ],
17144	//       "enumDescriptions": [
17145	//         "",
17146	//         "",
17147	//         "",
17148	//         ""
17149	//       ],
17150	//       "location": "query",
17151	//       "repeated": true,
17152	//       "type": "string"
17153	//     }
17154	//   },
17155	//   "path": "userprofiles/{profileId}/ads",
17156	//   "response": {
17157	//     "$ref": "AdsListResponse"
17158	//   },
17159	//   "scopes": [
17160	//     "https://www.googleapis.com/auth/dfatrafficking"
17161	//   ]
17162	// }
17163
17164}
17165
17166// Pages invokes f for each page of results.
17167// A non-nil error returned from f will halt the iteration.
17168// The provided context supersedes any context provided to the Context method.
17169func (c *AdsListCall) Pages(ctx context.Context, f func(*AdsListResponse) error) error {
17170	c.ctx_ = ctx
17171	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17172	for {
17173		x, err := c.Do()
17174		if err != nil {
17175			return err
17176		}
17177		if err := f(x); err != nil {
17178			return err
17179		}
17180		if x.NextPageToken == "" {
17181			return nil
17182		}
17183		c.PageToken(x.NextPageToken)
17184	}
17185}
17186
17187// method id "dfareporting.ads.patch":
17188
17189type AdsPatchCall struct {
17190	s          *Service
17191	profileId  int64
17192	ad         *Ad
17193	urlParams_ gensupport.URLParams
17194	ctx_       context.Context
17195	header_    http.Header
17196}
17197
17198// Patch: Updates an existing ad. This method supports patch semantics.
17199func (r *AdsService) Patch(profileId int64, id int64, ad *Ad) *AdsPatchCall {
17200	c := &AdsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17201	c.profileId = profileId
17202	c.urlParams_.Set("id", fmt.Sprint(id))
17203	c.ad = ad
17204	return c
17205}
17206
17207// Fields allows partial responses to be retrieved. See
17208// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17209// for more information.
17210func (c *AdsPatchCall) Fields(s ...googleapi.Field) *AdsPatchCall {
17211	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17212	return c
17213}
17214
17215// Context sets the context to be used in this call's Do method. Any
17216// pending HTTP request will be aborted if the provided context is
17217// canceled.
17218func (c *AdsPatchCall) Context(ctx context.Context) *AdsPatchCall {
17219	c.ctx_ = ctx
17220	return c
17221}
17222
17223// Header returns an http.Header that can be modified by the caller to
17224// add HTTP headers to the request.
17225func (c *AdsPatchCall) Header() http.Header {
17226	if c.header_ == nil {
17227		c.header_ = make(http.Header)
17228	}
17229	return c.header_
17230}
17231
17232func (c *AdsPatchCall) doRequest(alt string) (*http.Response, error) {
17233	reqHeaders := make(http.Header)
17234	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
17235	for k, v := range c.header_ {
17236		reqHeaders[k] = v
17237	}
17238	reqHeaders.Set("User-Agent", c.s.userAgent())
17239	var body io.Reader = nil
17240	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17241	if err != nil {
17242		return nil, err
17243	}
17244	reqHeaders.Set("Content-Type", "application/json")
17245	c.urlParams_.Set("alt", alt)
17246	c.urlParams_.Set("prettyPrint", "false")
17247	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17248	urls += "?" + c.urlParams_.Encode()
17249	req, err := http.NewRequest("PATCH", urls, body)
17250	if err != nil {
17251		return nil, err
17252	}
17253	req.Header = reqHeaders
17254	googleapi.Expand(req.URL, map[string]string{
17255		"profileId": strconv.FormatInt(c.profileId, 10),
17256	})
17257	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17258}
17259
17260// Do executes the "dfareporting.ads.patch" call.
17261// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
17262// is an error. Response headers are in either *Ad.ServerResponse.Header
17263// or (if a response was returned at all) in
17264// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17265// whether the returned error was because http.StatusNotModified was
17266// returned.
17267func (c *AdsPatchCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17268	gensupport.SetOptions(c.urlParams_, opts...)
17269	res, err := c.doRequest("json")
17270	if res != nil && res.StatusCode == http.StatusNotModified {
17271		if res.Body != nil {
17272			res.Body.Close()
17273		}
17274		return nil, &googleapi.Error{
17275			Code:   res.StatusCode,
17276			Header: res.Header,
17277		}
17278	}
17279	if err != nil {
17280		return nil, err
17281	}
17282	defer googleapi.CloseBody(res)
17283	if err := googleapi.CheckResponse(res); err != nil {
17284		return nil, err
17285	}
17286	ret := &Ad{
17287		ServerResponse: googleapi.ServerResponse{
17288			Header:         res.Header,
17289			HTTPStatusCode: res.StatusCode,
17290		},
17291	}
17292	target := &ret
17293	if err := gensupport.DecodeResponse(target, res); err != nil {
17294		return nil, err
17295	}
17296	return ret, nil
17297	// {
17298	//   "description": "Updates an existing ad. This method supports patch semantics.",
17299	//   "httpMethod": "PATCH",
17300	//   "id": "dfareporting.ads.patch",
17301	//   "parameterOrder": [
17302	//     "profileId",
17303	//     "id"
17304	//   ],
17305	//   "parameters": {
17306	//     "id": {
17307	//       "description": "Ad ID.",
17308	//       "format": "int64",
17309	//       "location": "query",
17310	//       "required": true,
17311	//       "type": "string"
17312	//     },
17313	//     "profileId": {
17314	//       "description": "User profile ID associated with this request.",
17315	//       "format": "int64",
17316	//       "location": "path",
17317	//       "required": true,
17318	//       "type": "string"
17319	//     }
17320	//   },
17321	//   "path": "userprofiles/{profileId}/ads",
17322	//   "request": {
17323	//     "$ref": "Ad"
17324	//   },
17325	//   "response": {
17326	//     "$ref": "Ad"
17327	//   },
17328	//   "scopes": [
17329	//     "https://www.googleapis.com/auth/dfatrafficking"
17330	//   ]
17331	// }
17332
17333}
17334
17335// method id "dfareporting.ads.update":
17336
17337type AdsUpdateCall struct {
17338	s          *Service
17339	profileId  int64
17340	ad         *Ad
17341	urlParams_ gensupport.URLParams
17342	ctx_       context.Context
17343	header_    http.Header
17344}
17345
17346// Update: Updates an existing ad.
17347func (r *AdsService) Update(profileId int64, ad *Ad) *AdsUpdateCall {
17348	c := &AdsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17349	c.profileId = profileId
17350	c.ad = ad
17351	return c
17352}
17353
17354// Fields allows partial responses to be retrieved. See
17355// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17356// for more information.
17357func (c *AdsUpdateCall) Fields(s ...googleapi.Field) *AdsUpdateCall {
17358	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17359	return c
17360}
17361
17362// Context sets the context to be used in this call's Do method. Any
17363// pending HTTP request will be aborted if the provided context is
17364// canceled.
17365func (c *AdsUpdateCall) Context(ctx context.Context) *AdsUpdateCall {
17366	c.ctx_ = ctx
17367	return c
17368}
17369
17370// Header returns an http.Header that can be modified by the caller to
17371// add HTTP headers to the request.
17372func (c *AdsUpdateCall) Header() http.Header {
17373	if c.header_ == nil {
17374		c.header_ = make(http.Header)
17375	}
17376	return c.header_
17377}
17378
17379func (c *AdsUpdateCall) doRequest(alt string) (*http.Response, error) {
17380	reqHeaders := make(http.Header)
17381	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
17382	for k, v := range c.header_ {
17383		reqHeaders[k] = v
17384	}
17385	reqHeaders.Set("User-Agent", c.s.userAgent())
17386	var body io.Reader = nil
17387	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17388	if err != nil {
17389		return nil, err
17390	}
17391	reqHeaders.Set("Content-Type", "application/json")
17392	c.urlParams_.Set("alt", alt)
17393	c.urlParams_.Set("prettyPrint", "false")
17394	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17395	urls += "?" + c.urlParams_.Encode()
17396	req, err := http.NewRequest("PUT", urls, body)
17397	if err != nil {
17398		return nil, err
17399	}
17400	req.Header = reqHeaders
17401	googleapi.Expand(req.URL, map[string]string{
17402		"profileId": strconv.FormatInt(c.profileId, 10),
17403	})
17404	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17405}
17406
17407// Do executes the "dfareporting.ads.update" call.
17408// Exactly one of *Ad or error will be non-nil. Any non-2xx status code
17409// is an error. Response headers are in either *Ad.ServerResponse.Header
17410// or (if a response was returned at all) in
17411// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17412// whether the returned error was because http.StatusNotModified was
17413// returned.
17414func (c *AdsUpdateCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17415	gensupport.SetOptions(c.urlParams_, opts...)
17416	res, err := c.doRequest("json")
17417	if res != nil && res.StatusCode == http.StatusNotModified {
17418		if res.Body != nil {
17419			res.Body.Close()
17420		}
17421		return nil, &googleapi.Error{
17422			Code:   res.StatusCode,
17423			Header: res.Header,
17424		}
17425	}
17426	if err != nil {
17427		return nil, err
17428	}
17429	defer googleapi.CloseBody(res)
17430	if err := googleapi.CheckResponse(res); err != nil {
17431		return nil, err
17432	}
17433	ret := &Ad{
17434		ServerResponse: googleapi.ServerResponse{
17435			Header:         res.Header,
17436			HTTPStatusCode: res.StatusCode,
17437		},
17438	}
17439	target := &ret
17440	if err := gensupport.DecodeResponse(target, res); err != nil {
17441		return nil, err
17442	}
17443	return ret, nil
17444	// {
17445	//   "description": "Updates an existing ad.",
17446	//   "httpMethod": "PUT",
17447	//   "id": "dfareporting.ads.update",
17448	//   "parameterOrder": [
17449	//     "profileId"
17450	//   ],
17451	//   "parameters": {
17452	//     "profileId": {
17453	//       "description": "User profile ID associated with this request.",
17454	//       "format": "int64",
17455	//       "location": "path",
17456	//       "required": true,
17457	//       "type": "string"
17458	//     }
17459	//   },
17460	//   "path": "userprofiles/{profileId}/ads",
17461	//   "request": {
17462	//     "$ref": "Ad"
17463	//   },
17464	//   "response": {
17465	//     "$ref": "Ad"
17466	//   },
17467	//   "scopes": [
17468	//     "https://www.googleapis.com/auth/dfatrafficking"
17469	//   ]
17470	// }
17471
17472}
17473
17474// method id "dfareporting.advertiserGroups.delete":
17475
17476type AdvertiserGroupsDeleteCall struct {
17477	s          *Service
17478	profileId  int64
17479	id         int64
17480	urlParams_ gensupport.URLParams
17481	ctx_       context.Context
17482	header_    http.Header
17483}
17484
17485// Delete: Deletes an existing advertiser group.
17486func (r *AdvertiserGroupsService) Delete(profileId int64, id int64) *AdvertiserGroupsDeleteCall {
17487	c := &AdvertiserGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17488	c.profileId = profileId
17489	c.id = id
17490	return c
17491}
17492
17493// Fields allows partial responses to be retrieved. See
17494// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17495// for more information.
17496func (c *AdvertiserGroupsDeleteCall) Fields(s ...googleapi.Field) *AdvertiserGroupsDeleteCall {
17497	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17498	return c
17499}
17500
17501// Context sets the context to be used in this call's Do method. Any
17502// pending HTTP request will be aborted if the provided context is
17503// canceled.
17504func (c *AdvertiserGroupsDeleteCall) Context(ctx context.Context) *AdvertiserGroupsDeleteCall {
17505	c.ctx_ = ctx
17506	return c
17507}
17508
17509// Header returns an http.Header that can be modified by the caller to
17510// add HTTP headers to the request.
17511func (c *AdvertiserGroupsDeleteCall) Header() http.Header {
17512	if c.header_ == nil {
17513		c.header_ = make(http.Header)
17514	}
17515	return c.header_
17516}
17517
17518func (c *AdvertiserGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
17519	reqHeaders := make(http.Header)
17520	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
17521	for k, v := range c.header_ {
17522		reqHeaders[k] = v
17523	}
17524	reqHeaders.Set("User-Agent", c.s.userAgent())
17525	var body io.Reader = nil
17526	c.urlParams_.Set("alt", alt)
17527	c.urlParams_.Set("prettyPrint", "false")
17528	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
17529	urls += "?" + c.urlParams_.Encode()
17530	req, err := http.NewRequest("DELETE", urls, body)
17531	if err != nil {
17532		return nil, err
17533	}
17534	req.Header = reqHeaders
17535	googleapi.Expand(req.URL, map[string]string{
17536		"profileId": strconv.FormatInt(c.profileId, 10),
17537		"id":        strconv.FormatInt(c.id, 10),
17538	})
17539	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17540}
17541
17542// Do executes the "dfareporting.advertiserGroups.delete" call.
17543func (c *AdvertiserGroupsDeleteCall) Do(opts ...googleapi.CallOption) error {
17544	gensupport.SetOptions(c.urlParams_, opts...)
17545	res, err := c.doRequest("json")
17546	if err != nil {
17547		return err
17548	}
17549	defer googleapi.CloseBody(res)
17550	if err := googleapi.CheckResponse(res); err != nil {
17551		return err
17552	}
17553	return nil
17554	// {
17555	//   "description": "Deletes an existing advertiser group.",
17556	//   "httpMethod": "DELETE",
17557	//   "id": "dfareporting.advertiserGroups.delete",
17558	//   "parameterOrder": [
17559	//     "profileId",
17560	//     "id"
17561	//   ],
17562	//   "parameters": {
17563	//     "id": {
17564	//       "description": "Advertiser group ID.",
17565	//       "format": "int64",
17566	//       "location": "path",
17567	//       "required": true,
17568	//       "type": "string"
17569	//     },
17570	//     "profileId": {
17571	//       "description": "User profile ID associated with this request.",
17572	//       "format": "int64",
17573	//       "location": "path",
17574	//       "required": true,
17575	//       "type": "string"
17576	//     }
17577	//   },
17578	//   "path": "userprofiles/{profileId}/advertiserGroups/{id}",
17579	//   "scopes": [
17580	//     "https://www.googleapis.com/auth/dfatrafficking"
17581	//   ]
17582	// }
17583
17584}
17585
17586// method id "dfareporting.advertiserGroups.get":
17587
17588type AdvertiserGroupsGetCall struct {
17589	s            *Service
17590	profileId    int64
17591	id           int64
17592	urlParams_   gensupport.URLParams
17593	ifNoneMatch_ string
17594	ctx_         context.Context
17595	header_      http.Header
17596}
17597
17598// Get: Gets one advertiser group by ID.
17599func (r *AdvertiserGroupsService) Get(profileId int64, id int64) *AdvertiserGroupsGetCall {
17600	c := &AdvertiserGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17601	c.profileId = profileId
17602	c.id = id
17603	return c
17604}
17605
17606// Fields allows partial responses to be retrieved. See
17607// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17608// for more information.
17609func (c *AdvertiserGroupsGetCall) Fields(s ...googleapi.Field) *AdvertiserGroupsGetCall {
17610	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17611	return c
17612}
17613
17614// IfNoneMatch sets the optional parameter which makes the operation
17615// fail if the object's ETag matches the given value. This is useful for
17616// getting updates only after the object has changed since the last
17617// request. Use googleapi.IsNotModified to check whether the response
17618// error from Do is the result of In-None-Match.
17619func (c *AdvertiserGroupsGetCall) IfNoneMatch(entityTag string) *AdvertiserGroupsGetCall {
17620	c.ifNoneMatch_ = entityTag
17621	return c
17622}
17623
17624// Context sets the context to be used in this call's Do method. Any
17625// pending HTTP request will be aborted if the provided context is
17626// canceled.
17627func (c *AdvertiserGroupsGetCall) Context(ctx context.Context) *AdvertiserGroupsGetCall {
17628	c.ctx_ = ctx
17629	return c
17630}
17631
17632// Header returns an http.Header that can be modified by the caller to
17633// add HTTP headers to the request.
17634func (c *AdvertiserGroupsGetCall) Header() http.Header {
17635	if c.header_ == nil {
17636		c.header_ = make(http.Header)
17637	}
17638	return c.header_
17639}
17640
17641func (c *AdvertiserGroupsGetCall) doRequest(alt string) (*http.Response, error) {
17642	reqHeaders := make(http.Header)
17643	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
17644	for k, v := range c.header_ {
17645		reqHeaders[k] = v
17646	}
17647	reqHeaders.Set("User-Agent", c.s.userAgent())
17648	if c.ifNoneMatch_ != "" {
17649		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17650	}
17651	var body io.Reader = nil
17652	c.urlParams_.Set("alt", alt)
17653	c.urlParams_.Set("prettyPrint", "false")
17654	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
17655	urls += "?" + c.urlParams_.Encode()
17656	req, err := http.NewRequest("GET", urls, body)
17657	if err != nil {
17658		return nil, err
17659	}
17660	req.Header = reqHeaders
17661	googleapi.Expand(req.URL, map[string]string{
17662		"profileId": strconv.FormatInt(c.profileId, 10),
17663		"id":        strconv.FormatInt(c.id, 10),
17664	})
17665	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17666}
17667
17668// Do executes the "dfareporting.advertiserGroups.get" call.
17669// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
17670// status code is an error. Response headers are in either
17671// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
17672// at all) in error.(*googleapi.Error).Header. Use
17673// googleapi.IsNotModified to check whether the returned error was
17674// because http.StatusNotModified was returned.
17675func (c *AdvertiserGroupsGetCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
17676	gensupport.SetOptions(c.urlParams_, opts...)
17677	res, err := c.doRequest("json")
17678	if res != nil && res.StatusCode == http.StatusNotModified {
17679		if res.Body != nil {
17680			res.Body.Close()
17681		}
17682		return nil, &googleapi.Error{
17683			Code:   res.StatusCode,
17684			Header: res.Header,
17685		}
17686	}
17687	if err != nil {
17688		return nil, err
17689	}
17690	defer googleapi.CloseBody(res)
17691	if err := googleapi.CheckResponse(res); err != nil {
17692		return nil, err
17693	}
17694	ret := &AdvertiserGroup{
17695		ServerResponse: googleapi.ServerResponse{
17696			Header:         res.Header,
17697			HTTPStatusCode: res.StatusCode,
17698		},
17699	}
17700	target := &ret
17701	if err := gensupport.DecodeResponse(target, res); err != nil {
17702		return nil, err
17703	}
17704	return ret, nil
17705	// {
17706	//   "description": "Gets one advertiser group by ID.",
17707	//   "httpMethod": "GET",
17708	//   "id": "dfareporting.advertiserGroups.get",
17709	//   "parameterOrder": [
17710	//     "profileId",
17711	//     "id"
17712	//   ],
17713	//   "parameters": {
17714	//     "id": {
17715	//       "description": "Advertiser group ID.",
17716	//       "format": "int64",
17717	//       "location": "path",
17718	//       "required": true,
17719	//       "type": "string"
17720	//     },
17721	//     "profileId": {
17722	//       "description": "User profile ID associated with this request.",
17723	//       "format": "int64",
17724	//       "location": "path",
17725	//       "required": true,
17726	//       "type": "string"
17727	//     }
17728	//   },
17729	//   "path": "userprofiles/{profileId}/advertiserGroups/{id}",
17730	//   "response": {
17731	//     "$ref": "AdvertiserGroup"
17732	//   },
17733	//   "scopes": [
17734	//     "https://www.googleapis.com/auth/dfatrafficking"
17735	//   ]
17736	// }
17737
17738}
17739
17740// method id "dfareporting.advertiserGroups.insert":
17741
17742type AdvertiserGroupsInsertCall struct {
17743	s               *Service
17744	profileId       int64
17745	advertisergroup *AdvertiserGroup
17746	urlParams_      gensupport.URLParams
17747	ctx_            context.Context
17748	header_         http.Header
17749}
17750
17751// Insert: Inserts a new advertiser group.
17752func (r *AdvertiserGroupsService) Insert(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsInsertCall {
17753	c := &AdvertiserGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17754	c.profileId = profileId
17755	c.advertisergroup = advertisergroup
17756	return c
17757}
17758
17759// Fields allows partial responses to be retrieved. See
17760// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17761// for more information.
17762func (c *AdvertiserGroupsInsertCall) Fields(s ...googleapi.Field) *AdvertiserGroupsInsertCall {
17763	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17764	return c
17765}
17766
17767// Context sets the context to be used in this call's Do method. Any
17768// pending HTTP request will be aborted if the provided context is
17769// canceled.
17770func (c *AdvertiserGroupsInsertCall) Context(ctx context.Context) *AdvertiserGroupsInsertCall {
17771	c.ctx_ = ctx
17772	return c
17773}
17774
17775// Header returns an http.Header that can be modified by the caller to
17776// add HTTP headers to the request.
17777func (c *AdvertiserGroupsInsertCall) Header() http.Header {
17778	if c.header_ == nil {
17779		c.header_ = make(http.Header)
17780	}
17781	return c.header_
17782}
17783
17784func (c *AdvertiserGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
17785	reqHeaders := make(http.Header)
17786	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
17787	for k, v := range c.header_ {
17788		reqHeaders[k] = v
17789	}
17790	reqHeaders.Set("User-Agent", c.s.userAgent())
17791	var body io.Reader = nil
17792	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
17793	if err != nil {
17794		return nil, err
17795	}
17796	reqHeaders.Set("Content-Type", "application/json")
17797	c.urlParams_.Set("alt", alt)
17798	c.urlParams_.Set("prettyPrint", "false")
17799	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
17800	urls += "?" + c.urlParams_.Encode()
17801	req, err := http.NewRequest("POST", urls, body)
17802	if err != nil {
17803		return nil, err
17804	}
17805	req.Header = reqHeaders
17806	googleapi.Expand(req.URL, map[string]string{
17807		"profileId": strconv.FormatInt(c.profileId, 10),
17808	})
17809	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17810}
17811
17812// Do executes the "dfareporting.advertiserGroups.insert" call.
17813// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
17814// status code is an error. Response headers are in either
17815// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
17816// at all) in error.(*googleapi.Error).Header. Use
17817// googleapi.IsNotModified to check whether the returned error was
17818// because http.StatusNotModified was returned.
17819func (c *AdvertiserGroupsInsertCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
17820	gensupport.SetOptions(c.urlParams_, opts...)
17821	res, err := c.doRequest("json")
17822	if res != nil && res.StatusCode == http.StatusNotModified {
17823		if res.Body != nil {
17824			res.Body.Close()
17825		}
17826		return nil, &googleapi.Error{
17827			Code:   res.StatusCode,
17828			Header: res.Header,
17829		}
17830	}
17831	if err != nil {
17832		return nil, err
17833	}
17834	defer googleapi.CloseBody(res)
17835	if err := googleapi.CheckResponse(res); err != nil {
17836		return nil, err
17837	}
17838	ret := &AdvertiserGroup{
17839		ServerResponse: googleapi.ServerResponse{
17840			Header:         res.Header,
17841			HTTPStatusCode: res.StatusCode,
17842		},
17843	}
17844	target := &ret
17845	if err := gensupport.DecodeResponse(target, res); err != nil {
17846		return nil, err
17847	}
17848	return ret, nil
17849	// {
17850	//   "description": "Inserts a new advertiser group.",
17851	//   "httpMethod": "POST",
17852	//   "id": "dfareporting.advertiserGroups.insert",
17853	//   "parameterOrder": [
17854	//     "profileId"
17855	//   ],
17856	//   "parameters": {
17857	//     "profileId": {
17858	//       "description": "User profile ID associated with this request.",
17859	//       "format": "int64",
17860	//       "location": "path",
17861	//       "required": true,
17862	//       "type": "string"
17863	//     }
17864	//   },
17865	//   "path": "userprofiles/{profileId}/advertiserGroups",
17866	//   "request": {
17867	//     "$ref": "AdvertiserGroup"
17868	//   },
17869	//   "response": {
17870	//     "$ref": "AdvertiserGroup"
17871	//   },
17872	//   "scopes": [
17873	//     "https://www.googleapis.com/auth/dfatrafficking"
17874	//   ]
17875	// }
17876
17877}
17878
17879// method id "dfareporting.advertiserGroups.list":
17880
17881type AdvertiserGroupsListCall struct {
17882	s            *Service
17883	profileId    int64
17884	urlParams_   gensupport.URLParams
17885	ifNoneMatch_ string
17886	ctx_         context.Context
17887	header_      http.Header
17888}
17889
17890// List: Retrieves a list of advertiser groups, possibly filtered. This
17891// method supports paging.
17892func (r *AdvertiserGroupsService) List(profileId int64) *AdvertiserGroupsListCall {
17893	c := &AdvertiserGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17894	c.profileId = profileId
17895	return c
17896}
17897
17898// Ids sets the optional parameter "ids": Select only advertiser groups
17899// with these IDs.
17900func (c *AdvertiserGroupsListCall) Ids(ids ...int64) *AdvertiserGroupsListCall {
17901	var ids_ []string
17902	for _, v := range ids {
17903		ids_ = append(ids_, fmt.Sprint(v))
17904	}
17905	c.urlParams_.SetMulti("ids", ids_)
17906	return c
17907}
17908
17909// MaxResults sets the optional parameter "maxResults": Maximum number
17910// of results to return.
17911func (c *AdvertiserGroupsListCall) MaxResults(maxResults int64) *AdvertiserGroupsListCall {
17912	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17913	return c
17914}
17915
17916// PageToken sets the optional parameter "pageToken": Value of the
17917// nextPageToken from the previous result page.
17918func (c *AdvertiserGroupsListCall) PageToken(pageToken string) *AdvertiserGroupsListCall {
17919	c.urlParams_.Set("pageToken", pageToken)
17920	return c
17921}
17922
17923// SearchString sets the optional parameter "searchString": Allows
17924// searching for objects by name or ID. Wildcards (*) are allowed. For
17925// example, "advertiser*2015" will return objects with names like
17926// "advertiser group June 2015", "advertiser group April 2015", or
17927// simply "advertiser group 2015". Most of the searches also add
17928// wildcards implicitly at the start and the end of the search string.
17929// For example, a search string of "advertisergroup" will match objects
17930// with name "my advertisergroup", "advertisergroup 2015", or simply
17931// "advertisergroup".
17932func (c *AdvertiserGroupsListCall) SearchString(searchString string) *AdvertiserGroupsListCall {
17933	c.urlParams_.Set("searchString", searchString)
17934	return c
17935}
17936
17937// SortField sets the optional parameter "sortField": Field by which to
17938// sort the list.
17939//
17940// Possible values:
17941//   "ID" (default)
17942//   "NAME"
17943func (c *AdvertiserGroupsListCall) SortField(sortField string) *AdvertiserGroupsListCall {
17944	c.urlParams_.Set("sortField", sortField)
17945	return c
17946}
17947
17948// SortOrder sets the optional parameter "sortOrder": Order of sorted
17949// results.
17950//
17951// Possible values:
17952//   "ASCENDING" (default)
17953//   "DESCENDING"
17954func (c *AdvertiserGroupsListCall) SortOrder(sortOrder string) *AdvertiserGroupsListCall {
17955	c.urlParams_.Set("sortOrder", sortOrder)
17956	return c
17957}
17958
17959// Fields allows partial responses to be retrieved. See
17960// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17961// for more information.
17962func (c *AdvertiserGroupsListCall) Fields(s ...googleapi.Field) *AdvertiserGroupsListCall {
17963	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17964	return c
17965}
17966
17967// IfNoneMatch sets the optional parameter which makes the operation
17968// fail if the object's ETag matches the given value. This is useful for
17969// getting updates only after the object has changed since the last
17970// request. Use googleapi.IsNotModified to check whether the response
17971// error from Do is the result of In-None-Match.
17972func (c *AdvertiserGroupsListCall) IfNoneMatch(entityTag string) *AdvertiserGroupsListCall {
17973	c.ifNoneMatch_ = entityTag
17974	return c
17975}
17976
17977// Context sets the context to be used in this call's Do method. Any
17978// pending HTTP request will be aborted if the provided context is
17979// canceled.
17980func (c *AdvertiserGroupsListCall) Context(ctx context.Context) *AdvertiserGroupsListCall {
17981	c.ctx_ = ctx
17982	return c
17983}
17984
17985// Header returns an http.Header that can be modified by the caller to
17986// add HTTP headers to the request.
17987func (c *AdvertiserGroupsListCall) Header() http.Header {
17988	if c.header_ == nil {
17989		c.header_ = make(http.Header)
17990	}
17991	return c.header_
17992}
17993
17994func (c *AdvertiserGroupsListCall) doRequest(alt string) (*http.Response, error) {
17995	reqHeaders := make(http.Header)
17996	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
17997	for k, v := range c.header_ {
17998		reqHeaders[k] = v
17999	}
18000	reqHeaders.Set("User-Agent", c.s.userAgent())
18001	if c.ifNoneMatch_ != "" {
18002		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18003	}
18004	var body io.Reader = nil
18005	c.urlParams_.Set("alt", alt)
18006	c.urlParams_.Set("prettyPrint", "false")
18007	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18008	urls += "?" + c.urlParams_.Encode()
18009	req, err := http.NewRequest("GET", urls, body)
18010	if err != nil {
18011		return nil, err
18012	}
18013	req.Header = reqHeaders
18014	googleapi.Expand(req.URL, map[string]string{
18015		"profileId": strconv.FormatInt(c.profileId, 10),
18016	})
18017	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18018}
18019
18020// Do executes the "dfareporting.advertiserGroups.list" call.
18021// Exactly one of *AdvertiserGroupsListResponse or error will be
18022// non-nil. Any non-2xx status code is an error. Response headers are in
18023// either *AdvertiserGroupsListResponse.ServerResponse.Header or (if a
18024// response was returned at all) in error.(*googleapi.Error).Header. Use
18025// googleapi.IsNotModified to check whether the returned error was
18026// because http.StatusNotModified was returned.
18027func (c *AdvertiserGroupsListCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroupsListResponse, error) {
18028	gensupport.SetOptions(c.urlParams_, opts...)
18029	res, err := c.doRequest("json")
18030	if res != nil && res.StatusCode == http.StatusNotModified {
18031		if res.Body != nil {
18032			res.Body.Close()
18033		}
18034		return nil, &googleapi.Error{
18035			Code:   res.StatusCode,
18036			Header: res.Header,
18037		}
18038	}
18039	if err != nil {
18040		return nil, err
18041	}
18042	defer googleapi.CloseBody(res)
18043	if err := googleapi.CheckResponse(res); err != nil {
18044		return nil, err
18045	}
18046	ret := &AdvertiserGroupsListResponse{
18047		ServerResponse: googleapi.ServerResponse{
18048			Header:         res.Header,
18049			HTTPStatusCode: res.StatusCode,
18050		},
18051	}
18052	target := &ret
18053	if err := gensupport.DecodeResponse(target, res); err != nil {
18054		return nil, err
18055	}
18056	return ret, nil
18057	// {
18058	//   "description": "Retrieves a list of advertiser groups, possibly filtered. This method supports paging.",
18059	//   "httpMethod": "GET",
18060	//   "id": "dfareporting.advertiserGroups.list",
18061	//   "parameterOrder": [
18062	//     "profileId"
18063	//   ],
18064	//   "parameters": {
18065	//     "ids": {
18066	//       "description": "Select only advertiser groups with these IDs.",
18067	//       "format": "int64",
18068	//       "location": "query",
18069	//       "repeated": true,
18070	//       "type": "string"
18071	//     },
18072	//     "maxResults": {
18073	//       "default": "1000",
18074	//       "description": "Maximum number of results to return.",
18075	//       "format": "int32",
18076	//       "location": "query",
18077	//       "maximum": "1000",
18078	//       "minimum": "0",
18079	//       "type": "integer"
18080	//     },
18081	//     "pageToken": {
18082	//       "description": "Value of the nextPageToken from the previous result page.",
18083	//       "location": "query",
18084	//       "type": "string"
18085	//     },
18086	//     "profileId": {
18087	//       "description": "User profile ID associated with this request.",
18088	//       "format": "int64",
18089	//       "location": "path",
18090	//       "required": true,
18091	//       "type": "string"
18092	//     },
18093	//     "searchString": {
18094	//       "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\".",
18095	//       "location": "query",
18096	//       "type": "string"
18097	//     },
18098	//     "sortField": {
18099	//       "default": "ID",
18100	//       "description": "Field by which to sort the list.",
18101	//       "enum": [
18102	//         "ID",
18103	//         "NAME"
18104	//       ],
18105	//       "enumDescriptions": [
18106	//         "",
18107	//         ""
18108	//       ],
18109	//       "location": "query",
18110	//       "type": "string"
18111	//     },
18112	//     "sortOrder": {
18113	//       "default": "ASCENDING",
18114	//       "description": "Order of sorted results.",
18115	//       "enum": [
18116	//         "ASCENDING",
18117	//         "DESCENDING"
18118	//       ],
18119	//       "enumDescriptions": [
18120	//         "",
18121	//         ""
18122	//       ],
18123	//       "location": "query",
18124	//       "type": "string"
18125	//     }
18126	//   },
18127	//   "path": "userprofiles/{profileId}/advertiserGroups",
18128	//   "response": {
18129	//     "$ref": "AdvertiserGroupsListResponse"
18130	//   },
18131	//   "scopes": [
18132	//     "https://www.googleapis.com/auth/dfatrafficking"
18133	//   ]
18134	// }
18135
18136}
18137
18138// Pages invokes f for each page of results.
18139// A non-nil error returned from f will halt the iteration.
18140// The provided context supersedes any context provided to the Context method.
18141func (c *AdvertiserGroupsListCall) Pages(ctx context.Context, f func(*AdvertiserGroupsListResponse) error) error {
18142	c.ctx_ = ctx
18143	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18144	for {
18145		x, err := c.Do()
18146		if err != nil {
18147			return err
18148		}
18149		if err := f(x); err != nil {
18150			return err
18151		}
18152		if x.NextPageToken == "" {
18153			return nil
18154		}
18155		c.PageToken(x.NextPageToken)
18156	}
18157}
18158
18159// method id "dfareporting.advertiserGroups.patch":
18160
18161type AdvertiserGroupsPatchCall struct {
18162	s               *Service
18163	profileId       int64
18164	advertisergroup *AdvertiserGroup
18165	urlParams_      gensupport.URLParams
18166	ctx_            context.Context
18167	header_         http.Header
18168}
18169
18170// Patch: Updates an existing advertiser group. This method supports
18171// patch semantics.
18172func (r *AdvertiserGroupsService) Patch(profileId int64, id int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsPatchCall {
18173	c := &AdvertiserGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18174	c.profileId = profileId
18175	c.urlParams_.Set("id", fmt.Sprint(id))
18176	c.advertisergroup = advertisergroup
18177	return c
18178}
18179
18180// Fields allows partial responses to be retrieved. See
18181// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18182// for more information.
18183func (c *AdvertiserGroupsPatchCall) Fields(s ...googleapi.Field) *AdvertiserGroupsPatchCall {
18184	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18185	return c
18186}
18187
18188// Context sets the context to be used in this call's Do method. Any
18189// pending HTTP request will be aborted if the provided context is
18190// canceled.
18191func (c *AdvertiserGroupsPatchCall) Context(ctx context.Context) *AdvertiserGroupsPatchCall {
18192	c.ctx_ = ctx
18193	return c
18194}
18195
18196// Header returns an http.Header that can be modified by the caller to
18197// add HTTP headers to the request.
18198func (c *AdvertiserGroupsPatchCall) Header() http.Header {
18199	if c.header_ == nil {
18200		c.header_ = make(http.Header)
18201	}
18202	return c.header_
18203}
18204
18205func (c *AdvertiserGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
18206	reqHeaders := make(http.Header)
18207	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
18208	for k, v := range c.header_ {
18209		reqHeaders[k] = v
18210	}
18211	reqHeaders.Set("User-Agent", c.s.userAgent())
18212	var body io.Reader = nil
18213	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18214	if err != nil {
18215		return nil, err
18216	}
18217	reqHeaders.Set("Content-Type", "application/json")
18218	c.urlParams_.Set("alt", alt)
18219	c.urlParams_.Set("prettyPrint", "false")
18220	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18221	urls += "?" + c.urlParams_.Encode()
18222	req, err := http.NewRequest("PATCH", urls, body)
18223	if err != nil {
18224		return nil, err
18225	}
18226	req.Header = reqHeaders
18227	googleapi.Expand(req.URL, map[string]string{
18228		"profileId": strconv.FormatInt(c.profileId, 10),
18229	})
18230	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18231}
18232
18233// Do executes the "dfareporting.advertiserGroups.patch" call.
18234// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18235// status code is an error. Response headers are in either
18236// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18237// at all) in error.(*googleapi.Error).Header. Use
18238// googleapi.IsNotModified to check whether the returned error was
18239// because http.StatusNotModified was returned.
18240func (c *AdvertiserGroupsPatchCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18241	gensupport.SetOptions(c.urlParams_, opts...)
18242	res, err := c.doRequest("json")
18243	if res != nil && res.StatusCode == http.StatusNotModified {
18244		if res.Body != nil {
18245			res.Body.Close()
18246		}
18247		return nil, &googleapi.Error{
18248			Code:   res.StatusCode,
18249			Header: res.Header,
18250		}
18251	}
18252	if err != nil {
18253		return nil, err
18254	}
18255	defer googleapi.CloseBody(res)
18256	if err := googleapi.CheckResponse(res); err != nil {
18257		return nil, err
18258	}
18259	ret := &AdvertiserGroup{
18260		ServerResponse: googleapi.ServerResponse{
18261			Header:         res.Header,
18262			HTTPStatusCode: res.StatusCode,
18263		},
18264	}
18265	target := &ret
18266	if err := gensupport.DecodeResponse(target, res); err != nil {
18267		return nil, err
18268	}
18269	return ret, nil
18270	// {
18271	//   "description": "Updates an existing advertiser group. This method supports patch semantics.",
18272	//   "httpMethod": "PATCH",
18273	//   "id": "dfareporting.advertiserGroups.patch",
18274	//   "parameterOrder": [
18275	//     "profileId",
18276	//     "id"
18277	//   ],
18278	//   "parameters": {
18279	//     "id": {
18280	//       "description": "Advertiser group ID.",
18281	//       "format": "int64",
18282	//       "location": "query",
18283	//       "required": true,
18284	//       "type": "string"
18285	//     },
18286	//     "profileId": {
18287	//       "description": "User profile ID associated with this request.",
18288	//       "format": "int64",
18289	//       "location": "path",
18290	//       "required": true,
18291	//       "type": "string"
18292	//     }
18293	//   },
18294	//   "path": "userprofiles/{profileId}/advertiserGroups",
18295	//   "request": {
18296	//     "$ref": "AdvertiserGroup"
18297	//   },
18298	//   "response": {
18299	//     "$ref": "AdvertiserGroup"
18300	//   },
18301	//   "scopes": [
18302	//     "https://www.googleapis.com/auth/dfatrafficking"
18303	//   ]
18304	// }
18305
18306}
18307
18308// method id "dfareporting.advertiserGroups.update":
18309
18310type AdvertiserGroupsUpdateCall struct {
18311	s               *Service
18312	profileId       int64
18313	advertisergroup *AdvertiserGroup
18314	urlParams_      gensupport.URLParams
18315	ctx_            context.Context
18316	header_         http.Header
18317}
18318
18319// Update: Updates an existing advertiser group.
18320func (r *AdvertiserGroupsService) Update(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsUpdateCall {
18321	c := &AdvertiserGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18322	c.profileId = profileId
18323	c.advertisergroup = advertisergroup
18324	return c
18325}
18326
18327// Fields allows partial responses to be retrieved. See
18328// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18329// for more information.
18330func (c *AdvertiserGroupsUpdateCall) Fields(s ...googleapi.Field) *AdvertiserGroupsUpdateCall {
18331	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18332	return c
18333}
18334
18335// Context sets the context to be used in this call's Do method. Any
18336// pending HTTP request will be aborted if the provided context is
18337// canceled.
18338func (c *AdvertiserGroupsUpdateCall) Context(ctx context.Context) *AdvertiserGroupsUpdateCall {
18339	c.ctx_ = ctx
18340	return c
18341}
18342
18343// Header returns an http.Header that can be modified by the caller to
18344// add HTTP headers to the request.
18345func (c *AdvertiserGroupsUpdateCall) Header() http.Header {
18346	if c.header_ == nil {
18347		c.header_ = make(http.Header)
18348	}
18349	return c.header_
18350}
18351
18352func (c *AdvertiserGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
18353	reqHeaders := make(http.Header)
18354	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
18355	for k, v := range c.header_ {
18356		reqHeaders[k] = v
18357	}
18358	reqHeaders.Set("User-Agent", c.s.userAgent())
18359	var body io.Reader = nil
18360	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18361	if err != nil {
18362		return nil, err
18363	}
18364	reqHeaders.Set("Content-Type", "application/json")
18365	c.urlParams_.Set("alt", alt)
18366	c.urlParams_.Set("prettyPrint", "false")
18367	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18368	urls += "?" + c.urlParams_.Encode()
18369	req, err := http.NewRequest("PUT", urls, body)
18370	if err != nil {
18371		return nil, err
18372	}
18373	req.Header = reqHeaders
18374	googleapi.Expand(req.URL, map[string]string{
18375		"profileId": strconv.FormatInt(c.profileId, 10),
18376	})
18377	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18378}
18379
18380// Do executes the "dfareporting.advertiserGroups.update" call.
18381// Exactly one of *AdvertiserGroup or error will be non-nil. Any non-2xx
18382// status code is an error. Response headers are in either
18383// *AdvertiserGroup.ServerResponse.Header or (if a response was returned
18384// at all) in error.(*googleapi.Error).Header. Use
18385// googleapi.IsNotModified to check whether the returned error was
18386// because http.StatusNotModified was returned.
18387func (c *AdvertiserGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18388	gensupport.SetOptions(c.urlParams_, opts...)
18389	res, err := c.doRequest("json")
18390	if res != nil && res.StatusCode == http.StatusNotModified {
18391		if res.Body != nil {
18392			res.Body.Close()
18393		}
18394		return nil, &googleapi.Error{
18395			Code:   res.StatusCode,
18396			Header: res.Header,
18397		}
18398	}
18399	if err != nil {
18400		return nil, err
18401	}
18402	defer googleapi.CloseBody(res)
18403	if err := googleapi.CheckResponse(res); err != nil {
18404		return nil, err
18405	}
18406	ret := &AdvertiserGroup{
18407		ServerResponse: googleapi.ServerResponse{
18408			Header:         res.Header,
18409			HTTPStatusCode: res.StatusCode,
18410		},
18411	}
18412	target := &ret
18413	if err := gensupport.DecodeResponse(target, res); err != nil {
18414		return nil, err
18415	}
18416	return ret, nil
18417	// {
18418	//   "description": "Updates an existing advertiser group.",
18419	//   "httpMethod": "PUT",
18420	//   "id": "dfareporting.advertiserGroups.update",
18421	//   "parameterOrder": [
18422	//     "profileId"
18423	//   ],
18424	//   "parameters": {
18425	//     "profileId": {
18426	//       "description": "User profile ID associated with this request.",
18427	//       "format": "int64",
18428	//       "location": "path",
18429	//       "required": true,
18430	//       "type": "string"
18431	//     }
18432	//   },
18433	//   "path": "userprofiles/{profileId}/advertiserGroups",
18434	//   "request": {
18435	//     "$ref": "AdvertiserGroup"
18436	//   },
18437	//   "response": {
18438	//     "$ref": "AdvertiserGroup"
18439	//   },
18440	//   "scopes": [
18441	//     "https://www.googleapis.com/auth/dfatrafficking"
18442	//   ]
18443	// }
18444
18445}
18446
18447// method id "dfareporting.advertiserLandingPages.get":
18448
18449type AdvertiserLandingPagesGetCall struct {
18450	s            *Service
18451	profileId    int64
18452	id           int64
18453	urlParams_   gensupport.URLParams
18454	ifNoneMatch_ string
18455	ctx_         context.Context
18456	header_      http.Header
18457}
18458
18459// Get: Gets one landing page by ID.
18460func (r *AdvertiserLandingPagesService) Get(profileId int64, id int64) *AdvertiserLandingPagesGetCall {
18461	c := &AdvertiserLandingPagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18462	c.profileId = profileId
18463	c.id = id
18464	return c
18465}
18466
18467// Fields allows partial responses to be retrieved. See
18468// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18469// for more information.
18470func (c *AdvertiserLandingPagesGetCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesGetCall {
18471	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18472	return c
18473}
18474
18475// IfNoneMatch sets the optional parameter which makes the operation
18476// fail if the object's ETag matches the given value. This is useful for
18477// getting updates only after the object has changed since the last
18478// request. Use googleapi.IsNotModified to check whether the response
18479// error from Do is the result of In-None-Match.
18480func (c *AdvertiserLandingPagesGetCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesGetCall {
18481	c.ifNoneMatch_ = entityTag
18482	return c
18483}
18484
18485// Context sets the context to be used in this call's Do method. Any
18486// pending HTTP request will be aborted if the provided context is
18487// canceled.
18488func (c *AdvertiserLandingPagesGetCall) Context(ctx context.Context) *AdvertiserLandingPagesGetCall {
18489	c.ctx_ = ctx
18490	return c
18491}
18492
18493// Header returns an http.Header that can be modified by the caller to
18494// add HTTP headers to the request.
18495func (c *AdvertiserLandingPagesGetCall) Header() http.Header {
18496	if c.header_ == nil {
18497		c.header_ = make(http.Header)
18498	}
18499	return c.header_
18500}
18501
18502func (c *AdvertiserLandingPagesGetCall) doRequest(alt string) (*http.Response, error) {
18503	reqHeaders := make(http.Header)
18504	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
18505	for k, v := range c.header_ {
18506		reqHeaders[k] = v
18507	}
18508	reqHeaders.Set("User-Agent", c.s.userAgent())
18509	if c.ifNoneMatch_ != "" {
18510		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18511	}
18512	var body io.Reader = nil
18513	c.urlParams_.Set("alt", alt)
18514	c.urlParams_.Set("prettyPrint", "false")
18515	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages/{id}")
18516	urls += "?" + c.urlParams_.Encode()
18517	req, err := http.NewRequest("GET", urls, body)
18518	if err != nil {
18519		return nil, err
18520	}
18521	req.Header = reqHeaders
18522	googleapi.Expand(req.URL, map[string]string{
18523		"profileId": strconv.FormatInt(c.profileId, 10),
18524		"id":        strconv.FormatInt(c.id, 10),
18525	})
18526	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18527}
18528
18529// Do executes the "dfareporting.advertiserLandingPages.get" call.
18530// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
18531// status code is an error. Response headers are in either
18532// *LandingPage.ServerResponse.Header or (if a response was returned at
18533// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18534// to check whether the returned error was because
18535// http.StatusNotModified was returned.
18536func (c *AdvertiserLandingPagesGetCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
18537	gensupport.SetOptions(c.urlParams_, opts...)
18538	res, err := c.doRequest("json")
18539	if res != nil && res.StatusCode == http.StatusNotModified {
18540		if res.Body != nil {
18541			res.Body.Close()
18542		}
18543		return nil, &googleapi.Error{
18544			Code:   res.StatusCode,
18545			Header: res.Header,
18546		}
18547	}
18548	if err != nil {
18549		return nil, err
18550	}
18551	defer googleapi.CloseBody(res)
18552	if err := googleapi.CheckResponse(res); err != nil {
18553		return nil, err
18554	}
18555	ret := &LandingPage{
18556		ServerResponse: googleapi.ServerResponse{
18557			Header:         res.Header,
18558			HTTPStatusCode: res.StatusCode,
18559		},
18560	}
18561	target := &ret
18562	if err := gensupport.DecodeResponse(target, res); err != nil {
18563		return nil, err
18564	}
18565	return ret, nil
18566	// {
18567	//   "description": "Gets one landing page by ID.",
18568	//   "httpMethod": "GET",
18569	//   "id": "dfareporting.advertiserLandingPages.get",
18570	//   "parameterOrder": [
18571	//     "profileId",
18572	//     "id"
18573	//   ],
18574	//   "parameters": {
18575	//     "id": {
18576	//       "description": "Landing page ID.",
18577	//       "format": "int64",
18578	//       "location": "path",
18579	//       "required": true,
18580	//       "type": "string"
18581	//     },
18582	//     "profileId": {
18583	//       "description": "User profile ID associated with this request.",
18584	//       "format": "int64",
18585	//       "location": "path",
18586	//       "required": true,
18587	//       "type": "string"
18588	//     }
18589	//   },
18590	//   "path": "userprofiles/{profileId}/advertiserLandingPages/{id}",
18591	//   "response": {
18592	//     "$ref": "LandingPage"
18593	//   },
18594	//   "scopes": [
18595	//     "https://www.googleapis.com/auth/dfatrafficking"
18596	//   ]
18597	// }
18598
18599}
18600
18601// method id "dfareporting.advertiserLandingPages.insert":
18602
18603type AdvertiserLandingPagesInsertCall struct {
18604	s           *Service
18605	profileId   int64
18606	landingpage *LandingPage
18607	urlParams_  gensupport.URLParams
18608	ctx_        context.Context
18609	header_     http.Header
18610}
18611
18612// Insert: Inserts a new landing page.
18613func (r *AdvertiserLandingPagesService) Insert(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesInsertCall {
18614	c := &AdvertiserLandingPagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18615	c.profileId = profileId
18616	c.landingpage = landingpage
18617	return c
18618}
18619
18620// Fields allows partial responses to be retrieved. See
18621// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18622// for more information.
18623func (c *AdvertiserLandingPagesInsertCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesInsertCall {
18624	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18625	return c
18626}
18627
18628// Context sets the context to be used in this call's Do method. Any
18629// pending HTTP request will be aborted if the provided context is
18630// canceled.
18631func (c *AdvertiserLandingPagesInsertCall) Context(ctx context.Context) *AdvertiserLandingPagesInsertCall {
18632	c.ctx_ = ctx
18633	return c
18634}
18635
18636// Header returns an http.Header that can be modified by the caller to
18637// add HTTP headers to the request.
18638func (c *AdvertiserLandingPagesInsertCall) Header() http.Header {
18639	if c.header_ == nil {
18640		c.header_ = make(http.Header)
18641	}
18642	return c.header_
18643}
18644
18645func (c *AdvertiserLandingPagesInsertCall) doRequest(alt string) (*http.Response, error) {
18646	reqHeaders := make(http.Header)
18647	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
18648	for k, v := range c.header_ {
18649		reqHeaders[k] = v
18650	}
18651	reqHeaders.Set("User-Agent", c.s.userAgent())
18652	var body io.Reader = nil
18653	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
18654	if err != nil {
18655		return nil, err
18656	}
18657	reqHeaders.Set("Content-Type", "application/json")
18658	c.urlParams_.Set("alt", alt)
18659	c.urlParams_.Set("prettyPrint", "false")
18660	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
18661	urls += "?" + c.urlParams_.Encode()
18662	req, err := http.NewRequest("POST", urls, body)
18663	if err != nil {
18664		return nil, err
18665	}
18666	req.Header = reqHeaders
18667	googleapi.Expand(req.URL, map[string]string{
18668		"profileId": strconv.FormatInt(c.profileId, 10),
18669	})
18670	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18671}
18672
18673// Do executes the "dfareporting.advertiserLandingPages.insert" call.
18674// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
18675// status code is an error. Response headers are in either
18676// *LandingPage.ServerResponse.Header or (if a response was returned at
18677// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18678// to check whether the returned error was because
18679// http.StatusNotModified was returned.
18680func (c *AdvertiserLandingPagesInsertCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
18681	gensupport.SetOptions(c.urlParams_, opts...)
18682	res, err := c.doRequest("json")
18683	if res != nil && res.StatusCode == http.StatusNotModified {
18684		if res.Body != nil {
18685			res.Body.Close()
18686		}
18687		return nil, &googleapi.Error{
18688			Code:   res.StatusCode,
18689			Header: res.Header,
18690		}
18691	}
18692	if err != nil {
18693		return nil, err
18694	}
18695	defer googleapi.CloseBody(res)
18696	if err := googleapi.CheckResponse(res); err != nil {
18697		return nil, err
18698	}
18699	ret := &LandingPage{
18700		ServerResponse: googleapi.ServerResponse{
18701			Header:         res.Header,
18702			HTTPStatusCode: res.StatusCode,
18703		},
18704	}
18705	target := &ret
18706	if err := gensupport.DecodeResponse(target, res); err != nil {
18707		return nil, err
18708	}
18709	return ret, nil
18710	// {
18711	//   "description": "Inserts a new landing page.",
18712	//   "httpMethod": "POST",
18713	//   "id": "dfareporting.advertiserLandingPages.insert",
18714	//   "parameterOrder": [
18715	//     "profileId"
18716	//   ],
18717	//   "parameters": {
18718	//     "profileId": {
18719	//       "description": "User profile ID associated with this request.",
18720	//       "format": "int64",
18721	//       "location": "path",
18722	//       "required": true,
18723	//       "type": "string"
18724	//     }
18725	//   },
18726	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
18727	//   "request": {
18728	//     "$ref": "LandingPage"
18729	//   },
18730	//   "response": {
18731	//     "$ref": "LandingPage"
18732	//   },
18733	//   "scopes": [
18734	//     "https://www.googleapis.com/auth/dfatrafficking"
18735	//   ]
18736	// }
18737
18738}
18739
18740// method id "dfareporting.advertiserLandingPages.list":
18741
18742type AdvertiserLandingPagesListCall struct {
18743	s            *Service
18744	profileId    int64
18745	urlParams_   gensupport.URLParams
18746	ifNoneMatch_ string
18747	ctx_         context.Context
18748	header_      http.Header
18749}
18750
18751// List: Retrieves a list of landing pages.
18752func (r *AdvertiserLandingPagesService) List(profileId int64) *AdvertiserLandingPagesListCall {
18753	c := &AdvertiserLandingPagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18754	c.profileId = profileId
18755	return c
18756}
18757
18758// AdvertiserIds sets the optional parameter "advertiserIds": Select
18759// only landing pages that belong to these advertisers.
18760func (c *AdvertiserLandingPagesListCall) AdvertiserIds(advertiserIds ...int64) *AdvertiserLandingPagesListCall {
18761	var advertiserIds_ []string
18762	for _, v := range advertiserIds {
18763		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
18764	}
18765	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
18766	return c
18767}
18768
18769// Archived sets the optional parameter "archived": Select only archived
18770// landing pages. Don't set this field to select both archived and
18771// non-archived landing pages.
18772func (c *AdvertiserLandingPagesListCall) Archived(archived bool) *AdvertiserLandingPagesListCall {
18773	c.urlParams_.Set("archived", fmt.Sprint(archived))
18774	return c
18775}
18776
18777// CampaignIds sets the optional parameter "campaignIds": Select only
18778// landing pages that are associated with these campaigns.
18779func (c *AdvertiserLandingPagesListCall) CampaignIds(campaignIds ...int64) *AdvertiserLandingPagesListCall {
18780	var campaignIds_ []string
18781	for _, v := range campaignIds {
18782		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
18783	}
18784	c.urlParams_.SetMulti("campaignIds", campaignIds_)
18785	return c
18786}
18787
18788// Ids sets the optional parameter "ids": Select only landing pages with
18789// these IDs.
18790func (c *AdvertiserLandingPagesListCall) Ids(ids ...int64) *AdvertiserLandingPagesListCall {
18791	var ids_ []string
18792	for _, v := range ids {
18793		ids_ = append(ids_, fmt.Sprint(v))
18794	}
18795	c.urlParams_.SetMulti("ids", ids_)
18796	return c
18797}
18798
18799// MaxResults sets the optional parameter "maxResults": Maximum number
18800// of results to return.
18801func (c *AdvertiserLandingPagesListCall) MaxResults(maxResults int64) *AdvertiserLandingPagesListCall {
18802	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18803	return c
18804}
18805
18806// PageToken sets the optional parameter "pageToken": Value of the
18807// nextPageToken from the previous result page.
18808func (c *AdvertiserLandingPagesListCall) PageToken(pageToken string) *AdvertiserLandingPagesListCall {
18809	c.urlParams_.Set("pageToken", pageToken)
18810	return c
18811}
18812
18813// SearchString sets the optional parameter "searchString": Allows
18814// searching for landing pages by name or ID. Wildcards (*) are allowed.
18815// For example, "landingpage*2017" will return landing pages with names
18816// like "landingpage July 2017", "landingpage March 2017", or simply
18817// "landingpage 2017". Most of the searches also add wildcards
18818// implicitly at the start and the end of the search string. For
18819// example, a search string of "landingpage" will match campaigns with
18820// name "my landingpage", "landingpage 2015", or simply "landingpage".
18821func (c *AdvertiserLandingPagesListCall) SearchString(searchString string) *AdvertiserLandingPagesListCall {
18822	c.urlParams_.Set("searchString", searchString)
18823	return c
18824}
18825
18826// SortField sets the optional parameter "sortField": Field by which to
18827// sort the list.
18828//
18829// Possible values:
18830//   "ID" (default)
18831//   "NAME"
18832func (c *AdvertiserLandingPagesListCall) SortField(sortField string) *AdvertiserLandingPagesListCall {
18833	c.urlParams_.Set("sortField", sortField)
18834	return c
18835}
18836
18837// SortOrder sets the optional parameter "sortOrder": Order of sorted
18838// results.
18839//
18840// Possible values:
18841//   "ASCENDING" (default)
18842//   "DESCENDING"
18843func (c *AdvertiserLandingPagesListCall) SortOrder(sortOrder string) *AdvertiserLandingPagesListCall {
18844	c.urlParams_.Set("sortOrder", sortOrder)
18845	return c
18846}
18847
18848// SubaccountId sets the optional parameter "subaccountId": Select only
18849// landing pages that belong to this subaccount.
18850func (c *AdvertiserLandingPagesListCall) SubaccountId(subaccountId int64) *AdvertiserLandingPagesListCall {
18851	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
18852	return c
18853}
18854
18855// Fields allows partial responses to be retrieved. See
18856// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18857// for more information.
18858func (c *AdvertiserLandingPagesListCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesListCall {
18859	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18860	return c
18861}
18862
18863// IfNoneMatch sets the optional parameter which makes the operation
18864// fail if the object's ETag matches the given value. This is useful for
18865// getting updates only after the object has changed since the last
18866// request. Use googleapi.IsNotModified to check whether the response
18867// error from Do is the result of In-None-Match.
18868func (c *AdvertiserLandingPagesListCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesListCall {
18869	c.ifNoneMatch_ = entityTag
18870	return c
18871}
18872
18873// Context sets the context to be used in this call's Do method. Any
18874// pending HTTP request will be aborted if the provided context is
18875// canceled.
18876func (c *AdvertiserLandingPagesListCall) Context(ctx context.Context) *AdvertiserLandingPagesListCall {
18877	c.ctx_ = ctx
18878	return c
18879}
18880
18881// Header returns an http.Header that can be modified by the caller to
18882// add HTTP headers to the request.
18883func (c *AdvertiserLandingPagesListCall) Header() http.Header {
18884	if c.header_ == nil {
18885		c.header_ = make(http.Header)
18886	}
18887	return c.header_
18888}
18889
18890func (c *AdvertiserLandingPagesListCall) doRequest(alt string) (*http.Response, error) {
18891	reqHeaders := make(http.Header)
18892	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
18893	for k, v := range c.header_ {
18894		reqHeaders[k] = v
18895	}
18896	reqHeaders.Set("User-Agent", c.s.userAgent())
18897	if c.ifNoneMatch_ != "" {
18898		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18899	}
18900	var body io.Reader = nil
18901	c.urlParams_.Set("alt", alt)
18902	c.urlParams_.Set("prettyPrint", "false")
18903	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
18904	urls += "?" + c.urlParams_.Encode()
18905	req, err := http.NewRequest("GET", urls, body)
18906	if err != nil {
18907		return nil, err
18908	}
18909	req.Header = reqHeaders
18910	googleapi.Expand(req.URL, map[string]string{
18911		"profileId": strconv.FormatInt(c.profileId, 10),
18912	})
18913	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18914}
18915
18916// Do executes the "dfareporting.advertiserLandingPages.list" call.
18917// Exactly one of *AdvertiserLandingPagesListResponse or error will be
18918// non-nil. Any non-2xx status code is an error. Response headers are in
18919// either *AdvertiserLandingPagesListResponse.ServerResponse.Header or
18920// (if a response was returned at all) in
18921// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18922// whether the returned error was because http.StatusNotModified was
18923// returned.
18924func (c *AdvertiserLandingPagesListCall) Do(opts ...googleapi.CallOption) (*AdvertiserLandingPagesListResponse, error) {
18925	gensupport.SetOptions(c.urlParams_, opts...)
18926	res, err := c.doRequest("json")
18927	if res != nil && res.StatusCode == http.StatusNotModified {
18928		if res.Body != nil {
18929			res.Body.Close()
18930		}
18931		return nil, &googleapi.Error{
18932			Code:   res.StatusCode,
18933			Header: res.Header,
18934		}
18935	}
18936	if err != nil {
18937		return nil, err
18938	}
18939	defer googleapi.CloseBody(res)
18940	if err := googleapi.CheckResponse(res); err != nil {
18941		return nil, err
18942	}
18943	ret := &AdvertiserLandingPagesListResponse{
18944		ServerResponse: googleapi.ServerResponse{
18945			Header:         res.Header,
18946			HTTPStatusCode: res.StatusCode,
18947		},
18948	}
18949	target := &ret
18950	if err := gensupport.DecodeResponse(target, res); err != nil {
18951		return nil, err
18952	}
18953	return ret, nil
18954	// {
18955	//   "description": "Retrieves a list of landing pages.",
18956	//   "httpMethod": "GET",
18957	//   "id": "dfareporting.advertiserLandingPages.list",
18958	//   "parameterOrder": [
18959	//     "profileId"
18960	//   ],
18961	//   "parameters": {
18962	//     "advertiserIds": {
18963	//       "description": "Select only landing pages that belong to these advertisers.",
18964	//       "format": "int64",
18965	//       "location": "query",
18966	//       "repeated": true,
18967	//       "type": "string"
18968	//     },
18969	//     "archived": {
18970	//       "description": "Select only archived landing pages. Don't set this field to select both archived and non-archived landing pages.",
18971	//       "location": "query",
18972	//       "type": "boolean"
18973	//     },
18974	//     "campaignIds": {
18975	//       "description": "Select only landing pages that are associated with these campaigns.",
18976	//       "format": "int64",
18977	//       "location": "query",
18978	//       "repeated": true,
18979	//       "type": "string"
18980	//     },
18981	//     "ids": {
18982	//       "description": "Select only landing pages with these IDs.",
18983	//       "format": "int64",
18984	//       "location": "query",
18985	//       "repeated": true,
18986	//       "type": "string"
18987	//     },
18988	//     "maxResults": {
18989	//       "default": "1000",
18990	//       "description": "Maximum number of results to return.",
18991	//       "format": "int32",
18992	//       "location": "query",
18993	//       "maximum": "1000",
18994	//       "minimum": "0",
18995	//       "type": "integer"
18996	//     },
18997	//     "pageToken": {
18998	//       "description": "Value of the nextPageToken from the previous result page.",
18999	//       "location": "query",
19000	//       "type": "string"
19001	//     },
19002	//     "profileId": {
19003	//       "description": "User profile ID associated with this request.",
19004	//       "format": "int64",
19005	//       "location": "path",
19006	//       "required": true,
19007	//       "type": "string"
19008	//     },
19009	//     "searchString": {
19010	//       "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\".",
19011	//       "location": "query",
19012	//       "type": "string"
19013	//     },
19014	//     "sortField": {
19015	//       "default": "ID",
19016	//       "description": "Field by which to sort the list.",
19017	//       "enum": [
19018	//         "ID",
19019	//         "NAME"
19020	//       ],
19021	//       "enumDescriptions": [
19022	//         "",
19023	//         ""
19024	//       ],
19025	//       "location": "query",
19026	//       "type": "string"
19027	//     },
19028	//     "sortOrder": {
19029	//       "default": "ASCENDING",
19030	//       "description": "Order of sorted results.",
19031	//       "enum": [
19032	//         "ASCENDING",
19033	//         "DESCENDING"
19034	//       ],
19035	//       "enumDescriptions": [
19036	//         "",
19037	//         ""
19038	//       ],
19039	//       "location": "query",
19040	//       "type": "string"
19041	//     },
19042	//     "subaccountId": {
19043	//       "description": "Select only landing pages that belong to this subaccount.",
19044	//       "format": "int64",
19045	//       "location": "query",
19046	//       "type": "string"
19047	//     }
19048	//   },
19049	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19050	//   "response": {
19051	//     "$ref": "AdvertiserLandingPagesListResponse"
19052	//   },
19053	//   "scopes": [
19054	//     "https://www.googleapis.com/auth/dfatrafficking"
19055	//   ]
19056	// }
19057
19058}
19059
19060// Pages invokes f for each page of results.
19061// A non-nil error returned from f will halt the iteration.
19062// The provided context supersedes any context provided to the Context method.
19063func (c *AdvertiserLandingPagesListCall) Pages(ctx context.Context, f func(*AdvertiserLandingPagesListResponse) error) error {
19064	c.ctx_ = ctx
19065	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19066	for {
19067		x, err := c.Do()
19068		if err != nil {
19069			return err
19070		}
19071		if err := f(x); err != nil {
19072			return err
19073		}
19074		if x.NextPageToken == "" {
19075			return nil
19076		}
19077		c.PageToken(x.NextPageToken)
19078	}
19079}
19080
19081// method id "dfareporting.advertiserLandingPages.patch":
19082
19083type AdvertiserLandingPagesPatchCall struct {
19084	s           *Service
19085	profileId   int64
19086	landingpage *LandingPage
19087	urlParams_  gensupport.URLParams
19088	ctx_        context.Context
19089	header_     http.Header
19090}
19091
19092// Patch: Updates an existing landing page. This method supports patch
19093// semantics.
19094func (r *AdvertiserLandingPagesService) Patch(profileId int64, id int64, landingpage *LandingPage) *AdvertiserLandingPagesPatchCall {
19095	c := &AdvertiserLandingPagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19096	c.profileId = profileId
19097	c.urlParams_.Set("id", fmt.Sprint(id))
19098	c.landingpage = landingpage
19099	return c
19100}
19101
19102// Fields allows partial responses to be retrieved. See
19103// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19104// for more information.
19105func (c *AdvertiserLandingPagesPatchCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesPatchCall {
19106	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19107	return c
19108}
19109
19110// Context sets the context to be used in this call's Do method. Any
19111// pending HTTP request will be aborted if the provided context is
19112// canceled.
19113func (c *AdvertiserLandingPagesPatchCall) Context(ctx context.Context) *AdvertiserLandingPagesPatchCall {
19114	c.ctx_ = ctx
19115	return c
19116}
19117
19118// Header returns an http.Header that can be modified by the caller to
19119// add HTTP headers to the request.
19120func (c *AdvertiserLandingPagesPatchCall) Header() http.Header {
19121	if c.header_ == nil {
19122		c.header_ = make(http.Header)
19123	}
19124	return c.header_
19125}
19126
19127func (c *AdvertiserLandingPagesPatchCall) doRequest(alt string) (*http.Response, error) {
19128	reqHeaders := make(http.Header)
19129	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
19130	for k, v := range c.header_ {
19131		reqHeaders[k] = v
19132	}
19133	reqHeaders.Set("User-Agent", c.s.userAgent())
19134	var body io.Reader = nil
19135	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
19136	if err != nil {
19137		return nil, err
19138	}
19139	reqHeaders.Set("Content-Type", "application/json")
19140	c.urlParams_.Set("alt", alt)
19141	c.urlParams_.Set("prettyPrint", "false")
19142	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19143	urls += "?" + c.urlParams_.Encode()
19144	req, err := http.NewRequest("PATCH", urls, body)
19145	if err != nil {
19146		return nil, err
19147	}
19148	req.Header = reqHeaders
19149	googleapi.Expand(req.URL, map[string]string{
19150		"profileId": strconv.FormatInt(c.profileId, 10),
19151	})
19152	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19153}
19154
19155// Do executes the "dfareporting.advertiserLandingPages.patch" call.
19156// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
19157// status code is an error. Response headers are in either
19158// *LandingPage.ServerResponse.Header or (if a response was returned at
19159// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19160// to check whether the returned error was because
19161// http.StatusNotModified was returned.
19162func (c *AdvertiserLandingPagesPatchCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
19163	gensupport.SetOptions(c.urlParams_, opts...)
19164	res, err := c.doRequest("json")
19165	if res != nil && res.StatusCode == http.StatusNotModified {
19166		if res.Body != nil {
19167			res.Body.Close()
19168		}
19169		return nil, &googleapi.Error{
19170			Code:   res.StatusCode,
19171			Header: res.Header,
19172		}
19173	}
19174	if err != nil {
19175		return nil, err
19176	}
19177	defer googleapi.CloseBody(res)
19178	if err := googleapi.CheckResponse(res); err != nil {
19179		return nil, err
19180	}
19181	ret := &LandingPage{
19182		ServerResponse: googleapi.ServerResponse{
19183			Header:         res.Header,
19184			HTTPStatusCode: res.StatusCode,
19185		},
19186	}
19187	target := &ret
19188	if err := gensupport.DecodeResponse(target, res); err != nil {
19189		return nil, err
19190	}
19191	return ret, nil
19192	// {
19193	//   "description": "Updates an existing landing page. This method supports patch semantics.",
19194	//   "httpMethod": "PATCH",
19195	//   "id": "dfareporting.advertiserLandingPages.patch",
19196	//   "parameterOrder": [
19197	//     "profileId",
19198	//     "id"
19199	//   ],
19200	//   "parameters": {
19201	//     "id": {
19202	//       "description": "Landing page ID.",
19203	//       "format": "int64",
19204	//       "location": "query",
19205	//       "required": true,
19206	//       "type": "string"
19207	//     },
19208	//     "profileId": {
19209	//       "description": "User profile ID associated with this request.",
19210	//       "format": "int64",
19211	//       "location": "path",
19212	//       "required": true,
19213	//       "type": "string"
19214	//     }
19215	//   },
19216	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19217	//   "request": {
19218	//     "$ref": "LandingPage"
19219	//   },
19220	//   "response": {
19221	//     "$ref": "LandingPage"
19222	//   },
19223	//   "scopes": [
19224	//     "https://www.googleapis.com/auth/dfatrafficking"
19225	//   ]
19226	// }
19227
19228}
19229
19230// method id "dfareporting.advertiserLandingPages.update":
19231
19232type AdvertiserLandingPagesUpdateCall struct {
19233	s           *Service
19234	profileId   int64
19235	landingpage *LandingPage
19236	urlParams_  gensupport.URLParams
19237	ctx_        context.Context
19238	header_     http.Header
19239}
19240
19241// Update: Updates an existing landing page.
19242func (r *AdvertiserLandingPagesService) Update(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesUpdateCall {
19243	c := &AdvertiserLandingPagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19244	c.profileId = profileId
19245	c.landingpage = landingpage
19246	return c
19247}
19248
19249// Fields allows partial responses to be retrieved. See
19250// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19251// for more information.
19252func (c *AdvertiserLandingPagesUpdateCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesUpdateCall {
19253	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19254	return c
19255}
19256
19257// Context sets the context to be used in this call's Do method. Any
19258// pending HTTP request will be aborted if the provided context is
19259// canceled.
19260func (c *AdvertiserLandingPagesUpdateCall) Context(ctx context.Context) *AdvertiserLandingPagesUpdateCall {
19261	c.ctx_ = ctx
19262	return c
19263}
19264
19265// Header returns an http.Header that can be modified by the caller to
19266// add HTTP headers to the request.
19267func (c *AdvertiserLandingPagesUpdateCall) Header() http.Header {
19268	if c.header_ == nil {
19269		c.header_ = make(http.Header)
19270	}
19271	return c.header_
19272}
19273
19274func (c *AdvertiserLandingPagesUpdateCall) doRequest(alt string) (*http.Response, error) {
19275	reqHeaders := make(http.Header)
19276	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
19277	for k, v := range c.header_ {
19278		reqHeaders[k] = v
19279	}
19280	reqHeaders.Set("User-Agent", c.s.userAgent())
19281	var body io.Reader = nil
19282	body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
19283	if err != nil {
19284		return nil, err
19285	}
19286	reqHeaders.Set("Content-Type", "application/json")
19287	c.urlParams_.Set("alt", alt)
19288	c.urlParams_.Set("prettyPrint", "false")
19289	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19290	urls += "?" + c.urlParams_.Encode()
19291	req, err := http.NewRequest("PUT", urls, body)
19292	if err != nil {
19293		return nil, err
19294	}
19295	req.Header = reqHeaders
19296	googleapi.Expand(req.URL, map[string]string{
19297		"profileId": strconv.FormatInt(c.profileId, 10),
19298	})
19299	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19300}
19301
19302// Do executes the "dfareporting.advertiserLandingPages.update" call.
19303// Exactly one of *LandingPage or error will be non-nil. Any non-2xx
19304// status code is an error. Response headers are in either
19305// *LandingPage.ServerResponse.Header or (if a response was returned at
19306// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19307// to check whether the returned error was because
19308// http.StatusNotModified was returned.
19309func (c *AdvertiserLandingPagesUpdateCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
19310	gensupport.SetOptions(c.urlParams_, opts...)
19311	res, err := c.doRequest("json")
19312	if res != nil && res.StatusCode == http.StatusNotModified {
19313		if res.Body != nil {
19314			res.Body.Close()
19315		}
19316		return nil, &googleapi.Error{
19317			Code:   res.StatusCode,
19318			Header: res.Header,
19319		}
19320	}
19321	if err != nil {
19322		return nil, err
19323	}
19324	defer googleapi.CloseBody(res)
19325	if err := googleapi.CheckResponse(res); err != nil {
19326		return nil, err
19327	}
19328	ret := &LandingPage{
19329		ServerResponse: googleapi.ServerResponse{
19330			Header:         res.Header,
19331			HTTPStatusCode: res.StatusCode,
19332		},
19333	}
19334	target := &ret
19335	if err := gensupport.DecodeResponse(target, res); err != nil {
19336		return nil, err
19337	}
19338	return ret, nil
19339	// {
19340	//   "description": "Updates an existing landing page.",
19341	//   "httpMethod": "PUT",
19342	//   "id": "dfareporting.advertiserLandingPages.update",
19343	//   "parameterOrder": [
19344	//     "profileId"
19345	//   ],
19346	//   "parameters": {
19347	//     "profileId": {
19348	//       "description": "User profile ID associated with this request.",
19349	//       "format": "int64",
19350	//       "location": "path",
19351	//       "required": true,
19352	//       "type": "string"
19353	//     }
19354	//   },
19355	//   "path": "userprofiles/{profileId}/advertiserLandingPages",
19356	//   "request": {
19357	//     "$ref": "LandingPage"
19358	//   },
19359	//   "response": {
19360	//     "$ref": "LandingPage"
19361	//   },
19362	//   "scopes": [
19363	//     "https://www.googleapis.com/auth/dfatrafficking"
19364	//   ]
19365	// }
19366
19367}
19368
19369// method id "dfareporting.advertisers.get":
19370
19371type AdvertisersGetCall struct {
19372	s            *Service
19373	profileId    int64
19374	id           int64
19375	urlParams_   gensupport.URLParams
19376	ifNoneMatch_ string
19377	ctx_         context.Context
19378	header_      http.Header
19379}
19380
19381// Get: Gets one advertiser by ID.
19382func (r *AdvertisersService) Get(profileId int64, id int64) *AdvertisersGetCall {
19383	c := &AdvertisersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19384	c.profileId = profileId
19385	c.id = id
19386	return c
19387}
19388
19389// Fields allows partial responses to be retrieved. See
19390// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19391// for more information.
19392func (c *AdvertisersGetCall) Fields(s ...googleapi.Field) *AdvertisersGetCall {
19393	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19394	return c
19395}
19396
19397// IfNoneMatch sets the optional parameter which makes the operation
19398// fail if the object's ETag matches the given value. This is useful for
19399// getting updates only after the object has changed since the last
19400// request. Use googleapi.IsNotModified to check whether the response
19401// error from Do is the result of In-None-Match.
19402func (c *AdvertisersGetCall) IfNoneMatch(entityTag string) *AdvertisersGetCall {
19403	c.ifNoneMatch_ = entityTag
19404	return c
19405}
19406
19407// Context sets the context to be used in this call's Do method. Any
19408// pending HTTP request will be aborted if the provided context is
19409// canceled.
19410func (c *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
19411	c.ctx_ = ctx
19412	return c
19413}
19414
19415// Header returns an http.Header that can be modified by the caller to
19416// add HTTP headers to the request.
19417func (c *AdvertisersGetCall) Header() http.Header {
19418	if c.header_ == nil {
19419		c.header_ = make(http.Header)
19420	}
19421	return c.header_
19422}
19423
19424func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
19425	reqHeaders := make(http.Header)
19426	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
19427	for k, v := range c.header_ {
19428		reqHeaders[k] = v
19429	}
19430	reqHeaders.Set("User-Agent", c.s.userAgent())
19431	if c.ifNoneMatch_ != "" {
19432		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19433	}
19434	var body io.Reader = nil
19435	c.urlParams_.Set("alt", alt)
19436	c.urlParams_.Set("prettyPrint", "false")
19437	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers/{id}")
19438	urls += "?" + c.urlParams_.Encode()
19439	req, err := http.NewRequest("GET", urls, body)
19440	if err != nil {
19441		return nil, err
19442	}
19443	req.Header = reqHeaders
19444	googleapi.Expand(req.URL, map[string]string{
19445		"profileId": strconv.FormatInt(c.profileId, 10),
19446		"id":        strconv.FormatInt(c.id, 10),
19447	})
19448	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19449}
19450
19451// Do executes the "dfareporting.advertisers.get" call.
19452// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
19453// status code is an error. Response headers are in either
19454// *Advertiser.ServerResponse.Header or (if a response was returned at
19455// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19456// to check whether the returned error was because
19457// http.StatusNotModified was returned.
19458func (c *AdvertisersGetCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
19459	gensupport.SetOptions(c.urlParams_, opts...)
19460	res, err := c.doRequest("json")
19461	if res != nil && res.StatusCode == http.StatusNotModified {
19462		if res.Body != nil {
19463			res.Body.Close()
19464		}
19465		return nil, &googleapi.Error{
19466			Code:   res.StatusCode,
19467			Header: res.Header,
19468		}
19469	}
19470	if err != nil {
19471		return nil, err
19472	}
19473	defer googleapi.CloseBody(res)
19474	if err := googleapi.CheckResponse(res); err != nil {
19475		return nil, err
19476	}
19477	ret := &Advertiser{
19478		ServerResponse: googleapi.ServerResponse{
19479			Header:         res.Header,
19480			HTTPStatusCode: res.StatusCode,
19481		},
19482	}
19483	target := &ret
19484	if err := gensupport.DecodeResponse(target, res); err != nil {
19485		return nil, err
19486	}
19487	return ret, nil
19488	// {
19489	//   "description": "Gets one advertiser by ID.",
19490	//   "httpMethod": "GET",
19491	//   "id": "dfareporting.advertisers.get",
19492	//   "parameterOrder": [
19493	//     "profileId",
19494	//     "id"
19495	//   ],
19496	//   "parameters": {
19497	//     "id": {
19498	//       "description": "Advertiser ID.",
19499	//       "format": "int64",
19500	//       "location": "path",
19501	//       "required": true,
19502	//       "type": "string"
19503	//     },
19504	//     "profileId": {
19505	//       "description": "User profile ID associated with this request.",
19506	//       "format": "int64",
19507	//       "location": "path",
19508	//       "required": true,
19509	//       "type": "string"
19510	//     }
19511	//   },
19512	//   "path": "userprofiles/{profileId}/advertisers/{id}",
19513	//   "response": {
19514	//     "$ref": "Advertiser"
19515	//   },
19516	//   "scopes": [
19517	//     "https://www.googleapis.com/auth/dfatrafficking"
19518	//   ]
19519	// }
19520
19521}
19522
19523// method id "dfareporting.advertisers.insert":
19524
19525type AdvertisersInsertCall struct {
19526	s          *Service
19527	profileId  int64
19528	advertiser *Advertiser
19529	urlParams_ gensupport.URLParams
19530	ctx_       context.Context
19531	header_    http.Header
19532}
19533
19534// Insert: Inserts a new advertiser.
19535func (r *AdvertisersService) Insert(profileId int64, advertiser *Advertiser) *AdvertisersInsertCall {
19536	c := &AdvertisersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19537	c.profileId = profileId
19538	c.advertiser = advertiser
19539	return c
19540}
19541
19542// Fields allows partial responses to be retrieved. See
19543// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19544// for more information.
19545func (c *AdvertisersInsertCall) Fields(s ...googleapi.Field) *AdvertisersInsertCall {
19546	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19547	return c
19548}
19549
19550// Context sets the context to be used in this call's Do method. Any
19551// pending HTTP request will be aborted if the provided context is
19552// canceled.
19553func (c *AdvertisersInsertCall) Context(ctx context.Context) *AdvertisersInsertCall {
19554	c.ctx_ = ctx
19555	return c
19556}
19557
19558// Header returns an http.Header that can be modified by the caller to
19559// add HTTP headers to the request.
19560func (c *AdvertisersInsertCall) Header() http.Header {
19561	if c.header_ == nil {
19562		c.header_ = make(http.Header)
19563	}
19564	return c.header_
19565}
19566
19567func (c *AdvertisersInsertCall) doRequest(alt string) (*http.Response, error) {
19568	reqHeaders := make(http.Header)
19569	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
19570	for k, v := range c.header_ {
19571		reqHeaders[k] = v
19572	}
19573	reqHeaders.Set("User-Agent", c.s.userAgent())
19574	var body io.Reader = nil
19575	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
19576	if err != nil {
19577		return nil, err
19578	}
19579	reqHeaders.Set("Content-Type", "application/json")
19580	c.urlParams_.Set("alt", alt)
19581	c.urlParams_.Set("prettyPrint", "false")
19582	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
19583	urls += "?" + c.urlParams_.Encode()
19584	req, err := http.NewRequest("POST", urls, body)
19585	if err != nil {
19586		return nil, err
19587	}
19588	req.Header = reqHeaders
19589	googleapi.Expand(req.URL, map[string]string{
19590		"profileId": strconv.FormatInt(c.profileId, 10),
19591	})
19592	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19593}
19594
19595// Do executes the "dfareporting.advertisers.insert" call.
19596// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
19597// status code is an error. Response headers are in either
19598// *Advertiser.ServerResponse.Header or (if a response was returned at
19599// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19600// to check whether the returned error was because
19601// http.StatusNotModified was returned.
19602func (c *AdvertisersInsertCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
19603	gensupport.SetOptions(c.urlParams_, opts...)
19604	res, err := c.doRequest("json")
19605	if res != nil && res.StatusCode == http.StatusNotModified {
19606		if res.Body != nil {
19607			res.Body.Close()
19608		}
19609		return nil, &googleapi.Error{
19610			Code:   res.StatusCode,
19611			Header: res.Header,
19612		}
19613	}
19614	if err != nil {
19615		return nil, err
19616	}
19617	defer googleapi.CloseBody(res)
19618	if err := googleapi.CheckResponse(res); err != nil {
19619		return nil, err
19620	}
19621	ret := &Advertiser{
19622		ServerResponse: googleapi.ServerResponse{
19623			Header:         res.Header,
19624			HTTPStatusCode: res.StatusCode,
19625		},
19626	}
19627	target := &ret
19628	if err := gensupport.DecodeResponse(target, res); err != nil {
19629		return nil, err
19630	}
19631	return ret, nil
19632	// {
19633	//   "description": "Inserts a new advertiser.",
19634	//   "httpMethod": "POST",
19635	//   "id": "dfareporting.advertisers.insert",
19636	//   "parameterOrder": [
19637	//     "profileId"
19638	//   ],
19639	//   "parameters": {
19640	//     "profileId": {
19641	//       "description": "User profile ID associated with this request.",
19642	//       "format": "int64",
19643	//       "location": "path",
19644	//       "required": true,
19645	//       "type": "string"
19646	//     }
19647	//   },
19648	//   "path": "userprofiles/{profileId}/advertisers",
19649	//   "request": {
19650	//     "$ref": "Advertiser"
19651	//   },
19652	//   "response": {
19653	//     "$ref": "Advertiser"
19654	//   },
19655	//   "scopes": [
19656	//     "https://www.googleapis.com/auth/dfatrafficking"
19657	//   ]
19658	// }
19659
19660}
19661
19662// method id "dfareporting.advertisers.list":
19663
19664type AdvertisersListCall struct {
19665	s            *Service
19666	profileId    int64
19667	urlParams_   gensupport.URLParams
19668	ifNoneMatch_ string
19669	ctx_         context.Context
19670	header_      http.Header
19671}
19672
19673// List: Retrieves a list of advertisers, possibly filtered. This method
19674// supports paging.
19675func (r *AdvertisersService) List(profileId int64) *AdvertisersListCall {
19676	c := &AdvertisersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19677	c.profileId = profileId
19678	return c
19679}
19680
19681// AdvertiserGroupIds sets the optional parameter "advertiserGroupIds":
19682// Select only advertisers with these advertiser group IDs.
19683func (c *AdvertisersListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *AdvertisersListCall {
19684	var advertiserGroupIds_ []string
19685	for _, v := range advertiserGroupIds {
19686		advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
19687	}
19688	c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
19689	return c
19690}
19691
19692// FloodlightConfigurationIds sets the optional parameter
19693// "floodlightConfigurationIds": Select only advertisers with these
19694// floodlight configuration IDs.
19695func (c *AdvertisersListCall) FloodlightConfigurationIds(floodlightConfigurationIds ...int64) *AdvertisersListCall {
19696	var floodlightConfigurationIds_ []string
19697	for _, v := range floodlightConfigurationIds {
19698		floodlightConfigurationIds_ = append(floodlightConfigurationIds_, fmt.Sprint(v))
19699	}
19700	c.urlParams_.SetMulti("floodlightConfigurationIds", floodlightConfigurationIds_)
19701	return c
19702}
19703
19704// Ids sets the optional parameter "ids": Select only advertisers with
19705// these IDs.
19706func (c *AdvertisersListCall) Ids(ids ...int64) *AdvertisersListCall {
19707	var ids_ []string
19708	for _, v := range ids {
19709		ids_ = append(ids_, fmt.Sprint(v))
19710	}
19711	c.urlParams_.SetMulti("ids", ids_)
19712	return c
19713}
19714
19715// IncludeAdvertisersWithoutGroupsOnly sets the optional parameter
19716// "includeAdvertisersWithoutGroupsOnly": Select only advertisers which
19717// do not belong to any advertiser group.
19718func (c *AdvertisersListCall) IncludeAdvertisersWithoutGroupsOnly(includeAdvertisersWithoutGroupsOnly bool) *AdvertisersListCall {
19719	c.urlParams_.Set("includeAdvertisersWithoutGroupsOnly", fmt.Sprint(includeAdvertisersWithoutGroupsOnly))
19720	return c
19721}
19722
19723// MaxResults sets the optional parameter "maxResults": Maximum number
19724// of results to return.
19725func (c *AdvertisersListCall) MaxResults(maxResults int64) *AdvertisersListCall {
19726	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19727	return c
19728}
19729
19730// OnlyParent sets the optional parameter "onlyParent": Select only
19731// advertisers which use another advertiser's floodlight configuration.
19732func (c *AdvertisersListCall) OnlyParent(onlyParent bool) *AdvertisersListCall {
19733	c.urlParams_.Set("onlyParent", fmt.Sprint(onlyParent))
19734	return c
19735}
19736
19737// PageToken sets the optional parameter "pageToken": Value of the
19738// nextPageToken from the previous result page.
19739func (c *AdvertisersListCall) PageToken(pageToken string) *AdvertisersListCall {
19740	c.urlParams_.Set("pageToken", pageToken)
19741	return c
19742}
19743
19744// SearchString sets the optional parameter "searchString": Allows
19745// searching for objects by name or ID. Wildcards (*) are allowed. For
19746// example, "advertiser*2015" will return objects with names like
19747// "advertiser June 2015", "advertiser April 2015", or simply
19748// "advertiser 2015". Most of the searches also add wildcards implicitly
19749// at the start and the end of the search string. For example, a search
19750// string of "advertiser" will match objects with name "my advertiser",
19751// "advertiser 2015", or simply "advertiser".
19752func (c *AdvertisersListCall) SearchString(searchString string) *AdvertisersListCall {
19753	c.urlParams_.Set("searchString", searchString)
19754	return c
19755}
19756
19757// SortField sets the optional parameter "sortField": Field by which to
19758// sort the list.
19759//
19760// Possible values:
19761//   "ID" (default)
19762//   "NAME"
19763func (c *AdvertisersListCall) SortField(sortField string) *AdvertisersListCall {
19764	c.urlParams_.Set("sortField", sortField)
19765	return c
19766}
19767
19768// SortOrder sets the optional parameter "sortOrder": Order of sorted
19769// results.
19770//
19771// Possible values:
19772//   "ASCENDING" (default)
19773//   "DESCENDING"
19774func (c *AdvertisersListCall) SortOrder(sortOrder string) *AdvertisersListCall {
19775	c.urlParams_.Set("sortOrder", sortOrder)
19776	return c
19777}
19778
19779// Status sets the optional parameter "status": Select only advertisers
19780// with the specified status.
19781//
19782// Possible values:
19783//   "APPROVED"
19784//   "ON_HOLD"
19785func (c *AdvertisersListCall) Status(status string) *AdvertisersListCall {
19786	c.urlParams_.Set("status", status)
19787	return c
19788}
19789
19790// SubaccountId sets the optional parameter "subaccountId": Select only
19791// advertisers with these subaccount IDs.
19792func (c *AdvertisersListCall) SubaccountId(subaccountId int64) *AdvertisersListCall {
19793	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
19794	return c
19795}
19796
19797// Fields allows partial responses to be retrieved. See
19798// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19799// for more information.
19800func (c *AdvertisersListCall) Fields(s ...googleapi.Field) *AdvertisersListCall {
19801	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19802	return c
19803}
19804
19805// IfNoneMatch sets the optional parameter which makes the operation
19806// fail if the object's ETag matches the given value. This is useful for
19807// getting updates only after the object has changed since the last
19808// request. Use googleapi.IsNotModified to check whether the response
19809// error from Do is the result of In-None-Match.
19810func (c *AdvertisersListCall) IfNoneMatch(entityTag string) *AdvertisersListCall {
19811	c.ifNoneMatch_ = entityTag
19812	return c
19813}
19814
19815// Context sets the context to be used in this call's Do method. Any
19816// pending HTTP request will be aborted if the provided context is
19817// canceled.
19818func (c *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
19819	c.ctx_ = ctx
19820	return c
19821}
19822
19823// Header returns an http.Header that can be modified by the caller to
19824// add HTTP headers to the request.
19825func (c *AdvertisersListCall) Header() http.Header {
19826	if c.header_ == nil {
19827		c.header_ = make(http.Header)
19828	}
19829	return c.header_
19830}
19831
19832func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
19833	reqHeaders := make(http.Header)
19834	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
19835	for k, v := range c.header_ {
19836		reqHeaders[k] = v
19837	}
19838	reqHeaders.Set("User-Agent", c.s.userAgent())
19839	if c.ifNoneMatch_ != "" {
19840		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19841	}
19842	var body io.Reader = nil
19843	c.urlParams_.Set("alt", alt)
19844	c.urlParams_.Set("prettyPrint", "false")
19845	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
19846	urls += "?" + c.urlParams_.Encode()
19847	req, err := http.NewRequest("GET", urls, body)
19848	if err != nil {
19849		return nil, err
19850	}
19851	req.Header = reqHeaders
19852	googleapi.Expand(req.URL, map[string]string{
19853		"profileId": strconv.FormatInt(c.profileId, 10),
19854	})
19855	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19856}
19857
19858// Do executes the "dfareporting.advertisers.list" call.
19859// Exactly one of *AdvertisersListResponse or error will be non-nil. Any
19860// non-2xx status code is an error. Response headers are in either
19861// *AdvertisersListResponse.ServerResponse.Header or (if a response was
19862// returned at all) in error.(*googleapi.Error).Header. Use
19863// googleapi.IsNotModified to check whether the returned error was
19864// because http.StatusNotModified was returned.
19865func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*AdvertisersListResponse, error) {
19866	gensupport.SetOptions(c.urlParams_, opts...)
19867	res, err := c.doRequest("json")
19868	if res != nil && res.StatusCode == http.StatusNotModified {
19869		if res.Body != nil {
19870			res.Body.Close()
19871		}
19872		return nil, &googleapi.Error{
19873			Code:   res.StatusCode,
19874			Header: res.Header,
19875		}
19876	}
19877	if err != nil {
19878		return nil, err
19879	}
19880	defer googleapi.CloseBody(res)
19881	if err := googleapi.CheckResponse(res); err != nil {
19882		return nil, err
19883	}
19884	ret := &AdvertisersListResponse{
19885		ServerResponse: googleapi.ServerResponse{
19886			Header:         res.Header,
19887			HTTPStatusCode: res.StatusCode,
19888		},
19889	}
19890	target := &ret
19891	if err := gensupport.DecodeResponse(target, res); err != nil {
19892		return nil, err
19893	}
19894	return ret, nil
19895	// {
19896	//   "description": "Retrieves a list of advertisers, possibly filtered. This method supports paging.",
19897	//   "httpMethod": "GET",
19898	//   "id": "dfareporting.advertisers.list",
19899	//   "parameterOrder": [
19900	//     "profileId"
19901	//   ],
19902	//   "parameters": {
19903	//     "advertiserGroupIds": {
19904	//       "description": "Select only advertisers with these advertiser group IDs.",
19905	//       "format": "int64",
19906	//       "location": "query",
19907	//       "repeated": true,
19908	//       "type": "string"
19909	//     },
19910	//     "floodlightConfigurationIds": {
19911	//       "description": "Select only advertisers with these floodlight configuration IDs.",
19912	//       "format": "int64",
19913	//       "location": "query",
19914	//       "repeated": true,
19915	//       "type": "string"
19916	//     },
19917	//     "ids": {
19918	//       "description": "Select only advertisers with these IDs.",
19919	//       "format": "int64",
19920	//       "location": "query",
19921	//       "repeated": true,
19922	//       "type": "string"
19923	//     },
19924	//     "includeAdvertisersWithoutGroupsOnly": {
19925	//       "description": "Select only advertisers which do not belong to any advertiser group.",
19926	//       "location": "query",
19927	//       "type": "boolean"
19928	//     },
19929	//     "maxResults": {
19930	//       "default": "1000",
19931	//       "description": "Maximum number of results to return.",
19932	//       "format": "int32",
19933	//       "location": "query",
19934	//       "maximum": "1000",
19935	//       "minimum": "0",
19936	//       "type": "integer"
19937	//     },
19938	//     "onlyParent": {
19939	//       "description": "Select only advertisers which use another advertiser's floodlight configuration.",
19940	//       "location": "query",
19941	//       "type": "boolean"
19942	//     },
19943	//     "pageToken": {
19944	//       "description": "Value of the nextPageToken from the previous result page.",
19945	//       "location": "query",
19946	//       "type": "string"
19947	//     },
19948	//     "profileId": {
19949	//       "description": "User profile ID associated with this request.",
19950	//       "format": "int64",
19951	//       "location": "path",
19952	//       "required": true,
19953	//       "type": "string"
19954	//     },
19955	//     "searchString": {
19956	//       "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\".",
19957	//       "location": "query",
19958	//       "type": "string"
19959	//     },
19960	//     "sortField": {
19961	//       "default": "ID",
19962	//       "description": "Field by which to sort the list.",
19963	//       "enum": [
19964	//         "ID",
19965	//         "NAME"
19966	//       ],
19967	//       "enumDescriptions": [
19968	//         "",
19969	//         ""
19970	//       ],
19971	//       "location": "query",
19972	//       "type": "string"
19973	//     },
19974	//     "sortOrder": {
19975	//       "default": "ASCENDING",
19976	//       "description": "Order of sorted results.",
19977	//       "enum": [
19978	//         "ASCENDING",
19979	//         "DESCENDING"
19980	//       ],
19981	//       "enumDescriptions": [
19982	//         "",
19983	//         ""
19984	//       ],
19985	//       "location": "query",
19986	//       "type": "string"
19987	//     },
19988	//     "status": {
19989	//       "description": "Select only advertisers with the specified status.",
19990	//       "enum": [
19991	//         "APPROVED",
19992	//         "ON_HOLD"
19993	//       ],
19994	//       "enumDescriptions": [
19995	//         "",
19996	//         ""
19997	//       ],
19998	//       "location": "query",
19999	//       "type": "string"
20000	//     },
20001	//     "subaccountId": {
20002	//       "description": "Select only advertisers with these subaccount IDs.",
20003	//       "format": "int64",
20004	//       "location": "query",
20005	//       "type": "string"
20006	//     }
20007	//   },
20008	//   "path": "userprofiles/{profileId}/advertisers",
20009	//   "response": {
20010	//     "$ref": "AdvertisersListResponse"
20011	//   },
20012	//   "scopes": [
20013	//     "https://www.googleapis.com/auth/dfatrafficking"
20014	//   ]
20015	// }
20016
20017}
20018
20019// Pages invokes f for each page of results.
20020// A non-nil error returned from f will halt the iteration.
20021// The provided context supersedes any context provided to the Context method.
20022func (c *AdvertisersListCall) Pages(ctx context.Context, f func(*AdvertisersListResponse) error) error {
20023	c.ctx_ = ctx
20024	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20025	for {
20026		x, err := c.Do()
20027		if err != nil {
20028			return err
20029		}
20030		if err := f(x); err != nil {
20031			return err
20032		}
20033		if x.NextPageToken == "" {
20034			return nil
20035		}
20036		c.PageToken(x.NextPageToken)
20037	}
20038}
20039
20040// method id "dfareporting.advertisers.patch":
20041
20042type AdvertisersPatchCall struct {
20043	s          *Service
20044	profileId  int64
20045	advertiser *Advertiser
20046	urlParams_ gensupport.URLParams
20047	ctx_       context.Context
20048	header_    http.Header
20049}
20050
20051// Patch: Updates an existing advertiser. This method supports patch
20052// semantics.
20053func (r *AdvertisersService) Patch(profileId int64, id int64, advertiser *Advertiser) *AdvertisersPatchCall {
20054	c := &AdvertisersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20055	c.profileId = profileId
20056	c.urlParams_.Set("id", fmt.Sprint(id))
20057	c.advertiser = advertiser
20058	return c
20059}
20060
20061// Fields allows partial responses to be retrieved. See
20062// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20063// for more information.
20064func (c *AdvertisersPatchCall) Fields(s ...googleapi.Field) *AdvertisersPatchCall {
20065	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20066	return c
20067}
20068
20069// Context sets the context to be used in this call's Do method. Any
20070// pending HTTP request will be aborted if the provided context is
20071// canceled.
20072func (c *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall {
20073	c.ctx_ = ctx
20074	return c
20075}
20076
20077// Header returns an http.Header that can be modified by the caller to
20078// add HTTP headers to the request.
20079func (c *AdvertisersPatchCall) Header() http.Header {
20080	if c.header_ == nil {
20081		c.header_ = make(http.Header)
20082	}
20083	return c.header_
20084}
20085
20086func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) {
20087	reqHeaders := make(http.Header)
20088	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
20089	for k, v := range c.header_ {
20090		reqHeaders[k] = v
20091	}
20092	reqHeaders.Set("User-Agent", c.s.userAgent())
20093	var body io.Reader = nil
20094	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
20095	if err != nil {
20096		return nil, err
20097	}
20098	reqHeaders.Set("Content-Type", "application/json")
20099	c.urlParams_.Set("alt", alt)
20100	c.urlParams_.Set("prettyPrint", "false")
20101	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20102	urls += "?" + c.urlParams_.Encode()
20103	req, err := http.NewRequest("PATCH", urls, body)
20104	if err != nil {
20105		return nil, err
20106	}
20107	req.Header = reqHeaders
20108	googleapi.Expand(req.URL, map[string]string{
20109		"profileId": strconv.FormatInt(c.profileId, 10),
20110	})
20111	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20112}
20113
20114// Do executes the "dfareporting.advertisers.patch" call.
20115// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
20116// status code is an error. Response headers are in either
20117// *Advertiser.ServerResponse.Header or (if a response was returned at
20118// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20119// to check whether the returned error was because
20120// http.StatusNotModified was returned.
20121func (c *AdvertisersPatchCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
20122	gensupport.SetOptions(c.urlParams_, opts...)
20123	res, err := c.doRequest("json")
20124	if res != nil && res.StatusCode == http.StatusNotModified {
20125		if res.Body != nil {
20126			res.Body.Close()
20127		}
20128		return nil, &googleapi.Error{
20129			Code:   res.StatusCode,
20130			Header: res.Header,
20131		}
20132	}
20133	if err != nil {
20134		return nil, err
20135	}
20136	defer googleapi.CloseBody(res)
20137	if err := googleapi.CheckResponse(res); err != nil {
20138		return nil, err
20139	}
20140	ret := &Advertiser{
20141		ServerResponse: googleapi.ServerResponse{
20142			Header:         res.Header,
20143			HTTPStatusCode: res.StatusCode,
20144		},
20145	}
20146	target := &ret
20147	if err := gensupport.DecodeResponse(target, res); err != nil {
20148		return nil, err
20149	}
20150	return ret, nil
20151	// {
20152	//   "description": "Updates an existing advertiser. This method supports patch semantics.",
20153	//   "httpMethod": "PATCH",
20154	//   "id": "dfareporting.advertisers.patch",
20155	//   "parameterOrder": [
20156	//     "profileId",
20157	//     "id"
20158	//   ],
20159	//   "parameters": {
20160	//     "id": {
20161	//       "description": "Advertiser ID.",
20162	//       "format": "int64",
20163	//       "location": "query",
20164	//       "required": true,
20165	//       "type": "string"
20166	//     },
20167	//     "profileId": {
20168	//       "description": "User profile ID associated with this request.",
20169	//       "format": "int64",
20170	//       "location": "path",
20171	//       "required": true,
20172	//       "type": "string"
20173	//     }
20174	//   },
20175	//   "path": "userprofiles/{profileId}/advertisers",
20176	//   "request": {
20177	//     "$ref": "Advertiser"
20178	//   },
20179	//   "response": {
20180	//     "$ref": "Advertiser"
20181	//   },
20182	//   "scopes": [
20183	//     "https://www.googleapis.com/auth/dfatrafficking"
20184	//   ]
20185	// }
20186
20187}
20188
20189// method id "dfareporting.advertisers.update":
20190
20191type AdvertisersUpdateCall struct {
20192	s          *Service
20193	profileId  int64
20194	advertiser *Advertiser
20195	urlParams_ gensupport.URLParams
20196	ctx_       context.Context
20197	header_    http.Header
20198}
20199
20200// Update: Updates an existing advertiser.
20201func (r *AdvertisersService) Update(profileId int64, advertiser *Advertiser) *AdvertisersUpdateCall {
20202	c := &AdvertisersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20203	c.profileId = profileId
20204	c.advertiser = advertiser
20205	return c
20206}
20207
20208// Fields allows partial responses to be retrieved. See
20209// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20210// for more information.
20211func (c *AdvertisersUpdateCall) Fields(s ...googleapi.Field) *AdvertisersUpdateCall {
20212	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20213	return c
20214}
20215
20216// Context sets the context to be used in this call's Do method. Any
20217// pending HTTP request will be aborted if the provided context is
20218// canceled.
20219func (c *AdvertisersUpdateCall) Context(ctx context.Context) *AdvertisersUpdateCall {
20220	c.ctx_ = ctx
20221	return c
20222}
20223
20224// Header returns an http.Header that can be modified by the caller to
20225// add HTTP headers to the request.
20226func (c *AdvertisersUpdateCall) Header() http.Header {
20227	if c.header_ == nil {
20228		c.header_ = make(http.Header)
20229	}
20230	return c.header_
20231}
20232
20233func (c *AdvertisersUpdateCall) doRequest(alt string) (*http.Response, error) {
20234	reqHeaders := make(http.Header)
20235	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
20236	for k, v := range c.header_ {
20237		reqHeaders[k] = v
20238	}
20239	reqHeaders.Set("User-Agent", c.s.userAgent())
20240	var body io.Reader = nil
20241	body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
20242	if err != nil {
20243		return nil, err
20244	}
20245	reqHeaders.Set("Content-Type", "application/json")
20246	c.urlParams_.Set("alt", alt)
20247	c.urlParams_.Set("prettyPrint", "false")
20248	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20249	urls += "?" + c.urlParams_.Encode()
20250	req, err := http.NewRequest("PUT", urls, body)
20251	if err != nil {
20252		return nil, err
20253	}
20254	req.Header = reqHeaders
20255	googleapi.Expand(req.URL, map[string]string{
20256		"profileId": strconv.FormatInt(c.profileId, 10),
20257	})
20258	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20259}
20260
20261// Do executes the "dfareporting.advertisers.update" call.
20262// Exactly one of *Advertiser or error will be non-nil. Any non-2xx
20263// status code is an error. Response headers are in either
20264// *Advertiser.ServerResponse.Header or (if a response was returned at
20265// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20266// to check whether the returned error was because
20267// http.StatusNotModified was returned.
20268func (c *AdvertisersUpdateCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
20269	gensupport.SetOptions(c.urlParams_, opts...)
20270	res, err := c.doRequest("json")
20271	if res != nil && res.StatusCode == http.StatusNotModified {
20272		if res.Body != nil {
20273			res.Body.Close()
20274		}
20275		return nil, &googleapi.Error{
20276			Code:   res.StatusCode,
20277			Header: res.Header,
20278		}
20279	}
20280	if err != nil {
20281		return nil, err
20282	}
20283	defer googleapi.CloseBody(res)
20284	if err := googleapi.CheckResponse(res); err != nil {
20285		return nil, err
20286	}
20287	ret := &Advertiser{
20288		ServerResponse: googleapi.ServerResponse{
20289			Header:         res.Header,
20290			HTTPStatusCode: res.StatusCode,
20291		},
20292	}
20293	target := &ret
20294	if err := gensupport.DecodeResponse(target, res); err != nil {
20295		return nil, err
20296	}
20297	return ret, nil
20298	// {
20299	//   "description": "Updates an existing advertiser.",
20300	//   "httpMethod": "PUT",
20301	//   "id": "dfareporting.advertisers.update",
20302	//   "parameterOrder": [
20303	//     "profileId"
20304	//   ],
20305	//   "parameters": {
20306	//     "profileId": {
20307	//       "description": "User profile ID associated with this request.",
20308	//       "format": "int64",
20309	//       "location": "path",
20310	//       "required": true,
20311	//       "type": "string"
20312	//     }
20313	//   },
20314	//   "path": "userprofiles/{profileId}/advertisers",
20315	//   "request": {
20316	//     "$ref": "Advertiser"
20317	//   },
20318	//   "response": {
20319	//     "$ref": "Advertiser"
20320	//   },
20321	//   "scopes": [
20322	//     "https://www.googleapis.com/auth/dfatrafficking"
20323	//   ]
20324	// }
20325
20326}
20327
20328// method id "dfareporting.browsers.list":
20329
20330type BrowsersListCall struct {
20331	s            *Service
20332	profileId    int64
20333	urlParams_   gensupport.URLParams
20334	ifNoneMatch_ string
20335	ctx_         context.Context
20336	header_      http.Header
20337}
20338
20339// List: Retrieves a list of browsers.
20340func (r *BrowsersService) List(profileId int64) *BrowsersListCall {
20341	c := &BrowsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20342	c.profileId = profileId
20343	return c
20344}
20345
20346// Fields allows partial responses to be retrieved. See
20347// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20348// for more information.
20349func (c *BrowsersListCall) Fields(s ...googleapi.Field) *BrowsersListCall {
20350	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20351	return c
20352}
20353
20354// IfNoneMatch sets the optional parameter which makes the operation
20355// fail if the object's ETag matches the given value. This is useful for
20356// getting updates only after the object has changed since the last
20357// request. Use googleapi.IsNotModified to check whether the response
20358// error from Do is the result of In-None-Match.
20359func (c *BrowsersListCall) IfNoneMatch(entityTag string) *BrowsersListCall {
20360	c.ifNoneMatch_ = entityTag
20361	return c
20362}
20363
20364// Context sets the context to be used in this call's Do method. Any
20365// pending HTTP request will be aborted if the provided context is
20366// canceled.
20367func (c *BrowsersListCall) Context(ctx context.Context) *BrowsersListCall {
20368	c.ctx_ = ctx
20369	return c
20370}
20371
20372// Header returns an http.Header that can be modified by the caller to
20373// add HTTP headers to the request.
20374func (c *BrowsersListCall) Header() http.Header {
20375	if c.header_ == nil {
20376		c.header_ = make(http.Header)
20377	}
20378	return c.header_
20379}
20380
20381func (c *BrowsersListCall) doRequest(alt string) (*http.Response, error) {
20382	reqHeaders := make(http.Header)
20383	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
20384	for k, v := range c.header_ {
20385		reqHeaders[k] = v
20386	}
20387	reqHeaders.Set("User-Agent", c.s.userAgent())
20388	if c.ifNoneMatch_ != "" {
20389		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20390	}
20391	var body io.Reader = nil
20392	c.urlParams_.Set("alt", alt)
20393	c.urlParams_.Set("prettyPrint", "false")
20394	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/browsers")
20395	urls += "?" + c.urlParams_.Encode()
20396	req, err := http.NewRequest("GET", urls, body)
20397	if err != nil {
20398		return nil, err
20399	}
20400	req.Header = reqHeaders
20401	googleapi.Expand(req.URL, map[string]string{
20402		"profileId": strconv.FormatInt(c.profileId, 10),
20403	})
20404	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20405}
20406
20407// Do executes the "dfareporting.browsers.list" call.
20408// Exactly one of *BrowsersListResponse or error will be non-nil. Any
20409// non-2xx status code is an error. Response headers are in either
20410// *BrowsersListResponse.ServerResponse.Header or (if a response was
20411// returned at all) in error.(*googleapi.Error).Header. Use
20412// googleapi.IsNotModified to check whether the returned error was
20413// because http.StatusNotModified was returned.
20414func (c *BrowsersListCall) Do(opts ...googleapi.CallOption) (*BrowsersListResponse, error) {
20415	gensupport.SetOptions(c.urlParams_, opts...)
20416	res, err := c.doRequest("json")
20417	if res != nil && res.StatusCode == http.StatusNotModified {
20418		if res.Body != nil {
20419			res.Body.Close()
20420		}
20421		return nil, &googleapi.Error{
20422			Code:   res.StatusCode,
20423			Header: res.Header,
20424		}
20425	}
20426	if err != nil {
20427		return nil, err
20428	}
20429	defer googleapi.CloseBody(res)
20430	if err := googleapi.CheckResponse(res); err != nil {
20431		return nil, err
20432	}
20433	ret := &BrowsersListResponse{
20434		ServerResponse: googleapi.ServerResponse{
20435			Header:         res.Header,
20436			HTTPStatusCode: res.StatusCode,
20437		},
20438	}
20439	target := &ret
20440	if err := gensupport.DecodeResponse(target, res); err != nil {
20441		return nil, err
20442	}
20443	return ret, nil
20444	// {
20445	//   "description": "Retrieves a list of browsers.",
20446	//   "httpMethod": "GET",
20447	//   "id": "dfareporting.browsers.list",
20448	//   "parameterOrder": [
20449	//     "profileId"
20450	//   ],
20451	//   "parameters": {
20452	//     "profileId": {
20453	//       "description": "User profile ID associated with this request.",
20454	//       "format": "int64",
20455	//       "location": "path",
20456	//       "required": true,
20457	//       "type": "string"
20458	//     }
20459	//   },
20460	//   "path": "userprofiles/{profileId}/browsers",
20461	//   "response": {
20462	//     "$ref": "BrowsersListResponse"
20463	//   },
20464	//   "scopes": [
20465	//     "https://www.googleapis.com/auth/dfatrafficking"
20466	//   ]
20467	// }
20468
20469}
20470
20471// method id "dfareporting.campaignCreativeAssociations.insert":
20472
20473type CampaignCreativeAssociationsInsertCall struct {
20474	s                           *Service
20475	profileId                   int64
20476	campaignId                  int64
20477	campaigncreativeassociation *CampaignCreativeAssociation
20478	urlParams_                  gensupport.URLParams
20479	ctx_                        context.Context
20480	header_                     http.Header
20481}
20482
20483// Insert: Associates a creative with the specified campaign. This
20484// method creates a default ad with dimensions matching the creative in
20485// the campaign if such a default ad does not exist already.
20486func (r *CampaignCreativeAssociationsService) Insert(profileId int64, campaignId int64, campaigncreativeassociation *CampaignCreativeAssociation) *CampaignCreativeAssociationsInsertCall {
20487	c := &CampaignCreativeAssociationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20488	c.profileId = profileId
20489	c.campaignId = campaignId
20490	c.campaigncreativeassociation = campaigncreativeassociation
20491	return c
20492}
20493
20494// Fields allows partial responses to be retrieved. See
20495// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20496// for more information.
20497func (c *CampaignCreativeAssociationsInsertCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsInsertCall {
20498	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20499	return c
20500}
20501
20502// Context sets the context to be used in this call's Do method. Any
20503// pending HTTP request will be aborted if the provided context is
20504// canceled.
20505func (c *CampaignCreativeAssociationsInsertCall) Context(ctx context.Context) *CampaignCreativeAssociationsInsertCall {
20506	c.ctx_ = ctx
20507	return c
20508}
20509
20510// Header returns an http.Header that can be modified by the caller to
20511// add HTTP headers to the request.
20512func (c *CampaignCreativeAssociationsInsertCall) Header() http.Header {
20513	if c.header_ == nil {
20514		c.header_ = make(http.Header)
20515	}
20516	return c.header_
20517}
20518
20519func (c *CampaignCreativeAssociationsInsertCall) doRequest(alt string) (*http.Response, error) {
20520	reqHeaders := make(http.Header)
20521	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
20522	for k, v := range c.header_ {
20523		reqHeaders[k] = v
20524	}
20525	reqHeaders.Set("User-Agent", c.s.userAgent())
20526	var body io.Reader = nil
20527	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaigncreativeassociation)
20528	if err != nil {
20529		return nil, err
20530	}
20531	reqHeaders.Set("Content-Type", "application/json")
20532	c.urlParams_.Set("alt", alt)
20533	c.urlParams_.Set("prettyPrint", "false")
20534	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
20535	urls += "?" + c.urlParams_.Encode()
20536	req, err := http.NewRequest("POST", urls, body)
20537	if err != nil {
20538		return nil, err
20539	}
20540	req.Header = reqHeaders
20541	googleapi.Expand(req.URL, map[string]string{
20542		"profileId":  strconv.FormatInt(c.profileId, 10),
20543		"campaignId": strconv.FormatInt(c.campaignId, 10),
20544	})
20545	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20546}
20547
20548// Do executes the "dfareporting.campaignCreativeAssociations.insert" call.
20549// Exactly one of *CampaignCreativeAssociation or error will be non-nil.
20550// Any non-2xx status code is an error. Response headers are in either
20551// *CampaignCreativeAssociation.ServerResponse.Header or (if a response
20552// was returned at all) in error.(*googleapi.Error).Header. Use
20553// googleapi.IsNotModified to check whether the returned error was
20554// because http.StatusNotModified was returned.
20555func (c *CampaignCreativeAssociationsInsertCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociation, error) {
20556	gensupport.SetOptions(c.urlParams_, opts...)
20557	res, err := c.doRequest("json")
20558	if res != nil && res.StatusCode == http.StatusNotModified {
20559		if res.Body != nil {
20560			res.Body.Close()
20561		}
20562		return nil, &googleapi.Error{
20563			Code:   res.StatusCode,
20564			Header: res.Header,
20565		}
20566	}
20567	if err != nil {
20568		return nil, err
20569	}
20570	defer googleapi.CloseBody(res)
20571	if err := googleapi.CheckResponse(res); err != nil {
20572		return nil, err
20573	}
20574	ret := &CampaignCreativeAssociation{
20575		ServerResponse: googleapi.ServerResponse{
20576			Header:         res.Header,
20577			HTTPStatusCode: res.StatusCode,
20578		},
20579	}
20580	target := &ret
20581	if err := gensupport.DecodeResponse(target, res); err != nil {
20582		return nil, err
20583	}
20584	return ret, nil
20585	// {
20586	//   "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.",
20587	//   "httpMethod": "POST",
20588	//   "id": "dfareporting.campaignCreativeAssociations.insert",
20589	//   "parameterOrder": [
20590	//     "profileId",
20591	//     "campaignId"
20592	//   ],
20593	//   "parameters": {
20594	//     "campaignId": {
20595	//       "description": "Campaign ID in this association.",
20596	//       "format": "int64",
20597	//       "location": "path",
20598	//       "required": true,
20599	//       "type": "string"
20600	//     },
20601	//     "profileId": {
20602	//       "description": "User profile ID associated with this request.",
20603	//       "format": "int64",
20604	//       "location": "path",
20605	//       "required": true,
20606	//       "type": "string"
20607	//     }
20608	//   },
20609	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
20610	//   "request": {
20611	//     "$ref": "CampaignCreativeAssociation"
20612	//   },
20613	//   "response": {
20614	//     "$ref": "CampaignCreativeAssociation"
20615	//   },
20616	//   "scopes": [
20617	//     "https://www.googleapis.com/auth/dfatrafficking"
20618	//   ]
20619	// }
20620
20621}
20622
20623// method id "dfareporting.campaignCreativeAssociations.list":
20624
20625type CampaignCreativeAssociationsListCall struct {
20626	s            *Service
20627	profileId    int64
20628	campaignId   int64
20629	urlParams_   gensupport.URLParams
20630	ifNoneMatch_ string
20631	ctx_         context.Context
20632	header_      http.Header
20633}
20634
20635// List: Retrieves the list of creative IDs associated with the
20636// specified campaign. This method supports paging.
20637func (r *CampaignCreativeAssociationsService) List(profileId int64, campaignId int64) *CampaignCreativeAssociationsListCall {
20638	c := &CampaignCreativeAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20639	c.profileId = profileId
20640	c.campaignId = campaignId
20641	return c
20642}
20643
20644// MaxResults sets the optional parameter "maxResults": Maximum number
20645// of results to return.
20646func (c *CampaignCreativeAssociationsListCall) MaxResults(maxResults int64) *CampaignCreativeAssociationsListCall {
20647	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20648	return c
20649}
20650
20651// PageToken sets the optional parameter "pageToken": Value of the
20652// nextPageToken from the previous result page.
20653func (c *CampaignCreativeAssociationsListCall) PageToken(pageToken string) *CampaignCreativeAssociationsListCall {
20654	c.urlParams_.Set("pageToken", pageToken)
20655	return c
20656}
20657
20658// SortOrder sets the optional parameter "sortOrder": Order of sorted
20659// results.
20660//
20661// Possible values:
20662//   "ASCENDING" (default)
20663//   "DESCENDING"
20664func (c *CampaignCreativeAssociationsListCall) SortOrder(sortOrder string) *CampaignCreativeAssociationsListCall {
20665	c.urlParams_.Set("sortOrder", sortOrder)
20666	return c
20667}
20668
20669// Fields allows partial responses to be retrieved. See
20670// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20671// for more information.
20672func (c *CampaignCreativeAssociationsListCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsListCall {
20673	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20674	return c
20675}
20676
20677// IfNoneMatch sets the optional parameter which makes the operation
20678// fail if the object's ETag matches the given value. This is useful for
20679// getting updates only after the object has changed since the last
20680// request. Use googleapi.IsNotModified to check whether the response
20681// error from Do is the result of In-None-Match.
20682func (c *CampaignCreativeAssociationsListCall) IfNoneMatch(entityTag string) *CampaignCreativeAssociationsListCall {
20683	c.ifNoneMatch_ = entityTag
20684	return c
20685}
20686
20687// Context sets the context to be used in this call's Do method. Any
20688// pending HTTP request will be aborted if the provided context is
20689// canceled.
20690func (c *CampaignCreativeAssociationsListCall) Context(ctx context.Context) *CampaignCreativeAssociationsListCall {
20691	c.ctx_ = ctx
20692	return c
20693}
20694
20695// Header returns an http.Header that can be modified by the caller to
20696// add HTTP headers to the request.
20697func (c *CampaignCreativeAssociationsListCall) Header() http.Header {
20698	if c.header_ == nil {
20699		c.header_ = make(http.Header)
20700	}
20701	return c.header_
20702}
20703
20704func (c *CampaignCreativeAssociationsListCall) doRequest(alt string) (*http.Response, error) {
20705	reqHeaders := make(http.Header)
20706	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
20707	for k, v := range c.header_ {
20708		reqHeaders[k] = v
20709	}
20710	reqHeaders.Set("User-Agent", c.s.userAgent())
20711	if c.ifNoneMatch_ != "" {
20712		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20713	}
20714	var body io.Reader = nil
20715	c.urlParams_.Set("alt", alt)
20716	c.urlParams_.Set("prettyPrint", "false")
20717	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
20718	urls += "?" + c.urlParams_.Encode()
20719	req, err := http.NewRequest("GET", urls, body)
20720	if err != nil {
20721		return nil, err
20722	}
20723	req.Header = reqHeaders
20724	googleapi.Expand(req.URL, map[string]string{
20725		"profileId":  strconv.FormatInt(c.profileId, 10),
20726		"campaignId": strconv.FormatInt(c.campaignId, 10),
20727	})
20728	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20729}
20730
20731// Do executes the "dfareporting.campaignCreativeAssociations.list" call.
20732// Exactly one of *CampaignCreativeAssociationsListResponse or error
20733// will be non-nil. Any non-2xx status code is an error. Response
20734// headers are in either
20735// *CampaignCreativeAssociationsListResponse.ServerResponse.Header or
20736// (if a response was returned at all) in
20737// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20738// whether the returned error was because http.StatusNotModified was
20739// returned.
20740func (c *CampaignCreativeAssociationsListCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociationsListResponse, error) {
20741	gensupport.SetOptions(c.urlParams_, opts...)
20742	res, err := c.doRequest("json")
20743	if res != nil && res.StatusCode == http.StatusNotModified {
20744		if res.Body != nil {
20745			res.Body.Close()
20746		}
20747		return nil, &googleapi.Error{
20748			Code:   res.StatusCode,
20749			Header: res.Header,
20750		}
20751	}
20752	if err != nil {
20753		return nil, err
20754	}
20755	defer googleapi.CloseBody(res)
20756	if err := googleapi.CheckResponse(res); err != nil {
20757		return nil, err
20758	}
20759	ret := &CampaignCreativeAssociationsListResponse{
20760		ServerResponse: googleapi.ServerResponse{
20761			Header:         res.Header,
20762			HTTPStatusCode: res.StatusCode,
20763		},
20764	}
20765	target := &ret
20766	if err := gensupport.DecodeResponse(target, res); err != nil {
20767		return nil, err
20768	}
20769	return ret, nil
20770	// {
20771	//   "description": "Retrieves the list of creative IDs associated with the specified campaign. This method supports paging.",
20772	//   "httpMethod": "GET",
20773	//   "id": "dfareporting.campaignCreativeAssociations.list",
20774	//   "parameterOrder": [
20775	//     "profileId",
20776	//     "campaignId"
20777	//   ],
20778	//   "parameters": {
20779	//     "campaignId": {
20780	//       "description": "Campaign ID in this association.",
20781	//       "format": "int64",
20782	//       "location": "path",
20783	//       "required": true,
20784	//       "type": "string"
20785	//     },
20786	//     "maxResults": {
20787	//       "default": "1000",
20788	//       "description": "Maximum number of results to return.",
20789	//       "format": "int32",
20790	//       "location": "query",
20791	//       "maximum": "1000",
20792	//       "minimum": "0",
20793	//       "type": "integer"
20794	//     },
20795	//     "pageToken": {
20796	//       "description": "Value of the nextPageToken from the previous result page.",
20797	//       "location": "query",
20798	//       "type": "string"
20799	//     },
20800	//     "profileId": {
20801	//       "description": "User profile ID associated with this request.",
20802	//       "format": "int64",
20803	//       "location": "path",
20804	//       "required": true,
20805	//       "type": "string"
20806	//     },
20807	//     "sortOrder": {
20808	//       "default": "ASCENDING",
20809	//       "description": "Order of sorted results.",
20810	//       "enum": [
20811	//         "ASCENDING",
20812	//         "DESCENDING"
20813	//       ],
20814	//       "enumDescriptions": [
20815	//         "",
20816	//         ""
20817	//       ],
20818	//       "location": "query",
20819	//       "type": "string"
20820	//     }
20821	//   },
20822	//   "path": "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations",
20823	//   "response": {
20824	//     "$ref": "CampaignCreativeAssociationsListResponse"
20825	//   },
20826	//   "scopes": [
20827	//     "https://www.googleapis.com/auth/dfatrafficking"
20828	//   ]
20829	// }
20830
20831}
20832
20833// Pages invokes f for each page of results.
20834// A non-nil error returned from f will halt the iteration.
20835// The provided context supersedes any context provided to the Context method.
20836func (c *CampaignCreativeAssociationsListCall) Pages(ctx context.Context, f func(*CampaignCreativeAssociationsListResponse) error) error {
20837	c.ctx_ = ctx
20838	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20839	for {
20840		x, err := c.Do()
20841		if err != nil {
20842			return err
20843		}
20844		if err := f(x); err != nil {
20845			return err
20846		}
20847		if x.NextPageToken == "" {
20848			return nil
20849		}
20850		c.PageToken(x.NextPageToken)
20851	}
20852}
20853
20854// method id "dfareporting.campaigns.get":
20855
20856type CampaignsGetCall struct {
20857	s            *Service
20858	profileId    int64
20859	id           int64
20860	urlParams_   gensupport.URLParams
20861	ifNoneMatch_ string
20862	ctx_         context.Context
20863	header_      http.Header
20864}
20865
20866// Get: Gets one campaign by ID.
20867func (r *CampaignsService) Get(profileId int64, id int64) *CampaignsGetCall {
20868	c := &CampaignsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20869	c.profileId = profileId
20870	c.id = id
20871	return c
20872}
20873
20874// Fields allows partial responses to be retrieved. See
20875// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20876// for more information.
20877func (c *CampaignsGetCall) Fields(s ...googleapi.Field) *CampaignsGetCall {
20878	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20879	return c
20880}
20881
20882// IfNoneMatch sets the optional parameter which makes the operation
20883// fail if the object's ETag matches the given value. This is useful for
20884// getting updates only after the object has changed since the last
20885// request. Use googleapi.IsNotModified to check whether the response
20886// error from Do is the result of In-None-Match.
20887func (c *CampaignsGetCall) IfNoneMatch(entityTag string) *CampaignsGetCall {
20888	c.ifNoneMatch_ = entityTag
20889	return c
20890}
20891
20892// Context sets the context to be used in this call's Do method. Any
20893// pending HTTP request will be aborted if the provided context is
20894// canceled.
20895func (c *CampaignsGetCall) Context(ctx context.Context) *CampaignsGetCall {
20896	c.ctx_ = ctx
20897	return c
20898}
20899
20900// Header returns an http.Header that can be modified by the caller to
20901// add HTTP headers to the request.
20902func (c *CampaignsGetCall) Header() http.Header {
20903	if c.header_ == nil {
20904		c.header_ = make(http.Header)
20905	}
20906	return c.header_
20907}
20908
20909func (c *CampaignsGetCall) doRequest(alt string) (*http.Response, error) {
20910	reqHeaders := make(http.Header)
20911	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
20912	for k, v := range c.header_ {
20913		reqHeaders[k] = v
20914	}
20915	reqHeaders.Set("User-Agent", c.s.userAgent())
20916	if c.ifNoneMatch_ != "" {
20917		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20918	}
20919	var body io.Reader = nil
20920	c.urlParams_.Set("alt", alt)
20921	c.urlParams_.Set("prettyPrint", "false")
20922	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{id}")
20923	urls += "?" + c.urlParams_.Encode()
20924	req, err := http.NewRequest("GET", urls, body)
20925	if err != nil {
20926		return nil, err
20927	}
20928	req.Header = reqHeaders
20929	googleapi.Expand(req.URL, map[string]string{
20930		"profileId": strconv.FormatInt(c.profileId, 10),
20931		"id":        strconv.FormatInt(c.id, 10),
20932	})
20933	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20934}
20935
20936// Do executes the "dfareporting.campaigns.get" call.
20937// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
20938// code is an error. Response headers are in either
20939// *Campaign.ServerResponse.Header or (if a response was returned at
20940// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20941// to check whether the returned error was because
20942// http.StatusNotModified was returned.
20943func (c *CampaignsGetCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
20944	gensupport.SetOptions(c.urlParams_, opts...)
20945	res, err := c.doRequest("json")
20946	if res != nil && res.StatusCode == http.StatusNotModified {
20947		if res.Body != nil {
20948			res.Body.Close()
20949		}
20950		return nil, &googleapi.Error{
20951			Code:   res.StatusCode,
20952			Header: res.Header,
20953		}
20954	}
20955	if err != nil {
20956		return nil, err
20957	}
20958	defer googleapi.CloseBody(res)
20959	if err := googleapi.CheckResponse(res); err != nil {
20960		return nil, err
20961	}
20962	ret := &Campaign{
20963		ServerResponse: googleapi.ServerResponse{
20964			Header:         res.Header,
20965			HTTPStatusCode: res.StatusCode,
20966		},
20967	}
20968	target := &ret
20969	if err := gensupport.DecodeResponse(target, res); err != nil {
20970		return nil, err
20971	}
20972	return ret, nil
20973	// {
20974	//   "description": "Gets one campaign by ID.",
20975	//   "httpMethod": "GET",
20976	//   "id": "dfareporting.campaigns.get",
20977	//   "parameterOrder": [
20978	//     "profileId",
20979	//     "id"
20980	//   ],
20981	//   "parameters": {
20982	//     "id": {
20983	//       "description": "Campaign ID.",
20984	//       "format": "int64",
20985	//       "location": "path",
20986	//       "required": true,
20987	//       "type": "string"
20988	//     },
20989	//     "profileId": {
20990	//       "description": "User profile ID associated with this request.",
20991	//       "format": "int64",
20992	//       "location": "path",
20993	//       "required": true,
20994	//       "type": "string"
20995	//     }
20996	//   },
20997	//   "path": "userprofiles/{profileId}/campaigns/{id}",
20998	//   "response": {
20999	//     "$ref": "Campaign"
21000	//   },
21001	//   "scopes": [
21002	//     "https://www.googleapis.com/auth/dfatrafficking"
21003	//   ]
21004	// }
21005
21006}
21007
21008// method id "dfareporting.campaigns.insert":
21009
21010type CampaignsInsertCall struct {
21011	s          *Service
21012	profileId  int64
21013	campaign   *Campaign
21014	urlParams_ gensupport.URLParams
21015	ctx_       context.Context
21016	header_    http.Header
21017}
21018
21019// Insert: Inserts a new campaign.
21020func (r *CampaignsService) Insert(profileId int64, campaign *Campaign) *CampaignsInsertCall {
21021	c := &CampaignsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21022	c.profileId = profileId
21023	c.campaign = campaign
21024	return c
21025}
21026
21027// Fields allows partial responses to be retrieved. See
21028// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21029// for more information.
21030func (c *CampaignsInsertCall) Fields(s ...googleapi.Field) *CampaignsInsertCall {
21031	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21032	return c
21033}
21034
21035// Context sets the context to be used in this call's Do method. Any
21036// pending HTTP request will be aborted if the provided context is
21037// canceled.
21038func (c *CampaignsInsertCall) Context(ctx context.Context) *CampaignsInsertCall {
21039	c.ctx_ = ctx
21040	return c
21041}
21042
21043// Header returns an http.Header that can be modified by the caller to
21044// add HTTP headers to the request.
21045func (c *CampaignsInsertCall) Header() http.Header {
21046	if c.header_ == nil {
21047		c.header_ = make(http.Header)
21048	}
21049	return c.header_
21050}
21051
21052func (c *CampaignsInsertCall) doRequest(alt string) (*http.Response, error) {
21053	reqHeaders := make(http.Header)
21054	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
21055	for k, v := range c.header_ {
21056		reqHeaders[k] = v
21057	}
21058	reqHeaders.Set("User-Agent", c.s.userAgent())
21059	var body io.Reader = nil
21060	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21061	if err != nil {
21062		return nil, err
21063	}
21064	reqHeaders.Set("Content-Type", "application/json")
21065	c.urlParams_.Set("alt", alt)
21066	c.urlParams_.Set("prettyPrint", "false")
21067	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21068	urls += "?" + c.urlParams_.Encode()
21069	req, err := http.NewRequest("POST", urls, body)
21070	if err != nil {
21071		return nil, err
21072	}
21073	req.Header = reqHeaders
21074	googleapi.Expand(req.URL, map[string]string{
21075		"profileId": strconv.FormatInt(c.profileId, 10),
21076	})
21077	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21078}
21079
21080// Do executes the "dfareporting.campaigns.insert" call.
21081// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21082// code is an error. Response headers are in either
21083// *Campaign.ServerResponse.Header or (if a response was returned at
21084// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21085// to check whether the returned error was because
21086// http.StatusNotModified was returned.
21087func (c *CampaignsInsertCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21088	gensupport.SetOptions(c.urlParams_, opts...)
21089	res, err := c.doRequest("json")
21090	if res != nil && res.StatusCode == http.StatusNotModified {
21091		if res.Body != nil {
21092			res.Body.Close()
21093		}
21094		return nil, &googleapi.Error{
21095			Code:   res.StatusCode,
21096			Header: res.Header,
21097		}
21098	}
21099	if err != nil {
21100		return nil, err
21101	}
21102	defer googleapi.CloseBody(res)
21103	if err := googleapi.CheckResponse(res); err != nil {
21104		return nil, err
21105	}
21106	ret := &Campaign{
21107		ServerResponse: googleapi.ServerResponse{
21108			Header:         res.Header,
21109			HTTPStatusCode: res.StatusCode,
21110		},
21111	}
21112	target := &ret
21113	if err := gensupport.DecodeResponse(target, res); err != nil {
21114		return nil, err
21115	}
21116	return ret, nil
21117	// {
21118	//   "description": "Inserts a new campaign.",
21119	//   "httpMethod": "POST",
21120	//   "id": "dfareporting.campaigns.insert",
21121	//   "parameterOrder": [
21122	//     "profileId"
21123	//   ],
21124	//   "parameters": {
21125	//     "profileId": {
21126	//       "description": "User profile ID associated with this request.",
21127	//       "format": "int64",
21128	//       "location": "path",
21129	//       "required": true,
21130	//       "type": "string"
21131	//     }
21132	//   },
21133	//   "path": "userprofiles/{profileId}/campaigns",
21134	//   "request": {
21135	//     "$ref": "Campaign"
21136	//   },
21137	//   "response": {
21138	//     "$ref": "Campaign"
21139	//   },
21140	//   "scopes": [
21141	//     "https://www.googleapis.com/auth/dfatrafficking"
21142	//   ]
21143	// }
21144
21145}
21146
21147// method id "dfareporting.campaigns.list":
21148
21149type CampaignsListCall struct {
21150	s            *Service
21151	profileId    int64
21152	urlParams_   gensupport.URLParams
21153	ifNoneMatch_ string
21154	ctx_         context.Context
21155	header_      http.Header
21156}
21157
21158// List: Retrieves a list of campaigns, possibly filtered. This method
21159// supports paging.
21160func (r *CampaignsService) List(profileId int64) *CampaignsListCall {
21161	c := &CampaignsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21162	c.profileId = profileId
21163	return c
21164}
21165
21166// AdvertiserGroupIds sets the optional parameter "advertiserGroupIds":
21167// Select only campaigns whose advertisers belong to these advertiser
21168// groups.
21169func (c *CampaignsListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *CampaignsListCall {
21170	var advertiserGroupIds_ []string
21171	for _, v := range advertiserGroupIds {
21172		advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
21173	}
21174	c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
21175	return c
21176}
21177
21178// AdvertiserIds sets the optional parameter "advertiserIds": Select
21179// only campaigns that belong to these advertisers.
21180func (c *CampaignsListCall) AdvertiserIds(advertiserIds ...int64) *CampaignsListCall {
21181	var advertiserIds_ []string
21182	for _, v := range advertiserIds {
21183		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
21184	}
21185	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
21186	return c
21187}
21188
21189// Archived sets the optional parameter "archived": Select only archived
21190// campaigns. Don't set this field to select both archived and
21191// non-archived campaigns.
21192func (c *CampaignsListCall) Archived(archived bool) *CampaignsListCall {
21193	c.urlParams_.Set("archived", fmt.Sprint(archived))
21194	return c
21195}
21196
21197// AtLeastOneOptimizationActivity sets the optional parameter
21198// "atLeastOneOptimizationActivity": Select only campaigns that have at
21199// least one optimization activity.
21200func (c *CampaignsListCall) AtLeastOneOptimizationActivity(atLeastOneOptimizationActivity bool) *CampaignsListCall {
21201	c.urlParams_.Set("atLeastOneOptimizationActivity", fmt.Sprint(atLeastOneOptimizationActivity))
21202	return c
21203}
21204
21205// ExcludedIds sets the optional parameter "excludedIds": Exclude
21206// campaigns with these IDs.
21207func (c *CampaignsListCall) ExcludedIds(excludedIds ...int64) *CampaignsListCall {
21208	var excludedIds_ []string
21209	for _, v := range excludedIds {
21210		excludedIds_ = append(excludedIds_, fmt.Sprint(v))
21211	}
21212	c.urlParams_.SetMulti("excludedIds", excludedIds_)
21213	return c
21214}
21215
21216// Ids sets the optional parameter "ids": Select only campaigns with
21217// these IDs.
21218func (c *CampaignsListCall) Ids(ids ...int64) *CampaignsListCall {
21219	var ids_ []string
21220	for _, v := range ids {
21221		ids_ = append(ids_, fmt.Sprint(v))
21222	}
21223	c.urlParams_.SetMulti("ids", ids_)
21224	return c
21225}
21226
21227// MaxResults sets the optional parameter "maxResults": Maximum number
21228// of results to return.
21229func (c *CampaignsListCall) MaxResults(maxResults int64) *CampaignsListCall {
21230	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
21231	return c
21232}
21233
21234// OverriddenEventTagId sets the optional parameter
21235// "overriddenEventTagId": Select only campaigns that have overridden
21236// this event tag ID.
21237func (c *CampaignsListCall) OverriddenEventTagId(overriddenEventTagId int64) *CampaignsListCall {
21238	c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
21239	return c
21240}
21241
21242// PageToken sets the optional parameter "pageToken": Value of the
21243// nextPageToken from the previous result page.
21244func (c *CampaignsListCall) PageToken(pageToken string) *CampaignsListCall {
21245	c.urlParams_.Set("pageToken", pageToken)
21246	return c
21247}
21248
21249// SearchString sets the optional parameter "searchString": Allows
21250// searching for campaigns by name or ID. Wildcards (*) are allowed. For
21251// example, "campaign*2015" will return campaigns with names like
21252// "campaign June 2015", "campaign April 2015", or simply "campaign
21253// 2015". Most of the searches also add wildcards implicitly at the
21254// start and the end of the search string. For example, a search string
21255// of "campaign" will match campaigns with name "my campaign", "campaign
21256// 2015", or simply "campaign".
21257func (c *CampaignsListCall) SearchString(searchString string) *CampaignsListCall {
21258	c.urlParams_.Set("searchString", searchString)
21259	return c
21260}
21261
21262// SortField sets the optional parameter "sortField": Field by which to
21263// sort the list.
21264//
21265// Possible values:
21266//   "ID" (default)
21267//   "NAME"
21268func (c *CampaignsListCall) SortField(sortField string) *CampaignsListCall {
21269	c.urlParams_.Set("sortField", sortField)
21270	return c
21271}
21272
21273// SortOrder sets the optional parameter "sortOrder": Order of sorted
21274// results.
21275//
21276// Possible values:
21277//   "ASCENDING" (default)
21278//   "DESCENDING"
21279func (c *CampaignsListCall) SortOrder(sortOrder string) *CampaignsListCall {
21280	c.urlParams_.Set("sortOrder", sortOrder)
21281	return c
21282}
21283
21284// SubaccountId sets the optional parameter "subaccountId": Select only
21285// campaigns that belong to this subaccount.
21286func (c *CampaignsListCall) SubaccountId(subaccountId int64) *CampaignsListCall {
21287	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
21288	return c
21289}
21290
21291// Fields allows partial responses to be retrieved. See
21292// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21293// for more information.
21294func (c *CampaignsListCall) Fields(s ...googleapi.Field) *CampaignsListCall {
21295	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21296	return c
21297}
21298
21299// IfNoneMatch sets the optional parameter which makes the operation
21300// fail if the object's ETag matches the given value. This is useful for
21301// getting updates only after the object has changed since the last
21302// request. Use googleapi.IsNotModified to check whether the response
21303// error from Do is the result of In-None-Match.
21304func (c *CampaignsListCall) IfNoneMatch(entityTag string) *CampaignsListCall {
21305	c.ifNoneMatch_ = entityTag
21306	return c
21307}
21308
21309// Context sets the context to be used in this call's Do method. Any
21310// pending HTTP request will be aborted if the provided context is
21311// canceled.
21312func (c *CampaignsListCall) Context(ctx context.Context) *CampaignsListCall {
21313	c.ctx_ = ctx
21314	return c
21315}
21316
21317// Header returns an http.Header that can be modified by the caller to
21318// add HTTP headers to the request.
21319func (c *CampaignsListCall) Header() http.Header {
21320	if c.header_ == nil {
21321		c.header_ = make(http.Header)
21322	}
21323	return c.header_
21324}
21325
21326func (c *CampaignsListCall) doRequest(alt string) (*http.Response, error) {
21327	reqHeaders := make(http.Header)
21328	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
21329	for k, v := range c.header_ {
21330		reqHeaders[k] = v
21331	}
21332	reqHeaders.Set("User-Agent", c.s.userAgent())
21333	if c.ifNoneMatch_ != "" {
21334		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21335	}
21336	var body io.Reader = nil
21337	c.urlParams_.Set("alt", alt)
21338	c.urlParams_.Set("prettyPrint", "false")
21339	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21340	urls += "?" + c.urlParams_.Encode()
21341	req, err := http.NewRequest("GET", urls, body)
21342	if err != nil {
21343		return nil, err
21344	}
21345	req.Header = reqHeaders
21346	googleapi.Expand(req.URL, map[string]string{
21347		"profileId": strconv.FormatInt(c.profileId, 10),
21348	})
21349	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21350}
21351
21352// Do executes the "dfareporting.campaigns.list" call.
21353// Exactly one of *CampaignsListResponse or error will be non-nil. Any
21354// non-2xx status code is an error. Response headers are in either
21355// *CampaignsListResponse.ServerResponse.Header or (if a response was
21356// returned at all) in error.(*googleapi.Error).Header. Use
21357// googleapi.IsNotModified to check whether the returned error was
21358// because http.StatusNotModified was returned.
21359func (c *CampaignsListCall) Do(opts ...googleapi.CallOption) (*CampaignsListResponse, error) {
21360	gensupport.SetOptions(c.urlParams_, opts...)
21361	res, err := c.doRequest("json")
21362	if res != nil && res.StatusCode == http.StatusNotModified {
21363		if res.Body != nil {
21364			res.Body.Close()
21365		}
21366		return nil, &googleapi.Error{
21367			Code:   res.StatusCode,
21368			Header: res.Header,
21369		}
21370	}
21371	if err != nil {
21372		return nil, err
21373	}
21374	defer googleapi.CloseBody(res)
21375	if err := googleapi.CheckResponse(res); err != nil {
21376		return nil, err
21377	}
21378	ret := &CampaignsListResponse{
21379		ServerResponse: googleapi.ServerResponse{
21380			Header:         res.Header,
21381			HTTPStatusCode: res.StatusCode,
21382		},
21383	}
21384	target := &ret
21385	if err := gensupport.DecodeResponse(target, res); err != nil {
21386		return nil, err
21387	}
21388	return ret, nil
21389	// {
21390	//   "description": "Retrieves a list of campaigns, possibly filtered. This method supports paging.",
21391	//   "httpMethod": "GET",
21392	//   "id": "dfareporting.campaigns.list",
21393	//   "parameterOrder": [
21394	//     "profileId"
21395	//   ],
21396	//   "parameters": {
21397	//     "advertiserGroupIds": {
21398	//       "description": "Select only campaigns whose advertisers belong to these advertiser groups.",
21399	//       "format": "int64",
21400	//       "location": "query",
21401	//       "repeated": true,
21402	//       "type": "string"
21403	//     },
21404	//     "advertiserIds": {
21405	//       "description": "Select only campaigns that belong to these advertisers.",
21406	//       "format": "int64",
21407	//       "location": "query",
21408	//       "repeated": true,
21409	//       "type": "string"
21410	//     },
21411	//     "archived": {
21412	//       "description": "Select only archived campaigns. Don't set this field to select both archived and non-archived campaigns.",
21413	//       "location": "query",
21414	//       "type": "boolean"
21415	//     },
21416	//     "atLeastOneOptimizationActivity": {
21417	//       "description": "Select only campaigns that have at least one optimization activity.",
21418	//       "location": "query",
21419	//       "type": "boolean"
21420	//     },
21421	//     "excludedIds": {
21422	//       "description": "Exclude campaigns with these IDs.",
21423	//       "format": "int64",
21424	//       "location": "query",
21425	//       "repeated": true,
21426	//       "type": "string"
21427	//     },
21428	//     "ids": {
21429	//       "description": "Select only campaigns with these IDs.",
21430	//       "format": "int64",
21431	//       "location": "query",
21432	//       "repeated": true,
21433	//       "type": "string"
21434	//     },
21435	//     "maxResults": {
21436	//       "default": "1000",
21437	//       "description": "Maximum number of results to return.",
21438	//       "format": "int32",
21439	//       "location": "query",
21440	//       "maximum": "1000",
21441	//       "minimum": "0",
21442	//       "type": "integer"
21443	//     },
21444	//     "overriddenEventTagId": {
21445	//       "description": "Select only campaigns that have overridden this event tag ID.",
21446	//       "format": "int64",
21447	//       "location": "query",
21448	//       "type": "string"
21449	//     },
21450	//     "pageToken": {
21451	//       "description": "Value of the nextPageToken from the previous result page.",
21452	//       "location": "query",
21453	//       "type": "string"
21454	//     },
21455	//     "profileId": {
21456	//       "description": "User profile ID associated with this request.",
21457	//       "format": "int64",
21458	//       "location": "path",
21459	//       "required": true,
21460	//       "type": "string"
21461	//     },
21462	//     "searchString": {
21463	//       "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\".",
21464	//       "location": "query",
21465	//       "type": "string"
21466	//     },
21467	//     "sortField": {
21468	//       "default": "ID",
21469	//       "description": "Field by which to sort the list.",
21470	//       "enum": [
21471	//         "ID",
21472	//         "NAME"
21473	//       ],
21474	//       "enumDescriptions": [
21475	//         "",
21476	//         ""
21477	//       ],
21478	//       "location": "query",
21479	//       "type": "string"
21480	//     },
21481	//     "sortOrder": {
21482	//       "default": "ASCENDING",
21483	//       "description": "Order of sorted results.",
21484	//       "enum": [
21485	//         "ASCENDING",
21486	//         "DESCENDING"
21487	//       ],
21488	//       "enumDescriptions": [
21489	//         "",
21490	//         ""
21491	//       ],
21492	//       "location": "query",
21493	//       "type": "string"
21494	//     },
21495	//     "subaccountId": {
21496	//       "description": "Select only campaigns that belong to this subaccount.",
21497	//       "format": "int64",
21498	//       "location": "query",
21499	//       "type": "string"
21500	//     }
21501	//   },
21502	//   "path": "userprofiles/{profileId}/campaigns",
21503	//   "response": {
21504	//     "$ref": "CampaignsListResponse"
21505	//   },
21506	//   "scopes": [
21507	//     "https://www.googleapis.com/auth/dfatrafficking"
21508	//   ]
21509	// }
21510
21511}
21512
21513// Pages invokes f for each page of results.
21514// A non-nil error returned from f will halt the iteration.
21515// The provided context supersedes any context provided to the Context method.
21516func (c *CampaignsListCall) Pages(ctx context.Context, f func(*CampaignsListResponse) error) error {
21517	c.ctx_ = ctx
21518	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21519	for {
21520		x, err := c.Do()
21521		if err != nil {
21522			return err
21523		}
21524		if err := f(x); err != nil {
21525			return err
21526		}
21527		if x.NextPageToken == "" {
21528			return nil
21529		}
21530		c.PageToken(x.NextPageToken)
21531	}
21532}
21533
21534// method id "dfareporting.campaigns.patch":
21535
21536type CampaignsPatchCall struct {
21537	s          *Service
21538	profileId  int64
21539	campaign   *Campaign
21540	urlParams_ gensupport.URLParams
21541	ctx_       context.Context
21542	header_    http.Header
21543}
21544
21545// Patch: Updates an existing campaign. This method supports patch
21546// semantics.
21547func (r *CampaignsService) Patch(profileId int64, id int64, campaign *Campaign) *CampaignsPatchCall {
21548	c := &CampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21549	c.profileId = profileId
21550	c.urlParams_.Set("id", fmt.Sprint(id))
21551	c.campaign = campaign
21552	return c
21553}
21554
21555// Fields allows partial responses to be retrieved. See
21556// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21557// for more information.
21558func (c *CampaignsPatchCall) Fields(s ...googleapi.Field) *CampaignsPatchCall {
21559	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21560	return c
21561}
21562
21563// Context sets the context to be used in this call's Do method. Any
21564// pending HTTP request will be aborted if the provided context is
21565// canceled.
21566func (c *CampaignsPatchCall) Context(ctx context.Context) *CampaignsPatchCall {
21567	c.ctx_ = ctx
21568	return c
21569}
21570
21571// Header returns an http.Header that can be modified by the caller to
21572// add HTTP headers to the request.
21573func (c *CampaignsPatchCall) Header() http.Header {
21574	if c.header_ == nil {
21575		c.header_ = make(http.Header)
21576	}
21577	return c.header_
21578}
21579
21580func (c *CampaignsPatchCall) doRequest(alt string) (*http.Response, error) {
21581	reqHeaders := make(http.Header)
21582	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
21583	for k, v := range c.header_ {
21584		reqHeaders[k] = v
21585	}
21586	reqHeaders.Set("User-Agent", c.s.userAgent())
21587	var body io.Reader = nil
21588	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21589	if err != nil {
21590		return nil, err
21591	}
21592	reqHeaders.Set("Content-Type", "application/json")
21593	c.urlParams_.Set("alt", alt)
21594	c.urlParams_.Set("prettyPrint", "false")
21595	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21596	urls += "?" + c.urlParams_.Encode()
21597	req, err := http.NewRequest("PATCH", urls, body)
21598	if err != nil {
21599		return nil, err
21600	}
21601	req.Header = reqHeaders
21602	googleapi.Expand(req.URL, map[string]string{
21603		"profileId": strconv.FormatInt(c.profileId, 10),
21604	})
21605	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21606}
21607
21608// Do executes the "dfareporting.campaigns.patch" call.
21609// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21610// code is an error. Response headers are in either
21611// *Campaign.ServerResponse.Header or (if a response was returned at
21612// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21613// to check whether the returned error was because
21614// http.StatusNotModified was returned.
21615func (c *CampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21616	gensupport.SetOptions(c.urlParams_, opts...)
21617	res, err := c.doRequest("json")
21618	if res != nil && res.StatusCode == http.StatusNotModified {
21619		if res.Body != nil {
21620			res.Body.Close()
21621		}
21622		return nil, &googleapi.Error{
21623			Code:   res.StatusCode,
21624			Header: res.Header,
21625		}
21626	}
21627	if err != nil {
21628		return nil, err
21629	}
21630	defer googleapi.CloseBody(res)
21631	if err := googleapi.CheckResponse(res); err != nil {
21632		return nil, err
21633	}
21634	ret := &Campaign{
21635		ServerResponse: googleapi.ServerResponse{
21636			Header:         res.Header,
21637			HTTPStatusCode: res.StatusCode,
21638		},
21639	}
21640	target := &ret
21641	if err := gensupport.DecodeResponse(target, res); err != nil {
21642		return nil, err
21643	}
21644	return ret, nil
21645	// {
21646	//   "description": "Updates an existing campaign. This method supports patch semantics.",
21647	//   "httpMethod": "PATCH",
21648	//   "id": "dfareporting.campaigns.patch",
21649	//   "parameterOrder": [
21650	//     "profileId",
21651	//     "id"
21652	//   ],
21653	//   "parameters": {
21654	//     "id": {
21655	//       "description": "Campaign ID.",
21656	//       "format": "int64",
21657	//       "location": "query",
21658	//       "required": true,
21659	//       "type": "string"
21660	//     },
21661	//     "profileId": {
21662	//       "description": "User profile ID associated with this request.",
21663	//       "format": "int64",
21664	//       "location": "path",
21665	//       "required": true,
21666	//       "type": "string"
21667	//     }
21668	//   },
21669	//   "path": "userprofiles/{profileId}/campaigns",
21670	//   "request": {
21671	//     "$ref": "Campaign"
21672	//   },
21673	//   "response": {
21674	//     "$ref": "Campaign"
21675	//   },
21676	//   "scopes": [
21677	//     "https://www.googleapis.com/auth/dfatrafficking"
21678	//   ]
21679	// }
21680
21681}
21682
21683// method id "dfareporting.campaigns.update":
21684
21685type CampaignsUpdateCall struct {
21686	s          *Service
21687	profileId  int64
21688	campaign   *Campaign
21689	urlParams_ gensupport.URLParams
21690	ctx_       context.Context
21691	header_    http.Header
21692}
21693
21694// Update: Updates an existing campaign.
21695func (r *CampaignsService) Update(profileId int64, campaign *Campaign) *CampaignsUpdateCall {
21696	c := &CampaignsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21697	c.profileId = profileId
21698	c.campaign = campaign
21699	return c
21700}
21701
21702// Fields allows partial responses to be retrieved. See
21703// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21704// for more information.
21705func (c *CampaignsUpdateCall) Fields(s ...googleapi.Field) *CampaignsUpdateCall {
21706	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21707	return c
21708}
21709
21710// Context sets the context to be used in this call's Do method. Any
21711// pending HTTP request will be aborted if the provided context is
21712// canceled.
21713func (c *CampaignsUpdateCall) Context(ctx context.Context) *CampaignsUpdateCall {
21714	c.ctx_ = ctx
21715	return c
21716}
21717
21718// Header returns an http.Header that can be modified by the caller to
21719// add HTTP headers to the request.
21720func (c *CampaignsUpdateCall) Header() http.Header {
21721	if c.header_ == nil {
21722		c.header_ = make(http.Header)
21723	}
21724	return c.header_
21725}
21726
21727func (c *CampaignsUpdateCall) doRequest(alt string) (*http.Response, error) {
21728	reqHeaders := make(http.Header)
21729	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
21730	for k, v := range c.header_ {
21731		reqHeaders[k] = v
21732	}
21733	reqHeaders.Set("User-Agent", c.s.userAgent())
21734	var body io.Reader = nil
21735	body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21736	if err != nil {
21737		return nil, err
21738	}
21739	reqHeaders.Set("Content-Type", "application/json")
21740	c.urlParams_.Set("alt", alt)
21741	c.urlParams_.Set("prettyPrint", "false")
21742	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21743	urls += "?" + c.urlParams_.Encode()
21744	req, err := http.NewRequest("PUT", urls, body)
21745	if err != nil {
21746		return nil, err
21747	}
21748	req.Header = reqHeaders
21749	googleapi.Expand(req.URL, map[string]string{
21750		"profileId": strconv.FormatInt(c.profileId, 10),
21751	})
21752	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21753}
21754
21755// Do executes the "dfareporting.campaigns.update" call.
21756// Exactly one of *Campaign or error will be non-nil. Any non-2xx status
21757// code is an error. Response headers are in either
21758// *Campaign.ServerResponse.Header or (if a response was returned at
21759// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21760// to check whether the returned error was because
21761// http.StatusNotModified was returned.
21762func (c *CampaignsUpdateCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21763	gensupport.SetOptions(c.urlParams_, opts...)
21764	res, err := c.doRequest("json")
21765	if res != nil && res.StatusCode == http.StatusNotModified {
21766		if res.Body != nil {
21767			res.Body.Close()
21768		}
21769		return nil, &googleapi.Error{
21770			Code:   res.StatusCode,
21771			Header: res.Header,
21772		}
21773	}
21774	if err != nil {
21775		return nil, err
21776	}
21777	defer googleapi.CloseBody(res)
21778	if err := googleapi.CheckResponse(res); err != nil {
21779		return nil, err
21780	}
21781	ret := &Campaign{
21782		ServerResponse: googleapi.ServerResponse{
21783			Header:         res.Header,
21784			HTTPStatusCode: res.StatusCode,
21785		},
21786	}
21787	target := &ret
21788	if err := gensupport.DecodeResponse(target, res); err != nil {
21789		return nil, err
21790	}
21791	return ret, nil
21792	// {
21793	//   "description": "Updates an existing campaign.",
21794	//   "httpMethod": "PUT",
21795	//   "id": "dfareporting.campaigns.update",
21796	//   "parameterOrder": [
21797	//     "profileId"
21798	//   ],
21799	//   "parameters": {
21800	//     "profileId": {
21801	//       "description": "User profile ID associated with this request.",
21802	//       "format": "int64",
21803	//       "location": "path",
21804	//       "required": true,
21805	//       "type": "string"
21806	//     }
21807	//   },
21808	//   "path": "userprofiles/{profileId}/campaigns",
21809	//   "request": {
21810	//     "$ref": "Campaign"
21811	//   },
21812	//   "response": {
21813	//     "$ref": "Campaign"
21814	//   },
21815	//   "scopes": [
21816	//     "https://www.googleapis.com/auth/dfatrafficking"
21817	//   ]
21818	// }
21819
21820}
21821
21822// method id "dfareporting.changeLogs.get":
21823
21824type ChangeLogsGetCall struct {
21825	s            *Service
21826	profileId    int64
21827	id           int64
21828	urlParams_   gensupport.URLParams
21829	ifNoneMatch_ string
21830	ctx_         context.Context
21831	header_      http.Header
21832}
21833
21834// Get: Gets one change log by ID.
21835func (r *ChangeLogsService) Get(profileId int64, id int64) *ChangeLogsGetCall {
21836	c := &ChangeLogsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21837	c.profileId = profileId
21838	c.id = id
21839	return c
21840}
21841
21842// Fields allows partial responses to be retrieved. See
21843// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21844// for more information.
21845func (c *ChangeLogsGetCall) Fields(s ...googleapi.Field) *ChangeLogsGetCall {
21846	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21847	return c
21848}
21849
21850// IfNoneMatch sets the optional parameter which makes the operation
21851// fail if the object's ETag matches the given value. This is useful for
21852// getting updates only after the object has changed since the last
21853// request. Use googleapi.IsNotModified to check whether the response
21854// error from Do is the result of In-None-Match.
21855func (c *ChangeLogsGetCall) IfNoneMatch(entityTag string) *ChangeLogsGetCall {
21856	c.ifNoneMatch_ = entityTag
21857	return c
21858}
21859
21860// Context sets the context to be used in this call's Do method. Any
21861// pending HTTP request will be aborted if the provided context is
21862// canceled.
21863func (c *ChangeLogsGetCall) Context(ctx context.Context) *ChangeLogsGetCall {
21864	c.ctx_ = ctx
21865	return c
21866}
21867
21868// Header returns an http.Header that can be modified by the caller to
21869// add HTTP headers to the request.
21870func (c *ChangeLogsGetCall) Header() http.Header {
21871	if c.header_ == nil {
21872		c.header_ = make(http.Header)
21873	}
21874	return c.header_
21875}
21876
21877func (c *ChangeLogsGetCall) doRequest(alt string) (*http.Response, error) {
21878	reqHeaders := make(http.Header)
21879	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
21880	for k, v := range c.header_ {
21881		reqHeaders[k] = v
21882	}
21883	reqHeaders.Set("User-Agent", c.s.userAgent())
21884	if c.ifNoneMatch_ != "" {
21885		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21886	}
21887	var body io.Reader = nil
21888	c.urlParams_.Set("alt", alt)
21889	c.urlParams_.Set("prettyPrint", "false")
21890	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs/{id}")
21891	urls += "?" + c.urlParams_.Encode()
21892	req, err := http.NewRequest("GET", urls, body)
21893	if err != nil {
21894		return nil, err
21895	}
21896	req.Header = reqHeaders
21897	googleapi.Expand(req.URL, map[string]string{
21898		"profileId": strconv.FormatInt(c.profileId, 10),
21899		"id":        strconv.FormatInt(c.id, 10),
21900	})
21901	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21902}
21903
21904// Do executes the "dfareporting.changeLogs.get" call.
21905// Exactly one of *ChangeLog or error will be non-nil. Any non-2xx
21906// status code is an error. Response headers are in either
21907// *ChangeLog.ServerResponse.Header or (if a response was returned at
21908// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21909// to check whether the returned error was because
21910// http.StatusNotModified was returned.
21911func (c *ChangeLogsGetCall) Do(opts ...googleapi.CallOption) (*ChangeLog, error) {
21912	gensupport.SetOptions(c.urlParams_, opts...)
21913	res, err := c.doRequest("json")
21914	if res != nil && res.StatusCode == http.StatusNotModified {
21915		if res.Body != nil {
21916			res.Body.Close()
21917		}
21918		return nil, &googleapi.Error{
21919			Code:   res.StatusCode,
21920			Header: res.Header,
21921		}
21922	}
21923	if err != nil {
21924		return nil, err
21925	}
21926	defer googleapi.CloseBody(res)
21927	if err := googleapi.CheckResponse(res); err != nil {
21928		return nil, err
21929	}
21930	ret := &ChangeLog{
21931		ServerResponse: googleapi.ServerResponse{
21932			Header:         res.Header,
21933			HTTPStatusCode: res.StatusCode,
21934		},
21935	}
21936	target := &ret
21937	if err := gensupport.DecodeResponse(target, res); err != nil {
21938		return nil, err
21939	}
21940	return ret, nil
21941	// {
21942	//   "description": "Gets one change log by ID.",
21943	//   "httpMethod": "GET",
21944	//   "id": "dfareporting.changeLogs.get",
21945	//   "parameterOrder": [
21946	//     "profileId",
21947	//     "id"
21948	//   ],
21949	//   "parameters": {
21950	//     "id": {
21951	//       "description": "Change log ID.",
21952	//       "format": "int64",
21953	//       "location": "path",
21954	//       "required": true,
21955	//       "type": "string"
21956	//     },
21957	//     "profileId": {
21958	//       "description": "User profile ID associated with this request.",
21959	//       "format": "int64",
21960	//       "location": "path",
21961	//       "required": true,
21962	//       "type": "string"
21963	//     }
21964	//   },
21965	//   "path": "userprofiles/{profileId}/changeLogs/{id}",
21966	//   "response": {
21967	//     "$ref": "ChangeLog"
21968	//   },
21969	//   "scopes": [
21970	//     "https://www.googleapis.com/auth/dfatrafficking"
21971	//   ]
21972	// }
21973
21974}
21975
21976// method id "dfareporting.changeLogs.list":
21977
21978type ChangeLogsListCall struct {
21979	s            *Service
21980	profileId    int64
21981	urlParams_   gensupport.URLParams
21982	ifNoneMatch_ string
21983	ctx_         context.Context
21984	header_      http.Header
21985}
21986
21987// List: Retrieves a list of change logs. This method supports paging.
21988func (r *ChangeLogsService) List(profileId int64) *ChangeLogsListCall {
21989	c := &ChangeLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21990	c.profileId = profileId
21991	return c
21992}
21993
21994// Action sets the optional parameter "action": Select only change logs
21995// with the specified action.
21996//
21997// Possible values:
21998//   "ACTION_ADD"
21999//   "ACTION_ASSIGN"
22000//   "ACTION_ASSOCIATE"
22001//   "ACTION_CREATE"
22002//   "ACTION_DELETE"
22003//   "ACTION_DISABLE"
22004//   "ACTION_EMAIL_TAGS"
22005//   "ACTION_ENABLE"
22006//   "ACTION_LINK"
22007//   "ACTION_MARK_AS_DEFAULT"
22008//   "ACTION_PUSH"
22009//   "ACTION_REMOVE"
22010//   "ACTION_SEND"
22011//   "ACTION_SHARE"
22012//   "ACTION_UNASSIGN"
22013//   "ACTION_UNLINK"
22014//   "ACTION_UPDATE"
22015func (c *ChangeLogsListCall) Action(action string) *ChangeLogsListCall {
22016	c.urlParams_.Set("action", action)
22017	return c
22018}
22019
22020// Ids sets the optional parameter "ids": Select only change logs with
22021// these IDs.
22022func (c *ChangeLogsListCall) Ids(ids ...int64) *ChangeLogsListCall {
22023	var ids_ []string
22024	for _, v := range ids {
22025		ids_ = append(ids_, fmt.Sprint(v))
22026	}
22027	c.urlParams_.SetMulti("ids", ids_)
22028	return c
22029}
22030
22031// MaxChangeTime sets the optional parameter "maxChangeTime": Select
22032// only change logs whose change time is before the specified
22033// maxChangeTime.The time should be formatted as an RFC3339 date/time
22034// string. For example, for 10:54 PM on July 18th, 2015, in the
22035// America/New York time zone, the format is
22036// "2015-07-18T22:54:00-04:00". In other words, the year, month, day,
22037// the letter T, the hour (24-hour clock system), minute, second, and
22038// then the time zone offset.
22039func (c *ChangeLogsListCall) MaxChangeTime(maxChangeTime string) *ChangeLogsListCall {
22040	c.urlParams_.Set("maxChangeTime", maxChangeTime)
22041	return c
22042}
22043
22044// MaxResults sets the optional parameter "maxResults": Maximum number
22045// of results to return.
22046func (c *ChangeLogsListCall) MaxResults(maxResults int64) *ChangeLogsListCall {
22047	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22048	return c
22049}
22050
22051// MinChangeTime sets the optional parameter "minChangeTime": Select
22052// only change logs whose change time is before the specified
22053// minChangeTime.The time should be formatted as an RFC3339 date/time
22054// string. For example, for 10:54 PM on July 18th, 2015, in the
22055// America/New York time zone, the format is
22056// "2015-07-18T22:54:00-04:00". In other words, the year, month, day,
22057// the letter T, the hour (24-hour clock system), minute, second, and
22058// then the time zone offset.
22059func (c *ChangeLogsListCall) MinChangeTime(minChangeTime string) *ChangeLogsListCall {
22060	c.urlParams_.Set("minChangeTime", minChangeTime)
22061	return c
22062}
22063
22064// ObjectIds sets the optional parameter "objectIds": Select only change
22065// logs with these object IDs.
22066func (c *ChangeLogsListCall) ObjectIds(objectIds ...int64) *ChangeLogsListCall {
22067	var objectIds_ []string
22068	for _, v := range objectIds {
22069		objectIds_ = append(objectIds_, fmt.Sprint(v))
22070	}
22071	c.urlParams_.SetMulti("objectIds", objectIds_)
22072	return c
22073}
22074
22075// ObjectType sets the optional parameter "objectType": Select only
22076// change logs with the specified object type.
22077//
22078// Possible values:
22079//   "OBJECT_ACCOUNT"
22080//   "OBJECT_ACCOUNT_BILLING_FEATURE"
22081//   "OBJECT_AD"
22082//   "OBJECT_ADVERTISER"
22083//   "OBJECT_ADVERTISER_GROUP"
22084//   "OBJECT_BILLING_ACCOUNT_GROUP"
22085//   "OBJECT_BILLING_FEATURE"
22086//   "OBJECT_BILLING_MINIMUM_FEE"
22087//   "OBJECT_BILLING_PROFILE"
22088//   "OBJECT_CAMPAIGN"
22089//   "OBJECT_CONTENT_CATEGORY"
22090//   "OBJECT_CREATIVE"
22091//   "OBJECT_CREATIVE_ASSET"
22092//   "OBJECT_CREATIVE_BUNDLE"
22093//   "OBJECT_CREATIVE_FIELD"
22094//   "OBJECT_CREATIVE_GROUP"
22095//   "OBJECT_DFA_SITE"
22096//   "OBJECT_EVENT_TAG"
22097//   "OBJECT_FLOODLIGHT_ACTIVITY_GROUP"
22098//   "OBJECT_FLOODLIGHT_ACTVITY"
22099//   "OBJECT_FLOODLIGHT_CONFIGURATION"
22100//   "OBJECT_FLOODLIGHT_DV360_LINK"
22101//   "OBJECT_INSTREAM_CREATIVE"
22102//   "OBJECT_LANDING_PAGE"
22103//   "OBJECT_MEDIA_ORDER"
22104//   "OBJECT_PLACEMENT"
22105//   "OBJECT_PLACEMENT_STRATEGY"
22106//   "OBJECT_PLAYSTORE_LINK"
22107//   "OBJECT_PROVIDED_LIST_CLIENT"
22108//   "OBJECT_RATE_CARD"
22109//   "OBJECT_REMARKETING_LIST"
22110//   "OBJECT_RICHMEDIA_CREATIVE"
22111//   "OBJECT_SD_SITE"
22112//   "OBJECT_SEARCH_LIFT_STUDY"
22113//   "OBJECT_SIZE"
22114//   "OBJECT_SUBACCOUNT"
22115//   "OBJECT_TARGETING_TEMPLATE"
22116//   "OBJECT_USER_PROFILE"
22117//   "OBJECT_USER_PROFILE_FILTER"
22118//   "OBJECT_USER_ROLE"
22119func (c *ChangeLogsListCall) ObjectType(objectType string) *ChangeLogsListCall {
22120	c.urlParams_.Set("objectType", objectType)
22121	return c
22122}
22123
22124// PageToken sets the optional parameter "pageToken": Value of the
22125// nextPageToken from the previous result page.
22126func (c *ChangeLogsListCall) PageToken(pageToken string) *ChangeLogsListCall {
22127	c.urlParams_.Set("pageToken", pageToken)
22128	return c
22129}
22130
22131// SearchString sets the optional parameter "searchString": Select only
22132// change logs whose object ID, user name, old or new values match the
22133// search string.
22134func (c *ChangeLogsListCall) SearchString(searchString string) *ChangeLogsListCall {
22135	c.urlParams_.Set("searchString", searchString)
22136	return c
22137}
22138
22139// UserProfileIds sets the optional parameter "userProfileIds": Select
22140// only change logs with these user profile IDs.
22141func (c *ChangeLogsListCall) UserProfileIds(userProfileIds ...int64) *ChangeLogsListCall {
22142	var userProfileIds_ []string
22143	for _, v := range userProfileIds {
22144		userProfileIds_ = append(userProfileIds_, fmt.Sprint(v))
22145	}
22146	c.urlParams_.SetMulti("userProfileIds", userProfileIds_)
22147	return c
22148}
22149
22150// Fields allows partial responses to be retrieved. See
22151// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22152// for more information.
22153func (c *ChangeLogsListCall) Fields(s ...googleapi.Field) *ChangeLogsListCall {
22154	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22155	return c
22156}
22157
22158// IfNoneMatch sets the optional parameter which makes the operation
22159// fail if the object's ETag matches the given value. This is useful for
22160// getting updates only after the object has changed since the last
22161// request. Use googleapi.IsNotModified to check whether the response
22162// error from Do is the result of In-None-Match.
22163func (c *ChangeLogsListCall) IfNoneMatch(entityTag string) *ChangeLogsListCall {
22164	c.ifNoneMatch_ = entityTag
22165	return c
22166}
22167
22168// Context sets the context to be used in this call's Do method. Any
22169// pending HTTP request will be aborted if the provided context is
22170// canceled.
22171func (c *ChangeLogsListCall) Context(ctx context.Context) *ChangeLogsListCall {
22172	c.ctx_ = ctx
22173	return c
22174}
22175
22176// Header returns an http.Header that can be modified by the caller to
22177// add HTTP headers to the request.
22178func (c *ChangeLogsListCall) Header() http.Header {
22179	if c.header_ == nil {
22180		c.header_ = make(http.Header)
22181	}
22182	return c.header_
22183}
22184
22185func (c *ChangeLogsListCall) doRequest(alt string) (*http.Response, error) {
22186	reqHeaders := make(http.Header)
22187	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
22188	for k, v := range c.header_ {
22189		reqHeaders[k] = v
22190	}
22191	reqHeaders.Set("User-Agent", c.s.userAgent())
22192	if c.ifNoneMatch_ != "" {
22193		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22194	}
22195	var body io.Reader = nil
22196	c.urlParams_.Set("alt", alt)
22197	c.urlParams_.Set("prettyPrint", "false")
22198	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs")
22199	urls += "?" + c.urlParams_.Encode()
22200	req, err := http.NewRequest("GET", urls, body)
22201	if err != nil {
22202		return nil, err
22203	}
22204	req.Header = reqHeaders
22205	googleapi.Expand(req.URL, map[string]string{
22206		"profileId": strconv.FormatInt(c.profileId, 10),
22207	})
22208	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22209}
22210
22211// Do executes the "dfareporting.changeLogs.list" call.
22212// Exactly one of *ChangeLogsListResponse or error will be non-nil. Any
22213// non-2xx status code is an error. Response headers are in either
22214// *ChangeLogsListResponse.ServerResponse.Header or (if a response was
22215// returned at all) in error.(*googleapi.Error).Header. Use
22216// googleapi.IsNotModified to check whether the returned error was
22217// because http.StatusNotModified was returned.
22218func (c *ChangeLogsListCall) Do(opts ...googleapi.CallOption) (*ChangeLogsListResponse, error) {
22219	gensupport.SetOptions(c.urlParams_, opts...)
22220	res, err := c.doRequest("json")
22221	if res != nil && res.StatusCode == http.StatusNotModified {
22222		if res.Body != nil {
22223			res.Body.Close()
22224		}
22225		return nil, &googleapi.Error{
22226			Code:   res.StatusCode,
22227			Header: res.Header,
22228		}
22229	}
22230	if err != nil {
22231		return nil, err
22232	}
22233	defer googleapi.CloseBody(res)
22234	if err := googleapi.CheckResponse(res); err != nil {
22235		return nil, err
22236	}
22237	ret := &ChangeLogsListResponse{
22238		ServerResponse: googleapi.ServerResponse{
22239			Header:         res.Header,
22240			HTTPStatusCode: res.StatusCode,
22241		},
22242	}
22243	target := &ret
22244	if err := gensupport.DecodeResponse(target, res); err != nil {
22245		return nil, err
22246	}
22247	return ret, nil
22248	// {
22249	//   "description": "Retrieves a list of change logs. This method supports paging.",
22250	//   "httpMethod": "GET",
22251	//   "id": "dfareporting.changeLogs.list",
22252	//   "parameterOrder": [
22253	//     "profileId"
22254	//   ],
22255	//   "parameters": {
22256	//     "action": {
22257	//       "description": "Select only change logs with the specified action.",
22258	//       "enum": [
22259	//         "ACTION_ADD",
22260	//         "ACTION_ASSIGN",
22261	//         "ACTION_ASSOCIATE",
22262	//         "ACTION_CREATE",
22263	//         "ACTION_DELETE",
22264	//         "ACTION_DISABLE",
22265	//         "ACTION_EMAIL_TAGS",
22266	//         "ACTION_ENABLE",
22267	//         "ACTION_LINK",
22268	//         "ACTION_MARK_AS_DEFAULT",
22269	//         "ACTION_PUSH",
22270	//         "ACTION_REMOVE",
22271	//         "ACTION_SEND",
22272	//         "ACTION_SHARE",
22273	//         "ACTION_UNASSIGN",
22274	//         "ACTION_UNLINK",
22275	//         "ACTION_UPDATE"
22276	//       ],
22277	//       "enumDescriptions": [
22278	//         "",
22279	//         "",
22280	//         "",
22281	//         "",
22282	//         "",
22283	//         "",
22284	//         "",
22285	//         "",
22286	//         "",
22287	//         "",
22288	//         "",
22289	//         "",
22290	//         "",
22291	//         "",
22292	//         "",
22293	//         "",
22294	//         ""
22295	//       ],
22296	//       "location": "query",
22297	//       "type": "string"
22298	//     },
22299	//     "ids": {
22300	//       "description": "Select only change logs with these IDs.",
22301	//       "format": "int64",
22302	//       "location": "query",
22303	//       "repeated": true,
22304	//       "type": "string"
22305	//     },
22306	//     "maxChangeTime": {
22307	//       "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.",
22308	//       "location": "query",
22309	//       "type": "string"
22310	//     },
22311	//     "maxResults": {
22312	//       "default": "1000",
22313	//       "description": "Maximum number of results to return.",
22314	//       "format": "int32",
22315	//       "location": "query",
22316	//       "maximum": "1000",
22317	//       "minimum": "0",
22318	//       "type": "integer"
22319	//     },
22320	//     "minChangeTime": {
22321	//       "description": "Select only change logs whose change time is before the specified minChangeTime.The time should be formatted as an RFC3339 date/time string. For example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is \"2015-07-18T22:54:00-04:00\". In other words, the year, month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset.",
22322	//       "location": "query",
22323	//       "type": "string"
22324	//     },
22325	//     "objectIds": {
22326	//       "description": "Select only change logs with these object IDs.",
22327	//       "format": "int64",
22328	//       "location": "query",
22329	//       "repeated": true,
22330	//       "type": "string"
22331	//     },
22332	//     "objectType": {
22333	//       "description": "Select only change logs with the specified object type.",
22334	//       "enum": [
22335	//         "OBJECT_ACCOUNT",
22336	//         "OBJECT_ACCOUNT_BILLING_FEATURE",
22337	//         "OBJECT_AD",
22338	//         "OBJECT_ADVERTISER",
22339	//         "OBJECT_ADVERTISER_GROUP",
22340	//         "OBJECT_BILLING_ACCOUNT_GROUP",
22341	//         "OBJECT_BILLING_FEATURE",
22342	//         "OBJECT_BILLING_MINIMUM_FEE",
22343	//         "OBJECT_BILLING_PROFILE",
22344	//         "OBJECT_CAMPAIGN",
22345	//         "OBJECT_CONTENT_CATEGORY",
22346	//         "OBJECT_CREATIVE",
22347	//         "OBJECT_CREATIVE_ASSET",
22348	//         "OBJECT_CREATIVE_BUNDLE",
22349	//         "OBJECT_CREATIVE_FIELD",
22350	//         "OBJECT_CREATIVE_GROUP",
22351	//         "OBJECT_DFA_SITE",
22352	//         "OBJECT_EVENT_TAG",
22353	//         "OBJECT_FLOODLIGHT_ACTIVITY_GROUP",
22354	//         "OBJECT_FLOODLIGHT_ACTVITY",
22355	//         "OBJECT_FLOODLIGHT_CONFIGURATION",
22356	//         "OBJECT_FLOODLIGHT_DV360_LINK",
22357	//         "OBJECT_INSTREAM_CREATIVE",
22358	//         "OBJECT_LANDING_PAGE",
22359	//         "OBJECT_MEDIA_ORDER",
22360	//         "OBJECT_PLACEMENT",
22361	//         "OBJECT_PLACEMENT_STRATEGY",
22362	//         "OBJECT_PLAYSTORE_LINK",
22363	//         "OBJECT_PROVIDED_LIST_CLIENT",
22364	//         "OBJECT_RATE_CARD",
22365	//         "OBJECT_REMARKETING_LIST",
22366	//         "OBJECT_RICHMEDIA_CREATIVE",
22367	//         "OBJECT_SD_SITE",
22368	//         "OBJECT_SEARCH_LIFT_STUDY",
22369	//         "OBJECT_SIZE",
22370	//         "OBJECT_SUBACCOUNT",
22371	//         "OBJECT_TARGETING_TEMPLATE",
22372	//         "OBJECT_USER_PROFILE",
22373	//         "OBJECT_USER_PROFILE_FILTER",
22374	//         "OBJECT_USER_ROLE"
22375	//       ],
22376	//       "enumDescriptions": [
22377	//         "",
22378	//         "",
22379	//         "",
22380	//         "",
22381	//         "",
22382	//         "",
22383	//         "",
22384	//         "",
22385	//         "",
22386	//         "",
22387	//         "",
22388	//         "",
22389	//         "",
22390	//         "",
22391	//         "",
22392	//         "",
22393	//         "",
22394	//         "",
22395	//         "",
22396	//         "",
22397	//         "",
22398	//         "",
22399	//         "",
22400	//         "",
22401	//         "",
22402	//         "",
22403	//         "",
22404	//         "",
22405	//         "",
22406	//         "",
22407	//         "",
22408	//         "",
22409	//         "",
22410	//         "",
22411	//         "",
22412	//         "",
22413	//         "",
22414	//         "",
22415	//         "",
22416	//         ""
22417	//       ],
22418	//       "location": "query",
22419	//       "type": "string"
22420	//     },
22421	//     "pageToken": {
22422	//       "description": "Value of the nextPageToken from the previous result page.",
22423	//       "location": "query",
22424	//       "type": "string"
22425	//     },
22426	//     "profileId": {
22427	//       "description": "User profile ID associated with this request.",
22428	//       "format": "int64",
22429	//       "location": "path",
22430	//       "required": true,
22431	//       "type": "string"
22432	//     },
22433	//     "searchString": {
22434	//       "description": "Select only change logs whose object ID, user name, old or new values match the search string.",
22435	//       "location": "query",
22436	//       "type": "string"
22437	//     },
22438	//     "userProfileIds": {
22439	//       "description": "Select only change logs with these user profile IDs.",
22440	//       "format": "int64",
22441	//       "location": "query",
22442	//       "repeated": true,
22443	//       "type": "string"
22444	//     }
22445	//   },
22446	//   "path": "userprofiles/{profileId}/changeLogs",
22447	//   "response": {
22448	//     "$ref": "ChangeLogsListResponse"
22449	//   },
22450	//   "scopes": [
22451	//     "https://www.googleapis.com/auth/dfatrafficking"
22452	//   ]
22453	// }
22454
22455}
22456
22457// Pages invokes f for each page of results.
22458// A non-nil error returned from f will halt the iteration.
22459// The provided context supersedes any context provided to the Context method.
22460func (c *ChangeLogsListCall) Pages(ctx context.Context, f func(*ChangeLogsListResponse) error) error {
22461	c.ctx_ = ctx
22462	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22463	for {
22464		x, err := c.Do()
22465		if err != nil {
22466			return err
22467		}
22468		if err := f(x); err != nil {
22469			return err
22470		}
22471		if x.NextPageToken == "" {
22472			return nil
22473		}
22474		c.PageToken(x.NextPageToken)
22475	}
22476}
22477
22478// method id "dfareporting.cities.list":
22479
22480type CitiesListCall struct {
22481	s            *Service
22482	profileId    int64
22483	urlParams_   gensupport.URLParams
22484	ifNoneMatch_ string
22485	ctx_         context.Context
22486	header_      http.Header
22487}
22488
22489// List: Retrieves a list of cities, possibly filtered.
22490func (r *CitiesService) List(profileId int64) *CitiesListCall {
22491	c := &CitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22492	c.profileId = profileId
22493	return c
22494}
22495
22496// CountryDartIds sets the optional parameter "countryDartIds": Select
22497// only cities from these countries.
22498func (c *CitiesListCall) CountryDartIds(countryDartIds ...int64) *CitiesListCall {
22499	var countryDartIds_ []string
22500	for _, v := range countryDartIds {
22501		countryDartIds_ = append(countryDartIds_, fmt.Sprint(v))
22502	}
22503	c.urlParams_.SetMulti("countryDartIds", countryDartIds_)
22504	return c
22505}
22506
22507// DartIds sets the optional parameter "dartIds": Select only cities
22508// with these DART IDs.
22509func (c *CitiesListCall) DartIds(dartIds ...int64) *CitiesListCall {
22510	var dartIds_ []string
22511	for _, v := range dartIds {
22512		dartIds_ = append(dartIds_, fmt.Sprint(v))
22513	}
22514	c.urlParams_.SetMulti("dartIds", dartIds_)
22515	return c
22516}
22517
22518// NamePrefix sets the optional parameter "namePrefix": Select only
22519// cities with names starting with this prefix.
22520func (c *CitiesListCall) NamePrefix(namePrefix string) *CitiesListCall {
22521	c.urlParams_.Set("namePrefix", namePrefix)
22522	return c
22523}
22524
22525// RegionDartIds sets the optional parameter "regionDartIds": Select
22526// only cities from these regions.
22527func (c *CitiesListCall) RegionDartIds(regionDartIds ...int64) *CitiesListCall {
22528	var regionDartIds_ []string
22529	for _, v := range regionDartIds {
22530		regionDartIds_ = append(regionDartIds_, fmt.Sprint(v))
22531	}
22532	c.urlParams_.SetMulti("regionDartIds", regionDartIds_)
22533	return c
22534}
22535
22536// Fields allows partial responses to be retrieved. See
22537// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22538// for more information.
22539func (c *CitiesListCall) Fields(s ...googleapi.Field) *CitiesListCall {
22540	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22541	return c
22542}
22543
22544// IfNoneMatch sets the optional parameter which makes the operation
22545// fail if the object's ETag matches the given value. This is useful for
22546// getting updates only after the object has changed since the last
22547// request. Use googleapi.IsNotModified to check whether the response
22548// error from Do is the result of In-None-Match.
22549func (c *CitiesListCall) IfNoneMatch(entityTag string) *CitiesListCall {
22550	c.ifNoneMatch_ = entityTag
22551	return c
22552}
22553
22554// Context sets the context to be used in this call's Do method. Any
22555// pending HTTP request will be aborted if the provided context is
22556// canceled.
22557func (c *CitiesListCall) Context(ctx context.Context) *CitiesListCall {
22558	c.ctx_ = ctx
22559	return c
22560}
22561
22562// Header returns an http.Header that can be modified by the caller to
22563// add HTTP headers to the request.
22564func (c *CitiesListCall) Header() http.Header {
22565	if c.header_ == nil {
22566		c.header_ = make(http.Header)
22567	}
22568	return c.header_
22569}
22570
22571func (c *CitiesListCall) doRequest(alt string) (*http.Response, error) {
22572	reqHeaders := make(http.Header)
22573	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
22574	for k, v := range c.header_ {
22575		reqHeaders[k] = v
22576	}
22577	reqHeaders.Set("User-Agent", c.s.userAgent())
22578	if c.ifNoneMatch_ != "" {
22579		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22580	}
22581	var body io.Reader = nil
22582	c.urlParams_.Set("alt", alt)
22583	c.urlParams_.Set("prettyPrint", "false")
22584	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/cities")
22585	urls += "?" + c.urlParams_.Encode()
22586	req, err := http.NewRequest("GET", urls, body)
22587	if err != nil {
22588		return nil, err
22589	}
22590	req.Header = reqHeaders
22591	googleapi.Expand(req.URL, map[string]string{
22592		"profileId": strconv.FormatInt(c.profileId, 10),
22593	})
22594	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22595}
22596
22597// Do executes the "dfareporting.cities.list" call.
22598// Exactly one of *CitiesListResponse or error will be non-nil. Any
22599// non-2xx status code is an error. Response headers are in either
22600// *CitiesListResponse.ServerResponse.Header or (if a response was
22601// returned at all) in error.(*googleapi.Error).Header. Use
22602// googleapi.IsNotModified to check whether the returned error was
22603// because http.StatusNotModified was returned.
22604func (c *CitiesListCall) Do(opts ...googleapi.CallOption) (*CitiesListResponse, error) {
22605	gensupport.SetOptions(c.urlParams_, opts...)
22606	res, err := c.doRequest("json")
22607	if res != nil && res.StatusCode == http.StatusNotModified {
22608		if res.Body != nil {
22609			res.Body.Close()
22610		}
22611		return nil, &googleapi.Error{
22612			Code:   res.StatusCode,
22613			Header: res.Header,
22614		}
22615	}
22616	if err != nil {
22617		return nil, err
22618	}
22619	defer googleapi.CloseBody(res)
22620	if err := googleapi.CheckResponse(res); err != nil {
22621		return nil, err
22622	}
22623	ret := &CitiesListResponse{
22624		ServerResponse: googleapi.ServerResponse{
22625			Header:         res.Header,
22626			HTTPStatusCode: res.StatusCode,
22627		},
22628	}
22629	target := &ret
22630	if err := gensupport.DecodeResponse(target, res); err != nil {
22631		return nil, err
22632	}
22633	return ret, nil
22634	// {
22635	//   "description": "Retrieves a list of cities, possibly filtered.",
22636	//   "httpMethod": "GET",
22637	//   "id": "dfareporting.cities.list",
22638	//   "parameterOrder": [
22639	//     "profileId"
22640	//   ],
22641	//   "parameters": {
22642	//     "countryDartIds": {
22643	//       "description": "Select only cities from these countries.",
22644	//       "format": "int64",
22645	//       "location": "query",
22646	//       "repeated": true,
22647	//       "type": "string"
22648	//     },
22649	//     "dartIds": {
22650	//       "description": "Select only cities with these DART IDs.",
22651	//       "format": "int64",
22652	//       "location": "query",
22653	//       "repeated": true,
22654	//       "type": "string"
22655	//     },
22656	//     "namePrefix": {
22657	//       "description": "Select only cities with names starting with this prefix.",
22658	//       "location": "query",
22659	//       "type": "string"
22660	//     },
22661	//     "profileId": {
22662	//       "description": "User profile ID associated with this request.",
22663	//       "format": "int64",
22664	//       "location": "path",
22665	//       "required": true,
22666	//       "type": "string"
22667	//     },
22668	//     "regionDartIds": {
22669	//       "description": "Select only cities from these regions.",
22670	//       "format": "int64",
22671	//       "location": "query",
22672	//       "repeated": true,
22673	//       "type": "string"
22674	//     }
22675	//   },
22676	//   "path": "userprofiles/{profileId}/cities",
22677	//   "response": {
22678	//     "$ref": "CitiesListResponse"
22679	//   },
22680	//   "scopes": [
22681	//     "https://www.googleapis.com/auth/dfatrafficking"
22682	//   ]
22683	// }
22684
22685}
22686
22687// method id "dfareporting.connectionTypes.get":
22688
22689type ConnectionTypesGetCall struct {
22690	s            *Service
22691	profileId    int64
22692	id           int64
22693	urlParams_   gensupport.URLParams
22694	ifNoneMatch_ string
22695	ctx_         context.Context
22696	header_      http.Header
22697}
22698
22699// Get: Gets one connection type by ID.
22700func (r *ConnectionTypesService) Get(profileId int64, id int64) *ConnectionTypesGetCall {
22701	c := &ConnectionTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22702	c.profileId = profileId
22703	c.id = id
22704	return c
22705}
22706
22707// Fields allows partial responses to be retrieved. See
22708// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22709// for more information.
22710func (c *ConnectionTypesGetCall) Fields(s ...googleapi.Field) *ConnectionTypesGetCall {
22711	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22712	return c
22713}
22714
22715// IfNoneMatch sets the optional parameter which makes the operation
22716// fail if the object's ETag matches the given value. This is useful for
22717// getting updates only after the object has changed since the last
22718// request. Use googleapi.IsNotModified to check whether the response
22719// error from Do is the result of In-None-Match.
22720func (c *ConnectionTypesGetCall) IfNoneMatch(entityTag string) *ConnectionTypesGetCall {
22721	c.ifNoneMatch_ = entityTag
22722	return c
22723}
22724
22725// Context sets the context to be used in this call's Do method. Any
22726// pending HTTP request will be aborted if the provided context is
22727// canceled.
22728func (c *ConnectionTypesGetCall) Context(ctx context.Context) *ConnectionTypesGetCall {
22729	c.ctx_ = ctx
22730	return c
22731}
22732
22733// Header returns an http.Header that can be modified by the caller to
22734// add HTTP headers to the request.
22735func (c *ConnectionTypesGetCall) Header() http.Header {
22736	if c.header_ == nil {
22737		c.header_ = make(http.Header)
22738	}
22739	return c.header_
22740}
22741
22742func (c *ConnectionTypesGetCall) doRequest(alt string) (*http.Response, error) {
22743	reqHeaders := make(http.Header)
22744	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
22745	for k, v := range c.header_ {
22746		reqHeaders[k] = v
22747	}
22748	reqHeaders.Set("User-Agent", c.s.userAgent())
22749	if c.ifNoneMatch_ != "" {
22750		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22751	}
22752	var body io.Reader = nil
22753	c.urlParams_.Set("alt", alt)
22754	c.urlParams_.Set("prettyPrint", "false")
22755	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes/{id}")
22756	urls += "?" + c.urlParams_.Encode()
22757	req, err := http.NewRequest("GET", urls, body)
22758	if err != nil {
22759		return nil, err
22760	}
22761	req.Header = reqHeaders
22762	googleapi.Expand(req.URL, map[string]string{
22763		"profileId": strconv.FormatInt(c.profileId, 10),
22764		"id":        strconv.FormatInt(c.id, 10),
22765	})
22766	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22767}
22768
22769// Do executes the "dfareporting.connectionTypes.get" call.
22770// Exactly one of *ConnectionType or error will be non-nil. Any non-2xx
22771// status code is an error. Response headers are in either
22772// *ConnectionType.ServerResponse.Header or (if a response was returned
22773// at all) in error.(*googleapi.Error).Header. Use
22774// googleapi.IsNotModified to check whether the returned error was
22775// because http.StatusNotModified was returned.
22776func (c *ConnectionTypesGetCall) Do(opts ...googleapi.CallOption) (*ConnectionType, error) {
22777	gensupport.SetOptions(c.urlParams_, opts...)
22778	res, err := c.doRequest("json")
22779	if res != nil && res.StatusCode == http.StatusNotModified {
22780		if res.Body != nil {
22781			res.Body.Close()
22782		}
22783		return nil, &googleapi.Error{
22784			Code:   res.StatusCode,
22785			Header: res.Header,
22786		}
22787	}
22788	if err != nil {
22789		return nil, err
22790	}
22791	defer googleapi.CloseBody(res)
22792	if err := googleapi.CheckResponse(res); err != nil {
22793		return nil, err
22794	}
22795	ret := &ConnectionType{
22796		ServerResponse: googleapi.ServerResponse{
22797			Header:         res.Header,
22798			HTTPStatusCode: res.StatusCode,
22799		},
22800	}
22801	target := &ret
22802	if err := gensupport.DecodeResponse(target, res); err != nil {
22803		return nil, err
22804	}
22805	return ret, nil
22806	// {
22807	//   "description": "Gets one connection type by ID.",
22808	//   "httpMethod": "GET",
22809	//   "id": "dfareporting.connectionTypes.get",
22810	//   "parameterOrder": [
22811	//     "profileId",
22812	//     "id"
22813	//   ],
22814	//   "parameters": {
22815	//     "id": {
22816	//       "description": "Connection type ID.",
22817	//       "format": "int64",
22818	//       "location": "path",
22819	//       "required": true,
22820	//       "type": "string"
22821	//     },
22822	//     "profileId": {
22823	//       "description": "User profile ID associated with this request.",
22824	//       "format": "int64",
22825	//       "location": "path",
22826	//       "required": true,
22827	//       "type": "string"
22828	//     }
22829	//   },
22830	//   "path": "userprofiles/{profileId}/connectionTypes/{id}",
22831	//   "response": {
22832	//     "$ref": "ConnectionType"
22833	//   },
22834	//   "scopes": [
22835	//     "https://www.googleapis.com/auth/dfatrafficking"
22836	//   ]
22837	// }
22838
22839}
22840
22841// method id "dfareporting.connectionTypes.list":
22842
22843type ConnectionTypesListCall struct {
22844	s            *Service
22845	profileId    int64
22846	urlParams_   gensupport.URLParams
22847	ifNoneMatch_ string
22848	ctx_         context.Context
22849	header_      http.Header
22850}
22851
22852// List: Retrieves a list of connection types.
22853func (r *ConnectionTypesService) List(profileId int64) *ConnectionTypesListCall {
22854	c := &ConnectionTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22855	c.profileId = profileId
22856	return c
22857}
22858
22859// Fields allows partial responses to be retrieved. See
22860// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22861// for more information.
22862func (c *ConnectionTypesListCall) Fields(s ...googleapi.Field) *ConnectionTypesListCall {
22863	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22864	return c
22865}
22866
22867// IfNoneMatch sets the optional parameter which makes the operation
22868// fail if the object's ETag matches the given value. This is useful for
22869// getting updates only after the object has changed since the last
22870// request. Use googleapi.IsNotModified to check whether the response
22871// error from Do is the result of In-None-Match.
22872func (c *ConnectionTypesListCall) IfNoneMatch(entityTag string) *ConnectionTypesListCall {
22873	c.ifNoneMatch_ = entityTag
22874	return c
22875}
22876
22877// Context sets the context to be used in this call's Do method. Any
22878// pending HTTP request will be aborted if the provided context is
22879// canceled.
22880func (c *ConnectionTypesListCall) Context(ctx context.Context) *ConnectionTypesListCall {
22881	c.ctx_ = ctx
22882	return c
22883}
22884
22885// Header returns an http.Header that can be modified by the caller to
22886// add HTTP headers to the request.
22887func (c *ConnectionTypesListCall) Header() http.Header {
22888	if c.header_ == nil {
22889		c.header_ = make(http.Header)
22890	}
22891	return c.header_
22892}
22893
22894func (c *ConnectionTypesListCall) doRequest(alt string) (*http.Response, error) {
22895	reqHeaders := make(http.Header)
22896	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
22897	for k, v := range c.header_ {
22898		reqHeaders[k] = v
22899	}
22900	reqHeaders.Set("User-Agent", c.s.userAgent())
22901	if c.ifNoneMatch_ != "" {
22902		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22903	}
22904	var body io.Reader = nil
22905	c.urlParams_.Set("alt", alt)
22906	c.urlParams_.Set("prettyPrint", "false")
22907	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes")
22908	urls += "?" + c.urlParams_.Encode()
22909	req, err := http.NewRequest("GET", urls, body)
22910	if err != nil {
22911		return nil, err
22912	}
22913	req.Header = reqHeaders
22914	googleapi.Expand(req.URL, map[string]string{
22915		"profileId": strconv.FormatInt(c.profileId, 10),
22916	})
22917	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22918}
22919
22920// Do executes the "dfareporting.connectionTypes.list" call.
22921// Exactly one of *ConnectionTypesListResponse or error will be non-nil.
22922// Any non-2xx status code is an error. Response headers are in either
22923// *ConnectionTypesListResponse.ServerResponse.Header or (if a response
22924// was returned at all) in error.(*googleapi.Error).Header. Use
22925// googleapi.IsNotModified to check whether the returned error was
22926// because http.StatusNotModified was returned.
22927func (c *ConnectionTypesListCall) Do(opts ...googleapi.CallOption) (*ConnectionTypesListResponse, error) {
22928	gensupport.SetOptions(c.urlParams_, opts...)
22929	res, err := c.doRequest("json")
22930	if res != nil && res.StatusCode == http.StatusNotModified {
22931		if res.Body != nil {
22932			res.Body.Close()
22933		}
22934		return nil, &googleapi.Error{
22935			Code:   res.StatusCode,
22936			Header: res.Header,
22937		}
22938	}
22939	if err != nil {
22940		return nil, err
22941	}
22942	defer googleapi.CloseBody(res)
22943	if err := googleapi.CheckResponse(res); err != nil {
22944		return nil, err
22945	}
22946	ret := &ConnectionTypesListResponse{
22947		ServerResponse: googleapi.ServerResponse{
22948			Header:         res.Header,
22949			HTTPStatusCode: res.StatusCode,
22950		},
22951	}
22952	target := &ret
22953	if err := gensupport.DecodeResponse(target, res); err != nil {
22954		return nil, err
22955	}
22956	return ret, nil
22957	// {
22958	//   "description": "Retrieves a list of connection types.",
22959	//   "httpMethod": "GET",
22960	//   "id": "dfareporting.connectionTypes.list",
22961	//   "parameterOrder": [
22962	//     "profileId"
22963	//   ],
22964	//   "parameters": {
22965	//     "profileId": {
22966	//       "description": "User profile ID associated with this request.",
22967	//       "format": "int64",
22968	//       "location": "path",
22969	//       "required": true,
22970	//       "type": "string"
22971	//     }
22972	//   },
22973	//   "path": "userprofiles/{profileId}/connectionTypes",
22974	//   "response": {
22975	//     "$ref": "ConnectionTypesListResponse"
22976	//   },
22977	//   "scopes": [
22978	//     "https://www.googleapis.com/auth/dfatrafficking"
22979	//   ]
22980	// }
22981
22982}
22983
22984// method id "dfareporting.contentCategories.delete":
22985
22986type ContentCategoriesDeleteCall struct {
22987	s          *Service
22988	profileId  int64
22989	id         int64
22990	urlParams_ gensupport.URLParams
22991	ctx_       context.Context
22992	header_    http.Header
22993}
22994
22995// Delete: Deletes an existing content category.
22996func (r *ContentCategoriesService) Delete(profileId int64, id int64) *ContentCategoriesDeleteCall {
22997	c := &ContentCategoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22998	c.profileId = profileId
22999	c.id = id
23000	return c
23001}
23002
23003// Fields allows partial responses to be retrieved. See
23004// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23005// for more information.
23006func (c *ContentCategoriesDeleteCall) Fields(s ...googleapi.Field) *ContentCategoriesDeleteCall {
23007	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23008	return c
23009}
23010
23011// Context sets the context to be used in this call's Do method. Any
23012// pending HTTP request will be aborted if the provided context is
23013// canceled.
23014func (c *ContentCategoriesDeleteCall) Context(ctx context.Context) *ContentCategoriesDeleteCall {
23015	c.ctx_ = ctx
23016	return c
23017}
23018
23019// Header returns an http.Header that can be modified by the caller to
23020// add HTTP headers to the request.
23021func (c *ContentCategoriesDeleteCall) Header() http.Header {
23022	if c.header_ == nil {
23023		c.header_ = make(http.Header)
23024	}
23025	return c.header_
23026}
23027
23028func (c *ContentCategoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
23029	reqHeaders := make(http.Header)
23030	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
23031	for k, v := range c.header_ {
23032		reqHeaders[k] = v
23033	}
23034	reqHeaders.Set("User-Agent", c.s.userAgent())
23035	var body io.Reader = nil
23036	c.urlParams_.Set("alt", alt)
23037	c.urlParams_.Set("prettyPrint", "false")
23038	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
23039	urls += "?" + c.urlParams_.Encode()
23040	req, err := http.NewRequest("DELETE", urls, body)
23041	if err != nil {
23042		return nil, err
23043	}
23044	req.Header = reqHeaders
23045	googleapi.Expand(req.URL, map[string]string{
23046		"profileId": strconv.FormatInt(c.profileId, 10),
23047		"id":        strconv.FormatInt(c.id, 10),
23048	})
23049	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23050}
23051
23052// Do executes the "dfareporting.contentCategories.delete" call.
23053func (c *ContentCategoriesDeleteCall) Do(opts ...googleapi.CallOption) error {
23054	gensupport.SetOptions(c.urlParams_, opts...)
23055	res, err := c.doRequest("json")
23056	if err != nil {
23057		return err
23058	}
23059	defer googleapi.CloseBody(res)
23060	if err := googleapi.CheckResponse(res); err != nil {
23061		return err
23062	}
23063	return nil
23064	// {
23065	//   "description": "Deletes an existing content category.",
23066	//   "httpMethod": "DELETE",
23067	//   "id": "dfareporting.contentCategories.delete",
23068	//   "parameterOrder": [
23069	//     "profileId",
23070	//     "id"
23071	//   ],
23072	//   "parameters": {
23073	//     "id": {
23074	//       "description": "Content category ID.",
23075	//       "format": "int64",
23076	//       "location": "path",
23077	//       "required": true,
23078	//       "type": "string"
23079	//     },
23080	//     "profileId": {
23081	//       "description": "User profile ID associated with this request.",
23082	//       "format": "int64",
23083	//       "location": "path",
23084	//       "required": true,
23085	//       "type": "string"
23086	//     }
23087	//   },
23088	//   "path": "userprofiles/{profileId}/contentCategories/{id}",
23089	//   "scopes": [
23090	//     "https://www.googleapis.com/auth/dfatrafficking"
23091	//   ]
23092	// }
23093
23094}
23095
23096// method id "dfareporting.contentCategories.get":
23097
23098type ContentCategoriesGetCall struct {
23099	s            *Service
23100	profileId    int64
23101	id           int64
23102	urlParams_   gensupport.URLParams
23103	ifNoneMatch_ string
23104	ctx_         context.Context
23105	header_      http.Header
23106}
23107
23108// Get: Gets one content category by ID.
23109func (r *ContentCategoriesService) Get(profileId int64, id int64) *ContentCategoriesGetCall {
23110	c := &ContentCategoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23111	c.profileId = profileId
23112	c.id = id
23113	return c
23114}
23115
23116// Fields allows partial responses to be retrieved. See
23117// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23118// for more information.
23119func (c *ContentCategoriesGetCall) Fields(s ...googleapi.Field) *ContentCategoriesGetCall {
23120	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23121	return c
23122}
23123
23124// IfNoneMatch sets the optional parameter which makes the operation
23125// fail if the object's ETag matches the given value. This is useful for
23126// getting updates only after the object has changed since the last
23127// request. Use googleapi.IsNotModified to check whether the response
23128// error from Do is the result of In-None-Match.
23129func (c *ContentCategoriesGetCall) IfNoneMatch(entityTag string) *ContentCategoriesGetCall {
23130	c.ifNoneMatch_ = entityTag
23131	return c
23132}
23133
23134// Context sets the context to be used in this call's Do method. Any
23135// pending HTTP request will be aborted if the provided context is
23136// canceled.
23137func (c *ContentCategoriesGetCall) Context(ctx context.Context) *ContentCategoriesGetCall {
23138	c.ctx_ = ctx
23139	return c
23140}
23141
23142// Header returns an http.Header that can be modified by the caller to
23143// add HTTP headers to the request.
23144func (c *ContentCategoriesGetCall) Header() http.Header {
23145	if c.header_ == nil {
23146		c.header_ = make(http.Header)
23147	}
23148	return c.header_
23149}
23150
23151func (c *ContentCategoriesGetCall) doRequest(alt string) (*http.Response, error) {
23152	reqHeaders := make(http.Header)
23153	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
23154	for k, v := range c.header_ {
23155		reqHeaders[k] = v
23156	}
23157	reqHeaders.Set("User-Agent", c.s.userAgent())
23158	if c.ifNoneMatch_ != "" {
23159		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23160	}
23161	var body io.Reader = nil
23162	c.urlParams_.Set("alt", alt)
23163	c.urlParams_.Set("prettyPrint", "false")
23164	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
23165	urls += "?" + c.urlParams_.Encode()
23166	req, err := http.NewRequest("GET", urls, body)
23167	if err != nil {
23168		return nil, err
23169	}
23170	req.Header = reqHeaders
23171	googleapi.Expand(req.URL, map[string]string{
23172		"profileId": strconv.FormatInt(c.profileId, 10),
23173		"id":        strconv.FormatInt(c.id, 10),
23174	})
23175	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23176}
23177
23178// Do executes the "dfareporting.contentCategories.get" call.
23179// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23180// status code is an error. Response headers are in either
23181// *ContentCategory.ServerResponse.Header or (if a response was returned
23182// at all) in error.(*googleapi.Error).Header. Use
23183// googleapi.IsNotModified to check whether the returned error was
23184// because http.StatusNotModified was returned.
23185func (c *ContentCategoriesGetCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23186	gensupport.SetOptions(c.urlParams_, opts...)
23187	res, err := c.doRequest("json")
23188	if res != nil && res.StatusCode == http.StatusNotModified {
23189		if res.Body != nil {
23190			res.Body.Close()
23191		}
23192		return nil, &googleapi.Error{
23193			Code:   res.StatusCode,
23194			Header: res.Header,
23195		}
23196	}
23197	if err != nil {
23198		return nil, err
23199	}
23200	defer googleapi.CloseBody(res)
23201	if err := googleapi.CheckResponse(res); err != nil {
23202		return nil, err
23203	}
23204	ret := &ContentCategory{
23205		ServerResponse: googleapi.ServerResponse{
23206			Header:         res.Header,
23207			HTTPStatusCode: res.StatusCode,
23208		},
23209	}
23210	target := &ret
23211	if err := gensupport.DecodeResponse(target, res); err != nil {
23212		return nil, err
23213	}
23214	return ret, nil
23215	// {
23216	//   "description": "Gets one content category by ID.",
23217	//   "httpMethod": "GET",
23218	//   "id": "dfareporting.contentCategories.get",
23219	//   "parameterOrder": [
23220	//     "profileId",
23221	//     "id"
23222	//   ],
23223	//   "parameters": {
23224	//     "id": {
23225	//       "description": "Content category ID.",
23226	//       "format": "int64",
23227	//       "location": "path",
23228	//       "required": true,
23229	//       "type": "string"
23230	//     },
23231	//     "profileId": {
23232	//       "description": "User profile ID associated with this request.",
23233	//       "format": "int64",
23234	//       "location": "path",
23235	//       "required": true,
23236	//       "type": "string"
23237	//     }
23238	//   },
23239	//   "path": "userprofiles/{profileId}/contentCategories/{id}",
23240	//   "response": {
23241	//     "$ref": "ContentCategory"
23242	//   },
23243	//   "scopes": [
23244	//     "https://www.googleapis.com/auth/dfatrafficking"
23245	//   ]
23246	// }
23247
23248}
23249
23250// method id "dfareporting.contentCategories.insert":
23251
23252type ContentCategoriesInsertCall struct {
23253	s               *Service
23254	profileId       int64
23255	contentcategory *ContentCategory
23256	urlParams_      gensupport.URLParams
23257	ctx_            context.Context
23258	header_         http.Header
23259}
23260
23261// Insert: Inserts a new content category.
23262func (r *ContentCategoriesService) Insert(profileId int64, contentcategory *ContentCategory) *ContentCategoriesInsertCall {
23263	c := &ContentCategoriesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23264	c.profileId = profileId
23265	c.contentcategory = contentcategory
23266	return c
23267}
23268
23269// Fields allows partial responses to be retrieved. See
23270// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23271// for more information.
23272func (c *ContentCategoriesInsertCall) Fields(s ...googleapi.Field) *ContentCategoriesInsertCall {
23273	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23274	return c
23275}
23276
23277// Context sets the context to be used in this call's Do method. Any
23278// pending HTTP request will be aborted if the provided context is
23279// canceled.
23280func (c *ContentCategoriesInsertCall) Context(ctx context.Context) *ContentCategoriesInsertCall {
23281	c.ctx_ = ctx
23282	return c
23283}
23284
23285// Header returns an http.Header that can be modified by the caller to
23286// add HTTP headers to the request.
23287func (c *ContentCategoriesInsertCall) Header() http.Header {
23288	if c.header_ == nil {
23289		c.header_ = make(http.Header)
23290	}
23291	return c.header_
23292}
23293
23294func (c *ContentCategoriesInsertCall) doRequest(alt string) (*http.Response, error) {
23295	reqHeaders := make(http.Header)
23296	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
23297	for k, v := range c.header_ {
23298		reqHeaders[k] = v
23299	}
23300	reqHeaders.Set("User-Agent", c.s.userAgent())
23301	var body io.Reader = nil
23302	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
23303	if err != nil {
23304		return nil, err
23305	}
23306	reqHeaders.Set("Content-Type", "application/json")
23307	c.urlParams_.Set("alt", alt)
23308	c.urlParams_.Set("prettyPrint", "false")
23309	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23310	urls += "?" + c.urlParams_.Encode()
23311	req, err := http.NewRequest("POST", urls, body)
23312	if err != nil {
23313		return nil, err
23314	}
23315	req.Header = reqHeaders
23316	googleapi.Expand(req.URL, map[string]string{
23317		"profileId": strconv.FormatInt(c.profileId, 10),
23318	})
23319	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23320}
23321
23322// Do executes the "dfareporting.contentCategories.insert" call.
23323// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23324// status code is an error. Response headers are in either
23325// *ContentCategory.ServerResponse.Header or (if a response was returned
23326// at all) in error.(*googleapi.Error).Header. Use
23327// googleapi.IsNotModified to check whether the returned error was
23328// because http.StatusNotModified was returned.
23329func (c *ContentCategoriesInsertCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23330	gensupport.SetOptions(c.urlParams_, opts...)
23331	res, err := c.doRequest("json")
23332	if res != nil && res.StatusCode == http.StatusNotModified {
23333		if res.Body != nil {
23334			res.Body.Close()
23335		}
23336		return nil, &googleapi.Error{
23337			Code:   res.StatusCode,
23338			Header: res.Header,
23339		}
23340	}
23341	if err != nil {
23342		return nil, err
23343	}
23344	defer googleapi.CloseBody(res)
23345	if err := googleapi.CheckResponse(res); err != nil {
23346		return nil, err
23347	}
23348	ret := &ContentCategory{
23349		ServerResponse: googleapi.ServerResponse{
23350			Header:         res.Header,
23351			HTTPStatusCode: res.StatusCode,
23352		},
23353	}
23354	target := &ret
23355	if err := gensupport.DecodeResponse(target, res); err != nil {
23356		return nil, err
23357	}
23358	return ret, nil
23359	// {
23360	//   "description": "Inserts a new content category.",
23361	//   "httpMethod": "POST",
23362	//   "id": "dfareporting.contentCategories.insert",
23363	//   "parameterOrder": [
23364	//     "profileId"
23365	//   ],
23366	//   "parameters": {
23367	//     "profileId": {
23368	//       "description": "User profile ID associated with this request.",
23369	//       "format": "int64",
23370	//       "location": "path",
23371	//       "required": true,
23372	//       "type": "string"
23373	//     }
23374	//   },
23375	//   "path": "userprofiles/{profileId}/contentCategories",
23376	//   "request": {
23377	//     "$ref": "ContentCategory"
23378	//   },
23379	//   "response": {
23380	//     "$ref": "ContentCategory"
23381	//   },
23382	//   "scopes": [
23383	//     "https://www.googleapis.com/auth/dfatrafficking"
23384	//   ]
23385	// }
23386
23387}
23388
23389// method id "dfareporting.contentCategories.list":
23390
23391type ContentCategoriesListCall struct {
23392	s            *Service
23393	profileId    int64
23394	urlParams_   gensupport.URLParams
23395	ifNoneMatch_ string
23396	ctx_         context.Context
23397	header_      http.Header
23398}
23399
23400// List: Retrieves a list of content categories, possibly filtered. This
23401// method supports paging.
23402func (r *ContentCategoriesService) List(profileId int64) *ContentCategoriesListCall {
23403	c := &ContentCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23404	c.profileId = profileId
23405	return c
23406}
23407
23408// Ids sets the optional parameter "ids": Select only content categories
23409// with these IDs.
23410func (c *ContentCategoriesListCall) Ids(ids ...int64) *ContentCategoriesListCall {
23411	var ids_ []string
23412	for _, v := range ids {
23413		ids_ = append(ids_, fmt.Sprint(v))
23414	}
23415	c.urlParams_.SetMulti("ids", ids_)
23416	return c
23417}
23418
23419// MaxResults sets the optional parameter "maxResults": Maximum number
23420// of results to return.
23421func (c *ContentCategoriesListCall) MaxResults(maxResults int64) *ContentCategoriesListCall {
23422	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23423	return c
23424}
23425
23426// PageToken sets the optional parameter "pageToken": Value of the
23427// nextPageToken from the previous result page.
23428func (c *ContentCategoriesListCall) PageToken(pageToken string) *ContentCategoriesListCall {
23429	c.urlParams_.Set("pageToken", pageToken)
23430	return c
23431}
23432
23433// SearchString sets the optional parameter "searchString": Allows
23434// searching for objects by name or ID. Wildcards (*) are allowed. For
23435// example, "contentcategory*2015" will return objects with names like
23436// "contentcategory June 2015", "contentcategory April 2015", or simply
23437// "contentcategory 2015". Most of the searches also add wildcards
23438// implicitly at the start and the end of the search string. For
23439// example, a search string of "contentcategory" will match objects with
23440// name "my contentcategory", "contentcategory 2015", or simply
23441// "contentcategory".
23442func (c *ContentCategoriesListCall) SearchString(searchString string) *ContentCategoriesListCall {
23443	c.urlParams_.Set("searchString", searchString)
23444	return c
23445}
23446
23447// SortField sets the optional parameter "sortField": Field by which to
23448// sort the list.
23449//
23450// Possible values:
23451//   "ID" (default)
23452//   "NAME"
23453func (c *ContentCategoriesListCall) SortField(sortField string) *ContentCategoriesListCall {
23454	c.urlParams_.Set("sortField", sortField)
23455	return c
23456}
23457
23458// SortOrder sets the optional parameter "sortOrder": Order of sorted
23459// results.
23460//
23461// Possible values:
23462//   "ASCENDING" (default)
23463//   "DESCENDING"
23464func (c *ContentCategoriesListCall) SortOrder(sortOrder string) *ContentCategoriesListCall {
23465	c.urlParams_.Set("sortOrder", sortOrder)
23466	return c
23467}
23468
23469// Fields allows partial responses to be retrieved. See
23470// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23471// for more information.
23472func (c *ContentCategoriesListCall) Fields(s ...googleapi.Field) *ContentCategoriesListCall {
23473	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23474	return c
23475}
23476
23477// IfNoneMatch sets the optional parameter which makes the operation
23478// fail if the object's ETag matches the given value. This is useful for
23479// getting updates only after the object has changed since the last
23480// request. Use googleapi.IsNotModified to check whether the response
23481// error from Do is the result of In-None-Match.
23482func (c *ContentCategoriesListCall) IfNoneMatch(entityTag string) *ContentCategoriesListCall {
23483	c.ifNoneMatch_ = entityTag
23484	return c
23485}
23486
23487// Context sets the context to be used in this call's Do method. Any
23488// pending HTTP request will be aborted if the provided context is
23489// canceled.
23490func (c *ContentCategoriesListCall) Context(ctx context.Context) *ContentCategoriesListCall {
23491	c.ctx_ = ctx
23492	return c
23493}
23494
23495// Header returns an http.Header that can be modified by the caller to
23496// add HTTP headers to the request.
23497func (c *ContentCategoriesListCall) Header() http.Header {
23498	if c.header_ == nil {
23499		c.header_ = make(http.Header)
23500	}
23501	return c.header_
23502}
23503
23504func (c *ContentCategoriesListCall) doRequest(alt string) (*http.Response, error) {
23505	reqHeaders := make(http.Header)
23506	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
23507	for k, v := range c.header_ {
23508		reqHeaders[k] = v
23509	}
23510	reqHeaders.Set("User-Agent", c.s.userAgent())
23511	if c.ifNoneMatch_ != "" {
23512		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23513	}
23514	var body io.Reader = nil
23515	c.urlParams_.Set("alt", alt)
23516	c.urlParams_.Set("prettyPrint", "false")
23517	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23518	urls += "?" + c.urlParams_.Encode()
23519	req, err := http.NewRequest("GET", urls, body)
23520	if err != nil {
23521		return nil, err
23522	}
23523	req.Header = reqHeaders
23524	googleapi.Expand(req.URL, map[string]string{
23525		"profileId": strconv.FormatInt(c.profileId, 10),
23526	})
23527	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23528}
23529
23530// Do executes the "dfareporting.contentCategories.list" call.
23531// Exactly one of *ContentCategoriesListResponse or error will be
23532// non-nil. Any non-2xx status code is an error. Response headers are in
23533// either *ContentCategoriesListResponse.ServerResponse.Header or (if a
23534// response was returned at all) in error.(*googleapi.Error).Header. Use
23535// googleapi.IsNotModified to check whether the returned error was
23536// because http.StatusNotModified was returned.
23537func (c *ContentCategoriesListCall) Do(opts ...googleapi.CallOption) (*ContentCategoriesListResponse, error) {
23538	gensupport.SetOptions(c.urlParams_, opts...)
23539	res, err := c.doRequest("json")
23540	if res != nil && res.StatusCode == http.StatusNotModified {
23541		if res.Body != nil {
23542			res.Body.Close()
23543		}
23544		return nil, &googleapi.Error{
23545			Code:   res.StatusCode,
23546			Header: res.Header,
23547		}
23548	}
23549	if err != nil {
23550		return nil, err
23551	}
23552	defer googleapi.CloseBody(res)
23553	if err := googleapi.CheckResponse(res); err != nil {
23554		return nil, err
23555	}
23556	ret := &ContentCategoriesListResponse{
23557		ServerResponse: googleapi.ServerResponse{
23558			Header:         res.Header,
23559			HTTPStatusCode: res.StatusCode,
23560		},
23561	}
23562	target := &ret
23563	if err := gensupport.DecodeResponse(target, res); err != nil {
23564		return nil, err
23565	}
23566	return ret, nil
23567	// {
23568	//   "description": "Retrieves a list of content categories, possibly filtered. This method supports paging.",
23569	//   "httpMethod": "GET",
23570	//   "id": "dfareporting.contentCategories.list",
23571	//   "parameterOrder": [
23572	//     "profileId"
23573	//   ],
23574	//   "parameters": {
23575	//     "ids": {
23576	//       "description": "Select only content categories with these IDs.",
23577	//       "format": "int64",
23578	//       "location": "query",
23579	//       "repeated": true,
23580	//       "type": "string"
23581	//     },
23582	//     "maxResults": {
23583	//       "default": "1000",
23584	//       "description": "Maximum number of results to return.",
23585	//       "format": "int32",
23586	//       "location": "query",
23587	//       "maximum": "1000",
23588	//       "minimum": "0",
23589	//       "type": "integer"
23590	//     },
23591	//     "pageToken": {
23592	//       "description": "Value of the nextPageToken from the previous result page.",
23593	//       "location": "query",
23594	//       "type": "string"
23595	//     },
23596	//     "profileId": {
23597	//       "description": "User profile ID associated with this request.",
23598	//       "format": "int64",
23599	//       "location": "path",
23600	//       "required": true,
23601	//       "type": "string"
23602	//     },
23603	//     "searchString": {
23604	//       "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\".",
23605	//       "location": "query",
23606	//       "type": "string"
23607	//     },
23608	//     "sortField": {
23609	//       "default": "ID",
23610	//       "description": "Field by which to sort the list.",
23611	//       "enum": [
23612	//         "ID",
23613	//         "NAME"
23614	//       ],
23615	//       "enumDescriptions": [
23616	//         "",
23617	//         ""
23618	//       ],
23619	//       "location": "query",
23620	//       "type": "string"
23621	//     },
23622	//     "sortOrder": {
23623	//       "default": "ASCENDING",
23624	//       "description": "Order of sorted results.",
23625	//       "enum": [
23626	//         "ASCENDING",
23627	//         "DESCENDING"
23628	//       ],
23629	//       "enumDescriptions": [
23630	//         "",
23631	//         ""
23632	//       ],
23633	//       "location": "query",
23634	//       "type": "string"
23635	//     }
23636	//   },
23637	//   "path": "userprofiles/{profileId}/contentCategories",
23638	//   "response": {
23639	//     "$ref": "ContentCategoriesListResponse"
23640	//   },
23641	//   "scopes": [
23642	//     "https://www.googleapis.com/auth/dfatrafficking"
23643	//   ]
23644	// }
23645
23646}
23647
23648// Pages invokes f for each page of results.
23649// A non-nil error returned from f will halt the iteration.
23650// The provided context supersedes any context provided to the Context method.
23651func (c *ContentCategoriesListCall) Pages(ctx context.Context, f func(*ContentCategoriesListResponse) error) error {
23652	c.ctx_ = ctx
23653	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
23654	for {
23655		x, err := c.Do()
23656		if err != nil {
23657			return err
23658		}
23659		if err := f(x); err != nil {
23660			return err
23661		}
23662		if x.NextPageToken == "" {
23663			return nil
23664		}
23665		c.PageToken(x.NextPageToken)
23666	}
23667}
23668
23669// method id "dfareporting.contentCategories.patch":
23670
23671type ContentCategoriesPatchCall struct {
23672	s               *Service
23673	profileId       int64
23674	contentcategory *ContentCategory
23675	urlParams_      gensupport.URLParams
23676	ctx_            context.Context
23677	header_         http.Header
23678}
23679
23680// Patch: Updates an existing content category. This method supports
23681// patch semantics.
23682func (r *ContentCategoriesService) Patch(profileId int64, id int64, contentcategory *ContentCategory) *ContentCategoriesPatchCall {
23683	c := &ContentCategoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23684	c.profileId = profileId
23685	c.urlParams_.Set("id", fmt.Sprint(id))
23686	c.contentcategory = contentcategory
23687	return c
23688}
23689
23690// Fields allows partial responses to be retrieved. See
23691// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23692// for more information.
23693func (c *ContentCategoriesPatchCall) Fields(s ...googleapi.Field) *ContentCategoriesPatchCall {
23694	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23695	return c
23696}
23697
23698// Context sets the context to be used in this call's Do method. Any
23699// pending HTTP request will be aborted if the provided context is
23700// canceled.
23701func (c *ContentCategoriesPatchCall) Context(ctx context.Context) *ContentCategoriesPatchCall {
23702	c.ctx_ = ctx
23703	return c
23704}
23705
23706// Header returns an http.Header that can be modified by the caller to
23707// add HTTP headers to the request.
23708func (c *ContentCategoriesPatchCall) Header() http.Header {
23709	if c.header_ == nil {
23710		c.header_ = make(http.Header)
23711	}
23712	return c.header_
23713}
23714
23715func (c *ContentCategoriesPatchCall) doRequest(alt string) (*http.Response, error) {
23716	reqHeaders := make(http.Header)
23717	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
23718	for k, v := range c.header_ {
23719		reqHeaders[k] = v
23720	}
23721	reqHeaders.Set("User-Agent", c.s.userAgent())
23722	var body io.Reader = nil
23723	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
23724	if err != nil {
23725		return nil, err
23726	}
23727	reqHeaders.Set("Content-Type", "application/json")
23728	c.urlParams_.Set("alt", alt)
23729	c.urlParams_.Set("prettyPrint", "false")
23730	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23731	urls += "?" + c.urlParams_.Encode()
23732	req, err := http.NewRequest("PATCH", urls, body)
23733	if err != nil {
23734		return nil, err
23735	}
23736	req.Header = reqHeaders
23737	googleapi.Expand(req.URL, map[string]string{
23738		"profileId": strconv.FormatInt(c.profileId, 10),
23739	})
23740	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23741}
23742
23743// Do executes the "dfareporting.contentCategories.patch" call.
23744// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23745// status code is an error. Response headers are in either
23746// *ContentCategory.ServerResponse.Header or (if a response was returned
23747// at all) in error.(*googleapi.Error).Header. Use
23748// googleapi.IsNotModified to check whether the returned error was
23749// because http.StatusNotModified was returned.
23750func (c *ContentCategoriesPatchCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23751	gensupport.SetOptions(c.urlParams_, opts...)
23752	res, err := c.doRequest("json")
23753	if res != nil && res.StatusCode == http.StatusNotModified {
23754		if res.Body != nil {
23755			res.Body.Close()
23756		}
23757		return nil, &googleapi.Error{
23758			Code:   res.StatusCode,
23759			Header: res.Header,
23760		}
23761	}
23762	if err != nil {
23763		return nil, err
23764	}
23765	defer googleapi.CloseBody(res)
23766	if err := googleapi.CheckResponse(res); err != nil {
23767		return nil, err
23768	}
23769	ret := &ContentCategory{
23770		ServerResponse: googleapi.ServerResponse{
23771			Header:         res.Header,
23772			HTTPStatusCode: res.StatusCode,
23773		},
23774	}
23775	target := &ret
23776	if err := gensupport.DecodeResponse(target, res); err != nil {
23777		return nil, err
23778	}
23779	return ret, nil
23780	// {
23781	//   "description": "Updates an existing content category. This method supports patch semantics.",
23782	//   "httpMethod": "PATCH",
23783	//   "id": "dfareporting.contentCategories.patch",
23784	//   "parameterOrder": [
23785	//     "profileId",
23786	//     "id"
23787	//   ],
23788	//   "parameters": {
23789	//     "id": {
23790	//       "description": "Content category ID.",
23791	//       "format": "int64",
23792	//       "location": "query",
23793	//       "required": true,
23794	//       "type": "string"
23795	//     },
23796	//     "profileId": {
23797	//       "description": "User profile ID associated with this request.",
23798	//       "format": "int64",
23799	//       "location": "path",
23800	//       "required": true,
23801	//       "type": "string"
23802	//     }
23803	//   },
23804	//   "path": "userprofiles/{profileId}/contentCategories",
23805	//   "request": {
23806	//     "$ref": "ContentCategory"
23807	//   },
23808	//   "response": {
23809	//     "$ref": "ContentCategory"
23810	//   },
23811	//   "scopes": [
23812	//     "https://www.googleapis.com/auth/dfatrafficking"
23813	//   ]
23814	// }
23815
23816}
23817
23818// method id "dfareporting.contentCategories.update":
23819
23820type ContentCategoriesUpdateCall struct {
23821	s               *Service
23822	profileId       int64
23823	contentcategory *ContentCategory
23824	urlParams_      gensupport.URLParams
23825	ctx_            context.Context
23826	header_         http.Header
23827}
23828
23829// Update: Updates an existing content category.
23830func (r *ContentCategoriesService) Update(profileId int64, contentcategory *ContentCategory) *ContentCategoriesUpdateCall {
23831	c := &ContentCategoriesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23832	c.profileId = profileId
23833	c.contentcategory = contentcategory
23834	return c
23835}
23836
23837// Fields allows partial responses to be retrieved. See
23838// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23839// for more information.
23840func (c *ContentCategoriesUpdateCall) Fields(s ...googleapi.Field) *ContentCategoriesUpdateCall {
23841	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23842	return c
23843}
23844
23845// Context sets the context to be used in this call's Do method. Any
23846// pending HTTP request will be aborted if the provided context is
23847// canceled.
23848func (c *ContentCategoriesUpdateCall) Context(ctx context.Context) *ContentCategoriesUpdateCall {
23849	c.ctx_ = ctx
23850	return c
23851}
23852
23853// Header returns an http.Header that can be modified by the caller to
23854// add HTTP headers to the request.
23855func (c *ContentCategoriesUpdateCall) Header() http.Header {
23856	if c.header_ == nil {
23857		c.header_ = make(http.Header)
23858	}
23859	return c.header_
23860}
23861
23862func (c *ContentCategoriesUpdateCall) doRequest(alt string) (*http.Response, error) {
23863	reqHeaders := make(http.Header)
23864	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
23865	for k, v := range c.header_ {
23866		reqHeaders[k] = v
23867	}
23868	reqHeaders.Set("User-Agent", c.s.userAgent())
23869	var body io.Reader = nil
23870	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
23871	if err != nil {
23872		return nil, err
23873	}
23874	reqHeaders.Set("Content-Type", "application/json")
23875	c.urlParams_.Set("alt", alt)
23876	c.urlParams_.Set("prettyPrint", "false")
23877	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23878	urls += "?" + c.urlParams_.Encode()
23879	req, err := http.NewRequest("PUT", urls, body)
23880	if err != nil {
23881		return nil, err
23882	}
23883	req.Header = reqHeaders
23884	googleapi.Expand(req.URL, map[string]string{
23885		"profileId": strconv.FormatInt(c.profileId, 10),
23886	})
23887	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23888}
23889
23890// Do executes the "dfareporting.contentCategories.update" call.
23891// Exactly one of *ContentCategory or error will be non-nil. Any non-2xx
23892// status code is an error. Response headers are in either
23893// *ContentCategory.ServerResponse.Header or (if a response was returned
23894// at all) in error.(*googleapi.Error).Header. Use
23895// googleapi.IsNotModified to check whether the returned error was
23896// because http.StatusNotModified was returned.
23897func (c *ContentCategoriesUpdateCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23898	gensupport.SetOptions(c.urlParams_, opts...)
23899	res, err := c.doRequest("json")
23900	if res != nil && res.StatusCode == http.StatusNotModified {
23901		if res.Body != nil {
23902			res.Body.Close()
23903		}
23904		return nil, &googleapi.Error{
23905			Code:   res.StatusCode,
23906			Header: res.Header,
23907		}
23908	}
23909	if err != nil {
23910		return nil, err
23911	}
23912	defer googleapi.CloseBody(res)
23913	if err := googleapi.CheckResponse(res); err != nil {
23914		return nil, err
23915	}
23916	ret := &ContentCategory{
23917		ServerResponse: googleapi.ServerResponse{
23918			Header:         res.Header,
23919			HTTPStatusCode: res.StatusCode,
23920		},
23921	}
23922	target := &ret
23923	if err := gensupport.DecodeResponse(target, res); err != nil {
23924		return nil, err
23925	}
23926	return ret, nil
23927	// {
23928	//   "description": "Updates an existing content category.",
23929	//   "httpMethod": "PUT",
23930	//   "id": "dfareporting.contentCategories.update",
23931	//   "parameterOrder": [
23932	//     "profileId"
23933	//   ],
23934	//   "parameters": {
23935	//     "profileId": {
23936	//       "description": "User profile ID associated with this request.",
23937	//       "format": "int64",
23938	//       "location": "path",
23939	//       "required": true,
23940	//       "type": "string"
23941	//     }
23942	//   },
23943	//   "path": "userprofiles/{profileId}/contentCategories",
23944	//   "request": {
23945	//     "$ref": "ContentCategory"
23946	//   },
23947	//   "response": {
23948	//     "$ref": "ContentCategory"
23949	//   },
23950	//   "scopes": [
23951	//     "https://www.googleapis.com/auth/dfatrafficking"
23952	//   ]
23953	// }
23954
23955}
23956
23957// method id "dfareporting.conversions.batchinsert":
23958
23959type ConversionsBatchinsertCall struct {
23960	s                             *Service
23961	profileId                     int64
23962	conversionsbatchinsertrequest *ConversionsBatchInsertRequest
23963	urlParams_                    gensupport.URLParams
23964	ctx_                          context.Context
23965	header_                       http.Header
23966}
23967
23968// Batchinsert: Inserts conversions.
23969func (r *ConversionsService) Batchinsert(profileId int64, conversionsbatchinsertrequest *ConversionsBatchInsertRequest) *ConversionsBatchinsertCall {
23970	c := &ConversionsBatchinsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23971	c.profileId = profileId
23972	c.conversionsbatchinsertrequest = conversionsbatchinsertrequest
23973	return c
23974}
23975
23976// Fields allows partial responses to be retrieved. See
23977// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23978// for more information.
23979func (c *ConversionsBatchinsertCall) Fields(s ...googleapi.Field) *ConversionsBatchinsertCall {
23980	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23981	return c
23982}
23983
23984// Context sets the context to be used in this call's Do method. Any
23985// pending HTTP request will be aborted if the provided context is
23986// canceled.
23987func (c *ConversionsBatchinsertCall) Context(ctx context.Context) *ConversionsBatchinsertCall {
23988	c.ctx_ = ctx
23989	return c
23990}
23991
23992// Header returns an http.Header that can be modified by the caller to
23993// add HTTP headers to the request.
23994func (c *ConversionsBatchinsertCall) Header() http.Header {
23995	if c.header_ == nil {
23996		c.header_ = make(http.Header)
23997	}
23998	return c.header_
23999}
24000
24001func (c *ConversionsBatchinsertCall) doRequest(alt string) (*http.Response, error) {
24002	reqHeaders := make(http.Header)
24003	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
24004	for k, v := range c.header_ {
24005		reqHeaders[k] = v
24006	}
24007	reqHeaders.Set("User-Agent", c.s.userAgent())
24008	var body io.Reader = nil
24009	body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchinsertrequest)
24010	if err != nil {
24011		return nil, err
24012	}
24013	reqHeaders.Set("Content-Type", "application/json")
24014	c.urlParams_.Set("alt", alt)
24015	c.urlParams_.Set("prettyPrint", "false")
24016	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchinsert")
24017	urls += "?" + c.urlParams_.Encode()
24018	req, err := http.NewRequest("POST", urls, body)
24019	if err != nil {
24020		return nil, err
24021	}
24022	req.Header = reqHeaders
24023	googleapi.Expand(req.URL, map[string]string{
24024		"profileId": strconv.FormatInt(c.profileId, 10),
24025	})
24026	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24027}
24028
24029// Do executes the "dfareporting.conversions.batchinsert" call.
24030// Exactly one of *ConversionsBatchInsertResponse or error will be
24031// non-nil. Any non-2xx status code is an error. Response headers are in
24032// either *ConversionsBatchInsertResponse.ServerResponse.Header or (if a
24033// response was returned at all) in error.(*googleapi.Error).Header. Use
24034// googleapi.IsNotModified to check whether the returned error was
24035// because http.StatusNotModified was returned.
24036func (c *ConversionsBatchinsertCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchInsertResponse, error) {
24037	gensupport.SetOptions(c.urlParams_, opts...)
24038	res, err := c.doRequest("json")
24039	if res != nil && res.StatusCode == http.StatusNotModified {
24040		if res.Body != nil {
24041			res.Body.Close()
24042		}
24043		return nil, &googleapi.Error{
24044			Code:   res.StatusCode,
24045			Header: res.Header,
24046		}
24047	}
24048	if err != nil {
24049		return nil, err
24050	}
24051	defer googleapi.CloseBody(res)
24052	if err := googleapi.CheckResponse(res); err != nil {
24053		return nil, err
24054	}
24055	ret := &ConversionsBatchInsertResponse{
24056		ServerResponse: googleapi.ServerResponse{
24057			Header:         res.Header,
24058			HTTPStatusCode: res.StatusCode,
24059		},
24060	}
24061	target := &ret
24062	if err := gensupport.DecodeResponse(target, res); err != nil {
24063		return nil, err
24064	}
24065	return ret, nil
24066	// {
24067	//   "description": "Inserts conversions.",
24068	//   "httpMethod": "POST",
24069	//   "id": "dfareporting.conversions.batchinsert",
24070	//   "parameterOrder": [
24071	//     "profileId"
24072	//   ],
24073	//   "parameters": {
24074	//     "profileId": {
24075	//       "description": "User profile ID associated with this request.",
24076	//       "format": "int64",
24077	//       "location": "path",
24078	//       "required": true,
24079	//       "type": "string"
24080	//     }
24081	//   },
24082	//   "path": "userprofiles/{profileId}/conversions/batchinsert",
24083	//   "request": {
24084	//     "$ref": "ConversionsBatchInsertRequest"
24085	//   },
24086	//   "response": {
24087	//     "$ref": "ConversionsBatchInsertResponse"
24088	//   },
24089	//   "scopes": [
24090	//     "https://www.googleapis.com/auth/ddmconversions"
24091	//   ]
24092	// }
24093
24094}
24095
24096// method id "dfareporting.conversions.batchupdate":
24097
24098type ConversionsBatchupdateCall struct {
24099	s                             *Service
24100	profileId                     int64
24101	conversionsbatchupdaterequest *ConversionsBatchUpdateRequest
24102	urlParams_                    gensupport.URLParams
24103	ctx_                          context.Context
24104	header_                       http.Header
24105}
24106
24107// Batchupdate: Updates existing conversions.
24108func (r *ConversionsService) Batchupdate(profileId int64, conversionsbatchupdaterequest *ConversionsBatchUpdateRequest) *ConversionsBatchupdateCall {
24109	c := &ConversionsBatchupdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24110	c.profileId = profileId
24111	c.conversionsbatchupdaterequest = conversionsbatchupdaterequest
24112	return c
24113}
24114
24115// Fields allows partial responses to be retrieved. See
24116// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24117// for more information.
24118func (c *ConversionsBatchupdateCall) Fields(s ...googleapi.Field) *ConversionsBatchupdateCall {
24119	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24120	return c
24121}
24122
24123// Context sets the context to be used in this call's Do method. Any
24124// pending HTTP request will be aborted if the provided context is
24125// canceled.
24126func (c *ConversionsBatchupdateCall) Context(ctx context.Context) *ConversionsBatchupdateCall {
24127	c.ctx_ = ctx
24128	return c
24129}
24130
24131// Header returns an http.Header that can be modified by the caller to
24132// add HTTP headers to the request.
24133func (c *ConversionsBatchupdateCall) Header() http.Header {
24134	if c.header_ == nil {
24135		c.header_ = make(http.Header)
24136	}
24137	return c.header_
24138}
24139
24140func (c *ConversionsBatchupdateCall) doRequest(alt string) (*http.Response, error) {
24141	reqHeaders := make(http.Header)
24142	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
24143	for k, v := range c.header_ {
24144		reqHeaders[k] = v
24145	}
24146	reqHeaders.Set("User-Agent", c.s.userAgent())
24147	var body io.Reader = nil
24148	body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchupdaterequest)
24149	if err != nil {
24150		return nil, err
24151	}
24152	reqHeaders.Set("Content-Type", "application/json")
24153	c.urlParams_.Set("alt", alt)
24154	c.urlParams_.Set("prettyPrint", "false")
24155	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchupdate")
24156	urls += "?" + c.urlParams_.Encode()
24157	req, err := http.NewRequest("POST", urls, body)
24158	if err != nil {
24159		return nil, err
24160	}
24161	req.Header = reqHeaders
24162	googleapi.Expand(req.URL, map[string]string{
24163		"profileId": strconv.FormatInt(c.profileId, 10),
24164	})
24165	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24166}
24167
24168// Do executes the "dfareporting.conversions.batchupdate" call.
24169// Exactly one of *ConversionsBatchUpdateResponse or error will be
24170// non-nil. Any non-2xx status code is an error. Response headers are in
24171// either *ConversionsBatchUpdateResponse.ServerResponse.Header or (if a
24172// response was returned at all) in error.(*googleapi.Error).Header. Use
24173// googleapi.IsNotModified to check whether the returned error was
24174// because http.StatusNotModified was returned.
24175func (c *ConversionsBatchupdateCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchUpdateResponse, error) {
24176	gensupport.SetOptions(c.urlParams_, opts...)
24177	res, err := c.doRequest("json")
24178	if res != nil && res.StatusCode == http.StatusNotModified {
24179		if res.Body != nil {
24180			res.Body.Close()
24181		}
24182		return nil, &googleapi.Error{
24183			Code:   res.StatusCode,
24184			Header: res.Header,
24185		}
24186	}
24187	if err != nil {
24188		return nil, err
24189	}
24190	defer googleapi.CloseBody(res)
24191	if err := googleapi.CheckResponse(res); err != nil {
24192		return nil, err
24193	}
24194	ret := &ConversionsBatchUpdateResponse{
24195		ServerResponse: googleapi.ServerResponse{
24196			Header:         res.Header,
24197			HTTPStatusCode: res.StatusCode,
24198		},
24199	}
24200	target := &ret
24201	if err := gensupport.DecodeResponse(target, res); err != nil {
24202		return nil, err
24203	}
24204	return ret, nil
24205	// {
24206	//   "description": "Updates existing conversions.",
24207	//   "httpMethod": "POST",
24208	//   "id": "dfareporting.conversions.batchupdate",
24209	//   "parameterOrder": [
24210	//     "profileId"
24211	//   ],
24212	//   "parameters": {
24213	//     "profileId": {
24214	//       "description": "User profile ID associated with this request.",
24215	//       "format": "int64",
24216	//       "location": "path",
24217	//       "required": true,
24218	//       "type": "string"
24219	//     }
24220	//   },
24221	//   "path": "userprofiles/{profileId}/conversions/batchupdate",
24222	//   "request": {
24223	//     "$ref": "ConversionsBatchUpdateRequest"
24224	//   },
24225	//   "response": {
24226	//     "$ref": "ConversionsBatchUpdateResponse"
24227	//   },
24228	//   "scopes": [
24229	//     "https://www.googleapis.com/auth/ddmconversions"
24230	//   ]
24231	// }
24232
24233}
24234
24235// method id "dfareporting.countries.get":
24236
24237type CountriesGetCall struct {
24238	s            *Service
24239	profileId    int64
24240	dartId       int64
24241	urlParams_   gensupport.URLParams
24242	ifNoneMatch_ string
24243	ctx_         context.Context
24244	header_      http.Header
24245}
24246
24247// Get: Gets one country by ID.
24248func (r *CountriesService) Get(profileId int64, dartId int64) *CountriesGetCall {
24249	c := &CountriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24250	c.profileId = profileId
24251	c.dartId = dartId
24252	return c
24253}
24254
24255// Fields allows partial responses to be retrieved. See
24256// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24257// for more information.
24258func (c *CountriesGetCall) Fields(s ...googleapi.Field) *CountriesGetCall {
24259	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24260	return c
24261}
24262
24263// IfNoneMatch sets the optional parameter which makes the operation
24264// fail if the object's ETag matches the given value. This is useful for
24265// getting updates only after the object has changed since the last
24266// request. Use googleapi.IsNotModified to check whether the response
24267// error from Do is the result of In-None-Match.
24268func (c *CountriesGetCall) IfNoneMatch(entityTag string) *CountriesGetCall {
24269	c.ifNoneMatch_ = entityTag
24270	return c
24271}
24272
24273// Context sets the context to be used in this call's Do method. Any
24274// pending HTTP request will be aborted if the provided context is
24275// canceled.
24276func (c *CountriesGetCall) Context(ctx context.Context) *CountriesGetCall {
24277	c.ctx_ = ctx
24278	return c
24279}
24280
24281// Header returns an http.Header that can be modified by the caller to
24282// add HTTP headers to the request.
24283func (c *CountriesGetCall) Header() http.Header {
24284	if c.header_ == nil {
24285		c.header_ = make(http.Header)
24286	}
24287	return c.header_
24288}
24289
24290func (c *CountriesGetCall) doRequest(alt string) (*http.Response, error) {
24291	reqHeaders := make(http.Header)
24292	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
24293	for k, v := range c.header_ {
24294		reqHeaders[k] = v
24295	}
24296	reqHeaders.Set("User-Agent", c.s.userAgent())
24297	if c.ifNoneMatch_ != "" {
24298		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24299	}
24300	var body io.Reader = nil
24301	c.urlParams_.Set("alt", alt)
24302	c.urlParams_.Set("prettyPrint", "false")
24303	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries/{dartId}")
24304	urls += "?" + c.urlParams_.Encode()
24305	req, err := http.NewRequest("GET", urls, body)
24306	if err != nil {
24307		return nil, err
24308	}
24309	req.Header = reqHeaders
24310	googleapi.Expand(req.URL, map[string]string{
24311		"profileId": strconv.FormatInt(c.profileId, 10),
24312		"dartId":    strconv.FormatInt(c.dartId, 10),
24313	})
24314	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24315}
24316
24317// Do executes the "dfareporting.countries.get" call.
24318// Exactly one of *Country or error will be non-nil. Any non-2xx status
24319// code is an error. Response headers are in either
24320// *Country.ServerResponse.Header or (if a response was returned at all)
24321// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
24322// check whether the returned error was because http.StatusNotModified
24323// was returned.
24324func (c *CountriesGetCall) Do(opts ...googleapi.CallOption) (*Country, error) {
24325	gensupport.SetOptions(c.urlParams_, opts...)
24326	res, err := c.doRequest("json")
24327	if res != nil && res.StatusCode == http.StatusNotModified {
24328		if res.Body != nil {
24329			res.Body.Close()
24330		}
24331		return nil, &googleapi.Error{
24332			Code:   res.StatusCode,
24333			Header: res.Header,
24334		}
24335	}
24336	if err != nil {
24337		return nil, err
24338	}
24339	defer googleapi.CloseBody(res)
24340	if err := googleapi.CheckResponse(res); err != nil {
24341		return nil, err
24342	}
24343	ret := &Country{
24344		ServerResponse: googleapi.ServerResponse{
24345			Header:         res.Header,
24346			HTTPStatusCode: res.StatusCode,
24347		},
24348	}
24349	target := &ret
24350	if err := gensupport.DecodeResponse(target, res); err != nil {
24351		return nil, err
24352	}
24353	return ret, nil
24354	// {
24355	//   "description": "Gets one country by ID.",
24356	//   "httpMethod": "GET",
24357	//   "id": "dfareporting.countries.get",
24358	//   "parameterOrder": [
24359	//     "profileId",
24360	//     "dartId"
24361	//   ],
24362	//   "parameters": {
24363	//     "dartId": {
24364	//       "description": "Country DART ID.",
24365	//       "format": "int64",
24366	//       "location": "path",
24367	//       "required": true,
24368	//       "type": "string"
24369	//     },
24370	//     "profileId": {
24371	//       "description": "User profile ID associated with this request.",
24372	//       "format": "int64",
24373	//       "location": "path",
24374	//       "required": true,
24375	//       "type": "string"
24376	//     }
24377	//   },
24378	//   "path": "userprofiles/{profileId}/countries/{dartId}",
24379	//   "response": {
24380	//     "$ref": "Country"
24381	//   },
24382	//   "scopes": [
24383	//     "https://www.googleapis.com/auth/dfatrafficking"
24384	//   ]
24385	// }
24386
24387}
24388
24389// method id "dfareporting.countries.list":
24390
24391type CountriesListCall struct {
24392	s            *Service
24393	profileId    int64
24394	urlParams_   gensupport.URLParams
24395	ifNoneMatch_ string
24396	ctx_         context.Context
24397	header_      http.Header
24398}
24399
24400// List: Retrieves a list of countries.
24401func (r *CountriesService) List(profileId int64) *CountriesListCall {
24402	c := &CountriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24403	c.profileId = profileId
24404	return c
24405}
24406
24407// Fields allows partial responses to be retrieved. See
24408// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24409// for more information.
24410func (c *CountriesListCall) Fields(s ...googleapi.Field) *CountriesListCall {
24411	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24412	return c
24413}
24414
24415// IfNoneMatch sets the optional parameter which makes the operation
24416// fail if the object's ETag matches the given value. This is useful for
24417// getting updates only after the object has changed since the last
24418// request. Use googleapi.IsNotModified to check whether the response
24419// error from Do is the result of In-None-Match.
24420func (c *CountriesListCall) IfNoneMatch(entityTag string) *CountriesListCall {
24421	c.ifNoneMatch_ = entityTag
24422	return c
24423}
24424
24425// Context sets the context to be used in this call's Do method. Any
24426// pending HTTP request will be aborted if the provided context is
24427// canceled.
24428func (c *CountriesListCall) Context(ctx context.Context) *CountriesListCall {
24429	c.ctx_ = ctx
24430	return c
24431}
24432
24433// Header returns an http.Header that can be modified by the caller to
24434// add HTTP headers to the request.
24435func (c *CountriesListCall) Header() http.Header {
24436	if c.header_ == nil {
24437		c.header_ = make(http.Header)
24438	}
24439	return c.header_
24440}
24441
24442func (c *CountriesListCall) doRequest(alt string) (*http.Response, error) {
24443	reqHeaders := make(http.Header)
24444	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
24445	for k, v := range c.header_ {
24446		reqHeaders[k] = v
24447	}
24448	reqHeaders.Set("User-Agent", c.s.userAgent())
24449	if c.ifNoneMatch_ != "" {
24450		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24451	}
24452	var body io.Reader = nil
24453	c.urlParams_.Set("alt", alt)
24454	c.urlParams_.Set("prettyPrint", "false")
24455	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries")
24456	urls += "?" + c.urlParams_.Encode()
24457	req, err := http.NewRequest("GET", urls, body)
24458	if err != nil {
24459		return nil, err
24460	}
24461	req.Header = reqHeaders
24462	googleapi.Expand(req.URL, map[string]string{
24463		"profileId": strconv.FormatInt(c.profileId, 10),
24464	})
24465	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24466}
24467
24468// Do executes the "dfareporting.countries.list" call.
24469// Exactly one of *CountriesListResponse or error will be non-nil. Any
24470// non-2xx status code is an error. Response headers are in either
24471// *CountriesListResponse.ServerResponse.Header or (if a response was
24472// returned at all) in error.(*googleapi.Error).Header. Use
24473// googleapi.IsNotModified to check whether the returned error was
24474// because http.StatusNotModified was returned.
24475func (c *CountriesListCall) Do(opts ...googleapi.CallOption) (*CountriesListResponse, error) {
24476	gensupport.SetOptions(c.urlParams_, opts...)
24477	res, err := c.doRequest("json")
24478	if res != nil && res.StatusCode == http.StatusNotModified {
24479		if res.Body != nil {
24480			res.Body.Close()
24481		}
24482		return nil, &googleapi.Error{
24483			Code:   res.StatusCode,
24484			Header: res.Header,
24485		}
24486	}
24487	if err != nil {
24488		return nil, err
24489	}
24490	defer googleapi.CloseBody(res)
24491	if err := googleapi.CheckResponse(res); err != nil {
24492		return nil, err
24493	}
24494	ret := &CountriesListResponse{
24495		ServerResponse: googleapi.ServerResponse{
24496			Header:         res.Header,
24497			HTTPStatusCode: res.StatusCode,
24498		},
24499	}
24500	target := &ret
24501	if err := gensupport.DecodeResponse(target, res); err != nil {
24502		return nil, err
24503	}
24504	return ret, nil
24505	// {
24506	//   "description": "Retrieves a list of countries.",
24507	//   "httpMethod": "GET",
24508	//   "id": "dfareporting.countries.list",
24509	//   "parameterOrder": [
24510	//     "profileId"
24511	//   ],
24512	//   "parameters": {
24513	//     "profileId": {
24514	//       "description": "User profile ID associated with this request.",
24515	//       "format": "int64",
24516	//       "location": "path",
24517	//       "required": true,
24518	//       "type": "string"
24519	//     }
24520	//   },
24521	//   "path": "userprofiles/{profileId}/countries",
24522	//   "response": {
24523	//     "$ref": "CountriesListResponse"
24524	//   },
24525	//   "scopes": [
24526	//     "https://www.googleapis.com/auth/dfatrafficking"
24527	//   ]
24528	// }
24529
24530}
24531
24532// method id "dfareporting.creativeAssets.insert":
24533
24534type CreativeAssetsInsertCall struct {
24535	s                     *Service
24536	profileId             int64
24537	advertiserId          int64
24538	creativeassetmetadata *CreativeAssetMetadata
24539	urlParams_            gensupport.URLParams
24540	mediaInfo_            *gensupport.MediaInfo
24541	ctx_                  context.Context
24542	header_               http.Header
24543}
24544
24545// Insert: Inserts a new creative asset.
24546func (r *CreativeAssetsService) Insert(profileId int64, advertiserId int64, creativeassetmetadata *CreativeAssetMetadata) *CreativeAssetsInsertCall {
24547	c := &CreativeAssetsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24548	c.profileId = profileId
24549	c.advertiserId = advertiserId
24550	c.creativeassetmetadata = creativeassetmetadata
24551	return c
24552}
24553
24554// Media specifies the media to upload in one or more chunks. The chunk
24555// size may be controlled by supplying a MediaOption generated by
24556// googleapi.ChunkSize. The chunk size defaults to
24557// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
24558// upload request will be determined by sniffing the contents of r,
24559// unless a MediaOption generated by googleapi.ContentType is
24560// supplied.
24561// At most one of Media and ResumableMedia may be set.
24562func (c *CreativeAssetsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CreativeAssetsInsertCall {
24563	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
24564	return c
24565}
24566
24567// ResumableMedia specifies the media to upload in chunks and can be
24568// canceled with ctx.
24569//
24570// Deprecated: use Media instead.
24571//
24572// At most one of Media and ResumableMedia may be set. mediaType
24573// identifies the MIME media type of the upload, such as "image/png". If
24574// mediaType is "", it will be auto-detected. The provided ctx will
24575// supersede any context previously provided to the Context method.
24576func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CreativeAssetsInsertCall {
24577	c.ctx_ = ctx
24578	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
24579	return c
24580}
24581
24582// ProgressUpdater provides a callback function that will be called
24583// after every chunk. It should be a low-latency function in order to
24584// not slow down the upload operation. This should only be called when
24585// using ResumableMedia (as opposed to Media).
24586func (c *CreativeAssetsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CreativeAssetsInsertCall {
24587	c.mediaInfo_.SetProgressUpdater(pu)
24588	return c
24589}
24590
24591// Fields allows partial responses to be retrieved. See
24592// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24593// for more information.
24594func (c *CreativeAssetsInsertCall) Fields(s ...googleapi.Field) *CreativeAssetsInsertCall {
24595	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24596	return c
24597}
24598
24599// Context sets the context to be used in this call's Do method. Any
24600// pending HTTP request will be aborted if the provided context is
24601// canceled.
24602// This context will supersede any context previously provided to the
24603// ResumableMedia method.
24604func (c *CreativeAssetsInsertCall) Context(ctx context.Context) *CreativeAssetsInsertCall {
24605	c.ctx_ = ctx
24606	return c
24607}
24608
24609// Header returns an http.Header that can be modified by the caller to
24610// add HTTP headers to the request.
24611func (c *CreativeAssetsInsertCall) Header() http.Header {
24612	if c.header_ == nil {
24613		c.header_ = make(http.Header)
24614	}
24615	return c.header_
24616}
24617
24618func (c *CreativeAssetsInsertCall) doRequest(alt string) (*http.Response, error) {
24619	reqHeaders := make(http.Header)
24620	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
24621	for k, v := range c.header_ {
24622		reqHeaders[k] = v
24623	}
24624	reqHeaders.Set("User-Agent", c.s.userAgent())
24625	var body io.Reader = nil
24626	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativeassetmetadata)
24627	if err != nil {
24628		return nil, err
24629	}
24630	reqHeaders.Set("Content-Type", "application/json")
24631	c.urlParams_.Set("alt", alt)
24632	c.urlParams_.Set("prettyPrint", "false")
24633	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets")
24634	if c.mediaInfo_ != nil {
24635		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/dfareporting/v3.1/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets")
24636		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
24637	}
24638	if body == nil {
24639		body = new(bytes.Buffer)
24640		reqHeaders.Set("Content-Type", "application/json")
24641	}
24642	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
24643	defer cleanup()
24644	urls += "?" + c.urlParams_.Encode()
24645	req, err := http.NewRequest("POST", urls, body)
24646	if err != nil {
24647		return nil, err
24648	}
24649	req.Header = reqHeaders
24650	req.GetBody = getBody
24651	googleapi.Expand(req.URL, map[string]string{
24652		"profileId":    strconv.FormatInt(c.profileId, 10),
24653		"advertiserId": strconv.FormatInt(c.advertiserId, 10),
24654	})
24655	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24656}
24657
24658// Do executes the "dfareporting.creativeAssets.insert" call.
24659// Exactly one of *CreativeAssetMetadata or error will be non-nil. Any
24660// non-2xx status code is an error. Response headers are in either
24661// *CreativeAssetMetadata.ServerResponse.Header or (if a response was
24662// returned at all) in error.(*googleapi.Error).Header. Use
24663// googleapi.IsNotModified to check whether the returned error was
24664// because http.StatusNotModified was returned.
24665func (c *CreativeAssetsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeAssetMetadata, error) {
24666	gensupport.SetOptions(c.urlParams_, opts...)
24667	res, err := c.doRequest("json")
24668	if res != nil && res.StatusCode == http.StatusNotModified {
24669		if res.Body != nil {
24670			res.Body.Close()
24671		}
24672		return nil, &googleapi.Error{
24673			Code:   res.StatusCode,
24674			Header: res.Header,
24675		}
24676	}
24677	if err != nil {
24678		return nil, err
24679	}
24680	defer googleapi.CloseBody(res)
24681	if err := googleapi.CheckResponse(res); err != nil {
24682		return nil, err
24683	}
24684	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
24685	if rx != nil {
24686		rx.Client = c.s.client
24687		rx.UserAgent = c.s.userAgent()
24688		ctx := c.ctx_
24689		if ctx == nil {
24690			ctx = context.TODO()
24691		}
24692		res, err = rx.Upload(ctx)
24693		if err != nil {
24694			return nil, err
24695		}
24696		defer res.Body.Close()
24697		if err := googleapi.CheckResponse(res); err != nil {
24698			return nil, err
24699		}
24700	}
24701	ret := &CreativeAssetMetadata{
24702		ServerResponse: googleapi.ServerResponse{
24703			Header:         res.Header,
24704			HTTPStatusCode: res.StatusCode,
24705		},
24706	}
24707	target := &ret
24708	if err := gensupport.DecodeResponse(target, res); err != nil {
24709		return nil, err
24710	}
24711	return ret, nil
24712	// {
24713	//   "description": "Inserts a new creative asset.",
24714	//   "httpMethod": "POST",
24715	//   "id": "dfareporting.creativeAssets.insert",
24716	//   "mediaUpload": {
24717	//     "accept": [
24718	//       "*/*"
24719	//     ],
24720	//     "maxSize": "1024MB",
24721	//     "protocols": {
24722	//       "resumable": {
24723	//         "multipart": true,
24724	//         "path": "/resumable/upload/dfareporting/v3.1/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets"
24725	//       },
24726	//       "simple": {
24727	//         "multipart": true,
24728	//         "path": "/upload/dfareporting/v3.1/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets"
24729	//       }
24730	//     }
24731	//   },
24732	//   "parameterOrder": [
24733	//     "profileId",
24734	//     "advertiserId"
24735	//   ],
24736	//   "parameters": {
24737	//     "advertiserId": {
24738	//       "description": "Advertiser ID of this creative. This is a required field.",
24739	//       "format": "int64",
24740	//       "location": "path",
24741	//       "required": true,
24742	//       "type": "string"
24743	//     },
24744	//     "profileId": {
24745	//       "description": "User profile ID associated with this request.",
24746	//       "format": "int64",
24747	//       "location": "path",
24748	//       "required": true,
24749	//       "type": "string"
24750	//     }
24751	//   },
24752	//   "path": "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets",
24753	//   "request": {
24754	//     "$ref": "CreativeAssetMetadata"
24755	//   },
24756	//   "response": {
24757	//     "$ref": "CreativeAssetMetadata"
24758	//   },
24759	//   "scopes": [
24760	//     "https://www.googleapis.com/auth/dfatrafficking"
24761	//   ],
24762	//   "supportsMediaUpload": true
24763	// }
24764
24765}
24766
24767// method id "dfareporting.creativeFieldValues.delete":
24768
24769type CreativeFieldValuesDeleteCall struct {
24770	s               *Service
24771	profileId       int64
24772	creativeFieldId int64
24773	id              int64
24774	urlParams_      gensupport.URLParams
24775	ctx_            context.Context
24776	header_         http.Header
24777}
24778
24779// Delete: Deletes an existing creative field value.
24780func (r *CreativeFieldValuesService) Delete(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesDeleteCall {
24781	c := &CreativeFieldValuesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24782	c.profileId = profileId
24783	c.creativeFieldId = creativeFieldId
24784	c.id = id
24785	return c
24786}
24787
24788// Fields allows partial responses to be retrieved. See
24789// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24790// for more information.
24791func (c *CreativeFieldValuesDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldValuesDeleteCall {
24792	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24793	return c
24794}
24795
24796// Context sets the context to be used in this call's Do method. Any
24797// pending HTTP request will be aborted if the provided context is
24798// canceled.
24799func (c *CreativeFieldValuesDeleteCall) Context(ctx context.Context) *CreativeFieldValuesDeleteCall {
24800	c.ctx_ = ctx
24801	return c
24802}
24803
24804// Header returns an http.Header that can be modified by the caller to
24805// add HTTP headers to the request.
24806func (c *CreativeFieldValuesDeleteCall) Header() http.Header {
24807	if c.header_ == nil {
24808		c.header_ = make(http.Header)
24809	}
24810	return c.header_
24811}
24812
24813func (c *CreativeFieldValuesDeleteCall) doRequest(alt string) (*http.Response, error) {
24814	reqHeaders := make(http.Header)
24815	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
24816	for k, v := range c.header_ {
24817		reqHeaders[k] = v
24818	}
24819	reqHeaders.Set("User-Agent", c.s.userAgent())
24820	var body io.Reader = nil
24821	c.urlParams_.Set("alt", alt)
24822	c.urlParams_.Set("prettyPrint", "false")
24823	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
24824	urls += "?" + c.urlParams_.Encode()
24825	req, err := http.NewRequest("DELETE", urls, body)
24826	if err != nil {
24827		return nil, err
24828	}
24829	req.Header = reqHeaders
24830	googleapi.Expand(req.URL, map[string]string{
24831		"profileId":       strconv.FormatInt(c.profileId, 10),
24832		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
24833		"id":              strconv.FormatInt(c.id, 10),
24834	})
24835	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24836}
24837
24838// Do executes the "dfareporting.creativeFieldValues.delete" call.
24839func (c *CreativeFieldValuesDeleteCall) Do(opts ...googleapi.CallOption) error {
24840	gensupport.SetOptions(c.urlParams_, opts...)
24841	res, err := c.doRequest("json")
24842	if err != nil {
24843		return err
24844	}
24845	defer googleapi.CloseBody(res)
24846	if err := googleapi.CheckResponse(res); err != nil {
24847		return err
24848	}
24849	return nil
24850	// {
24851	//   "description": "Deletes an existing creative field value.",
24852	//   "httpMethod": "DELETE",
24853	//   "id": "dfareporting.creativeFieldValues.delete",
24854	//   "parameterOrder": [
24855	//     "profileId",
24856	//     "creativeFieldId",
24857	//     "id"
24858	//   ],
24859	//   "parameters": {
24860	//     "creativeFieldId": {
24861	//       "description": "Creative field ID for this creative field value.",
24862	//       "format": "int64",
24863	//       "location": "path",
24864	//       "required": true,
24865	//       "type": "string"
24866	//     },
24867	//     "id": {
24868	//       "description": "Creative Field Value ID",
24869	//       "format": "int64",
24870	//       "location": "path",
24871	//       "required": true,
24872	//       "type": "string"
24873	//     },
24874	//     "profileId": {
24875	//       "description": "User profile ID associated with this request.",
24876	//       "format": "int64",
24877	//       "location": "path",
24878	//       "required": true,
24879	//       "type": "string"
24880	//     }
24881	//   },
24882	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
24883	//   "scopes": [
24884	//     "https://www.googleapis.com/auth/dfatrafficking"
24885	//   ]
24886	// }
24887
24888}
24889
24890// method id "dfareporting.creativeFieldValues.get":
24891
24892type CreativeFieldValuesGetCall struct {
24893	s               *Service
24894	profileId       int64
24895	creativeFieldId int64
24896	id              int64
24897	urlParams_      gensupport.URLParams
24898	ifNoneMatch_    string
24899	ctx_            context.Context
24900	header_         http.Header
24901}
24902
24903// Get: Gets one creative field value by ID.
24904func (r *CreativeFieldValuesService) Get(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesGetCall {
24905	c := &CreativeFieldValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24906	c.profileId = profileId
24907	c.creativeFieldId = creativeFieldId
24908	c.id = id
24909	return c
24910}
24911
24912// Fields allows partial responses to be retrieved. See
24913// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24914// for more information.
24915func (c *CreativeFieldValuesGetCall) Fields(s ...googleapi.Field) *CreativeFieldValuesGetCall {
24916	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24917	return c
24918}
24919
24920// IfNoneMatch sets the optional parameter which makes the operation
24921// fail if the object's ETag matches the given value. This is useful for
24922// getting updates only after the object has changed since the last
24923// request. Use googleapi.IsNotModified to check whether the response
24924// error from Do is the result of In-None-Match.
24925func (c *CreativeFieldValuesGetCall) IfNoneMatch(entityTag string) *CreativeFieldValuesGetCall {
24926	c.ifNoneMatch_ = entityTag
24927	return c
24928}
24929
24930// Context sets the context to be used in this call's Do method. Any
24931// pending HTTP request will be aborted if the provided context is
24932// canceled.
24933func (c *CreativeFieldValuesGetCall) Context(ctx context.Context) *CreativeFieldValuesGetCall {
24934	c.ctx_ = ctx
24935	return c
24936}
24937
24938// Header returns an http.Header that can be modified by the caller to
24939// add HTTP headers to the request.
24940func (c *CreativeFieldValuesGetCall) Header() http.Header {
24941	if c.header_ == nil {
24942		c.header_ = make(http.Header)
24943	}
24944	return c.header_
24945}
24946
24947func (c *CreativeFieldValuesGetCall) doRequest(alt string) (*http.Response, error) {
24948	reqHeaders := make(http.Header)
24949	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
24950	for k, v := range c.header_ {
24951		reqHeaders[k] = v
24952	}
24953	reqHeaders.Set("User-Agent", c.s.userAgent())
24954	if c.ifNoneMatch_ != "" {
24955		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24956	}
24957	var body io.Reader = nil
24958	c.urlParams_.Set("alt", alt)
24959	c.urlParams_.Set("prettyPrint", "false")
24960	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
24961	urls += "?" + c.urlParams_.Encode()
24962	req, err := http.NewRequest("GET", urls, body)
24963	if err != nil {
24964		return nil, err
24965	}
24966	req.Header = reqHeaders
24967	googleapi.Expand(req.URL, map[string]string{
24968		"profileId":       strconv.FormatInt(c.profileId, 10),
24969		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
24970		"id":              strconv.FormatInt(c.id, 10),
24971	})
24972	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24973}
24974
24975// Do executes the "dfareporting.creativeFieldValues.get" call.
24976// Exactly one of *CreativeFieldValue or error will be non-nil. Any
24977// non-2xx status code is an error. Response headers are in either
24978// *CreativeFieldValue.ServerResponse.Header or (if a response was
24979// returned at all) in error.(*googleapi.Error).Header. Use
24980// googleapi.IsNotModified to check whether the returned error was
24981// because http.StatusNotModified was returned.
24982func (c *CreativeFieldValuesGetCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
24983	gensupport.SetOptions(c.urlParams_, opts...)
24984	res, err := c.doRequest("json")
24985	if res != nil && res.StatusCode == http.StatusNotModified {
24986		if res.Body != nil {
24987			res.Body.Close()
24988		}
24989		return nil, &googleapi.Error{
24990			Code:   res.StatusCode,
24991			Header: res.Header,
24992		}
24993	}
24994	if err != nil {
24995		return nil, err
24996	}
24997	defer googleapi.CloseBody(res)
24998	if err := googleapi.CheckResponse(res); err != nil {
24999		return nil, err
25000	}
25001	ret := &CreativeFieldValue{
25002		ServerResponse: googleapi.ServerResponse{
25003			Header:         res.Header,
25004			HTTPStatusCode: res.StatusCode,
25005		},
25006	}
25007	target := &ret
25008	if err := gensupport.DecodeResponse(target, res); err != nil {
25009		return nil, err
25010	}
25011	return ret, nil
25012	// {
25013	//   "description": "Gets one creative field value by ID.",
25014	//   "httpMethod": "GET",
25015	//   "id": "dfareporting.creativeFieldValues.get",
25016	//   "parameterOrder": [
25017	//     "profileId",
25018	//     "creativeFieldId",
25019	//     "id"
25020	//   ],
25021	//   "parameters": {
25022	//     "creativeFieldId": {
25023	//       "description": "Creative field ID for this creative field value.",
25024	//       "format": "int64",
25025	//       "location": "path",
25026	//       "required": true,
25027	//       "type": "string"
25028	//     },
25029	//     "id": {
25030	//       "description": "Creative Field Value ID",
25031	//       "format": "int64",
25032	//       "location": "path",
25033	//       "required": true,
25034	//       "type": "string"
25035	//     },
25036	//     "profileId": {
25037	//       "description": "User profile ID associated with this request.",
25038	//       "format": "int64",
25039	//       "location": "path",
25040	//       "required": true,
25041	//       "type": "string"
25042	//     }
25043	//   },
25044	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}",
25045	//   "response": {
25046	//     "$ref": "CreativeFieldValue"
25047	//   },
25048	//   "scopes": [
25049	//     "https://www.googleapis.com/auth/dfatrafficking"
25050	//   ]
25051	// }
25052
25053}
25054
25055// method id "dfareporting.creativeFieldValues.insert":
25056
25057type CreativeFieldValuesInsertCall struct {
25058	s                  *Service
25059	profileId          int64
25060	creativeFieldId    int64
25061	creativefieldvalue *CreativeFieldValue
25062	urlParams_         gensupport.URLParams
25063	ctx_               context.Context
25064	header_            http.Header
25065}
25066
25067// Insert: Inserts a new creative field value.
25068func (r *CreativeFieldValuesService) Insert(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesInsertCall {
25069	c := &CreativeFieldValuesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25070	c.profileId = profileId
25071	c.creativeFieldId = creativeFieldId
25072	c.creativefieldvalue = creativefieldvalue
25073	return c
25074}
25075
25076// Fields allows partial responses to be retrieved. See
25077// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25078// for more information.
25079func (c *CreativeFieldValuesInsertCall) Fields(s ...googleapi.Field) *CreativeFieldValuesInsertCall {
25080	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25081	return c
25082}
25083
25084// Context sets the context to be used in this call's Do method. Any
25085// pending HTTP request will be aborted if the provided context is
25086// canceled.
25087func (c *CreativeFieldValuesInsertCall) Context(ctx context.Context) *CreativeFieldValuesInsertCall {
25088	c.ctx_ = ctx
25089	return c
25090}
25091
25092// Header returns an http.Header that can be modified by the caller to
25093// add HTTP headers to the request.
25094func (c *CreativeFieldValuesInsertCall) Header() http.Header {
25095	if c.header_ == nil {
25096		c.header_ = make(http.Header)
25097	}
25098	return c.header_
25099}
25100
25101func (c *CreativeFieldValuesInsertCall) doRequest(alt string) (*http.Response, error) {
25102	reqHeaders := make(http.Header)
25103	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
25104	for k, v := range c.header_ {
25105		reqHeaders[k] = v
25106	}
25107	reqHeaders.Set("User-Agent", c.s.userAgent())
25108	var body io.Reader = nil
25109	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25110	if err != nil {
25111		return nil, err
25112	}
25113	reqHeaders.Set("Content-Type", "application/json")
25114	c.urlParams_.Set("alt", alt)
25115	c.urlParams_.Set("prettyPrint", "false")
25116	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25117	urls += "?" + c.urlParams_.Encode()
25118	req, err := http.NewRequest("POST", urls, body)
25119	if err != nil {
25120		return nil, err
25121	}
25122	req.Header = reqHeaders
25123	googleapi.Expand(req.URL, map[string]string{
25124		"profileId":       strconv.FormatInt(c.profileId, 10),
25125		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25126	})
25127	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25128}
25129
25130// Do executes the "dfareporting.creativeFieldValues.insert" call.
25131// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25132// non-2xx status code is an error. Response headers are in either
25133// *CreativeFieldValue.ServerResponse.Header or (if a response was
25134// returned at all) in error.(*googleapi.Error).Header. Use
25135// googleapi.IsNotModified to check whether the returned error was
25136// because http.StatusNotModified was returned.
25137func (c *CreativeFieldValuesInsertCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25138	gensupport.SetOptions(c.urlParams_, opts...)
25139	res, err := c.doRequest("json")
25140	if res != nil && res.StatusCode == http.StatusNotModified {
25141		if res.Body != nil {
25142			res.Body.Close()
25143		}
25144		return nil, &googleapi.Error{
25145			Code:   res.StatusCode,
25146			Header: res.Header,
25147		}
25148	}
25149	if err != nil {
25150		return nil, err
25151	}
25152	defer googleapi.CloseBody(res)
25153	if err := googleapi.CheckResponse(res); err != nil {
25154		return nil, err
25155	}
25156	ret := &CreativeFieldValue{
25157		ServerResponse: googleapi.ServerResponse{
25158			Header:         res.Header,
25159			HTTPStatusCode: res.StatusCode,
25160		},
25161	}
25162	target := &ret
25163	if err := gensupport.DecodeResponse(target, res); err != nil {
25164		return nil, err
25165	}
25166	return ret, nil
25167	// {
25168	//   "description": "Inserts a new creative field value.",
25169	//   "httpMethod": "POST",
25170	//   "id": "dfareporting.creativeFieldValues.insert",
25171	//   "parameterOrder": [
25172	//     "profileId",
25173	//     "creativeFieldId"
25174	//   ],
25175	//   "parameters": {
25176	//     "creativeFieldId": {
25177	//       "description": "Creative field ID for this creative field value.",
25178	//       "format": "int64",
25179	//       "location": "path",
25180	//       "required": true,
25181	//       "type": "string"
25182	//     },
25183	//     "profileId": {
25184	//       "description": "User profile ID associated with this request.",
25185	//       "format": "int64",
25186	//       "location": "path",
25187	//       "required": true,
25188	//       "type": "string"
25189	//     }
25190	//   },
25191	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25192	//   "request": {
25193	//     "$ref": "CreativeFieldValue"
25194	//   },
25195	//   "response": {
25196	//     "$ref": "CreativeFieldValue"
25197	//   },
25198	//   "scopes": [
25199	//     "https://www.googleapis.com/auth/dfatrafficking"
25200	//   ]
25201	// }
25202
25203}
25204
25205// method id "dfareporting.creativeFieldValues.list":
25206
25207type CreativeFieldValuesListCall struct {
25208	s               *Service
25209	profileId       int64
25210	creativeFieldId int64
25211	urlParams_      gensupport.URLParams
25212	ifNoneMatch_    string
25213	ctx_            context.Context
25214	header_         http.Header
25215}
25216
25217// List: Retrieves a list of creative field values, possibly filtered.
25218// This method supports paging.
25219func (r *CreativeFieldValuesService) List(profileId int64, creativeFieldId int64) *CreativeFieldValuesListCall {
25220	c := &CreativeFieldValuesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25221	c.profileId = profileId
25222	c.creativeFieldId = creativeFieldId
25223	return c
25224}
25225
25226// Ids sets the optional parameter "ids": Select only creative field
25227// values with these IDs.
25228func (c *CreativeFieldValuesListCall) Ids(ids ...int64) *CreativeFieldValuesListCall {
25229	var ids_ []string
25230	for _, v := range ids {
25231		ids_ = append(ids_, fmt.Sprint(v))
25232	}
25233	c.urlParams_.SetMulti("ids", ids_)
25234	return c
25235}
25236
25237// MaxResults sets the optional parameter "maxResults": Maximum number
25238// of results to return.
25239func (c *CreativeFieldValuesListCall) MaxResults(maxResults int64) *CreativeFieldValuesListCall {
25240	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
25241	return c
25242}
25243
25244// PageToken sets the optional parameter "pageToken": Value of the
25245// nextPageToken from the previous result page.
25246func (c *CreativeFieldValuesListCall) PageToken(pageToken string) *CreativeFieldValuesListCall {
25247	c.urlParams_.Set("pageToken", pageToken)
25248	return c
25249}
25250
25251// SearchString sets the optional parameter "searchString": Allows
25252// searching for creative field values by their values. Wildcards (e.g.
25253// *) are not allowed.
25254func (c *CreativeFieldValuesListCall) SearchString(searchString string) *CreativeFieldValuesListCall {
25255	c.urlParams_.Set("searchString", searchString)
25256	return c
25257}
25258
25259// SortField sets the optional parameter "sortField": Field by which to
25260// sort the list.
25261//
25262// Possible values:
25263//   "ID" (default)
25264//   "VALUE"
25265func (c *CreativeFieldValuesListCall) SortField(sortField string) *CreativeFieldValuesListCall {
25266	c.urlParams_.Set("sortField", sortField)
25267	return c
25268}
25269
25270// SortOrder sets the optional parameter "sortOrder": Order of sorted
25271// results.
25272//
25273// Possible values:
25274//   "ASCENDING" (default)
25275//   "DESCENDING"
25276func (c *CreativeFieldValuesListCall) SortOrder(sortOrder string) *CreativeFieldValuesListCall {
25277	c.urlParams_.Set("sortOrder", sortOrder)
25278	return c
25279}
25280
25281// Fields allows partial responses to be retrieved. See
25282// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25283// for more information.
25284func (c *CreativeFieldValuesListCall) Fields(s ...googleapi.Field) *CreativeFieldValuesListCall {
25285	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25286	return c
25287}
25288
25289// IfNoneMatch sets the optional parameter which makes the operation
25290// fail if the object's ETag matches the given value. This is useful for
25291// getting updates only after the object has changed since the last
25292// request. Use googleapi.IsNotModified to check whether the response
25293// error from Do is the result of In-None-Match.
25294func (c *CreativeFieldValuesListCall) IfNoneMatch(entityTag string) *CreativeFieldValuesListCall {
25295	c.ifNoneMatch_ = entityTag
25296	return c
25297}
25298
25299// Context sets the context to be used in this call's Do method. Any
25300// pending HTTP request will be aborted if the provided context is
25301// canceled.
25302func (c *CreativeFieldValuesListCall) Context(ctx context.Context) *CreativeFieldValuesListCall {
25303	c.ctx_ = ctx
25304	return c
25305}
25306
25307// Header returns an http.Header that can be modified by the caller to
25308// add HTTP headers to the request.
25309func (c *CreativeFieldValuesListCall) Header() http.Header {
25310	if c.header_ == nil {
25311		c.header_ = make(http.Header)
25312	}
25313	return c.header_
25314}
25315
25316func (c *CreativeFieldValuesListCall) doRequest(alt string) (*http.Response, error) {
25317	reqHeaders := make(http.Header)
25318	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
25319	for k, v := range c.header_ {
25320		reqHeaders[k] = v
25321	}
25322	reqHeaders.Set("User-Agent", c.s.userAgent())
25323	if c.ifNoneMatch_ != "" {
25324		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25325	}
25326	var body io.Reader = nil
25327	c.urlParams_.Set("alt", alt)
25328	c.urlParams_.Set("prettyPrint", "false")
25329	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25330	urls += "?" + c.urlParams_.Encode()
25331	req, err := http.NewRequest("GET", urls, body)
25332	if err != nil {
25333		return nil, err
25334	}
25335	req.Header = reqHeaders
25336	googleapi.Expand(req.URL, map[string]string{
25337		"profileId":       strconv.FormatInt(c.profileId, 10),
25338		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25339	})
25340	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25341}
25342
25343// Do executes the "dfareporting.creativeFieldValues.list" call.
25344// Exactly one of *CreativeFieldValuesListResponse or error will be
25345// non-nil. Any non-2xx status code is an error. Response headers are in
25346// either *CreativeFieldValuesListResponse.ServerResponse.Header or (if
25347// a response was returned at all) in error.(*googleapi.Error).Header.
25348// Use googleapi.IsNotModified to check whether the returned error was
25349// because http.StatusNotModified was returned.
25350func (c *CreativeFieldValuesListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValuesListResponse, error) {
25351	gensupport.SetOptions(c.urlParams_, opts...)
25352	res, err := c.doRequest("json")
25353	if res != nil && res.StatusCode == http.StatusNotModified {
25354		if res.Body != nil {
25355			res.Body.Close()
25356		}
25357		return nil, &googleapi.Error{
25358			Code:   res.StatusCode,
25359			Header: res.Header,
25360		}
25361	}
25362	if err != nil {
25363		return nil, err
25364	}
25365	defer googleapi.CloseBody(res)
25366	if err := googleapi.CheckResponse(res); err != nil {
25367		return nil, err
25368	}
25369	ret := &CreativeFieldValuesListResponse{
25370		ServerResponse: googleapi.ServerResponse{
25371			Header:         res.Header,
25372			HTTPStatusCode: res.StatusCode,
25373		},
25374	}
25375	target := &ret
25376	if err := gensupport.DecodeResponse(target, res); err != nil {
25377		return nil, err
25378	}
25379	return ret, nil
25380	// {
25381	//   "description": "Retrieves a list of creative field values, possibly filtered. This method supports paging.",
25382	//   "httpMethod": "GET",
25383	//   "id": "dfareporting.creativeFieldValues.list",
25384	//   "parameterOrder": [
25385	//     "profileId",
25386	//     "creativeFieldId"
25387	//   ],
25388	//   "parameters": {
25389	//     "creativeFieldId": {
25390	//       "description": "Creative field ID for this creative field value.",
25391	//       "format": "int64",
25392	//       "location": "path",
25393	//       "required": true,
25394	//       "type": "string"
25395	//     },
25396	//     "ids": {
25397	//       "description": "Select only creative field values with these IDs.",
25398	//       "format": "int64",
25399	//       "location": "query",
25400	//       "repeated": true,
25401	//       "type": "string"
25402	//     },
25403	//     "maxResults": {
25404	//       "default": "1000",
25405	//       "description": "Maximum number of results to return.",
25406	//       "format": "int32",
25407	//       "location": "query",
25408	//       "maximum": "1000",
25409	//       "minimum": "0",
25410	//       "type": "integer"
25411	//     },
25412	//     "pageToken": {
25413	//       "description": "Value of the nextPageToken from the previous result page.",
25414	//       "location": "query",
25415	//       "type": "string"
25416	//     },
25417	//     "profileId": {
25418	//       "description": "User profile ID associated with this request.",
25419	//       "format": "int64",
25420	//       "location": "path",
25421	//       "required": true,
25422	//       "type": "string"
25423	//     },
25424	//     "searchString": {
25425	//       "description": "Allows searching for creative field values by their values. Wildcards (e.g. *) are not allowed.",
25426	//       "location": "query",
25427	//       "type": "string"
25428	//     },
25429	//     "sortField": {
25430	//       "default": "ID",
25431	//       "description": "Field by which to sort the list.",
25432	//       "enum": [
25433	//         "ID",
25434	//         "VALUE"
25435	//       ],
25436	//       "enumDescriptions": [
25437	//         "",
25438	//         ""
25439	//       ],
25440	//       "location": "query",
25441	//       "type": "string"
25442	//     },
25443	//     "sortOrder": {
25444	//       "default": "ASCENDING",
25445	//       "description": "Order of sorted results.",
25446	//       "enum": [
25447	//         "ASCENDING",
25448	//         "DESCENDING"
25449	//       ],
25450	//       "enumDescriptions": [
25451	//         "",
25452	//         ""
25453	//       ],
25454	//       "location": "query",
25455	//       "type": "string"
25456	//     }
25457	//   },
25458	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25459	//   "response": {
25460	//     "$ref": "CreativeFieldValuesListResponse"
25461	//   },
25462	//   "scopes": [
25463	//     "https://www.googleapis.com/auth/dfatrafficking"
25464	//   ]
25465	// }
25466
25467}
25468
25469// Pages invokes f for each page of results.
25470// A non-nil error returned from f will halt the iteration.
25471// The provided context supersedes any context provided to the Context method.
25472func (c *CreativeFieldValuesListCall) Pages(ctx context.Context, f func(*CreativeFieldValuesListResponse) error) error {
25473	c.ctx_ = ctx
25474	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
25475	for {
25476		x, err := c.Do()
25477		if err != nil {
25478			return err
25479		}
25480		if err := f(x); err != nil {
25481			return err
25482		}
25483		if x.NextPageToken == "" {
25484			return nil
25485		}
25486		c.PageToken(x.NextPageToken)
25487	}
25488}
25489
25490// method id "dfareporting.creativeFieldValues.patch":
25491
25492type CreativeFieldValuesPatchCall struct {
25493	s                  *Service
25494	profileId          int64
25495	creativeFieldId    int64
25496	creativefieldvalue *CreativeFieldValue
25497	urlParams_         gensupport.URLParams
25498	ctx_               context.Context
25499	header_            http.Header
25500}
25501
25502// Patch: Updates an existing creative field value. This method supports
25503// patch semantics.
25504func (r *CreativeFieldValuesService) Patch(profileId int64, creativeFieldId int64, id int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesPatchCall {
25505	c := &CreativeFieldValuesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25506	c.profileId = profileId
25507	c.creativeFieldId = creativeFieldId
25508	c.urlParams_.Set("id", fmt.Sprint(id))
25509	c.creativefieldvalue = creativefieldvalue
25510	return c
25511}
25512
25513// Fields allows partial responses to be retrieved. See
25514// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25515// for more information.
25516func (c *CreativeFieldValuesPatchCall) Fields(s ...googleapi.Field) *CreativeFieldValuesPatchCall {
25517	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25518	return c
25519}
25520
25521// Context sets the context to be used in this call's Do method. Any
25522// pending HTTP request will be aborted if the provided context is
25523// canceled.
25524func (c *CreativeFieldValuesPatchCall) Context(ctx context.Context) *CreativeFieldValuesPatchCall {
25525	c.ctx_ = ctx
25526	return c
25527}
25528
25529// Header returns an http.Header that can be modified by the caller to
25530// add HTTP headers to the request.
25531func (c *CreativeFieldValuesPatchCall) Header() http.Header {
25532	if c.header_ == nil {
25533		c.header_ = make(http.Header)
25534	}
25535	return c.header_
25536}
25537
25538func (c *CreativeFieldValuesPatchCall) doRequest(alt string) (*http.Response, error) {
25539	reqHeaders := make(http.Header)
25540	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
25541	for k, v := range c.header_ {
25542		reqHeaders[k] = v
25543	}
25544	reqHeaders.Set("User-Agent", c.s.userAgent())
25545	var body io.Reader = nil
25546	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25547	if err != nil {
25548		return nil, err
25549	}
25550	reqHeaders.Set("Content-Type", "application/json")
25551	c.urlParams_.Set("alt", alt)
25552	c.urlParams_.Set("prettyPrint", "false")
25553	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25554	urls += "?" + c.urlParams_.Encode()
25555	req, err := http.NewRequest("PATCH", urls, body)
25556	if err != nil {
25557		return nil, err
25558	}
25559	req.Header = reqHeaders
25560	googleapi.Expand(req.URL, map[string]string{
25561		"profileId":       strconv.FormatInt(c.profileId, 10),
25562		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25563	})
25564	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25565}
25566
25567// Do executes the "dfareporting.creativeFieldValues.patch" call.
25568// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25569// non-2xx status code is an error. Response headers are in either
25570// *CreativeFieldValue.ServerResponse.Header or (if a response was
25571// returned at all) in error.(*googleapi.Error).Header. Use
25572// googleapi.IsNotModified to check whether the returned error was
25573// because http.StatusNotModified was returned.
25574func (c *CreativeFieldValuesPatchCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25575	gensupport.SetOptions(c.urlParams_, opts...)
25576	res, err := c.doRequest("json")
25577	if res != nil && res.StatusCode == http.StatusNotModified {
25578		if res.Body != nil {
25579			res.Body.Close()
25580		}
25581		return nil, &googleapi.Error{
25582			Code:   res.StatusCode,
25583			Header: res.Header,
25584		}
25585	}
25586	if err != nil {
25587		return nil, err
25588	}
25589	defer googleapi.CloseBody(res)
25590	if err := googleapi.CheckResponse(res); err != nil {
25591		return nil, err
25592	}
25593	ret := &CreativeFieldValue{
25594		ServerResponse: googleapi.ServerResponse{
25595			Header:         res.Header,
25596			HTTPStatusCode: res.StatusCode,
25597		},
25598	}
25599	target := &ret
25600	if err := gensupport.DecodeResponse(target, res); err != nil {
25601		return nil, err
25602	}
25603	return ret, nil
25604	// {
25605	//   "description": "Updates an existing creative field value. This method supports patch semantics.",
25606	//   "httpMethod": "PATCH",
25607	//   "id": "dfareporting.creativeFieldValues.patch",
25608	//   "parameterOrder": [
25609	//     "profileId",
25610	//     "creativeFieldId",
25611	//     "id"
25612	//   ],
25613	//   "parameters": {
25614	//     "creativeFieldId": {
25615	//       "description": "Creative field ID for this creative field value.",
25616	//       "format": "int64",
25617	//       "location": "path",
25618	//       "required": true,
25619	//       "type": "string"
25620	//     },
25621	//     "id": {
25622	//       "description": "Creative Field Value ID",
25623	//       "format": "int64",
25624	//       "location": "query",
25625	//       "required": true,
25626	//       "type": "string"
25627	//     },
25628	//     "profileId": {
25629	//       "description": "User profile ID associated with this request.",
25630	//       "format": "int64",
25631	//       "location": "path",
25632	//       "required": true,
25633	//       "type": "string"
25634	//     }
25635	//   },
25636	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25637	//   "request": {
25638	//     "$ref": "CreativeFieldValue"
25639	//   },
25640	//   "response": {
25641	//     "$ref": "CreativeFieldValue"
25642	//   },
25643	//   "scopes": [
25644	//     "https://www.googleapis.com/auth/dfatrafficking"
25645	//   ]
25646	// }
25647
25648}
25649
25650// method id "dfareporting.creativeFieldValues.update":
25651
25652type CreativeFieldValuesUpdateCall struct {
25653	s                  *Service
25654	profileId          int64
25655	creativeFieldId    int64
25656	creativefieldvalue *CreativeFieldValue
25657	urlParams_         gensupport.URLParams
25658	ctx_               context.Context
25659	header_            http.Header
25660}
25661
25662// Update: Updates an existing creative field value.
25663func (r *CreativeFieldValuesService) Update(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesUpdateCall {
25664	c := &CreativeFieldValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25665	c.profileId = profileId
25666	c.creativeFieldId = creativeFieldId
25667	c.creativefieldvalue = creativefieldvalue
25668	return c
25669}
25670
25671// Fields allows partial responses to be retrieved. See
25672// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25673// for more information.
25674func (c *CreativeFieldValuesUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldValuesUpdateCall {
25675	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25676	return c
25677}
25678
25679// Context sets the context to be used in this call's Do method. Any
25680// pending HTTP request will be aborted if the provided context is
25681// canceled.
25682func (c *CreativeFieldValuesUpdateCall) Context(ctx context.Context) *CreativeFieldValuesUpdateCall {
25683	c.ctx_ = ctx
25684	return c
25685}
25686
25687// Header returns an http.Header that can be modified by the caller to
25688// add HTTP headers to the request.
25689func (c *CreativeFieldValuesUpdateCall) Header() http.Header {
25690	if c.header_ == nil {
25691		c.header_ = make(http.Header)
25692	}
25693	return c.header_
25694}
25695
25696func (c *CreativeFieldValuesUpdateCall) doRequest(alt string) (*http.Response, error) {
25697	reqHeaders := make(http.Header)
25698	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
25699	for k, v := range c.header_ {
25700		reqHeaders[k] = v
25701	}
25702	reqHeaders.Set("User-Agent", c.s.userAgent())
25703	var body io.Reader = nil
25704	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25705	if err != nil {
25706		return nil, err
25707	}
25708	reqHeaders.Set("Content-Type", "application/json")
25709	c.urlParams_.Set("alt", alt)
25710	c.urlParams_.Set("prettyPrint", "false")
25711	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25712	urls += "?" + c.urlParams_.Encode()
25713	req, err := http.NewRequest("PUT", urls, body)
25714	if err != nil {
25715		return nil, err
25716	}
25717	req.Header = reqHeaders
25718	googleapi.Expand(req.URL, map[string]string{
25719		"profileId":       strconv.FormatInt(c.profileId, 10),
25720		"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25721	})
25722	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25723}
25724
25725// Do executes the "dfareporting.creativeFieldValues.update" call.
25726// Exactly one of *CreativeFieldValue or error will be non-nil. Any
25727// non-2xx status code is an error. Response headers are in either
25728// *CreativeFieldValue.ServerResponse.Header or (if a response was
25729// returned at all) in error.(*googleapi.Error).Header. Use
25730// googleapi.IsNotModified to check whether the returned error was
25731// because http.StatusNotModified was returned.
25732func (c *CreativeFieldValuesUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25733	gensupport.SetOptions(c.urlParams_, opts...)
25734	res, err := c.doRequest("json")
25735	if res != nil && res.StatusCode == http.StatusNotModified {
25736		if res.Body != nil {
25737			res.Body.Close()
25738		}
25739		return nil, &googleapi.Error{
25740			Code:   res.StatusCode,
25741			Header: res.Header,
25742		}
25743	}
25744	if err != nil {
25745		return nil, err
25746	}
25747	defer googleapi.CloseBody(res)
25748	if err := googleapi.CheckResponse(res); err != nil {
25749		return nil, err
25750	}
25751	ret := &CreativeFieldValue{
25752		ServerResponse: googleapi.ServerResponse{
25753			Header:         res.Header,
25754			HTTPStatusCode: res.StatusCode,
25755		},
25756	}
25757	target := &ret
25758	if err := gensupport.DecodeResponse(target, res); err != nil {
25759		return nil, err
25760	}
25761	return ret, nil
25762	// {
25763	//   "description": "Updates an existing creative field value.",
25764	//   "httpMethod": "PUT",
25765	//   "id": "dfareporting.creativeFieldValues.update",
25766	//   "parameterOrder": [
25767	//     "profileId",
25768	//     "creativeFieldId"
25769	//   ],
25770	//   "parameters": {
25771	//     "creativeFieldId": {
25772	//       "description": "Creative field ID for this creative field value.",
25773	//       "format": "int64",
25774	//       "location": "path",
25775	//       "required": true,
25776	//       "type": "string"
25777	//     },
25778	//     "profileId": {
25779	//       "description": "User profile ID associated with this request.",
25780	//       "format": "int64",
25781	//       "location": "path",
25782	//       "required": true,
25783	//       "type": "string"
25784	//     }
25785	//   },
25786	//   "path": "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues",
25787	//   "request": {
25788	//     "$ref": "CreativeFieldValue"
25789	//   },
25790	//   "response": {
25791	//     "$ref": "CreativeFieldValue"
25792	//   },
25793	//   "scopes": [
25794	//     "https://www.googleapis.com/auth/dfatrafficking"
25795	//   ]
25796	// }
25797
25798}
25799
25800// method id "dfareporting.creativeFields.delete":
25801
25802type CreativeFieldsDeleteCall struct {
25803	s          *Service
25804	profileId  int64
25805	id         int64
25806	urlParams_ gensupport.URLParams
25807	ctx_       context.Context
25808	header_    http.Header
25809}
25810
25811// Delete: Deletes an existing creative field.
25812func (r *CreativeFieldsService) Delete(profileId int64, id int64) *CreativeFieldsDeleteCall {
25813	c := &CreativeFieldsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25814	c.profileId = profileId
25815	c.id = id
25816	return c
25817}
25818
25819// Fields allows partial responses to be retrieved. See
25820// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25821// for more information.
25822func (c *CreativeFieldsDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldsDeleteCall {
25823	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25824	return c
25825}
25826
25827// Context sets the context to be used in this call's Do method. Any
25828// pending HTTP request will be aborted if the provided context is
25829// canceled.
25830func (c *CreativeFieldsDeleteCall) Context(ctx context.Context) *CreativeFieldsDeleteCall {
25831	c.ctx_ = ctx
25832	return c
25833}
25834
25835// Header returns an http.Header that can be modified by the caller to
25836// add HTTP headers to the request.
25837func (c *CreativeFieldsDeleteCall) Header() http.Header {
25838	if c.header_ == nil {
25839		c.header_ = make(http.Header)
25840	}
25841	return c.header_
25842}
25843
25844func (c *CreativeFieldsDeleteCall) doRequest(alt string) (*http.Response, error) {
25845	reqHeaders := make(http.Header)
25846	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
25847	for k, v := range c.header_ {
25848		reqHeaders[k] = v
25849	}
25850	reqHeaders.Set("User-Agent", c.s.userAgent())
25851	var body io.Reader = nil
25852	c.urlParams_.Set("alt", alt)
25853	c.urlParams_.Set("prettyPrint", "false")
25854	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
25855	urls += "?" + c.urlParams_.Encode()
25856	req, err := http.NewRequest("DELETE", urls, body)
25857	if err != nil {
25858		return nil, err
25859	}
25860	req.Header = reqHeaders
25861	googleapi.Expand(req.URL, map[string]string{
25862		"profileId": strconv.FormatInt(c.profileId, 10),
25863		"id":        strconv.FormatInt(c.id, 10),
25864	})
25865	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25866}
25867
25868// Do executes the "dfareporting.creativeFields.delete" call.
25869func (c *CreativeFieldsDeleteCall) Do(opts ...googleapi.CallOption) error {
25870	gensupport.SetOptions(c.urlParams_, opts...)
25871	res, err := c.doRequest("json")
25872	if err != nil {
25873		return err
25874	}
25875	defer googleapi.CloseBody(res)
25876	if err := googleapi.CheckResponse(res); err != nil {
25877		return err
25878	}
25879	return nil
25880	// {
25881	//   "description": "Deletes an existing creative field.",
25882	//   "httpMethod": "DELETE",
25883	//   "id": "dfareporting.creativeFields.delete",
25884	//   "parameterOrder": [
25885	//     "profileId",
25886	//     "id"
25887	//   ],
25888	//   "parameters": {
25889	//     "id": {
25890	//       "description": "Creative Field ID",
25891	//       "format": "int64",
25892	//       "location": "path",
25893	//       "required": true,
25894	//       "type": "string"
25895	//     },
25896	//     "profileId": {
25897	//       "description": "User profile ID associated with this request.",
25898	//       "format": "int64",
25899	//       "location": "path",
25900	//       "required": true,
25901	//       "type": "string"
25902	//     }
25903	//   },
25904	//   "path": "userprofiles/{profileId}/creativeFields/{id}",
25905	//   "scopes": [
25906	//     "https://www.googleapis.com/auth/dfatrafficking"
25907	//   ]
25908	// }
25909
25910}
25911
25912// method id "dfareporting.creativeFields.get":
25913
25914type CreativeFieldsGetCall struct {
25915	s            *Service
25916	profileId    int64
25917	id           int64
25918	urlParams_   gensupport.URLParams
25919	ifNoneMatch_ string
25920	ctx_         context.Context
25921	header_      http.Header
25922}
25923
25924// Get: Gets one creative field by ID.
25925func (r *CreativeFieldsService) Get(profileId int64, id int64) *CreativeFieldsGetCall {
25926	c := &CreativeFieldsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25927	c.profileId = profileId
25928	c.id = id
25929	return c
25930}
25931
25932// Fields allows partial responses to be retrieved. See
25933// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25934// for more information.
25935func (c *CreativeFieldsGetCall) Fields(s ...googleapi.Field) *CreativeFieldsGetCall {
25936	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25937	return c
25938}
25939
25940// IfNoneMatch sets the optional parameter which makes the operation
25941// fail if the object's ETag matches the given value. This is useful for
25942// getting updates only after the object has changed since the last
25943// request. Use googleapi.IsNotModified to check whether the response
25944// error from Do is the result of In-None-Match.
25945func (c *CreativeFieldsGetCall) IfNoneMatch(entityTag string) *CreativeFieldsGetCall {
25946	c.ifNoneMatch_ = entityTag
25947	return c
25948}
25949
25950// Context sets the context to be used in this call's Do method. Any
25951// pending HTTP request will be aborted if the provided context is
25952// canceled.
25953func (c *CreativeFieldsGetCall) Context(ctx context.Context) *CreativeFieldsGetCall {
25954	c.ctx_ = ctx
25955	return c
25956}
25957
25958// Header returns an http.Header that can be modified by the caller to
25959// add HTTP headers to the request.
25960func (c *CreativeFieldsGetCall) Header() http.Header {
25961	if c.header_ == nil {
25962		c.header_ = make(http.Header)
25963	}
25964	return c.header_
25965}
25966
25967func (c *CreativeFieldsGetCall) doRequest(alt string) (*http.Response, error) {
25968	reqHeaders := make(http.Header)
25969	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
25970	for k, v := range c.header_ {
25971		reqHeaders[k] = v
25972	}
25973	reqHeaders.Set("User-Agent", c.s.userAgent())
25974	if c.ifNoneMatch_ != "" {
25975		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25976	}
25977	var body io.Reader = nil
25978	c.urlParams_.Set("alt", alt)
25979	c.urlParams_.Set("prettyPrint", "false")
25980	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
25981	urls += "?" + c.urlParams_.Encode()
25982	req, err := http.NewRequest("GET", urls, body)
25983	if err != nil {
25984		return nil, err
25985	}
25986	req.Header = reqHeaders
25987	googleapi.Expand(req.URL, map[string]string{
25988		"profileId": strconv.FormatInt(c.profileId, 10),
25989		"id":        strconv.FormatInt(c.id, 10),
25990	})
25991	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25992}
25993
25994// Do executes the "dfareporting.creativeFields.get" call.
25995// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
25996// status code is an error. Response headers are in either
25997// *CreativeField.ServerResponse.Header or (if a response was returned
25998// at all) in error.(*googleapi.Error).Header. Use
25999// googleapi.IsNotModified to check whether the returned error was
26000// because http.StatusNotModified was returned.
26001func (c *CreativeFieldsGetCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26002	gensupport.SetOptions(c.urlParams_, opts...)
26003	res, err := c.doRequest("json")
26004	if res != nil && res.StatusCode == http.StatusNotModified {
26005		if res.Body != nil {
26006			res.Body.Close()
26007		}
26008		return nil, &googleapi.Error{
26009			Code:   res.StatusCode,
26010			Header: res.Header,
26011		}
26012	}
26013	if err != nil {
26014		return nil, err
26015	}
26016	defer googleapi.CloseBody(res)
26017	if err := googleapi.CheckResponse(res); err != nil {
26018		return nil, err
26019	}
26020	ret := &CreativeField{
26021		ServerResponse: googleapi.ServerResponse{
26022			Header:         res.Header,
26023			HTTPStatusCode: res.StatusCode,
26024		},
26025	}
26026	target := &ret
26027	if err := gensupport.DecodeResponse(target, res); err != nil {
26028		return nil, err
26029	}
26030	return ret, nil
26031	// {
26032	//   "description": "Gets one creative field by ID.",
26033	//   "httpMethod": "GET",
26034	//   "id": "dfareporting.creativeFields.get",
26035	//   "parameterOrder": [
26036	//     "profileId",
26037	//     "id"
26038	//   ],
26039	//   "parameters": {
26040	//     "id": {
26041	//       "description": "Creative Field ID",
26042	//       "format": "int64",
26043	//       "location": "path",
26044	//       "required": true,
26045	//       "type": "string"
26046	//     },
26047	//     "profileId": {
26048	//       "description": "User profile ID associated with this request.",
26049	//       "format": "int64",
26050	//       "location": "path",
26051	//       "required": true,
26052	//       "type": "string"
26053	//     }
26054	//   },
26055	//   "path": "userprofiles/{profileId}/creativeFields/{id}",
26056	//   "response": {
26057	//     "$ref": "CreativeField"
26058	//   },
26059	//   "scopes": [
26060	//     "https://www.googleapis.com/auth/dfatrafficking"
26061	//   ]
26062	// }
26063
26064}
26065
26066// method id "dfareporting.creativeFields.insert":
26067
26068type CreativeFieldsInsertCall struct {
26069	s             *Service
26070	profileId     int64
26071	creativefield *CreativeField
26072	urlParams_    gensupport.URLParams
26073	ctx_          context.Context
26074	header_       http.Header
26075}
26076
26077// Insert: Inserts a new creative field.
26078func (r *CreativeFieldsService) Insert(profileId int64, creativefield *CreativeField) *CreativeFieldsInsertCall {
26079	c := &CreativeFieldsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26080	c.profileId = profileId
26081	c.creativefield = creativefield
26082	return c
26083}
26084
26085// Fields allows partial responses to be retrieved. See
26086// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26087// for more information.
26088func (c *CreativeFieldsInsertCall) Fields(s ...googleapi.Field) *CreativeFieldsInsertCall {
26089	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26090	return c
26091}
26092
26093// Context sets the context to be used in this call's Do method. Any
26094// pending HTTP request will be aborted if the provided context is
26095// canceled.
26096func (c *CreativeFieldsInsertCall) Context(ctx context.Context) *CreativeFieldsInsertCall {
26097	c.ctx_ = ctx
26098	return c
26099}
26100
26101// Header returns an http.Header that can be modified by the caller to
26102// add HTTP headers to the request.
26103func (c *CreativeFieldsInsertCall) Header() http.Header {
26104	if c.header_ == nil {
26105		c.header_ = make(http.Header)
26106	}
26107	return c.header_
26108}
26109
26110func (c *CreativeFieldsInsertCall) doRequest(alt string) (*http.Response, error) {
26111	reqHeaders := make(http.Header)
26112	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
26113	for k, v := range c.header_ {
26114		reqHeaders[k] = v
26115	}
26116	reqHeaders.Set("User-Agent", c.s.userAgent())
26117	var body io.Reader = nil
26118	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26119	if err != nil {
26120		return nil, err
26121	}
26122	reqHeaders.Set("Content-Type", "application/json")
26123	c.urlParams_.Set("alt", alt)
26124	c.urlParams_.Set("prettyPrint", "false")
26125	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26126	urls += "?" + c.urlParams_.Encode()
26127	req, err := http.NewRequest("POST", urls, body)
26128	if err != nil {
26129		return nil, err
26130	}
26131	req.Header = reqHeaders
26132	googleapi.Expand(req.URL, map[string]string{
26133		"profileId": strconv.FormatInt(c.profileId, 10),
26134	})
26135	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26136}
26137
26138// Do executes the "dfareporting.creativeFields.insert" call.
26139// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26140// status code is an error. Response headers are in either
26141// *CreativeField.ServerResponse.Header or (if a response was returned
26142// at all) in error.(*googleapi.Error).Header. Use
26143// googleapi.IsNotModified to check whether the returned error was
26144// because http.StatusNotModified was returned.
26145func (c *CreativeFieldsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26146	gensupport.SetOptions(c.urlParams_, opts...)
26147	res, err := c.doRequest("json")
26148	if res != nil && res.StatusCode == http.StatusNotModified {
26149		if res.Body != nil {
26150			res.Body.Close()
26151		}
26152		return nil, &googleapi.Error{
26153			Code:   res.StatusCode,
26154			Header: res.Header,
26155		}
26156	}
26157	if err != nil {
26158		return nil, err
26159	}
26160	defer googleapi.CloseBody(res)
26161	if err := googleapi.CheckResponse(res); err != nil {
26162		return nil, err
26163	}
26164	ret := &CreativeField{
26165		ServerResponse: googleapi.ServerResponse{
26166			Header:         res.Header,
26167			HTTPStatusCode: res.StatusCode,
26168		},
26169	}
26170	target := &ret
26171	if err := gensupport.DecodeResponse(target, res); err != nil {
26172		return nil, err
26173	}
26174	return ret, nil
26175	// {
26176	//   "description": "Inserts a new creative field.",
26177	//   "httpMethod": "POST",
26178	//   "id": "dfareporting.creativeFields.insert",
26179	//   "parameterOrder": [
26180	//     "profileId"
26181	//   ],
26182	//   "parameters": {
26183	//     "profileId": {
26184	//       "description": "User profile ID associated with this request.",
26185	//       "format": "int64",
26186	//       "location": "path",
26187	//       "required": true,
26188	//       "type": "string"
26189	//     }
26190	//   },
26191	//   "path": "userprofiles/{profileId}/creativeFields",
26192	//   "request": {
26193	//     "$ref": "CreativeField"
26194	//   },
26195	//   "response": {
26196	//     "$ref": "CreativeField"
26197	//   },
26198	//   "scopes": [
26199	//     "https://www.googleapis.com/auth/dfatrafficking"
26200	//   ]
26201	// }
26202
26203}
26204
26205// method id "dfareporting.creativeFields.list":
26206
26207type CreativeFieldsListCall struct {
26208	s            *Service
26209	profileId    int64
26210	urlParams_   gensupport.URLParams
26211	ifNoneMatch_ string
26212	ctx_         context.Context
26213	header_      http.Header
26214}
26215
26216// List: Retrieves a list of creative fields, possibly filtered. This
26217// method supports paging.
26218func (r *CreativeFieldsService) List(profileId int64) *CreativeFieldsListCall {
26219	c := &CreativeFieldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26220	c.profileId = profileId
26221	return c
26222}
26223
26224// AdvertiserIds sets the optional parameter "advertiserIds": Select
26225// only creative fields that belong to these advertisers.
26226func (c *CreativeFieldsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeFieldsListCall {
26227	var advertiserIds_ []string
26228	for _, v := range advertiserIds {
26229		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
26230	}
26231	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
26232	return c
26233}
26234
26235// Ids sets the optional parameter "ids": Select only creative fields
26236// with these IDs.
26237func (c *CreativeFieldsListCall) Ids(ids ...int64) *CreativeFieldsListCall {
26238	var ids_ []string
26239	for _, v := range ids {
26240		ids_ = append(ids_, fmt.Sprint(v))
26241	}
26242	c.urlParams_.SetMulti("ids", ids_)
26243	return c
26244}
26245
26246// MaxResults sets the optional parameter "maxResults": Maximum number
26247// of results to return.
26248func (c *CreativeFieldsListCall) MaxResults(maxResults int64) *CreativeFieldsListCall {
26249	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
26250	return c
26251}
26252
26253// PageToken sets the optional parameter "pageToken": Value of the
26254// nextPageToken from the previous result page.
26255func (c *CreativeFieldsListCall) PageToken(pageToken string) *CreativeFieldsListCall {
26256	c.urlParams_.Set("pageToken", pageToken)
26257	return c
26258}
26259
26260// SearchString sets the optional parameter "searchString": Allows
26261// searching for creative fields by name or ID. Wildcards (*) are
26262// allowed. For example, "creativefield*2015" will return creative
26263// fields with names like "creativefield June 2015", "creativefield
26264// April 2015", or simply "creativefield 2015". Most of the searches
26265// also add wild-cards implicitly at the start and the end of the search
26266// string. For example, a search string of "creativefield" will match
26267// creative fields with the name "my creativefield", "creativefield
26268// 2015", or simply "creativefield".
26269func (c *CreativeFieldsListCall) SearchString(searchString string) *CreativeFieldsListCall {
26270	c.urlParams_.Set("searchString", searchString)
26271	return c
26272}
26273
26274// SortField sets the optional parameter "sortField": Field by which to
26275// sort the list.
26276//
26277// Possible values:
26278//   "ID" (default)
26279//   "NAME"
26280func (c *CreativeFieldsListCall) SortField(sortField string) *CreativeFieldsListCall {
26281	c.urlParams_.Set("sortField", sortField)
26282	return c
26283}
26284
26285// SortOrder sets the optional parameter "sortOrder": Order of sorted
26286// results.
26287//
26288// Possible values:
26289//   "ASCENDING" (default)
26290//   "DESCENDING"
26291func (c *CreativeFieldsListCall) SortOrder(sortOrder string) *CreativeFieldsListCall {
26292	c.urlParams_.Set("sortOrder", sortOrder)
26293	return c
26294}
26295
26296// Fields allows partial responses to be retrieved. See
26297// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26298// for more information.
26299func (c *CreativeFieldsListCall) Fields(s ...googleapi.Field) *CreativeFieldsListCall {
26300	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26301	return c
26302}
26303
26304// IfNoneMatch sets the optional parameter which makes the operation
26305// fail if the object's ETag matches the given value. This is useful for
26306// getting updates only after the object has changed since the last
26307// request. Use googleapi.IsNotModified to check whether the response
26308// error from Do is the result of In-None-Match.
26309func (c *CreativeFieldsListCall) IfNoneMatch(entityTag string) *CreativeFieldsListCall {
26310	c.ifNoneMatch_ = entityTag
26311	return c
26312}
26313
26314// Context sets the context to be used in this call's Do method. Any
26315// pending HTTP request will be aborted if the provided context is
26316// canceled.
26317func (c *CreativeFieldsListCall) Context(ctx context.Context) *CreativeFieldsListCall {
26318	c.ctx_ = ctx
26319	return c
26320}
26321
26322// Header returns an http.Header that can be modified by the caller to
26323// add HTTP headers to the request.
26324func (c *CreativeFieldsListCall) Header() http.Header {
26325	if c.header_ == nil {
26326		c.header_ = make(http.Header)
26327	}
26328	return c.header_
26329}
26330
26331func (c *CreativeFieldsListCall) doRequest(alt string) (*http.Response, error) {
26332	reqHeaders := make(http.Header)
26333	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
26334	for k, v := range c.header_ {
26335		reqHeaders[k] = v
26336	}
26337	reqHeaders.Set("User-Agent", c.s.userAgent())
26338	if c.ifNoneMatch_ != "" {
26339		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26340	}
26341	var body io.Reader = nil
26342	c.urlParams_.Set("alt", alt)
26343	c.urlParams_.Set("prettyPrint", "false")
26344	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26345	urls += "?" + c.urlParams_.Encode()
26346	req, err := http.NewRequest("GET", urls, body)
26347	if err != nil {
26348		return nil, err
26349	}
26350	req.Header = reqHeaders
26351	googleapi.Expand(req.URL, map[string]string{
26352		"profileId": strconv.FormatInt(c.profileId, 10),
26353	})
26354	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26355}
26356
26357// Do executes the "dfareporting.creativeFields.list" call.
26358// Exactly one of *CreativeFieldsListResponse or error will be non-nil.
26359// Any non-2xx status code is an error. Response headers are in either
26360// *CreativeFieldsListResponse.ServerResponse.Header or (if a response
26361// was returned at all) in error.(*googleapi.Error).Header. Use
26362// googleapi.IsNotModified to check whether the returned error was
26363// because http.StatusNotModified was returned.
26364func (c *CreativeFieldsListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldsListResponse, error) {
26365	gensupport.SetOptions(c.urlParams_, opts...)
26366	res, err := c.doRequest("json")
26367	if res != nil && res.StatusCode == http.StatusNotModified {
26368		if res.Body != nil {
26369			res.Body.Close()
26370		}
26371		return nil, &googleapi.Error{
26372			Code:   res.StatusCode,
26373			Header: res.Header,
26374		}
26375	}
26376	if err != nil {
26377		return nil, err
26378	}
26379	defer googleapi.CloseBody(res)
26380	if err := googleapi.CheckResponse(res); err != nil {
26381		return nil, err
26382	}
26383	ret := &CreativeFieldsListResponse{
26384		ServerResponse: googleapi.ServerResponse{
26385			Header:         res.Header,
26386			HTTPStatusCode: res.StatusCode,
26387		},
26388	}
26389	target := &ret
26390	if err := gensupport.DecodeResponse(target, res); err != nil {
26391		return nil, err
26392	}
26393	return ret, nil
26394	// {
26395	//   "description": "Retrieves a list of creative fields, possibly filtered. This method supports paging.",
26396	//   "httpMethod": "GET",
26397	//   "id": "dfareporting.creativeFields.list",
26398	//   "parameterOrder": [
26399	//     "profileId"
26400	//   ],
26401	//   "parameters": {
26402	//     "advertiserIds": {
26403	//       "description": "Select only creative fields that belong to these advertisers.",
26404	//       "format": "int64",
26405	//       "location": "query",
26406	//       "repeated": true,
26407	//       "type": "string"
26408	//     },
26409	//     "ids": {
26410	//       "description": "Select only creative fields with these IDs.",
26411	//       "format": "int64",
26412	//       "location": "query",
26413	//       "repeated": true,
26414	//       "type": "string"
26415	//     },
26416	//     "maxResults": {
26417	//       "default": "1000",
26418	//       "description": "Maximum number of results to return.",
26419	//       "format": "int32",
26420	//       "location": "query",
26421	//       "maximum": "1000",
26422	//       "minimum": "0",
26423	//       "type": "integer"
26424	//     },
26425	//     "pageToken": {
26426	//       "description": "Value of the nextPageToken from the previous result page.",
26427	//       "location": "query",
26428	//       "type": "string"
26429	//     },
26430	//     "profileId": {
26431	//       "description": "User profile ID associated with this request.",
26432	//       "format": "int64",
26433	//       "location": "path",
26434	//       "required": true,
26435	//       "type": "string"
26436	//     },
26437	//     "searchString": {
26438	//       "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\".",
26439	//       "location": "query",
26440	//       "type": "string"
26441	//     },
26442	//     "sortField": {
26443	//       "default": "ID",
26444	//       "description": "Field by which to sort the list.",
26445	//       "enum": [
26446	//         "ID",
26447	//         "NAME"
26448	//       ],
26449	//       "enumDescriptions": [
26450	//         "",
26451	//         ""
26452	//       ],
26453	//       "location": "query",
26454	//       "type": "string"
26455	//     },
26456	//     "sortOrder": {
26457	//       "default": "ASCENDING",
26458	//       "description": "Order of sorted results.",
26459	//       "enum": [
26460	//         "ASCENDING",
26461	//         "DESCENDING"
26462	//       ],
26463	//       "enumDescriptions": [
26464	//         "",
26465	//         ""
26466	//       ],
26467	//       "location": "query",
26468	//       "type": "string"
26469	//     }
26470	//   },
26471	//   "path": "userprofiles/{profileId}/creativeFields",
26472	//   "response": {
26473	//     "$ref": "CreativeFieldsListResponse"
26474	//   },
26475	//   "scopes": [
26476	//     "https://www.googleapis.com/auth/dfatrafficking"
26477	//   ]
26478	// }
26479
26480}
26481
26482// Pages invokes f for each page of results.
26483// A non-nil error returned from f will halt the iteration.
26484// The provided context supersedes any context provided to the Context method.
26485func (c *CreativeFieldsListCall) Pages(ctx context.Context, f func(*CreativeFieldsListResponse) error) error {
26486	c.ctx_ = ctx
26487	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26488	for {
26489		x, err := c.Do()
26490		if err != nil {
26491			return err
26492		}
26493		if err := f(x); err != nil {
26494			return err
26495		}
26496		if x.NextPageToken == "" {
26497			return nil
26498		}
26499		c.PageToken(x.NextPageToken)
26500	}
26501}
26502
26503// method id "dfareporting.creativeFields.patch":
26504
26505type CreativeFieldsPatchCall struct {
26506	s             *Service
26507	profileId     int64
26508	creativefield *CreativeField
26509	urlParams_    gensupport.URLParams
26510	ctx_          context.Context
26511	header_       http.Header
26512}
26513
26514// Patch: Updates an existing creative field. This method supports patch
26515// semantics.
26516func (r *CreativeFieldsService) Patch(profileId int64, id int64, creativefield *CreativeField) *CreativeFieldsPatchCall {
26517	c := &CreativeFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26518	c.profileId = profileId
26519	c.urlParams_.Set("id", fmt.Sprint(id))
26520	c.creativefield = creativefield
26521	return c
26522}
26523
26524// Fields allows partial responses to be retrieved. See
26525// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26526// for more information.
26527func (c *CreativeFieldsPatchCall) Fields(s ...googleapi.Field) *CreativeFieldsPatchCall {
26528	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26529	return c
26530}
26531
26532// Context sets the context to be used in this call's Do method. Any
26533// pending HTTP request will be aborted if the provided context is
26534// canceled.
26535func (c *CreativeFieldsPatchCall) Context(ctx context.Context) *CreativeFieldsPatchCall {
26536	c.ctx_ = ctx
26537	return c
26538}
26539
26540// Header returns an http.Header that can be modified by the caller to
26541// add HTTP headers to the request.
26542func (c *CreativeFieldsPatchCall) Header() http.Header {
26543	if c.header_ == nil {
26544		c.header_ = make(http.Header)
26545	}
26546	return c.header_
26547}
26548
26549func (c *CreativeFieldsPatchCall) doRequest(alt string) (*http.Response, error) {
26550	reqHeaders := make(http.Header)
26551	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
26552	for k, v := range c.header_ {
26553		reqHeaders[k] = v
26554	}
26555	reqHeaders.Set("User-Agent", c.s.userAgent())
26556	var body io.Reader = nil
26557	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26558	if err != nil {
26559		return nil, err
26560	}
26561	reqHeaders.Set("Content-Type", "application/json")
26562	c.urlParams_.Set("alt", alt)
26563	c.urlParams_.Set("prettyPrint", "false")
26564	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26565	urls += "?" + c.urlParams_.Encode()
26566	req, err := http.NewRequest("PATCH", urls, body)
26567	if err != nil {
26568		return nil, err
26569	}
26570	req.Header = reqHeaders
26571	googleapi.Expand(req.URL, map[string]string{
26572		"profileId": strconv.FormatInt(c.profileId, 10),
26573	})
26574	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26575}
26576
26577// Do executes the "dfareporting.creativeFields.patch" call.
26578// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26579// status code is an error. Response headers are in either
26580// *CreativeField.ServerResponse.Header or (if a response was returned
26581// at all) in error.(*googleapi.Error).Header. Use
26582// googleapi.IsNotModified to check whether the returned error was
26583// because http.StatusNotModified was returned.
26584func (c *CreativeFieldsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26585	gensupport.SetOptions(c.urlParams_, opts...)
26586	res, err := c.doRequest("json")
26587	if res != nil && res.StatusCode == http.StatusNotModified {
26588		if res.Body != nil {
26589			res.Body.Close()
26590		}
26591		return nil, &googleapi.Error{
26592			Code:   res.StatusCode,
26593			Header: res.Header,
26594		}
26595	}
26596	if err != nil {
26597		return nil, err
26598	}
26599	defer googleapi.CloseBody(res)
26600	if err := googleapi.CheckResponse(res); err != nil {
26601		return nil, err
26602	}
26603	ret := &CreativeField{
26604		ServerResponse: googleapi.ServerResponse{
26605			Header:         res.Header,
26606			HTTPStatusCode: res.StatusCode,
26607		},
26608	}
26609	target := &ret
26610	if err := gensupport.DecodeResponse(target, res); err != nil {
26611		return nil, err
26612	}
26613	return ret, nil
26614	// {
26615	//   "description": "Updates an existing creative field. This method supports patch semantics.",
26616	//   "httpMethod": "PATCH",
26617	//   "id": "dfareporting.creativeFields.patch",
26618	//   "parameterOrder": [
26619	//     "profileId",
26620	//     "id"
26621	//   ],
26622	//   "parameters": {
26623	//     "id": {
26624	//       "description": "Creative Field ID",
26625	//       "format": "int64",
26626	//       "location": "query",
26627	//       "required": true,
26628	//       "type": "string"
26629	//     },
26630	//     "profileId": {
26631	//       "description": "User profile ID associated with this request.",
26632	//       "format": "int64",
26633	//       "location": "path",
26634	//       "required": true,
26635	//       "type": "string"
26636	//     }
26637	//   },
26638	//   "path": "userprofiles/{profileId}/creativeFields",
26639	//   "request": {
26640	//     "$ref": "CreativeField"
26641	//   },
26642	//   "response": {
26643	//     "$ref": "CreativeField"
26644	//   },
26645	//   "scopes": [
26646	//     "https://www.googleapis.com/auth/dfatrafficking"
26647	//   ]
26648	// }
26649
26650}
26651
26652// method id "dfareporting.creativeFields.update":
26653
26654type CreativeFieldsUpdateCall struct {
26655	s             *Service
26656	profileId     int64
26657	creativefield *CreativeField
26658	urlParams_    gensupport.URLParams
26659	ctx_          context.Context
26660	header_       http.Header
26661}
26662
26663// Update: Updates an existing creative field.
26664func (r *CreativeFieldsService) Update(profileId int64, creativefield *CreativeField) *CreativeFieldsUpdateCall {
26665	c := &CreativeFieldsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26666	c.profileId = profileId
26667	c.creativefield = creativefield
26668	return c
26669}
26670
26671// Fields allows partial responses to be retrieved. See
26672// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26673// for more information.
26674func (c *CreativeFieldsUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldsUpdateCall {
26675	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26676	return c
26677}
26678
26679// Context sets the context to be used in this call's Do method. Any
26680// pending HTTP request will be aborted if the provided context is
26681// canceled.
26682func (c *CreativeFieldsUpdateCall) Context(ctx context.Context) *CreativeFieldsUpdateCall {
26683	c.ctx_ = ctx
26684	return c
26685}
26686
26687// Header returns an http.Header that can be modified by the caller to
26688// add HTTP headers to the request.
26689func (c *CreativeFieldsUpdateCall) Header() http.Header {
26690	if c.header_ == nil {
26691		c.header_ = make(http.Header)
26692	}
26693	return c.header_
26694}
26695
26696func (c *CreativeFieldsUpdateCall) doRequest(alt string) (*http.Response, error) {
26697	reqHeaders := make(http.Header)
26698	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
26699	for k, v := range c.header_ {
26700		reqHeaders[k] = v
26701	}
26702	reqHeaders.Set("User-Agent", c.s.userAgent())
26703	var body io.Reader = nil
26704	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26705	if err != nil {
26706		return nil, err
26707	}
26708	reqHeaders.Set("Content-Type", "application/json")
26709	c.urlParams_.Set("alt", alt)
26710	c.urlParams_.Set("prettyPrint", "false")
26711	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26712	urls += "?" + c.urlParams_.Encode()
26713	req, err := http.NewRequest("PUT", urls, body)
26714	if err != nil {
26715		return nil, err
26716	}
26717	req.Header = reqHeaders
26718	googleapi.Expand(req.URL, map[string]string{
26719		"profileId": strconv.FormatInt(c.profileId, 10),
26720	})
26721	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26722}
26723
26724// Do executes the "dfareporting.creativeFields.update" call.
26725// Exactly one of *CreativeField or error will be non-nil. Any non-2xx
26726// status code is an error. Response headers are in either
26727// *CreativeField.ServerResponse.Header or (if a response was returned
26728// at all) in error.(*googleapi.Error).Header. Use
26729// googleapi.IsNotModified to check whether the returned error was
26730// because http.StatusNotModified was returned.
26731func (c *CreativeFieldsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26732	gensupport.SetOptions(c.urlParams_, opts...)
26733	res, err := c.doRequest("json")
26734	if res != nil && res.StatusCode == http.StatusNotModified {
26735		if res.Body != nil {
26736			res.Body.Close()
26737		}
26738		return nil, &googleapi.Error{
26739			Code:   res.StatusCode,
26740			Header: res.Header,
26741		}
26742	}
26743	if err != nil {
26744		return nil, err
26745	}
26746	defer googleapi.CloseBody(res)
26747	if err := googleapi.CheckResponse(res); err != nil {
26748		return nil, err
26749	}
26750	ret := &CreativeField{
26751		ServerResponse: googleapi.ServerResponse{
26752			Header:         res.Header,
26753			HTTPStatusCode: res.StatusCode,
26754		},
26755	}
26756	target := &ret
26757	if err := gensupport.DecodeResponse(target, res); err != nil {
26758		return nil, err
26759	}
26760	return ret, nil
26761	// {
26762	//   "description": "Updates an existing creative field.",
26763	//   "httpMethod": "PUT",
26764	//   "id": "dfareporting.creativeFields.update",
26765	//   "parameterOrder": [
26766	//     "profileId"
26767	//   ],
26768	//   "parameters": {
26769	//     "profileId": {
26770	//       "description": "User profile ID associated with this request.",
26771	//       "format": "int64",
26772	//       "location": "path",
26773	//       "required": true,
26774	//       "type": "string"
26775	//     }
26776	//   },
26777	//   "path": "userprofiles/{profileId}/creativeFields",
26778	//   "request": {
26779	//     "$ref": "CreativeField"
26780	//   },
26781	//   "response": {
26782	//     "$ref": "CreativeField"
26783	//   },
26784	//   "scopes": [
26785	//     "https://www.googleapis.com/auth/dfatrafficking"
26786	//   ]
26787	// }
26788
26789}
26790
26791// method id "dfareporting.creativeGroups.get":
26792
26793type CreativeGroupsGetCall struct {
26794	s            *Service
26795	profileId    int64
26796	id           int64
26797	urlParams_   gensupport.URLParams
26798	ifNoneMatch_ string
26799	ctx_         context.Context
26800	header_      http.Header
26801}
26802
26803// Get: Gets one creative group by ID.
26804func (r *CreativeGroupsService) Get(profileId int64, id int64) *CreativeGroupsGetCall {
26805	c := &CreativeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26806	c.profileId = profileId
26807	c.id = id
26808	return c
26809}
26810
26811// Fields allows partial responses to be retrieved. See
26812// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26813// for more information.
26814func (c *CreativeGroupsGetCall) Fields(s ...googleapi.Field) *CreativeGroupsGetCall {
26815	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26816	return c
26817}
26818
26819// IfNoneMatch sets the optional parameter which makes the operation
26820// fail if the object's ETag matches the given value. This is useful for
26821// getting updates only after the object has changed since the last
26822// request. Use googleapi.IsNotModified to check whether the response
26823// error from Do is the result of In-None-Match.
26824func (c *CreativeGroupsGetCall) IfNoneMatch(entityTag string) *CreativeGroupsGetCall {
26825	c.ifNoneMatch_ = entityTag
26826	return c
26827}
26828
26829// Context sets the context to be used in this call's Do method. Any
26830// pending HTTP request will be aborted if the provided context is
26831// canceled.
26832func (c *CreativeGroupsGetCall) Context(ctx context.Context) *CreativeGroupsGetCall {
26833	c.ctx_ = ctx
26834	return c
26835}
26836
26837// Header returns an http.Header that can be modified by the caller to
26838// add HTTP headers to the request.
26839func (c *CreativeGroupsGetCall) Header() http.Header {
26840	if c.header_ == nil {
26841		c.header_ = make(http.Header)
26842	}
26843	return c.header_
26844}
26845
26846func (c *CreativeGroupsGetCall) doRequest(alt string) (*http.Response, error) {
26847	reqHeaders := make(http.Header)
26848	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
26849	for k, v := range c.header_ {
26850		reqHeaders[k] = v
26851	}
26852	reqHeaders.Set("User-Agent", c.s.userAgent())
26853	if c.ifNoneMatch_ != "" {
26854		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26855	}
26856	var body io.Reader = nil
26857	c.urlParams_.Set("alt", alt)
26858	c.urlParams_.Set("prettyPrint", "false")
26859	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups/{id}")
26860	urls += "?" + c.urlParams_.Encode()
26861	req, err := http.NewRequest("GET", urls, body)
26862	if err != nil {
26863		return nil, err
26864	}
26865	req.Header = reqHeaders
26866	googleapi.Expand(req.URL, map[string]string{
26867		"profileId": strconv.FormatInt(c.profileId, 10),
26868		"id":        strconv.FormatInt(c.id, 10),
26869	})
26870	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26871}
26872
26873// Do executes the "dfareporting.creativeGroups.get" call.
26874// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
26875// status code is an error. Response headers are in either
26876// *CreativeGroup.ServerResponse.Header or (if a response was returned
26877// at all) in error.(*googleapi.Error).Header. Use
26878// googleapi.IsNotModified to check whether the returned error was
26879// because http.StatusNotModified was returned.
26880func (c *CreativeGroupsGetCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
26881	gensupport.SetOptions(c.urlParams_, opts...)
26882	res, err := c.doRequest("json")
26883	if res != nil && res.StatusCode == http.StatusNotModified {
26884		if res.Body != nil {
26885			res.Body.Close()
26886		}
26887		return nil, &googleapi.Error{
26888			Code:   res.StatusCode,
26889			Header: res.Header,
26890		}
26891	}
26892	if err != nil {
26893		return nil, err
26894	}
26895	defer googleapi.CloseBody(res)
26896	if err := googleapi.CheckResponse(res); err != nil {
26897		return nil, err
26898	}
26899	ret := &CreativeGroup{
26900		ServerResponse: googleapi.ServerResponse{
26901			Header:         res.Header,
26902			HTTPStatusCode: res.StatusCode,
26903		},
26904	}
26905	target := &ret
26906	if err := gensupport.DecodeResponse(target, res); err != nil {
26907		return nil, err
26908	}
26909	return ret, nil
26910	// {
26911	//   "description": "Gets one creative group by ID.",
26912	//   "httpMethod": "GET",
26913	//   "id": "dfareporting.creativeGroups.get",
26914	//   "parameterOrder": [
26915	//     "profileId",
26916	//     "id"
26917	//   ],
26918	//   "parameters": {
26919	//     "id": {
26920	//       "description": "Creative group ID.",
26921	//       "format": "int64",
26922	//       "location": "path",
26923	//       "required": true,
26924	//       "type": "string"
26925	//     },
26926	//     "profileId": {
26927	//       "description": "User profile ID associated with this request.",
26928	//       "format": "int64",
26929	//       "location": "path",
26930	//       "required": true,
26931	//       "type": "string"
26932	//     }
26933	//   },
26934	//   "path": "userprofiles/{profileId}/creativeGroups/{id}",
26935	//   "response": {
26936	//     "$ref": "CreativeGroup"
26937	//   },
26938	//   "scopes": [
26939	//     "https://www.googleapis.com/auth/dfatrafficking"
26940	//   ]
26941	// }
26942
26943}
26944
26945// method id "dfareporting.creativeGroups.insert":
26946
26947type CreativeGroupsInsertCall struct {
26948	s             *Service
26949	profileId     int64
26950	creativegroup *CreativeGroup
26951	urlParams_    gensupport.URLParams
26952	ctx_          context.Context
26953	header_       http.Header
26954}
26955
26956// Insert: Inserts a new creative group.
26957func (r *CreativeGroupsService) Insert(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsInsertCall {
26958	c := &CreativeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26959	c.profileId = profileId
26960	c.creativegroup = creativegroup
26961	return c
26962}
26963
26964// Fields allows partial responses to be retrieved. See
26965// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26966// for more information.
26967func (c *CreativeGroupsInsertCall) Fields(s ...googleapi.Field) *CreativeGroupsInsertCall {
26968	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26969	return c
26970}
26971
26972// Context sets the context to be used in this call's Do method. Any
26973// pending HTTP request will be aborted if the provided context is
26974// canceled.
26975func (c *CreativeGroupsInsertCall) Context(ctx context.Context) *CreativeGroupsInsertCall {
26976	c.ctx_ = ctx
26977	return c
26978}
26979
26980// Header returns an http.Header that can be modified by the caller to
26981// add HTTP headers to the request.
26982func (c *CreativeGroupsInsertCall) Header() http.Header {
26983	if c.header_ == nil {
26984		c.header_ = make(http.Header)
26985	}
26986	return c.header_
26987}
26988
26989func (c *CreativeGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
26990	reqHeaders := make(http.Header)
26991	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
26992	for k, v := range c.header_ {
26993		reqHeaders[k] = v
26994	}
26995	reqHeaders.Set("User-Agent", c.s.userAgent())
26996	var body io.Reader = nil
26997	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
26998	if err != nil {
26999		return nil, err
27000	}
27001	reqHeaders.Set("Content-Type", "application/json")
27002	c.urlParams_.Set("alt", alt)
27003	c.urlParams_.Set("prettyPrint", "false")
27004	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27005	urls += "?" + c.urlParams_.Encode()
27006	req, err := http.NewRequest("POST", urls, body)
27007	if err != nil {
27008		return nil, err
27009	}
27010	req.Header = reqHeaders
27011	googleapi.Expand(req.URL, map[string]string{
27012		"profileId": strconv.FormatInt(c.profileId, 10),
27013	})
27014	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27015}
27016
27017// Do executes the "dfareporting.creativeGroups.insert" call.
27018// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27019// status code is an error. Response headers are in either
27020// *CreativeGroup.ServerResponse.Header or (if a response was returned
27021// at all) in error.(*googleapi.Error).Header. Use
27022// googleapi.IsNotModified to check whether the returned error was
27023// because http.StatusNotModified was returned.
27024func (c *CreativeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27025	gensupport.SetOptions(c.urlParams_, opts...)
27026	res, err := c.doRequest("json")
27027	if res != nil && res.StatusCode == http.StatusNotModified {
27028		if res.Body != nil {
27029			res.Body.Close()
27030		}
27031		return nil, &googleapi.Error{
27032			Code:   res.StatusCode,
27033			Header: res.Header,
27034		}
27035	}
27036	if err != nil {
27037		return nil, err
27038	}
27039	defer googleapi.CloseBody(res)
27040	if err := googleapi.CheckResponse(res); err != nil {
27041		return nil, err
27042	}
27043	ret := &CreativeGroup{
27044		ServerResponse: googleapi.ServerResponse{
27045			Header:         res.Header,
27046			HTTPStatusCode: res.StatusCode,
27047		},
27048	}
27049	target := &ret
27050	if err := gensupport.DecodeResponse(target, res); err != nil {
27051		return nil, err
27052	}
27053	return ret, nil
27054	// {
27055	//   "description": "Inserts a new creative group.",
27056	//   "httpMethod": "POST",
27057	//   "id": "dfareporting.creativeGroups.insert",
27058	//   "parameterOrder": [
27059	//     "profileId"
27060	//   ],
27061	//   "parameters": {
27062	//     "profileId": {
27063	//       "description": "User profile ID associated with this request.",
27064	//       "format": "int64",
27065	//       "location": "path",
27066	//       "required": true,
27067	//       "type": "string"
27068	//     }
27069	//   },
27070	//   "path": "userprofiles/{profileId}/creativeGroups",
27071	//   "request": {
27072	//     "$ref": "CreativeGroup"
27073	//   },
27074	//   "response": {
27075	//     "$ref": "CreativeGroup"
27076	//   },
27077	//   "scopes": [
27078	//     "https://www.googleapis.com/auth/dfatrafficking"
27079	//   ]
27080	// }
27081
27082}
27083
27084// method id "dfareporting.creativeGroups.list":
27085
27086type CreativeGroupsListCall struct {
27087	s            *Service
27088	profileId    int64
27089	urlParams_   gensupport.URLParams
27090	ifNoneMatch_ string
27091	ctx_         context.Context
27092	header_      http.Header
27093}
27094
27095// List: Retrieves a list of creative groups, possibly filtered. This
27096// method supports paging.
27097func (r *CreativeGroupsService) List(profileId int64) *CreativeGroupsListCall {
27098	c := &CreativeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27099	c.profileId = profileId
27100	return c
27101}
27102
27103// AdvertiserIds sets the optional parameter "advertiserIds": Select
27104// only creative groups that belong to these advertisers.
27105func (c *CreativeGroupsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeGroupsListCall {
27106	var advertiserIds_ []string
27107	for _, v := range advertiserIds {
27108		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
27109	}
27110	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
27111	return c
27112}
27113
27114// GroupNumber sets the optional parameter "groupNumber": Select only
27115// creative groups that belong to this subgroup.
27116func (c *CreativeGroupsListCall) GroupNumber(groupNumber int64) *CreativeGroupsListCall {
27117	c.urlParams_.Set("groupNumber", fmt.Sprint(groupNumber))
27118	return c
27119}
27120
27121// Ids sets the optional parameter "ids": Select only creative groups
27122// with these IDs.
27123func (c *CreativeGroupsListCall) Ids(ids ...int64) *CreativeGroupsListCall {
27124	var ids_ []string
27125	for _, v := range ids {
27126		ids_ = append(ids_, fmt.Sprint(v))
27127	}
27128	c.urlParams_.SetMulti("ids", ids_)
27129	return c
27130}
27131
27132// MaxResults sets the optional parameter "maxResults": Maximum number
27133// of results to return.
27134func (c *CreativeGroupsListCall) MaxResults(maxResults int64) *CreativeGroupsListCall {
27135	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27136	return c
27137}
27138
27139// PageToken sets the optional parameter "pageToken": Value of the
27140// nextPageToken from the previous result page.
27141func (c *CreativeGroupsListCall) PageToken(pageToken string) *CreativeGroupsListCall {
27142	c.urlParams_.Set("pageToken", pageToken)
27143	return c
27144}
27145
27146// SearchString sets the optional parameter "searchString": Allows
27147// searching for creative groups by name or ID. Wildcards (*) are
27148// allowed. For example, "creativegroup*2015" will return creative
27149// groups with names like "creativegroup June 2015", "creativegroup
27150// April 2015", or simply "creativegroup 2015". Most of the searches
27151// also add wild-cards implicitly at the start and the end of the search
27152// string. For example, a search string of "creativegroup" will match
27153// creative groups with the name "my creativegroup", "creativegroup
27154// 2015", or simply "creativegroup".
27155func (c *CreativeGroupsListCall) SearchString(searchString string) *CreativeGroupsListCall {
27156	c.urlParams_.Set("searchString", searchString)
27157	return c
27158}
27159
27160// SortField sets the optional parameter "sortField": Field by which to
27161// sort the list.
27162//
27163// Possible values:
27164//   "ID" (default)
27165//   "NAME"
27166func (c *CreativeGroupsListCall) SortField(sortField string) *CreativeGroupsListCall {
27167	c.urlParams_.Set("sortField", sortField)
27168	return c
27169}
27170
27171// SortOrder sets the optional parameter "sortOrder": Order of sorted
27172// results.
27173//
27174// Possible values:
27175//   "ASCENDING" (default)
27176//   "DESCENDING"
27177func (c *CreativeGroupsListCall) SortOrder(sortOrder string) *CreativeGroupsListCall {
27178	c.urlParams_.Set("sortOrder", sortOrder)
27179	return c
27180}
27181
27182// Fields allows partial responses to be retrieved. See
27183// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27184// for more information.
27185func (c *CreativeGroupsListCall) Fields(s ...googleapi.Field) *CreativeGroupsListCall {
27186	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27187	return c
27188}
27189
27190// IfNoneMatch sets the optional parameter which makes the operation
27191// fail if the object's ETag matches the given value. This is useful for
27192// getting updates only after the object has changed since the last
27193// request. Use googleapi.IsNotModified to check whether the response
27194// error from Do is the result of In-None-Match.
27195func (c *CreativeGroupsListCall) IfNoneMatch(entityTag string) *CreativeGroupsListCall {
27196	c.ifNoneMatch_ = entityTag
27197	return c
27198}
27199
27200// Context sets the context to be used in this call's Do method. Any
27201// pending HTTP request will be aborted if the provided context is
27202// canceled.
27203func (c *CreativeGroupsListCall) Context(ctx context.Context) *CreativeGroupsListCall {
27204	c.ctx_ = ctx
27205	return c
27206}
27207
27208// Header returns an http.Header that can be modified by the caller to
27209// add HTTP headers to the request.
27210func (c *CreativeGroupsListCall) Header() http.Header {
27211	if c.header_ == nil {
27212		c.header_ = make(http.Header)
27213	}
27214	return c.header_
27215}
27216
27217func (c *CreativeGroupsListCall) doRequest(alt string) (*http.Response, error) {
27218	reqHeaders := make(http.Header)
27219	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
27220	for k, v := range c.header_ {
27221		reqHeaders[k] = v
27222	}
27223	reqHeaders.Set("User-Agent", c.s.userAgent())
27224	if c.ifNoneMatch_ != "" {
27225		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27226	}
27227	var body io.Reader = nil
27228	c.urlParams_.Set("alt", alt)
27229	c.urlParams_.Set("prettyPrint", "false")
27230	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27231	urls += "?" + c.urlParams_.Encode()
27232	req, err := http.NewRequest("GET", urls, body)
27233	if err != nil {
27234		return nil, err
27235	}
27236	req.Header = reqHeaders
27237	googleapi.Expand(req.URL, map[string]string{
27238		"profileId": strconv.FormatInt(c.profileId, 10),
27239	})
27240	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27241}
27242
27243// Do executes the "dfareporting.creativeGroups.list" call.
27244// Exactly one of *CreativeGroupsListResponse or error will be non-nil.
27245// Any non-2xx status code is an error. Response headers are in either
27246// *CreativeGroupsListResponse.ServerResponse.Header or (if a response
27247// was returned at all) in error.(*googleapi.Error).Header. Use
27248// googleapi.IsNotModified to check whether the returned error was
27249// because http.StatusNotModified was returned.
27250func (c *CreativeGroupsListCall) Do(opts ...googleapi.CallOption) (*CreativeGroupsListResponse, error) {
27251	gensupport.SetOptions(c.urlParams_, opts...)
27252	res, err := c.doRequest("json")
27253	if res != nil && res.StatusCode == http.StatusNotModified {
27254		if res.Body != nil {
27255			res.Body.Close()
27256		}
27257		return nil, &googleapi.Error{
27258			Code:   res.StatusCode,
27259			Header: res.Header,
27260		}
27261	}
27262	if err != nil {
27263		return nil, err
27264	}
27265	defer googleapi.CloseBody(res)
27266	if err := googleapi.CheckResponse(res); err != nil {
27267		return nil, err
27268	}
27269	ret := &CreativeGroupsListResponse{
27270		ServerResponse: googleapi.ServerResponse{
27271			Header:         res.Header,
27272			HTTPStatusCode: res.StatusCode,
27273		},
27274	}
27275	target := &ret
27276	if err := gensupport.DecodeResponse(target, res); err != nil {
27277		return nil, err
27278	}
27279	return ret, nil
27280	// {
27281	//   "description": "Retrieves a list of creative groups, possibly filtered. This method supports paging.",
27282	//   "httpMethod": "GET",
27283	//   "id": "dfareporting.creativeGroups.list",
27284	//   "parameterOrder": [
27285	//     "profileId"
27286	//   ],
27287	//   "parameters": {
27288	//     "advertiserIds": {
27289	//       "description": "Select only creative groups that belong to these advertisers.",
27290	//       "format": "int64",
27291	//       "location": "query",
27292	//       "repeated": true,
27293	//       "type": "string"
27294	//     },
27295	//     "groupNumber": {
27296	//       "description": "Select only creative groups that belong to this subgroup.",
27297	//       "format": "int32",
27298	//       "location": "query",
27299	//       "maximum": "2",
27300	//       "minimum": "1",
27301	//       "type": "integer"
27302	//     },
27303	//     "ids": {
27304	//       "description": "Select only creative groups with these IDs.",
27305	//       "format": "int64",
27306	//       "location": "query",
27307	//       "repeated": true,
27308	//       "type": "string"
27309	//     },
27310	//     "maxResults": {
27311	//       "default": "1000",
27312	//       "description": "Maximum number of results to return.",
27313	//       "format": "int32",
27314	//       "location": "query",
27315	//       "maximum": "1000",
27316	//       "minimum": "0",
27317	//       "type": "integer"
27318	//     },
27319	//     "pageToken": {
27320	//       "description": "Value of the nextPageToken from the previous result page.",
27321	//       "location": "query",
27322	//       "type": "string"
27323	//     },
27324	//     "profileId": {
27325	//       "description": "User profile ID associated with this request.",
27326	//       "format": "int64",
27327	//       "location": "path",
27328	//       "required": true,
27329	//       "type": "string"
27330	//     },
27331	//     "searchString": {
27332	//       "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\".",
27333	//       "location": "query",
27334	//       "type": "string"
27335	//     },
27336	//     "sortField": {
27337	//       "default": "ID",
27338	//       "description": "Field by which to sort the list.",
27339	//       "enum": [
27340	//         "ID",
27341	//         "NAME"
27342	//       ],
27343	//       "enumDescriptions": [
27344	//         "",
27345	//         ""
27346	//       ],
27347	//       "location": "query",
27348	//       "type": "string"
27349	//     },
27350	//     "sortOrder": {
27351	//       "default": "ASCENDING",
27352	//       "description": "Order of sorted results.",
27353	//       "enum": [
27354	//         "ASCENDING",
27355	//         "DESCENDING"
27356	//       ],
27357	//       "enumDescriptions": [
27358	//         "",
27359	//         ""
27360	//       ],
27361	//       "location": "query",
27362	//       "type": "string"
27363	//     }
27364	//   },
27365	//   "path": "userprofiles/{profileId}/creativeGroups",
27366	//   "response": {
27367	//     "$ref": "CreativeGroupsListResponse"
27368	//   },
27369	//   "scopes": [
27370	//     "https://www.googleapis.com/auth/dfatrafficking"
27371	//   ]
27372	// }
27373
27374}
27375
27376// Pages invokes f for each page of results.
27377// A non-nil error returned from f will halt the iteration.
27378// The provided context supersedes any context provided to the Context method.
27379func (c *CreativeGroupsListCall) Pages(ctx context.Context, f func(*CreativeGroupsListResponse) error) error {
27380	c.ctx_ = ctx
27381	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27382	for {
27383		x, err := c.Do()
27384		if err != nil {
27385			return err
27386		}
27387		if err := f(x); err != nil {
27388			return err
27389		}
27390		if x.NextPageToken == "" {
27391			return nil
27392		}
27393		c.PageToken(x.NextPageToken)
27394	}
27395}
27396
27397// method id "dfareporting.creativeGroups.patch":
27398
27399type CreativeGroupsPatchCall struct {
27400	s             *Service
27401	profileId     int64
27402	creativegroup *CreativeGroup
27403	urlParams_    gensupport.URLParams
27404	ctx_          context.Context
27405	header_       http.Header
27406}
27407
27408// Patch: Updates an existing creative group. This method supports patch
27409// semantics.
27410func (r *CreativeGroupsService) Patch(profileId int64, id int64, creativegroup *CreativeGroup) *CreativeGroupsPatchCall {
27411	c := &CreativeGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27412	c.profileId = profileId
27413	c.urlParams_.Set("id", fmt.Sprint(id))
27414	c.creativegroup = creativegroup
27415	return c
27416}
27417
27418// Fields allows partial responses to be retrieved. See
27419// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27420// for more information.
27421func (c *CreativeGroupsPatchCall) Fields(s ...googleapi.Field) *CreativeGroupsPatchCall {
27422	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27423	return c
27424}
27425
27426// Context sets the context to be used in this call's Do method. Any
27427// pending HTTP request will be aborted if the provided context is
27428// canceled.
27429func (c *CreativeGroupsPatchCall) Context(ctx context.Context) *CreativeGroupsPatchCall {
27430	c.ctx_ = ctx
27431	return c
27432}
27433
27434// Header returns an http.Header that can be modified by the caller to
27435// add HTTP headers to the request.
27436func (c *CreativeGroupsPatchCall) Header() http.Header {
27437	if c.header_ == nil {
27438		c.header_ = make(http.Header)
27439	}
27440	return c.header_
27441}
27442
27443func (c *CreativeGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
27444	reqHeaders := make(http.Header)
27445	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
27446	for k, v := range c.header_ {
27447		reqHeaders[k] = v
27448	}
27449	reqHeaders.Set("User-Agent", c.s.userAgent())
27450	var body io.Reader = nil
27451	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27452	if err != nil {
27453		return nil, err
27454	}
27455	reqHeaders.Set("Content-Type", "application/json")
27456	c.urlParams_.Set("alt", alt)
27457	c.urlParams_.Set("prettyPrint", "false")
27458	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27459	urls += "?" + c.urlParams_.Encode()
27460	req, err := http.NewRequest("PATCH", urls, body)
27461	if err != nil {
27462		return nil, err
27463	}
27464	req.Header = reqHeaders
27465	googleapi.Expand(req.URL, map[string]string{
27466		"profileId": strconv.FormatInt(c.profileId, 10),
27467	})
27468	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27469}
27470
27471// Do executes the "dfareporting.creativeGroups.patch" call.
27472// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27473// status code is an error. Response headers are in either
27474// *CreativeGroup.ServerResponse.Header or (if a response was returned
27475// at all) in error.(*googleapi.Error).Header. Use
27476// googleapi.IsNotModified to check whether the returned error was
27477// because http.StatusNotModified was returned.
27478func (c *CreativeGroupsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27479	gensupport.SetOptions(c.urlParams_, opts...)
27480	res, err := c.doRequest("json")
27481	if res != nil && res.StatusCode == http.StatusNotModified {
27482		if res.Body != nil {
27483			res.Body.Close()
27484		}
27485		return nil, &googleapi.Error{
27486			Code:   res.StatusCode,
27487			Header: res.Header,
27488		}
27489	}
27490	if err != nil {
27491		return nil, err
27492	}
27493	defer googleapi.CloseBody(res)
27494	if err := googleapi.CheckResponse(res); err != nil {
27495		return nil, err
27496	}
27497	ret := &CreativeGroup{
27498		ServerResponse: googleapi.ServerResponse{
27499			Header:         res.Header,
27500			HTTPStatusCode: res.StatusCode,
27501		},
27502	}
27503	target := &ret
27504	if err := gensupport.DecodeResponse(target, res); err != nil {
27505		return nil, err
27506	}
27507	return ret, nil
27508	// {
27509	//   "description": "Updates an existing creative group. This method supports patch semantics.",
27510	//   "httpMethod": "PATCH",
27511	//   "id": "dfareporting.creativeGroups.patch",
27512	//   "parameterOrder": [
27513	//     "profileId",
27514	//     "id"
27515	//   ],
27516	//   "parameters": {
27517	//     "id": {
27518	//       "description": "Creative group ID.",
27519	//       "format": "int64",
27520	//       "location": "query",
27521	//       "required": true,
27522	//       "type": "string"
27523	//     },
27524	//     "profileId": {
27525	//       "description": "User profile ID associated with this request.",
27526	//       "format": "int64",
27527	//       "location": "path",
27528	//       "required": true,
27529	//       "type": "string"
27530	//     }
27531	//   },
27532	//   "path": "userprofiles/{profileId}/creativeGroups",
27533	//   "request": {
27534	//     "$ref": "CreativeGroup"
27535	//   },
27536	//   "response": {
27537	//     "$ref": "CreativeGroup"
27538	//   },
27539	//   "scopes": [
27540	//     "https://www.googleapis.com/auth/dfatrafficking"
27541	//   ]
27542	// }
27543
27544}
27545
27546// method id "dfareporting.creativeGroups.update":
27547
27548type CreativeGroupsUpdateCall struct {
27549	s             *Service
27550	profileId     int64
27551	creativegroup *CreativeGroup
27552	urlParams_    gensupport.URLParams
27553	ctx_          context.Context
27554	header_       http.Header
27555}
27556
27557// Update: Updates an existing creative group.
27558func (r *CreativeGroupsService) Update(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsUpdateCall {
27559	c := &CreativeGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27560	c.profileId = profileId
27561	c.creativegroup = creativegroup
27562	return c
27563}
27564
27565// Fields allows partial responses to be retrieved. See
27566// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27567// for more information.
27568func (c *CreativeGroupsUpdateCall) Fields(s ...googleapi.Field) *CreativeGroupsUpdateCall {
27569	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27570	return c
27571}
27572
27573// Context sets the context to be used in this call's Do method. Any
27574// pending HTTP request will be aborted if the provided context is
27575// canceled.
27576func (c *CreativeGroupsUpdateCall) Context(ctx context.Context) *CreativeGroupsUpdateCall {
27577	c.ctx_ = ctx
27578	return c
27579}
27580
27581// Header returns an http.Header that can be modified by the caller to
27582// add HTTP headers to the request.
27583func (c *CreativeGroupsUpdateCall) Header() http.Header {
27584	if c.header_ == nil {
27585		c.header_ = make(http.Header)
27586	}
27587	return c.header_
27588}
27589
27590func (c *CreativeGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
27591	reqHeaders := make(http.Header)
27592	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
27593	for k, v := range c.header_ {
27594		reqHeaders[k] = v
27595	}
27596	reqHeaders.Set("User-Agent", c.s.userAgent())
27597	var body io.Reader = nil
27598	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27599	if err != nil {
27600		return nil, err
27601	}
27602	reqHeaders.Set("Content-Type", "application/json")
27603	c.urlParams_.Set("alt", alt)
27604	c.urlParams_.Set("prettyPrint", "false")
27605	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27606	urls += "?" + c.urlParams_.Encode()
27607	req, err := http.NewRequest("PUT", urls, body)
27608	if err != nil {
27609		return nil, err
27610	}
27611	req.Header = reqHeaders
27612	googleapi.Expand(req.URL, map[string]string{
27613		"profileId": strconv.FormatInt(c.profileId, 10),
27614	})
27615	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27616}
27617
27618// Do executes the "dfareporting.creativeGroups.update" call.
27619// Exactly one of *CreativeGroup or error will be non-nil. Any non-2xx
27620// status code is an error. Response headers are in either
27621// *CreativeGroup.ServerResponse.Header or (if a response was returned
27622// at all) in error.(*googleapi.Error).Header. Use
27623// googleapi.IsNotModified to check whether the returned error was
27624// because http.StatusNotModified was returned.
27625func (c *CreativeGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27626	gensupport.SetOptions(c.urlParams_, opts...)
27627	res, err := c.doRequest("json")
27628	if res != nil && res.StatusCode == http.StatusNotModified {
27629		if res.Body != nil {
27630			res.Body.Close()
27631		}
27632		return nil, &googleapi.Error{
27633			Code:   res.StatusCode,
27634			Header: res.Header,
27635		}
27636	}
27637	if err != nil {
27638		return nil, err
27639	}
27640	defer googleapi.CloseBody(res)
27641	if err := googleapi.CheckResponse(res); err != nil {
27642		return nil, err
27643	}
27644	ret := &CreativeGroup{
27645		ServerResponse: googleapi.ServerResponse{
27646			Header:         res.Header,
27647			HTTPStatusCode: res.StatusCode,
27648		},
27649	}
27650	target := &ret
27651	if err := gensupport.DecodeResponse(target, res); err != nil {
27652		return nil, err
27653	}
27654	return ret, nil
27655	// {
27656	//   "description": "Updates an existing creative group.",
27657	//   "httpMethod": "PUT",
27658	//   "id": "dfareporting.creativeGroups.update",
27659	//   "parameterOrder": [
27660	//     "profileId"
27661	//   ],
27662	//   "parameters": {
27663	//     "profileId": {
27664	//       "description": "User profile ID associated with this request.",
27665	//       "format": "int64",
27666	//       "location": "path",
27667	//       "required": true,
27668	//       "type": "string"
27669	//     }
27670	//   },
27671	//   "path": "userprofiles/{profileId}/creativeGroups",
27672	//   "request": {
27673	//     "$ref": "CreativeGroup"
27674	//   },
27675	//   "response": {
27676	//     "$ref": "CreativeGroup"
27677	//   },
27678	//   "scopes": [
27679	//     "https://www.googleapis.com/auth/dfatrafficking"
27680	//   ]
27681	// }
27682
27683}
27684
27685// method id "dfareporting.creatives.get":
27686
27687type CreativesGetCall struct {
27688	s            *Service
27689	profileId    int64
27690	id           int64
27691	urlParams_   gensupport.URLParams
27692	ifNoneMatch_ string
27693	ctx_         context.Context
27694	header_      http.Header
27695}
27696
27697// Get: Gets one creative by ID.
27698func (r *CreativesService) Get(profileId int64, id int64) *CreativesGetCall {
27699	c := &CreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27700	c.profileId = profileId
27701	c.id = id
27702	return c
27703}
27704
27705// Fields allows partial responses to be retrieved. See
27706// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27707// for more information.
27708func (c *CreativesGetCall) Fields(s ...googleapi.Field) *CreativesGetCall {
27709	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27710	return c
27711}
27712
27713// IfNoneMatch sets the optional parameter which makes the operation
27714// fail if the object's ETag matches the given value. This is useful for
27715// getting updates only after the object has changed since the last
27716// request. Use googleapi.IsNotModified to check whether the response
27717// error from Do is the result of In-None-Match.
27718func (c *CreativesGetCall) IfNoneMatch(entityTag string) *CreativesGetCall {
27719	c.ifNoneMatch_ = entityTag
27720	return c
27721}
27722
27723// Context sets the context to be used in this call's Do method. Any
27724// pending HTTP request will be aborted if the provided context is
27725// canceled.
27726func (c *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
27727	c.ctx_ = ctx
27728	return c
27729}
27730
27731// Header returns an http.Header that can be modified by the caller to
27732// add HTTP headers to the request.
27733func (c *CreativesGetCall) Header() http.Header {
27734	if c.header_ == nil {
27735		c.header_ = make(http.Header)
27736	}
27737	return c.header_
27738}
27739
27740func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
27741	reqHeaders := make(http.Header)
27742	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
27743	for k, v := range c.header_ {
27744		reqHeaders[k] = v
27745	}
27746	reqHeaders.Set("User-Agent", c.s.userAgent())
27747	if c.ifNoneMatch_ != "" {
27748		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27749	}
27750	var body io.Reader = nil
27751	c.urlParams_.Set("alt", alt)
27752	c.urlParams_.Set("prettyPrint", "false")
27753	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives/{id}")
27754	urls += "?" + c.urlParams_.Encode()
27755	req, err := http.NewRequest("GET", urls, body)
27756	if err != nil {
27757		return nil, err
27758	}
27759	req.Header = reqHeaders
27760	googleapi.Expand(req.URL, map[string]string{
27761		"profileId": strconv.FormatInt(c.profileId, 10),
27762		"id":        strconv.FormatInt(c.id, 10),
27763	})
27764	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27765}
27766
27767// Do executes the "dfareporting.creatives.get" call.
27768// Exactly one of *Creative or error will be non-nil. Any non-2xx status
27769// code is an error. Response headers are in either
27770// *Creative.ServerResponse.Header or (if a response was returned at
27771// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27772// to check whether the returned error was because
27773// http.StatusNotModified was returned.
27774func (c *CreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
27775	gensupport.SetOptions(c.urlParams_, opts...)
27776	res, err := c.doRequest("json")
27777	if res != nil && res.StatusCode == http.StatusNotModified {
27778		if res.Body != nil {
27779			res.Body.Close()
27780		}
27781		return nil, &googleapi.Error{
27782			Code:   res.StatusCode,
27783			Header: res.Header,
27784		}
27785	}
27786	if err != nil {
27787		return nil, err
27788	}
27789	defer googleapi.CloseBody(res)
27790	if err := googleapi.CheckResponse(res); err != nil {
27791		return nil, err
27792	}
27793	ret := &Creative{
27794		ServerResponse: googleapi.ServerResponse{
27795			Header:         res.Header,
27796			HTTPStatusCode: res.StatusCode,
27797		},
27798	}
27799	target := &ret
27800	if err := gensupport.DecodeResponse(target, res); err != nil {
27801		return nil, err
27802	}
27803	return ret, nil
27804	// {
27805	//   "description": "Gets one creative by ID.",
27806	//   "httpMethod": "GET",
27807	//   "id": "dfareporting.creatives.get",
27808	//   "parameterOrder": [
27809	//     "profileId",
27810	//     "id"
27811	//   ],
27812	//   "parameters": {
27813	//     "id": {
27814	//       "description": "Creative ID.",
27815	//       "format": "int64",
27816	//       "location": "path",
27817	//       "required": true,
27818	//       "type": "string"
27819	//     },
27820	//     "profileId": {
27821	//       "description": "User profile ID associated with this request.",
27822	//       "format": "int64",
27823	//       "location": "path",
27824	//       "required": true,
27825	//       "type": "string"
27826	//     }
27827	//   },
27828	//   "path": "userprofiles/{profileId}/creatives/{id}",
27829	//   "response": {
27830	//     "$ref": "Creative"
27831	//   },
27832	//   "scopes": [
27833	//     "https://www.googleapis.com/auth/dfatrafficking"
27834	//   ]
27835	// }
27836
27837}
27838
27839// method id "dfareporting.creatives.insert":
27840
27841type CreativesInsertCall struct {
27842	s          *Service
27843	profileId  int64
27844	creative   *Creative
27845	urlParams_ gensupport.URLParams
27846	ctx_       context.Context
27847	header_    http.Header
27848}
27849
27850// Insert: Inserts a new creative.
27851func (r *CreativesService) Insert(profileId int64, creative *Creative) *CreativesInsertCall {
27852	c := &CreativesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27853	c.profileId = profileId
27854	c.creative = creative
27855	return c
27856}
27857
27858// Fields allows partial responses to be retrieved. See
27859// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27860// for more information.
27861func (c *CreativesInsertCall) Fields(s ...googleapi.Field) *CreativesInsertCall {
27862	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27863	return c
27864}
27865
27866// Context sets the context to be used in this call's Do method. Any
27867// pending HTTP request will be aborted if the provided context is
27868// canceled.
27869func (c *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
27870	c.ctx_ = ctx
27871	return c
27872}
27873
27874// Header returns an http.Header that can be modified by the caller to
27875// add HTTP headers to the request.
27876func (c *CreativesInsertCall) Header() http.Header {
27877	if c.header_ == nil {
27878		c.header_ = make(http.Header)
27879	}
27880	return c.header_
27881}
27882
27883func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
27884	reqHeaders := make(http.Header)
27885	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
27886	for k, v := range c.header_ {
27887		reqHeaders[k] = v
27888	}
27889	reqHeaders.Set("User-Agent", c.s.userAgent())
27890	var body io.Reader = nil
27891	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
27892	if err != nil {
27893		return nil, err
27894	}
27895	reqHeaders.Set("Content-Type", "application/json")
27896	c.urlParams_.Set("alt", alt)
27897	c.urlParams_.Set("prettyPrint", "false")
27898	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
27899	urls += "?" + c.urlParams_.Encode()
27900	req, err := http.NewRequest("POST", urls, body)
27901	if err != nil {
27902		return nil, err
27903	}
27904	req.Header = reqHeaders
27905	googleapi.Expand(req.URL, map[string]string{
27906		"profileId": strconv.FormatInt(c.profileId, 10),
27907	})
27908	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27909}
27910
27911// Do executes the "dfareporting.creatives.insert" call.
27912// Exactly one of *Creative or error will be non-nil. Any non-2xx status
27913// code is an error. Response headers are in either
27914// *Creative.ServerResponse.Header or (if a response was returned at
27915// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27916// to check whether the returned error was because
27917// http.StatusNotModified was returned.
27918func (c *CreativesInsertCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
27919	gensupport.SetOptions(c.urlParams_, opts...)
27920	res, err := c.doRequest("json")
27921	if res != nil && res.StatusCode == http.StatusNotModified {
27922		if res.Body != nil {
27923			res.Body.Close()
27924		}
27925		return nil, &googleapi.Error{
27926			Code:   res.StatusCode,
27927			Header: res.Header,
27928		}
27929	}
27930	if err != nil {
27931		return nil, err
27932	}
27933	defer googleapi.CloseBody(res)
27934	if err := googleapi.CheckResponse(res); err != nil {
27935		return nil, err
27936	}
27937	ret := &Creative{
27938		ServerResponse: googleapi.ServerResponse{
27939			Header:         res.Header,
27940			HTTPStatusCode: res.StatusCode,
27941		},
27942	}
27943	target := &ret
27944	if err := gensupport.DecodeResponse(target, res); err != nil {
27945		return nil, err
27946	}
27947	return ret, nil
27948	// {
27949	//   "description": "Inserts a new creative.",
27950	//   "httpMethod": "POST",
27951	//   "id": "dfareporting.creatives.insert",
27952	//   "parameterOrder": [
27953	//     "profileId"
27954	//   ],
27955	//   "parameters": {
27956	//     "profileId": {
27957	//       "description": "User profile ID associated with this request.",
27958	//       "format": "int64",
27959	//       "location": "path",
27960	//       "required": true,
27961	//       "type": "string"
27962	//     }
27963	//   },
27964	//   "path": "userprofiles/{profileId}/creatives",
27965	//   "request": {
27966	//     "$ref": "Creative"
27967	//   },
27968	//   "response": {
27969	//     "$ref": "Creative"
27970	//   },
27971	//   "scopes": [
27972	//     "https://www.googleapis.com/auth/dfatrafficking"
27973	//   ]
27974	// }
27975
27976}
27977
27978// method id "dfareporting.creatives.list":
27979
27980type CreativesListCall struct {
27981	s            *Service
27982	profileId    int64
27983	urlParams_   gensupport.URLParams
27984	ifNoneMatch_ string
27985	ctx_         context.Context
27986	header_      http.Header
27987}
27988
27989// List: Retrieves a list of creatives, possibly filtered. This method
27990// supports paging.
27991func (r *CreativesService) List(profileId int64) *CreativesListCall {
27992	c := &CreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27993	c.profileId = profileId
27994	return c
27995}
27996
27997// Active sets the optional parameter "active": Select only active
27998// creatives. Leave blank to select active and inactive creatives.
27999func (c *CreativesListCall) Active(active bool) *CreativesListCall {
28000	c.urlParams_.Set("active", fmt.Sprint(active))
28001	return c
28002}
28003
28004// AdvertiserId sets the optional parameter "advertiserId": Select only
28005// creatives with this advertiser ID.
28006func (c *CreativesListCall) AdvertiserId(advertiserId int64) *CreativesListCall {
28007	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28008	return c
28009}
28010
28011// Archived sets the optional parameter "archived": Select only archived
28012// creatives. Leave blank to select archived and unarchived creatives.
28013func (c *CreativesListCall) Archived(archived bool) *CreativesListCall {
28014	c.urlParams_.Set("archived", fmt.Sprint(archived))
28015	return c
28016}
28017
28018// CampaignId sets the optional parameter "campaignId": Select only
28019// creatives with this campaign ID.
28020func (c *CreativesListCall) CampaignId(campaignId int64) *CreativesListCall {
28021	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
28022	return c
28023}
28024
28025// CompanionCreativeIds sets the optional parameter
28026// "companionCreativeIds": Select only in-stream video creatives with
28027// these companion IDs.
28028func (c *CreativesListCall) CompanionCreativeIds(companionCreativeIds ...int64) *CreativesListCall {
28029	var companionCreativeIds_ []string
28030	for _, v := range companionCreativeIds {
28031		companionCreativeIds_ = append(companionCreativeIds_, fmt.Sprint(v))
28032	}
28033	c.urlParams_.SetMulti("companionCreativeIds", companionCreativeIds_)
28034	return c
28035}
28036
28037// CreativeFieldIds sets the optional parameter "creativeFieldIds":
28038// Select only creatives with these creative field IDs.
28039func (c *CreativesListCall) CreativeFieldIds(creativeFieldIds ...int64) *CreativesListCall {
28040	var creativeFieldIds_ []string
28041	for _, v := range creativeFieldIds {
28042		creativeFieldIds_ = append(creativeFieldIds_, fmt.Sprint(v))
28043	}
28044	c.urlParams_.SetMulti("creativeFieldIds", creativeFieldIds_)
28045	return c
28046}
28047
28048// Ids sets the optional parameter "ids": Select only creatives with
28049// these IDs.
28050func (c *CreativesListCall) Ids(ids ...int64) *CreativesListCall {
28051	var ids_ []string
28052	for _, v := range ids {
28053		ids_ = append(ids_, fmt.Sprint(v))
28054	}
28055	c.urlParams_.SetMulti("ids", ids_)
28056	return c
28057}
28058
28059// MaxResults sets the optional parameter "maxResults": Maximum number
28060// of results to return.
28061func (c *CreativesListCall) MaxResults(maxResults int64) *CreativesListCall {
28062	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28063	return c
28064}
28065
28066// PageToken sets the optional parameter "pageToken": Value of the
28067// nextPageToken from the previous result page.
28068func (c *CreativesListCall) PageToken(pageToken string) *CreativesListCall {
28069	c.urlParams_.Set("pageToken", pageToken)
28070	return c
28071}
28072
28073// RenderingIds sets the optional parameter "renderingIds": Select only
28074// creatives with these rendering IDs.
28075func (c *CreativesListCall) RenderingIds(renderingIds ...int64) *CreativesListCall {
28076	var renderingIds_ []string
28077	for _, v := range renderingIds {
28078		renderingIds_ = append(renderingIds_, fmt.Sprint(v))
28079	}
28080	c.urlParams_.SetMulti("renderingIds", renderingIds_)
28081	return c
28082}
28083
28084// SearchString sets the optional parameter "searchString": Allows
28085// searching for objects by name or ID. Wildcards (*) are allowed. For
28086// example, "creative*2015" will return objects with names like
28087// "creative June 2015", "creative April 2015", or simply "creative
28088// 2015". Most of the searches also add wildcards implicitly at the
28089// start and the end of the search string. For example, a search string
28090// of "creative" will match objects with name "my creative", "creative
28091// 2015", or simply "creative".
28092func (c *CreativesListCall) SearchString(searchString string) *CreativesListCall {
28093	c.urlParams_.Set("searchString", searchString)
28094	return c
28095}
28096
28097// SizeIds sets the optional parameter "sizeIds": Select only creatives
28098// with these size IDs.
28099func (c *CreativesListCall) SizeIds(sizeIds ...int64) *CreativesListCall {
28100	var sizeIds_ []string
28101	for _, v := range sizeIds {
28102		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
28103	}
28104	c.urlParams_.SetMulti("sizeIds", sizeIds_)
28105	return c
28106}
28107
28108// SortField sets the optional parameter "sortField": Field by which to
28109// sort the list.
28110//
28111// Possible values:
28112//   "ID" (default)
28113//   "NAME"
28114func (c *CreativesListCall) SortField(sortField string) *CreativesListCall {
28115	c.urlParams_.Set("sortField", sortField)
28116	return c
28117}
28118
28119// SortOrder sets the optional parameter "sortOrder": Order of sorted
28120// results.
28121//
28122// Possible values:
28123//   "ASCENDING" (default)
28124//   "DESCENDING"
28125func (c *CreativesListCall) SortOrder(sortOrder string) *CreativesListCall {
28126	c.urlParams_.Set("sortOrder", sortOrder)
28127	return c
28128}
28129
28130// StudioCreativeId sets the optional parameter "studioCreativeId":
28131// Select only creatives corresponding to this Studio creative ID.
28132func (c *CreativesListCall) StudioCreativeId(studioCreativeId int64) *CreativesListCall {
28133	c.urlParams_.Set("studioCreativeId", fmt.Sprint(studioCreativeId))
28134	return c
28135}
28136
28137// Types sets the optional parameter "types": Select only creatives with
28138// these creative types.
28139//
28140// Possible values:
28141//   "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
28142//   "CUSTOM_DISPLAY"
28143//   "CUSTOM_DISPLAY_INTERSTITIAL"
28144//   "DISPLAY"
28145//   "DISPLAY_IMAGE_GALLERY"
28146//   "DISPLAY_REDIRECT"
28147//   "FLASH_INPAGE"
28148//   "HTML5_BANNER"
28149//   "IMAGE"
28150//   "INSTREAM_AUDIO"
28151//   "INSTREAM_VIDEO"
28152//   "INSTREAM_VIDEO_REDIRECT"
28153//   "INTERNAL_REDIRECT"
28154//   "INTERSTITIAL_INTERNAL_REDIRECT"
28155//   "RICH_MEDIA_DISPLAY_BANNER"
28156//   "RICH_MEDIA_DISPLAY_EXPANDING"
28157//   "RICH_MEDIA_DISPLAY_INTERSTITIAL"
28158//   "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL"
28159//   "RICH_MEDIA_IM_EXPAND"
28160//   "RICH_MEDIA_INPAGE_FLOATING"
28161//   "RICH_MEDIA_MOBILE_IN_APP"
28162//   "RICH_MEDIA_PEEL_DOWN"
28163//   "TRACKING_TEXT"
28164//   "VPAID_LINEAR_VIDEO"
28165//   "VPAID_NON_LINEAR_VIDEO"
28166func (c *CreativesListCall) Types(types ...string) *CreativesListCall {
28167	c.urlParams_.SetMulti("types", append([]string{}, types...))
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 *CreativesListCall) Fields(s ...googleapi.Field) *CreativesListCall {
28175	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28176	return c
28177}
28178
28179// IfNoneMatch sets the optional parameter which makes the operation
28180// fail if the object's ETag matches the given value. This is useful for
28181// getting updates only after the object has changed since the last
28182// request. Use googleapi.IsNotModified to check whether the response
28183// error from Do is the result of In-None-Match.
28184func (c *CreativesListCall) IfNoneMatch(entityTag string) *CreativesListCall {
28185	c.ifNoneMatch_ = entityTag
28186	return c
28187}
28188
28189// Context sets the context to be used in this call's Do method. Any
28190// pending HTTP request will be aborted if the provided context is
28191// canceled.
28192func (c *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
28193	c.ctx_ = ctx
28194	return c
28195}
28196
28197// Header returns an http.Header that can be modified by the caller to
28198// add HTTP headers to the request.
28199func (c *CreativesListCall) Header() http.Header {
28200	if c.header_ == nil {
28201		c.header_ = make(http.Header)
28202	}
28203	return c.header_
28204}
28205
28206func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
28207	reqHeaders := make(http.Header)
28208	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
28209	for k, v := range c.header_ {
28210		reqHeaders[k] = v
28211	}
28212	reqHeaders.Set("User-Agent", c.s.userAgent())
28213	if c.ifNoneMatch_ != "" {
28214		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28215	}
28216	var body io.Reader = nil
28217	c.urlParams_.Set("alt", alt)
28218	c.urlParams_.Set("prettyPrint", "false")
28219	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28220	urls += "?" + c.urlParams_.Encode()
28221	req, err := http.NewRequest("GET", urls, body)
28222	if err != nil {
28223		return nil, err
28224	}
28225	req.Header = reqHeaders
28226	googleapi.Expand(req.URL, map[string]string{
28227		"profileId": strconv.FormatInt(c.profileId, 10),
28228	})
28229	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28230}
28231
28232// Do executes the "dfareporting.creatives.list" call.
28233// Exactly one of *CreativesListResponse or error will be non-nil. Any
28234// non-2xx status code is an error. Response headers are in either
28235// *CreativesListResponse.ServerResponse.Header or (if a response was
28236// returned at all) in error.(*googleapi.Error).Header. Use
28237// googleapi.IsNotModified to check whether the returned error was
28238// because http.StatusNotModified was returned.
28239func (c *CreativesListCall) Do(opts ...googleapi.CallOption) (*CreativesListResponse, error) {
28240	gensupport.SetOptions(c.urlParams_, opts...)
28241	res, err := c.doRequest("json")
28242	if res != nil && res.StatusCode == http.StatusNotModified {
28243		if res.Body != nil {
28244			res.Body.Close()
28245		}
28246		return nil, &googleapi.Error{
28247			Code:   res.StatusCode,
28248			Header: res.Header,
28249		}
28250	}
28251	if err != nil {
28252		return nil, err
28253	}
28254	defer googleapi.CloseBody(res)
28255	if err := googleapi.CheckResponse(res); err != nil {
28256		return nil, err
28257	}
28258	ret := &CreativesListResponse{
28259		ServerResponse: googleapi.ServerResponse{
28260			Header:         res.Header,
28261			HTTPStatusCode: res.StatusCode,
28262		},
28263	}
28264	target := &ret
28265	if err := gensupport.DecodeResponse(target, res); err != nil {
28266		return nil, err
28267	}
28268	return ret, nil
28269	// {
28270	//   "description": "Retrieves a list of creatives, possibly filtered. This method supports paging.",
28271	//   "httpMethod": "GET",
28272	//   "id": "dfareporting.creatives.list",
28273	//   "parameterOrder": [
28274	//     "profileId"
28275	//   ],
28276	//   "parameters": {
28277	//     "active": {
28278	//       "description": "Select only active creatives. Leave blank to select active and inactive creatives.",
28279	//       "location": "query",
28280	//       "type": "boolean"
28281	//     },
28282	//     "advertiserId": {
28283	//       "description": "Select only creatives with this advertiser ID.",
28284	//       "format": "int64",
28285	//       "location": "query",
28286	//       "type": "string"
28287	//     },
28288	//     "archived": {
28289	//       "description": "Select only archived creatives. Leave blank to select archived and unarchived creatives.",
28290	//       "location": "query",
28291	//       "type": "boolean"
28292	//     },
28293	//     "campaignId": {
28294	//       "description": "Select only creatives with this campaign ID.",
28295	//       "format": "int64",
28296	//       "location": "query",
28297	//       "type": "string"
28298	//     },
28299	//     "companionCreativeIds": {
28300	//       "description": "Select only in-stream video creatives with these companion IDs.",
28301	//       "format": "int64",
28302	//       "location": "query",
28303	//       "repeated": true,
28304	//       "type": "string"
28305	//     },
28306	//     "creativeFieldIds": {
28307	//       "description": "Select only creatives with these creative field IDs.",
28308	//       "format": "int64",
28309	//       "location": "query",
28310	//       "repeated": true,
28311	//       "type": "string"
28312	//     },
28313	//     "ids": {
28314	//       "description": "Select only creatives with these IDs.",
28315	//       "format": "int64",
28316	//       "location": "query",
28317	//       "repeated": true,
28318	//       "type": "string"
28319	//     },
28320	//     "maxResults": {
28321	//       "default": "1000",
28322	//       "description": "Maximum number of results to return.",
28323	//       "format": "int32",
28324	//       "location": "query",
28325	//       "maximum": "1000",
28326	//       "minimum": "0",
28327	//       "type": "integer"
28328	//     },
28329	//     "pageToken": {
28330	//       "description": "Value of the nextPageToken from the previous result page.",
28331	//       "location": "query",
28332	//       "type": "string"
28333	//     },
28334	//     "profileId": {
28335	//       "description": "User profile ID associated with this request.",
28336	//       "format": "int64",
28337	//       "location": "path",
28338	//       "required": true,
28339	//       "type": "string"
28340	//     },
28341	//     "renderingIds": {
28342	//       "description": "Select only creatives with these rendering IDs.",
28343	//       "format": "int64",
28344	//       "location": "query",
28345	//       "repeated": true,
28346	//       "type": "string"
28347	//     },
28348	//     "searchString": {
28349	//       "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\".",
28350	//       "location": "query",
28351	//       "type": "string"
28352	//     },
28353	//     "sizeIds": {
28354	//       "description": "Select only creatives with these size IDs.",
28355	//       "format": "int64",
28356	//       "location": "query",
28357	//       "repeated": true,
28358	//       "type": "string"
28359	//     },
28360	//     "sortField": {
28361	//       "default": "ID",
28362	//       "description": "Field by which to sort the list.",
28363	//       "enum": [
28364	//         "ID",
28365	//         "NAME"
28366	//       ],
28367	//       "enumDescriptions": [
28368	//         "",
28369	//         ""
28370	//       ],
28371	//       "location": "query",
28372	//       "type": "string"
28373	//     },
28374	//     "sortOrder": {
28375	//       "default": "ASCENDING",
28376	//       "description": "Order of sorted results.",
28377	//       "enum": [
28378	//         "ASCENDING",
28379	//         "DESCENDING"
28380	//       ],
28381	//       "enumDescriptions": [
28382	//         "",
28383	//         ""
28384	//       ],
28385	//       "location": "query",
28386	//       "type": "string"
28387	//     },
28388	//     "studioCreativeId": {
28389	//       "description": "Select only creatives corresponding to this Studio creative ID.",
28390	//       "format": "int64",
28391	//       "location": "query",
28392	//       "type": "string"
28393	//     },
28394	//     "types": {
28395	//       "description": "Select only creatives with these creative types.",
28396	//       "enum": [
28397	//         "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO",
28398	//         "CUSTOM_DISPLAY",
28399	//         "CUSTOM_DISPLAY_INTERSTITIAL",
28400	//         "DISPLAY",
28401	//         "DISPLAY_IMAGE_GALLERY",
28402	//         "DISPLAY_REDIRECT",
28403	//         "FLASH_INPAGE",
28404	//         "HTML5_BANNER",
28405	//         "IMAGE",
28406	//         "INSTREAM_AUDIO",
28407	//         "INSTREAM_VIDEO",
28408	//         "INSTREAM_VIDEO_REDIRECT",
28409	//         "INTERNAL_REDIRECT",
28410	//         "INTERSTITIAL_INTERNAL_REDIRECT",
28411	//         "RICH_MEDIA_DISPLAY_BANNER",
28412	//         "RICH_MEDIA_DISPLAY_EXPANDING",
28413	//         "RICH_MEDIA_DISPLAY_INTERSTITIAL",
28414	//         "RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL",
28415	//         "RICH_MEDIA_IM_EXPAND",
28416	//         "RICH_MEDIA_INPAGE_FLOATING",
28417	//         "RICH_MEDIA_MOBILE_IN_APP",
28418	//         "RICH_MEDIA_PEEL_DOWN",
28419	//         "TRACKING_TEXT",
28420	//         "VPAID_LINEAR_VIDEO",
28421	//         "VPAID_NON_LINEAR_VIDEO"
28422	//       ],
28423	//       "enumDescriptions": [
28424	//         "",
28425	//         "",
28426	//         "",
28427	//         "",
28428	//         "",
28429	//         "",
28430	//         "",
28431	//         "",
28432	//         "",
28433	//         "",
28434	//         "",
28435	//         "",
28436	//         "",
28437	//         "",
28438	//         "",
28439	//         "",
28440	//         "",
28441	//         "",
28442	//         "",
28443	//         "",
28444	//         "",
28445	//         "",
28446	//         "",
28447	//         "",
28448	//         ""
28449	//       ],
28450	//       "location": "query",
28451	//       "repeated": true,
28452	//       "type": "string"
28453	//     }
28454	//   },
28455	//   "path": "userprofiles/{profileId}/creatives",
28456	//   "response": {
28457	//     "$ref": "CreativesListResponse"
28458	//   },
28459	//   "scopes": [
28460	//     "https://www.googleapis.com/auth/dfatrafficking"
28461	//   ]
28462	// }
28463
28464}
28465
28466// Pages invokes f for each page of results.
28467// A non-nil error returned from f will halt the iteration.
28468// The provided context supersedes any context provided to the Context method.
28469func (c *CreativesListCall) Pages(ctx context.Context, f func(*CreativesListResponse) error) error {
28470	c.ctx_ = ctx
28471	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28472	for {
28473		x, err := c.Do()
28474		if err != nil {
28475			return err
28476		}
28477		if err := f(x); err != nil {
28478			return err
28479		}
28480		if x.NextPageToken == "" {
28481			return nil
28482		}
28483		c.PageToken(x.NextPageToken)
28484	}
28485}
28486
28487// method id "dfareporting.creatives.patch":
28488
28489type CreativesPatchCall struct {
28490	s          *Service
28491	profileId  int64
28492	creative   *Creative
28493	urlParams_ gensupport.URLParams
28494	ctx_       context.Context
28495	header_    http.Header
28496}
28497
28498// Patch: Updates an existing creative. This method supports patch
28499// semantics.
28500func (r *CreativesService) Patch(profileId int64, id int64, creative *Creative) *CreativesPatchCall {
28501	c := &CreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28502	c.profileId = profileId
28503	c.urlParams_.Set("id", fmt.Sprint(id))
28504	c.creative = creative
28505	return c
28506}
28507
28508// Fields allows partial responses to be retrieved. See
28509// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28510// for more information.
28511func (c *CreativesPatchCall) Fields(s ...googleapi.Field) *CreativesPatchCall {
28512	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28513	return c
28514}
28515
28516// Context sets the context to be used in this call's Do method. Any
28517// pending HTTP request will be aborted if the provided context is
28518// canceled.
28519func (c *CreativesPatchCall) Context(ctx context.Context) *CreativesPatchCall {
28520	c.ctx_ = ctx
28521	return c
28522}
28523
28524// Header returns an http.Header that can be modified by the caller to
28525// add HTTP headers to the request.
28526func (c *CreativesPatchCall) Header() http.Header {
28527	if c.header_ == nil {
28528		c.header_ = make(http.Header)
28529	}
28530	return c.header_
28531}
28532
28533func (c *CreativesPatchCall) doRequest(alt string) (*http.Response, error) {
28534	reqHeaders := make(http.Header)
28535	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
28536	for k, v := range c.header_ {
28537		reqHeaders[k] = v
28538	}
28539	reqHeaders.Set("User-Agent", c.s.userAgent())
28540	var body io.Reader = nil
28541	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
28542	if err != nil {
28543		return nil, err
28544	}
28545	reqHeaders.Set("Content-Type", "application/json")
28546	c.urlParams_.Set("alt", alt)
28547	c.urlParams_.Set("prettyPrint", "false")
28548	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28549	urls += "?" + c.urlParams_.Encode()
28550	req, err := http.NewRequest("PATCH", urls, body)
28551	if err != nil {
28552		return nil, err
28553	}
28554	req.Header = reqHeaders
28555	googleapi.Expand(req.URL, map[string]string{
28556		"profileId": strconv.FormatInt(c.profileId, 10),
28557	})
28558	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28559}
28560
28561// Do executes the "dfareporting.creatives.patch" call.
28562// Exactly one of *Creative or error will be non-nil. Any non-2xx status
28563// code is an error. Response headers are in either
28564// *Creative.ServerResponse.Header or (if a response was returned at
28565// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28566// to check whether the returned error was because
28567// http.StatusNotModified was returned.
28568func (c *CreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28569	gensupport.SetOptions(c.urlParams_, opts...)
28570	res, err := c.doRequest("json")
28571	if res != nil && res.StatusCode == http.StatusNotModified {
28572		if res.Body != nil {
28573			res.Body.Close()
28574		}
28575		return nil, &googleapi.Error{
28576			Code:   res.StatusCode,
28577			Header: res.Header,
28578		}
28579	}
28580	if err != nil {
28581		return nil, err
28582	}
28583	defer googleapi.CloseBody(res)
28584	if err := googleapi.CheckResponse(res); err != nil {
28585		return nil, err
28586	}
28587	ret := &Creative{
28588		ServerResponse: googleapi.ServerResponse{
28589			Header:         res.Header,
28590			HTTPStatusCode: res.StatusCode,
28591		},
28592	}
28593	target := &ret
28594	if err := gensupport.DecodeResponse(target, res); err != nil {
28595		return nil, err
28596	}
28597	return ret, nil
28598	// {
28599	//   "description": "Updates an existing creative. This method supports patch semantics.",
28600	//   "httpMethod": "PATCH",
28601	//   "id": "dfareporting.creatives.patch",
28602	//   "parameterOrder": [
28603	//     "profileId",
28604	//     "id"
28605	//   ],
28606	//   "parameters": {
28607	//     "id": {
28608	//       "description": "Creative ID.",
28609	//       "format": "int64",
28610	//       "location": "query",
28611	//       "required": true,
28612	//       "type": "string"
28613	//     },
28614	//     "profileId": {
28615	//       "description": "User profile ID associated with this request.",
28616	//       "format": "int64",
28617	//       "location": "path",
28618	//       "required": true,
28619	//       "type": "string"
28620	//     }
28621	//   },
28622	//   "path": "userprofiles/{profileId}/creatives",
28623	//   "request": {
28624	//     "$ref": "Creative"
28625	//   },
28626	//   "response": {
28627	//     "$ref": "Creative"
28628	//   },
28629	//   "scopes": [
28630	//     "https://www.googleapis.com/auth/dfatrafficking"
28631	//   ]
28632	// }
28633
28634}
28635
28636// method id "dfareporting.creatives.update":
28637
28638type CreativesUpdateCall struct {
28639	s          *Service
28640	profileId  int64
28641	creative   *Creative
28642	urlParams_ gensupport.URLParams
28643	ctx_       context.Context
28644	header_    http.Header
28645}
28646
28647// Update: Updates an existing creative.
28648func (r *CreativesService) Update(profileId int64, creative *Creative) *CreativesUpdateCall {
28649	c := &CreativesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28650	c.profileId = profileId
28651	c.creative = creative
28652	return c
28653}
28654
28655// Fields allows partial responses to be retrieved. See
28656// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28657// for more information.
28658func (c *CreativesUpdateCall) Fields(s ...googleapi.Field) *CreativesUpdateCall {
28659	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28660	return c
28661}
28662
28663// Context sets the context to be used in this call's Do method. Any
28664// pending HTTP request will be aborted if the provided context is
28665// canceled.
28666func (c *CreativesUpdateCall) Context(ctx context.Context) *CreativesUpdateCall {
28667	c.ctx_ = ctx
28668	return c
28669}
28670
28671// Header returns an http.Header that can be modified by the caller to
28672// add HTTP headers to the request.
28673func (c *CreativesUpdateCall) Header() http.Header {
28674	if c.header_ == nil {
28675		c.header_ = make(http.Header)
28676	}
28677	return c.header_
28678}
28679
28680func (c *CreativesUpdateCall) doRequest(alt string) (*http.Response, error) {
28681	reqHeaders := make(http.Header)
28682	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
28683	for k, v := range c.header_ {
28684		reqHeaders[k] = v
28685	}
28686	reqHeaders.Set("User-Agent", c.s.userAgent())
28687	var body io.Reader = nil
28688	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
28689	if err != nil {
28690		return nil, err
28691	}
28692	reqHeaders.Set("Content-Type", "application/json")
28693	c.urlParams_.Set("alt", alt)
28694	c.urlParams_.Set("prettyPrint", "false")
28695	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28696	urls += "?" + c.urlParams_.Encode()
28697	req, err := http.NewRequest("PUT", urls, body)
28698	if err != nil {
28699		return nil, err
28700	}
28701	req.Header = reqHeaders
28702	googleapi.Expand(req.URL, map[string]string{
28703		"profileId": strconv.FormatInt(c.profileId, 10),
28704	})
28705	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28706}
28707
28708// Do executes the "dfareporting.creatives.update" call.
28709// Exactly one of *Creative or error will be non-nil. Any non-2xx status
28710// code is an error. Response headers are in either
28711// *Creative.ServerResponse.Header or (if a response was returned at
28712// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28713// to check whether the returned error was because
28714// http.StatusNotModified was returned.
28715func (c *CreativesUpdateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28716	gensupport.SetOptions(c.urlParams_, opts...)
28717	res, err := c.doRequest("json")
28718	if res != nil && res.StatusCode == http.StatusNotModified {
28719		if res.Body != nil {
28720			res.Body.Close()
28721		}
28722		return nil, &googleapi.Error{
28723			Code:   res.StatusCode,
28724			Header: res.Header,
28725		}
28726	}
28727	if err != nil {
28728		return nil, err
28729	}
28730	defer googleapi.CloseBody(res)
28731	if err := googleapi.CheckResponse(res); err != nil {
28732		return nil, err
28733	}
28734	ret := &Creative{
28735		ServerResponse: googleapi.ServerResponse{
28736			Header:         res.Header,
28737			HTTPStatusCode: res.StatusCode,
28738		},
28739	}
28740	target := &ret
28741	if err := gensupport.DecodeResponse(target, res); err != nil {
28742		return nil, err
28743	}
28744	return ret, nil
28745	// {
28746	//   "description": "Updates an existing creative.",
28747	//   "httpMethod": "PUT",
28748	//   "id": "dfareporting.creatives.update",
28749	//   "parameterOrder": [
28750	//     "profileId"
28751	//   ],
28752	//   "parameters": {
28753	//     "profileId": {
28754	//       "description": "User profile ID associated with this request.",
28755	//       "format": "int64",
28756	//       "location": "path",
28757	//       "required": true,
28758	//       "type": "string"
28759	//     }
28760	//   },
28761	//   "path": "userprofiles/{profileId}/creatives",
28762	//   "request": {
28763	//     "$ref": "Creative"
28764	//   },
28765	//   "response": {
28766	//     "$ref": "Creative"
28767	//   },
28768	//   "scopes": [
28769	//     "https://www.googleapis.com/auth/dfatrafficking"
28770	//   ]
28771	// }
28772
28773}
28774
28775// method id "dfareporting.dimensionValues.query":
28776
28777type DimensionValuesQueryCall struct {
28778	s                     *Service
28779	profileId             int64
28780	dimensionvaluerequest *DimensionValueRequest
28781	urlParams_            gensupport.URLParams
28782	ctx_                  context.Context
28783	header_               http.Header
28784}
28785
28786// Query: Retrieves list of report dimension values for a list of
28787// filters.
28788func (r *DimensionValuesService) Query(profileId int64, dimensionvaluerequest *DimensionValueRequest) *DimensionValuesQueryCall {
28789	c := &DimensionValuesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28790	c.profileId = profileId
28791	c.dimensionvaluerequest = dimensionvaluerequest
28792	return c
28793}
28794
28795// MaxResults sets the optional parameter "maxResults": Maximum number
28796// of results to return.
28797func (c *DimensionValuesQueryCall) MaxResults(maxResults int64) *DimensionValuesQueryCall {
28798	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28799	return c
28800}
28801
28802// PageToken sets the optional parameter "pageToken": The value of the
28803// nextToken from the previous result page.
28804func (c *DimensionValuesQueryCall) PageToken(pageToken string) *DimensionValuesQueryCall {
28805	c.urlParams_.Set("pageToken", pageToken)
28806	return c
28807}
28808
28809// Fields allows partial responses to be retrieved. See
28810// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28811// for more information.
28812func (c *DimensionValuesQueryCall) Fields(s ...googleapi.Field) *DimensionValuesQueryCall {
28813	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28814	return c
28815}
28816
28817// Context sets the context to be used in this call's Do method. Any
28818// pending HTTP request will be aborted if the provided context is
28819// canceled.
28820func (c *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
28821	c.ctx_ = ctx
28822	return c
28823}
28824
28825// Header returns an http.Header that can be modified by the caller to
28826// add HTTP headers to the request.
28827func (c *DimensionValuesQueryCall) Header() http.Header {
28828	if c.header_ == nil {
28829		c.header_ = make(http.Header)
28830	}
28831	return c.header_
28832}
28833
28834func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
28835	reqHeaders := make(http.Header)
28836	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
28837	for k, v := range c.header_ {
28838		reqHeaders[k] = v
28839	}
28840	reqHeaders.Set("User-Agent", c.s.userAgent())
28841	var body io.Reader = nil
28842	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
28843	if err != nil {
28844		return nil, err
28845	}
28846	reqHeaders.Set("Content-Type", "application/json")
28847	c.urlParams_.Set("alt", alt)
28848	c.urlParams_.Set("prettyPrint", "false")
28849	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dimensionvalues/query")
28850	urls += "?" + c.urlParams_.Encode()
28851	req, err := http.NewRequest("POST", urls, body)
28852	if err != nil {
28853		return nil, err
28854	}
28855	req.Header = reqHeaders
28856	googleapi.Expand(req.URL, map[string]string{
28857		"profileId": strconv.FormatInt(c.profileId, 10),
28858	})
28859	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28860}
28861
28862// Do executes the "dfareporting.dimensionValues.query" call.
28863// Exactly one of *DimensionValueList or error will be non-nil. Any
28864// non-2xx status code is an error. Response headers are in either
28865// *DimensionValueList.ServerResponse.Header or (if a response was
28866// returned at all) in error.(*googleapi.Error).Header. Use
28867// googleapi.IsNotModified to check whether the returned error was
28868// because http.StatusNotModified was returned.
28869func (c *DimensionValuesQueryCall) Do(opts ...googleapi.CallOption) (*DimensionValueList, error) {
28870	gensupport.SetOptions(c.urlParams_, opts...)
28871	res, err := c.doRequest("json")
28872	if res != nil && res.StatusCode == http.StatusNotModified {
28873		if res.Body != nil {
28874			res.Body.Close()
28875		}
28876		return nil, &googleapi.Error{
28877			Code:   res.StatusCode,
28878			Header: res.Header,
28879		}
28880	}
28881	if err != nil {
28882		return nil, err
28883	}
28884	defer googleapi.CloseBody(res)
28885	if err := googleapi.CheckResponse(res); err != nil {
28886		return nil, err
28887	}
28888	ret := &DimensionValueList{
28889		ServerResponse: googleapi.ServerResponse{
28890			Header:         res.Header,
28891			HTTPStatusCode: res.StatusCode,
28892		},
28893	}
28894	target := &ret
28895	if err := gensupport.DecodeResponse(target, res); err != nil {
28896		return nil, err
28897	}
28898	return ret, nil
28899	// {
28900	//   "description": "Retrieves list of report dimension values for a list of filters.",
28901	//   "httpMethod": "POST",
28902	//   "id": "dfareporting.dimensionValues.query",
28903	//   "parameterOrder": [
28904	//     "profileId"
28905	//   ],
28906	//   "parameters": {
28907	//     "maxResults": {
28908	//       "default": "100",
28909	//       "description": "Maximum number of results to return.",
28910	//       "format": "int32",
28911	//       "location": "query",
28912	//       "maximum": "100",
28913	//       "minimum": "0",
28914	//       "type": "integer"
28915	//     },
28916	//     "pageToken": {
28917	//       "description": "The value of the nextToken from the previous result page.",
28918	//       "location": "query",
28919	//       "type": "string"
28920	//     },
28921	//     "profileId": {
28922	//       "description": "The DFA user profile ID.",
28923	//       "format": "int64",
28924	//       "location": "path",
28925	//       "required": true,
28926	//       "type": "string"
28927	//     }
28928	//   },
28929	//   "path": "userprofiles/{profileId}/dimensionvalues/query",
28930	//   "request": {
28931	//     "$ref": "DimensionValueRequest"
28932	//   },
28933	//   "response": {
28934	//     "$ref": "DimensionValueList"
28935	//   },
28936	//   "scopes": [
28937	//     "https://www.googleapis.com/auth/dfareporting"
28938	//   ]
28939	// }
28940
28941}
28942
28943// Pages invokes f for each page of results.
28944// A non-nil error returned from f will halt the iteration.
28945// The provided context supersedes any context provided to the Context method.
28946func (c *DimensionValuesQueryCall) Pages(ctx context.Context, f func(*DimensionValueList) error) error {
28947	c.ctx_ = ctx
28948	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28949	for {
28950		x, err := c.Do()
28951		if err != nil {
28952			return err
28953		}
28954		if err := f(x); err != nil {
28955			return err
28956		}
28957		if x.NextPageToken == "" {
28958			return nil
28959		}
28960		c.PageToken(x.NextPageToken)
28961	}
28962}
28963
28964// method id "dfareporting.directorySites.get":
28965
28966type DirectorySitesGetCall struct {
28967	s            *Service
28968	profileId    int64
28969	id           int64
28970	urlParams_   gensupport.URLParams
28971	ifNoneMatch_ string
28972	ctx_         context.Context
28973	header_      http.Header
28974}
28975
28976// Get: Gets one directory site by ID.
28977func (r *DirectorySitesService) Get(profileId int64, id int64) *DirectorySitesGetCall {
28978	c := &DirectorySitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28979	c.profileId = profileId
28980	c.id = id
28981	return c
28982}
28983
28984// Fields allows partial responses to be retrieved. See
28985// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28986// for more information.
28987func (c *DirectorySitesGetCall) Fields(s ...googleapi.Field) *DirectorySitesGetCall {
28988	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28989	return c
28990}
28991
28992// IfNoneMatch sets the optional parameter which makes the operation
28993// fail if the object's ETag matches the given value. This is useful for
28994// getting updates only after the object has changed since the last
28995// request. Use googleapi.IsNotModified to check whether the response
28996// error from Do is the result of In-None-Match.
28997func (c *DirectorySitesGetCall) IfNoneMatch(entityTag string) *DirectorySitesGetCall {
28998	c.ifNoneMatch_ = entityTag
28999	return c
29000}
29001
29002// Context sets the context to be used in this call's Do method. Any
29003// pending HTTP request will be aborted if the provided context is
29004// canceled.
29005func (c *DirectorySitesGetCall) Context(ctx context.Context) *DirectorySitesGetCall {
29006	c.ctx_ = ctx
29007	return c
29008}
29009
29010// Header returns an http.Header that can be modified by the caller to
29011// add HTTP headers to the request.
29012func (c *DirectorySitesGetCall) Header() http.Header {
29013	if c.header_ == nil {
29014		c.header_ = make(http.Header)
29015	}
29016	return c.header_
29017}
29018
29019func (c *DirectorySitesGetCall) doRequest(alt string) (*http.Response, error) {
29020	reqHeaders := make(http.Header)
29021	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
29022	for k, v := range c.header_ {
29023		reqHeaders[k] = v
29024	}
29025	reqHeaders.Set("User-Agent", c.s.userAgent())
29026	if c.ifNoneMatch_ != "" {
29027		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29028	}
29029	var body io.Reader = nil
29030	c.urlParams_.Set("alt", alt)
29031	c.urlParams_.Set("prettyPrint", "false")
29032	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites/{id}")
29033	urls += "?" + c.urlParams_.Encode()
29034	req, err := http.NewRequest("GET", urls, body)
29035	if err != nil {
29036		return nil, err
29037	}
29038	req.Header = reqHeaders
29039	googleapi.Expand(req.URL, map[string]string{
29040		"profileId": strconv.FormatInt(c.profileId, 10),
29041		"id":        strconv.FormatInt(c.id, 10),
29042	})
29043	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29044}
29045
29046// Do executes the "dfareporting.directorySites.get" call.
29047// Exactly one of *DirectorySite or error will be non-nil. Any non-2xx
29048// status code is an error. Response headers are in either
29049// *DirectorySite.ServerResponse.Header or (if a response was returned
29050// at all) in error.(*googleapi.Error).Header. Use
29051// googleapi.IsNotModified to check whether the returned error was
29052// because http.StatusNotModified was returned.
29053func (c *DirectorySitesGetCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
29054	gensupport.SetOptions(c.urlParams_, opts...)
29055	res, err := c.doRequest("json")
29056	if res != nil && res.StatusCode == http.StatusNotModified {
29057		if res.Body != nil {
29058			res.Body.Close()
29059		}
29060		return nil, &googleapi.Error{
29061			Code:   res.StatusCode,
29062			Header: res.Header,
29063		}
29064	}
29065	if err != nil {
29066		return nil, err
29067	}
29068	defer googleapi.CloseBody(res)
29069	if err := googleapi.CheckResponse(res); err != nil {
29070		return nil, err
29071	}
29072	ret := &DirectorySite{
29073		ServerResponse: googleapi.ServerResponse{
29074			Header:         res.Header,
29075			HTTPStatusCode: res.StatusCode,
29076		},
29077	}
29078	target := &ret
29079	if err := gensupport.DecodeResponse(target, res); err != nil {
29080		return nil, err
29081	}
29082	return ret, nil
29083	// {
29084	//   "description": "Gets one directory site by ID.",
29085	//   "httpMethod": "GET",
29086	//   "id": "dfareporting.directorySites.get",
29087	//   "parameterOrder": [
29088	//     "profileId",
29089	//     "id"
29090	//   ],
29091	//   "parameters": {
29092	//     "id": {
29093	//       "description": "Directory site ID.",
29094	//       "format": "int64",
29095	//       "location": "path",
29096	//       "required": true,
29097	//       "type": "string"
29098	//     },
29099	//     "profileId": {
29100	//       "description": "User profile ID associated with this request.",
29101	//       "format": "int64",
29102	//       "location": "path",
29103	//       "required": true,
29104	//       "type": "string"
29105	//     }
29106	//   },
29107	//   "path": "userprofiles/{profileId}/directorySites/{id}",
29108	//   "response": {
29109	//     "$ref": "DirectorySite"
29110	//   },
29111	//   "scopes": [
29112	//     "https://www.googleapis.com/auth/dfatrafficking"
29113	//   ]
29114	// }
29115
29116}
29117
29118// method id "dfareporting.directorySites.insert":
29119
29120type DirectorySitesInsertCall struct {
29121	s             *Service
29122	profileId     int64
29123	directorysite *DirectorySite
29124	urlParams_    gensupport.URLParams
29125	ctx_          context.Context
29126	header_       http.Header
29127}
29128
29129// Insert: Inserts a new directory site.
29130func (r *DirectorySitesService) Insert(profileId int64, directorysite *DirectorySite) *DirectorySitesInsertCall {
29131	c := &DirectorySitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29132	c.profileId = profileId
29133	c.directorysite = directorysite
29134	return c
29135}
29136
29137// Fields allows partial responses to be retrieved. See
29138// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29139// for more information.
29140func (c *DirectorySitesInsertCall) Fields(s ...googleapi.Field) *DirectorySitesInsertCall {
29141	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29142	return c
29143}
29144
29145// Context sets the context to be used in this call's Do method. Any
29146// pending HTTP request will be aborted if the provided context is
29147// canceled.
29148func (c *DirectorySitesInsertCall) Context(ctx context.Context) *DirectorySitesInsertCall {
29149	c.ctx_ = ctx
29150	return c
29151}
29152
29153// Header returns an http.Header that can be modified by the caller to
29154// add HTTP headers to the request.
29155func (c *DirectorySitesInsertCall) Header() http.Header {
29156	if c.header_ == nil {
29157		c.header_ = make(http.Header)
29158	}
29159	return c.header_
29160}
29161
29162func (c *DirectorySitesInsertCall) doRequest(alt string) (*http.Response, error) {
29163	reqHeaders := make(http.Header)
29164	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
29165	for k, v := range c.header_ {
29166		reqHeaders[k] = v
29167	}
29168	reqHeaders.Set("User-Agent", c.s.userAgent())
29169	var body io.Reader = nil
29170	body, err := googleapi.WithoutDataWrapper.JSONReader(c.directorysite)
29171	if err != nil {
29172		return nil, err
29173	}
29174	reqHeaders.Set("Content-Type", "application/json")
29175	c.urlParams_.Set("alt", alt)
29176	c.urlParams_.Set("prettyPrint", "false")
29177	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
29178	urls += "?" + c.urlParams_.Encode()
29179	req, err := http.NewRequest("POST", urls, body)
29180	if err != nil {
29181		return nil, err
29182	}
29183	req.Header = reqHeaders
29184	googleapi.Expand(req.URL, map[string]string{
29185		"profileId": strconv.FormatInt(c.profileId, 10),
29186	})
29187	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29188}
29189
29190// Do executes the "dfareporting.directorySites.insert" call.
29191// Exactly one of *DirectorySite or error will be non-nil. Any non-2xx
29192// status code is an error. Response headers are in either
29193// *DirectorySite.ServerResponse.Header or (if a response was returned
29194// at all) in error.(*googleapi.Error).Header. Use
29195// googleapi.IsNotModified to check whether the returned error was
29196// because http.StatusNotModified was returned.
29197func (c *DirectorySitesInsertCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
29198	gensupport.SetOptions(c.urlParams_, opts...)
29199	res, err := c.doRequest("json")
29200	if res != nil && res.StatusCode == http.StatusNotModified {
29201		if res.Body != nil {
29202			res.Body.Close()
29203		}
29204		return nil, &googleapi.Error{
29205			Code:   res.StatusCode,
29206			Header: res.Header,
29207		}
29208	}
29209	if err != nil {
29210		return nil, err
29211	}
29212	defer googleapi.CloseBody(res)
29213	if err := googleapi.CheckResponse(res); err != nil {
29214		return nil, err
29215	}
29216	ret := &DirectorySite{
29217		ServerResponse: googleapi.ServerResponse{
29218			Header:         res.Header,
29219			HTTPStatusCode: res.StatusCode,
29220		},
29221	}
29222	target := &ret
29223	if err := gensupport.DecodeResponse(target, res); err != nil {
29224		return nil, err
29225	}
29226	return ret, nil
29227	// {
29228	//   "description": "Inserts a new directory site.",
29229	//   "httpMethod": "POST",
29230	//   "id": "dfareporting.directorySites.insert",
29231	//   "parameterOrder": [
29232	//     "profileId"
29233	//   ],
29234	//   "parameters": {
29235	//     "profileId": {
29236	//       "description": "User profile ID associated with this request.",
29237	//       "format": "int64",
29238	//       "location": "path",
29239	//       "required": true,
29240	//       "type": "string"
29241	//     }
29242	//   },
29243	//   "path": "userprofiles/{profileId}/directorySites",
29244	//   "request": {
29245	//     "$ref": "DirectorySite"
29246	//   },
29247	//   "response": {
29248	//     "$ref": "DirectorySite"
29249	//   },
29250	//   "scopes": [
29251	//     "https://www.googleapis.com/auth/dfatrafficking"
29252	//   ]
29253	// }
29254
29255}
29256
29257// method id "dfareporting.directorySites.list":
29258
29259type DirectorySitesListCall struct {
29260	s            *Service
29261	profileId    int64
29262	urlParams_   gensupport.URLParams
29263	ifNoneMatch_ string
29264	ctx_         context.Context
29265	header_      http.Header
29266}
29267
29268// List: Retrieves a list of directory sites, possibly filtered. This
29269// method supports paging.
29270func (r *DirectorySitesService) List(profileId int64) *DirectorySitesListCall {
29271	c := &DirectorySitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29272	c.profileId = profileId
29273	return c
29274}
29275
29276// AcceptsInStreamVideoPlacements sets the optional parameter
29277// "acceptsInStreamVideoPlacements": This search filter is no longer
29278// supported and will have no effect on the results returned.
29279func (c *DirectorySitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *DirectorySitesListCall {
29280	c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
29281	return c
29282}
29283
29284// AcceptsInterstitialPlacements sets the optional parameter
29285// "acceptsInterstitialPlacements": This search filter is no longer
29286// supported and will have no effect on the results returned.
29287func (c *DirectorySitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *DirectorySitesListCall {
29288	c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
29289	return c
29290}
29291
29292// AcceptsPublisherPaidPlacements sets the optional parameter
29293// "acceptsPublisherPaidPlacements": Select only directory sites that
29294// accept publisher paid placements. This field can be left blank.
29295func (c *DirectorySitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *DirectorySitesListCall {
29296	c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
29297	return c
29298}
29299
29300// Active sets the optional parameter "active": Select only active
29301// directory sites. Leave blank to retrieve both active and inactive
29302// directory sites.
29303func (c *DirectorySitesListCall) Active(active bool) *DirectorySitesListCall {
29304	c.urlParams_.Set("active", fmt.Sprint(active))
29305	return c
29306}
29307
29308// DfpNetworkCode sets the optional parameter "dfpNetworkCode": Select
29309// only directory sites with this Ad Manager network code.
29310func (c *DirectorySitesListCall) DfpNetworkCode(dfpNetworkCode string) *DirectorySitesListCall {
29311	c.urlParams_.Set("dfpNetworkCode", dfpNetworkCode)
29312	return c
29313}
29314
29315// Ids sets the optional parameter "ids": Select only directory sites
29316// with these IDs.
29317func (c *DirectorySitesListCall) Ids(ids ...int64) *DirectorySitesListCall {
29318	var ids_ []string
29319	for _, v := range ids {
29320		ids_ = append(ids_, fmt.Sprint(v))
29321	}
29322	c.urlParams_.SetMulti("ids", ids_)
29323	return c
29324}
29325
29326// MaxResults sets the optional parameter "maxResults": Maximum number
29327// of results to return.
29328func (c *DirectorySitesListCall) MaxResults(maxResults int64) *DirectorySitesListCall {
29329	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29330	return c
29331}
29332
29333// PageToken sets the optional parameter "pageToken": Value of the
29334// nextPageToken from the previous result page.
29335func (c *DirectorySitesListCall) PageToken(pageToken string) *DirectorySitesListCall {
29336	c.urlParams_.Set("pageToken", pageToken)
29337	return c
29338}
29339
29340// SearchString sets the optional parameter "searchString": Allows
29341// searching for objects by name, ID or URL. Wildcards (*) are allowed.
29342// For example, "directory site*2015" will return objects with names
29343// like "directory site June 2015", "directory site April 2015", or
29344// simply "directory site 2015". Most of the searches also add wildcards
29345// implicitly at the start and the end of the search string. For
29346// example, a search string of "directory site" will match objects with
29347// name "my directory site", "directory site 2015" or simply, "directory
29348// site".
29349func (c *DirectorySitesListCall) SearchString(searchString string) *DirectorySitesListCall {
29350	c.urlParams_.Set("searchString", searchString)
29351	return c
29352}
29353
29354// SortField sets the optional parameter "sortField": Field by which to
29355// sort the list.
29356//
29357// Possible values:
29358//   "ID" (default)
29359//   "NAME"
29360func (c *DirectorySitesListCall) SortField(sortField string) *DirectorySitesListCall {
29361	c.urlParams_.Set("sortField", sortField)
29362	return c
29363}
29364
29365// SortOrder sets the optional parameter "sortOrder": Order of sorted
29366// results.
29367//
29368// Possible values:
29369//   "ASCENDING" (default)
29370//   "DESCENDING"
29371func (c *DirectorySitesListCall) SortOrder(sortOrder string) *DirectorySitesListCall {
29372	c.urlParams_.Set("sortOrder", sortOrder)
29373	return c
29374}
29375
29376// Fields allows partial responses to be retrieved. See
29377// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29378// for more information.
29379func (c *DirectorySitesListCall) Fields(s ...googleapi.Field) *DirectorySitesListCall {
29380	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29381	return c
29382}
29383
29384// IfNoneMatch sets the optional parameter which makes the operation
29385// fail if the object's ETag matches the given value. This is useful for
29386// getting updates only after the object has changed since the last
29387// request. Use googleapi.IsNotModified to check whether the response
29388// error from Do is the result of In-None-Match.
29389func (c *DirectorySitesListCall) IfNoneMatch(entityTag string) *DirectorySitesListCall {
29390	c.ifNoneMatch_ = entityTag
29391	return c
29392}
29393
29394// Context sets the context to be used in this call's Do method. Any
29395// pending HTTP request will be aborted if the provided context is
29396// canceled.
29397func (c *DirectorySitesListCall) Context(ctx context.Context) *DirectorySitesListCall {
29398	c.ctx_ = ctx
29399	return c
29400}
29401
29402// Header returns an http.Header that can be modified by the caller to
29403// add HTTP headers to the request.
29404func (c *DirectorySitesListCall) Header() http.Header {
29405	if c.header_ == nil {
29406		c.header_ = make(http.Header)
29407	}
29408	return c.header_
29409}
29410
29411func (c *DirectorySitesListCall) doRequest(alt string) (*http.Response, error) {
29412	reqHeaders := make(http.Header)
29413	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
29414	for k, v := range c.header_ {
29415		reqHeaders[k] = v
29416	}
29417	reqHeaders.Set("User-Agent", c.s.userAgent())
29418	if c.ifNoneMatch_ != "" {
29419		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29420	}
29421	var body io.Reader = nil
29422	c.urlParams_.Set("alt", alt)
29423	c.urlParams_.Set("prettyPrint", "false")
29424	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
29425	urls += "?" + c.urlParams_.Encode()
29426	req, err := http.NewRequest("GET", urls, body)
29427	if err != nil {
29428		return nil, err
29429	}
29430	req.Header = reqHeaders
29431	googleapi.Expand(req.URL, map[string]string{
29432		"profileId": strconv.FormatInt(c.profileId, 10),
29433	})
29434	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29435}
29436
29437// Do executes the "dfareporting.directorySites.list" call.
29438// Exactly one of *DirectorySitesListResponse or error will be non-nil.
29439// Any non-2xx status code is an error. Response headers are in either
29440// *DirectorySitesListResponse.ServerResponse.Header or (if a response
29441// was returned at all) in error.(*googleapi.Error).Header. Use
29442// googleapi.IsNotModified to check whether the returned error was
29443// because http.StatusNotModified was returned.
29444func (c *DirectorySitesListCall) Do(opts ...googleapi.CallOption) (*DirectorySitesListResponse, error) {
29445	gensupport.SetOptions(c.urlParams_, opts...)
29446	res, err := c.doRequest("json")
29447	if res != nil && res.StatusCode == http.StatusNotModified {
29448		if res.Body != nil {
29449			res.Body.Close()
29450		}
29451		return nil, &googleapi.Error{
29452			Code:   res.StatusCode,
29453			Header: res.Header,
29454		}
29455	}
29456	if err != nil {
29457		return nil, err
29458	}
29459	defer googleapi.CloseBody(res)
29460	if err := googleapi.CheckResponse(res); err != nil {
29461		return nil, err
29462	}
29463	ret := &DirectorySitesListResponse{
29464		ServerResponse: googleapi.ServerResponse{
29465			Header:         res.Header,
29466			HTTPStatusCode: res.StatusCode,
29467		},
29468	}
29469	target := &ret
29470	if err := gensupport.DecodeResponse(target, res); err != nil {
29471		return nil, err
29472	}
29473	return ret, nil
29474	// {
29475	//   "description": "Retrieves a list of directory sites, possibly filtered. This method supports paging.",
29476	//   "httpMethod": "GET",
29477	//   "id": "dfareporting.directorySites.list",
29478	//   "parameterOrder": [
29479	//     "profileId"
29480	//   ],
29481	//   "parameters": {
29482	//     "acceptsInStreamVideoPlacements": {
29483	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
29484	//       "location": "query",
29485	//       "type": "boolean"
29486	//     },
29487	//     "acceptsInterstitialPlacements": {
29488	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
29489	//       "location": "query",
29490	//       "type": "boolean"
29491	//     },
29492	//     "acceptsPublisherPaidPlacements": {
29493	//       "description": "Select only directory sites that accept publisher paid placements. This field can be left blank.",
29494	//       "location": "query",
29495	//       "type": "boolean"
29496	//     },
29497	//     "active": {
29498	//       "description": "Select only active directory sites. Leave blank to retrieve both active and inactive directory sites.",
29499	//       "location": "query",
29500	//       "type": "boolean"
29501	//     },
29502	//     "dfpNetworkCode": {
29503	//       "description": "Select only directory sites with this Ad Manager network code.",
29504	//       "location": "query",
29505	//       "type": "string"
29506	//     },
29507	//     "ids": {
29508	//       "description": "Select only directory sites with these IDs.",
29509	//       "format": "int64",
29510	//       "location": "query",
29511	//       "repeated": true,
29512	//       "type": "string"
29513	//     },
29514	//     "maxResults": {
29515	//       "default": "1000",
29516	//       "description": "Maximum number of results to return.",
29517	//       "format": "int32",
29518	//       "location": "query",
29519	//       "maximum": "1000",
29520	//       "minimum": "0",
29521	//       "type": "integer"
29522	//     },
29523	//     "pageToken": {
29524	//       "description": "Value of the nextPageToken from the previous result page.",
29525	//       "location": "query",
29526	//       "type": "string"
29527	//     },
29528	//     "profileId": {
29529	//       "description": "User profile ID associated with this request.",
29530	//       "format": "int64",
29531	//       "location": "path",
29532	//       "required": true,
29533	//       "type": "string"
29534	//     },
29535	//     "searchString": {
29536	//       "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\".",
29537	//       "location": "query",
29538	//       "type": "string"
29539	//     },
29540	//     "sortField": {
29541	//       "default": "ID",
29542	//       "description": "Field by which to sort the list.",
29543	//       "enum": [
29544	//         "ID",
29545	//         "NAME"
29546	//       ],
29547	//       "enumDescriptions": [
29548	//         "",
29549	//         ""
29550	//       ],
29551	//       "location": "query",
29552	//       "type": "string"
29553	//     },
29554	//     "sortOrder": {
29555	//       "default": "ASCENDING",
29556	//       "description": "Order of sorted results.",
29557	//       "enum": [
29558	//         "ASCENDING",
29559	//         "DESCENDING"
29560	//       ],
29561	//       "enumDescriptions": [
29562	//         "",
29563	//         ""
29564	//       ],
29565	//       "location": "query",
29566	//       "type": "string"
29567	//     }
29568	//   },
29569	//   "path": "userprofiles/{profileId}/directorySites",
29570	//   "response": {
29571	//     "$ref": "DirectorySitesListResponse"
29572	//   },
29573	//   "scopes": [
29574	//     "https://www.googleapis.com/auth/dfatrafficking"
29575	//   ]
29576	// }
29577
29578}
29579
29580// Pages invokes f for each page of results.
29581// A non-nil error returned from f will halt the iteration.
29582// The provided context supersedes any context provided to the Context method.
29583func (c *DirectorySitesListCall) Pages(ctx context.Context, f func(*DirectorySitesListResponse) error) error {
29584	c.ctx_ = ctx
29585	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29586	for {
29587		x, err := c.Do()
29588		if err != nil {
29589			return err
29590		}
29591		if err := f(x); err != nil {
29592			return err
29593		}
29594		if x.NextPageToken == "" {
29595			return nil
29596		}
29597		c.PageToken(x.NextPageToken)
29598	}
29599}
29600
29601// method id "dfareporting.dynamicTargetingKeys.delete":
29602
29603type DynamicTargetingKeysDeleteCall struct {
29604	s          *Service
29605	profileId  int64
29606	objectId   int64
29607	urlParams_ gensupport.URLParams
29608	ctx_       context.Context
29609	header_    http.Header
29610}
29611
29612// Delete: Deletes an existing dynamic targeting key.
29613func (r *DynamicTargetingKeysService) Delete(profileId int64, objectId int64, name string, objectType string) *DynamicTargetingKeysDeleteCall {
29614	c := &DynamicTargetingKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29615	c.profileId = profileId
29616	c.objectId = objectId
29617	c.urlParams_.Set("name", name)
29618	c.urlParams_.Set("objectType", objectType)
29619	return c
29620}
29621
29622// Fields allows partial responses to be retrieved. See
29623// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29624// for more information.
29625func (c *DynamicTargetingKeysDeleteCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysDeleteCall {
29626	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29627	return c
29628}
29629
29630// Context sets the context to be used in this call's Do method. Any
29631// pending HTTP request will be aborted if the provided context is
29632// canceled.
29633func (c *DynamicTargetingKeysDeleteCall) Context(ctx context.Context) *DynamicTargetingKeysDeleteCall {
29634	c.ctx_ = ctx
29635	return c
29636}
29637
29638// Header returns an http.Header that can be modified by the caller to
29639// add HTTP headers to the request.
29640func (c *DynamicTargetingKeysDeleteCall) Header() http.Header {
29641	if c.header_ == nil {
29642		c.header_ = make(http.Header)
29643	}
29644	return c.header_
29645}
29646
29647func (c *DynamicTargetingKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
29648	reqHeaders := make(http.Header)
29649	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
29650	for k, v := range c.header_ {
29651		reqHeaders[k] = v
29652	}
29653	reqHeaders.Set("User-Agent", c.s.userAgent())
29654	var body io.Reader = nil
29655	c.urlParams_.Set("alt", alt)
29656	c.urlParams_.Set("prettyPrint", "false")
29657	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}")
29658	urls += "?" + c.urlParams_.Encode()
29659	req, err := http.NewRequest("DELETE", urls, body)
29660	if err != nil {
29661		return nil, err
29662	}
29663	req.Header = reqHeaders
29664	googleapi.Expand(req.URL, map[string]string{
29665		"profileId": strconv.FormatInt(c.profileId, 10),
29666		"objectId":  strconv.FormatInt(c.objectId, 10),
29667	})
29668	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29669}
29670
29671// Do executes the "dfareporting.dynamicTargetingKeys.delete" call.
29672func (c *DynamicTargetingKeysDeleteCall) Do(opts ...googleapi.CallOption) error {
29673	gensupport.SetOptions(c.urlParams_, opts...)
29674	res, err := c.doRequest("json")
29675	if err != nil {
29676		return err
29677	}
29678	defer googleapi.CloseBody(res)
29679	if err := googleapi.CheckResponse(res); err != nil {
29680		return err
29681	}
29682	return nil
29683	// {
29684	//   "description": "Deletes an existing dynamic targeting key.",
29685	//   "httpMethod": "DELETE",
29686	//   "id": "dfareporting.dynamicTargetingKeys.delete",
29687	//   "parameterOrder": [
29688	//     "profileId",
29689	//     "objectId",
29690	//     "name",
29691	//     "objectType"
29692	//   ],
29693	//   "parameters": {
29694	//     "name": {
29695	//       "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.",
29696	//       "location": "query",
29697	//       "required": true,
29698	//       "type": "string"
29699	//     },
29700	//     "objectId": {
29701	//       "description": "ID of the object of this dynamic targeting key. This is a required field.",
29702	//       "format": "int64",
29703	//       "location": "path",
29704	//       "required": true,
29705	//       "type": "string"
29706	//     },
29707	//     "objectType": {
29708	//       "description": "Type of the object of this dynamic targeting key. This is a required field.",
29709	//       "enum": [
29710	//         "OBJECT_AD",
29711	//         "OBJECT_ADVERTISER",
29712	//         "OBJECT_CREATIVE",
29713	//         "OBJECT_PLACEMENT"
29714	//       ],
29715	//       "enumDescriptions": [
29716	//         "",
29717	//         "",
29718	//         "",
29719	//         ""
29720	//       ],
29721	//       "location": "query",
29722	//       "required": true,
29723	//       "type": "string"
29724	//     },
29725	//     "profileId": {
29726	//       "description": "User profile ID associated with this request.",
29727	//       "format": "int64",
29728	//       "location": "path",
29729	//       "required": true,
29730	//       "type": "string"
29731	//     }
29732	//   },
29733	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}",
29734	//   "scopes": [
29735	//     "https://www.googleapis.com/auth/dfatrafficking"
29736	//   ]
29737	// }
29738
29739}
29740
29741// method id "dfareporting.dynamicTargetingKeys.insert":
29742
29743type DynamicTargetingKeysInsertCall struct {
29744	s                   *Service
29745	profileId           int64
29746	dynamictargetingkey *DynamicTargetingKey
29747	urlParams_          gensupport.URLParams
29748	ctx_                context.Context
29749	header_             http.Header
29750}
29751
29752// Insert: Inserts a new dynamic targeting key. Keys must be created at
29753// the advertiser level before being assigned to the advertiser's ads,
29754// creatives, or placements. There is a maximum of 1000 keys per
29755// advertiser, out of which a maximum of 20 keys can be assigned per ad,
29756// creative, or placement.
29757func (r *DynamicTargetingKeysService) Insert(profileId int64, dynamictargetingkey *DynamicTargetingKey) *DynamicTargetingKeysInsertCall {
29758	c := &DynamicTargetingKeysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29759	c.profileId = profileId
29760	c.dynamictargetingkey = dynamictargetingkey
29761	return c
29762}
29763
29764// Fields allows partial responses to be retrieved. See
29765// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29766// for more information.
29767func (c *DynamicTargetingKeysInsertCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysInsertCall {
29768	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29769	return c
29770}
29771
29772// Context sets the context to be used in this call's Do method. Any
29773// pending HTTP request will be aborted if the provided context is
29774// canceled.
29775func (c *DynamicTargetingKeysInsertCall) Context(ctx context.Context) *DynamicTargetingKeysInsertCall {
29776	c.ctx_ = ctx
29777	return c
29778}
29779
29780// Header returns an http.Header that can be modified by the caller to
29781// add HTTP headers to the request.
29782func (c *DynamicTargetingKeysInsertCall) Header() http.Header {
29783	if c.header_ == nil {
29784		c.header_ = make(http.Header)
29785	}
29786	return c.header_
29787}
29788
29789func (c *DynamicTargetingKeysInsertCall) doRequest(alt string) (*http.Response, error) {
29790	reqHeaders := make(http.Header)
29791	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
29792	for k, v := range c.header_ {
29793		reqHeaders[k] = v
29794	}
29795	reqHeaders.Set("User-Agent", c.s.userAgent())
29796	var body io.Reader = nil
29797	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dynamictargetingkey)
29798	if err != nil {
29799		return nil, err
29800	}
29801	reqHeaders.Set("Content-Type", "application/json")
29802	c.urlParams_.Set("alt", alt)
29803	c.urlParams_.Set("prettyPrint", "false")
29804	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
29805	urls += "?" + c.urlParams_.Encode()
29806	req, err := http.NewRequest("POST", urls, body)
29807	if err != nil {
29808		return nil, err
29809	}
29810	req.Header = reqHeaders
29811	googleapi.Expand(req.URL, map[string]string{
29812		"profileId": strconv.FormatInt(c.profileId, 10),
29813	})
29814	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29815}
29816
29817// Do executes the "dfareporting.dynamicTargetingKeys.insert" call.
29818// Exactly one of *DynamicTargetingKey or error will be non-nil. Any
29819// non-2xx status code is an error. Response headers are in either
29820// *DynamicTargetingKey.ServerResponse.Header or (if a response was
29821// returned at all) in error.(*googleapi.Error).Header. Use
29822// googleapi.IsNotModified to check whether the returned error was
29823// because http.StatusNotModified was returned.
29824func (c *DynamicTargetingKeysInsertCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKey, error) {
29825	gensupport.SetOptions(c.urlParams_, opts...)
29826	res, err := c.doRequest("json")
29827	if res != nil && res.StatusCode == http.StatusNotModified {
29828		if res.Body != nil {
29829			res.Body.Close()
29830		}
29831		return nil, &googleapi.Error{
29832			Code:   res.StatusCode,
29833			Header: res.Header,
29834		}
29835	}
29836	if err != nil {
29837		return nil, err
29838	}
29839	defer googleapi.CloseBody(res)
29840	if err := googleapi.CheckResponse(res); err != nil {
29841		return nil, err
29842	}
29843	ret := &DynamicTargetingKey{
29844		ServerResponse: googleapi.ServerResponse{
29845			Header:         res.Header,
29846			HTTPStatusCode: res.StatusCode,
29847		},
29848	}
29849	target := &ret
29850	if err := gensupport.DecodeResponse(target, res); err != nil {
29851		return nil, err
29852	}
29853	return ret, nil
29854	// {
29855	//   "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.",
29856	//   "httpMethod": "POST",
29857	//   "id": "dfareporting.dynamicTargetingKeys.insert",
29858	//   "parameterOrder": [
29859	//     "profileId"
29860	//   ],
29861	//   "parameters": {
29862	//     "profileId": {
29863	//       "description": "User profile ID associated with this request.",
29864	//       "format": "int64",
29865	//       "location": "path",
29866	//       "required": true,
29867	//       "type": "string"
29868	//     }
29869	//   },
29870	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys",
29871	//   "request": {
29872	//     "$ref": "DynamicTargetingKey"
29873	//   },
29874	//   "response": {
29875	//     "$ref": "DynamicTargetingKey"
29876	//   },
29877	//   "scopes": [
29878	//     "https://www.googleapis.com/auth/dfatrafficking"
29879	//   ]
29880	// }
29881
29882}
29883
29884// method id "dfareporting.dynamicTargetingKeys.list":
29885
29886type DynamicTargetingKeysListCall struct {
29887	s            *Service
29888	profileId    int64
29889	urlParams_   gensupport.URLParams
29890	ifNoneMatch_ string
29891	ctx_         context.Context
29892	header_      http.Header
29893}
29894
29895// List: Retrieves a list of dynamic targeting keys.
29896func (r *DynamicTargetingKeysService) List(profileId int64) *DynamicTargetingKeysListCall {
29897	c := &DynamicTargetingKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29898	c.profileId = profileId
29899	return c
29900}
29901
29902// AdvertiserId sets the optional parameter "advertiserId": Select only
29903// dynamic targeting keys whose object has this advertiser ID.
29904func (c *DynamicTargetingKeysListCall) AdvertiserId(advertiserId int64) *DynamicTargetingKeysListCall {
29905	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
29906	return c
29907}
29908
29909// Names sets the optional parameter "names": Select only dynamic
29910// targeting keys exactly matching these names.
29911func (c *DynamicTargetingKeysListCall) Names(names ...string) *DynamicTargetingKeysListCall {
29912	c.urlParams_.SetMulti("names", append([]string{}, names...))
29913	return c
29914}
29915
29916// ObjectId sets the optional parameter "objectId": Select only dynamic
29917// targeting keys with this object ID.
29918func (c *DynamicTargetingKeysListCall) ObjectId(objectId int64) *DynamicTargetingKeysListCall {
29919	c.urlParams_.Set("objectId", fmt.Sprint(objectId))
29920	return c
29921}
29922
29923// ObjectType sets the optional parameter "objectType": Select only
29924// dynamic targeting keys with this object type.
29925//
29926// Possible values:
29927//   "OBJECT_AD"
29928//   "OBJECT_ADVERTISER"
29929//   "OBJECT_CREATIVE"
29930//   "OBJECT_PLACEMENT"
29931func (c *DynamicTargetingKeysListCall) ObjectType(objectType string) *DynamicTargetingKeysListCall {
29932	c.urlParams_.Set("objectType", objectType)
29933	return c
29934}
29935
29936// Fields allows partial responses to be retrieved. See
29937// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29938// for more information.
29939func (c *DynamicTargetingKeysListCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysListCall {
29940	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29941	return c
29942}
29943
29944// IfNoneMatch sets the optional parameter which makes the operation
29945// fail if the object's ETag matches the given value. This is useful for
29946// getting updates only after the object has changed since the last
29947// request. Use googleapi.IsNotModified to check whether the response
29948// error from Do is the result of In-None-Match.
29949func (c *DynamicTargetingKeysListCall) IfNoneMatch(entityTag string) *DynamicTargetingKeysListCall {
29950	c.ifNoneMatch_ = entityTag
29951	return c
29952}
29953
29954// Context sets the context to be used in this call's Do method. Any
29955// pending HTTP request will be aborted if the provided context is
29956// canceled.
29957func (c *DynamicTargetingKeysListCall) Context(ctx context.Context) *DynamicTargetingKeysListCall {
29958	c.ctx_ = ctx
29959	return c
29960}
29961
29962// Header returns an http.Header that can be modified by the caller to
29963// add HTTP headers to the request.
29964func (c *DynamicTargetingKeysListCall) Header() http.Header {
29965	if c.header_ == nil {
29966		c.header_ = make(http.Header)
29967	}
29968	return c.header_
29969}
29970
29971func (c *DynamicTargetingKeysListCall) doRequest(alt string) (*http.Response, error) {
29972	reqHeaders := make(http.Header)
29973	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
29974	for k, v := range c.header_ {
29975		reqHeaders[k] = v
29976	}
29977	reqHeaders.Set("User-Agent", c.s.userAgent())
29978	if c.ifNoneMatch_ != "" {
29979		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29980	}
29981	var body io.Reader = nil
29982	c.urlParams_.Set("alt", alt)
29983	c.urlParams_.Set("prettyPrint", "false")
29984	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
29985	urls += "?" + c.urlParams_.Encode()
29986	req, err := http.NewRequest("GET", urls, body)
29987	if err != nil {
29988		return nil, err
29989	}
29990	req.Header = reqHeaders
29991	googleapi.Expand(req.URL, map[string]string{
29992		"profileId": strconv.FormatInt(c.profileId, 10),
29993	})
29994	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29995}
29996
29997// Do executes the "dfareporting.dynamicTargetingKeys.list" call.
29998// Exactly one of *DynamicTargetingKeysListResponse or error will be
29999// non-nil. Any non-2xx status code is an error. Response headers are in
30000// either *DynamicTargetingKeysListResponse.ServerResponse.Header or (if
30001// a response was returned at all) in error.(*googleapi.Error).Header.
30002// Use googleapi.IsNotModified to check whether the returned error was
30003// because http.StatusNotModified was returned.
30004func (c *DynamicTargetingKeysListCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKeysListResponse, error) {
30005	gensupport.SetOptions(c.urlParams_, opts...)
30006	res, err := c.doRequest("json")
30007	if res != nil && res.StatusCode == http.StatusNotModified {
30008		if res.Body != nil {
30009			res.Body.Close()
30010		}
30011		return nil, &googleapi.Error{
30012			Code:   res.StatusCode,
30013			Header: res.Header,
30014		}
30015	}
30016	if err != nil {
30017		return nil, err
30018	}
30019	defer googleapi.CloseBody(res)
30020	if err := googleapi.CheckResponse(res); err != nil {
30021		return nil, err
30022	}
30023	ret := &DynamicTargetingKeysListResponse{
30024		ServerResponse: googleapi.ServerResponse{
30025			Header:         res.Header,
30026			HTTPStatusCode: res.StatusCode,
30027		},
30028	}
30029	target := &ret
30030	if err := gensupport.DecodeResponse(target, res); err != nil {
30031		return nil, err
30032	}
30033	return ret, nil
30034	// {
30035	//   "description": "Retrieves a list of dynamic targeting keys.",
30036	//   "httpMethod": "GET",
30037	//   "id": "dfareporting.dynamicTargetingKeys.list",
30038	//   "parameterOrder": [
30039	//     "profileId"
30040	//   ],
30041	//   "parameters": {
30042	//     "advertiserId": {
30043	//       "description": "Select only dynamic targeting keys whose object has this advertiser ID.",
30044	//       "format": "int64",
30045	//       "location": "query",
30046	//       "type": "string"
30047	//     },
30048	//     "names": {
30049	//       "description": "Select only dynamic targeting keys exactly matching these names.",
30050	//       "location": "query",
30051	//       "repeated": true,
30052	//       "type": "string"
30053	//     },
30054	//     "objectId": {
30055	//       "description": "Select only dynamic targeting keys with this object ID.",
30056	//       "format": "int64",
30057	//       "location": "query",
30058	//       "type": "string"
30059	//     },
30060	//     "objectType": {
30061	//       "description": "Select only dynamic targeting keys with this object type.",
30062	//       "enum": [
30063	//         "OBJECT_AD",
30064	//         "OBJECT_ADVERTISER",
30065	//         "OBJECT_CREATIVE",
30066	//         "OBJECT_PLACEMENT"
30067	//       ],
30068	//       "enumDescriptions": [
30069	//         "",
30070	//         "",
30071	//         "",
30072	//         ""
30073	//       ],
30074	//       "location": "query",
30075	//       "type": "string"
30076	//     },
30077	//     "profileId": {
30078	//       "description": "User profile ID associated with this request.",
30079	//       "format": "int64",
30080	//       "location": "path",
30081	//       "required": true,
30082	//       "type": "string"
30083	//     }
30084	//   },
30085	//   "path": "userprofiles/{profileId}/dynamicTargetingKeys",
30086	//   "response": {
30087	//     "$ref": "DynamicTargetingKeysListResponse"
30088	//   },
30089	//   "scopes": [
30090	//     "https://www.googleapis.com/auth/dfatrafficking"
30091	//   ]
30092	// }
30093
30094}
30095
30096// method id "dfareporting.eventTags.delete":
30097
30098type EventTagsDeleteCall struct {
30099	s          *Service
30100	profileId  int64
30101	id         int64
30102	urlParams_ gensupport.URLParams
30103	ctx_       context.Context
30104	header_    http.Header
30105}
30106
30107// Delete: Deletes an existing event tag.
30108func (r *EventTagsService) Delete(profileId int64, id int64) *EventTagsDeleteCall {
30109	c := &EventTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30110	c.profileId = profileId
30111	c.id = id
30112	return c
30113}
30114
30115// Fields allows partial responses to be retrieved. See
30116// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30117// for more information.
30118func (c *EventTagsDeleteCall) Fields(s ...googleapi.Field) *EventTagsDeleteCall {
30119	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30120	return c
30121}
30122
30123// Context sets the context to be used in this call's Do method. Any
30124// pending HTTP request will be aborted if the provided context is
30125// canceled.
30126func (c *EventTagsDeleteCall) Context(ctx context.Context) *EventTagsDeleteCall {
30127	c.ctx_ = ctx
30128	return c
30129}
30130
30131// Header returns an http.Header that can be modified by the caller to
30132// add HTTP headers to the request.
30133func (c *EventTagsDeleteCall) Header() http.Header {
30134	if c.header_ == nil {
30135		c.header_ = make(http.Header)
30136	}
30137	return c.header_
30138}
30139
30140func (c *EventTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
30141	reqHeaders := make(http.Header)
30142	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
30143	for k, v := range c.header_ {
30144		reqHeaders[k] = v
30145	}
30146	reqHeaders.Set("User-Agent", c.s.userAgent())
30147	var body io.Reader = nil
30148	c.urlParams_.Set("alt", alt)
30149	c.urlParams_.Set("prettyPrint", "false")
30150	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
30151	urls += "?" + c.urlParams_.Encode()
30152	req, err := http.NewRequest("DELETE", urls, body)
30153	if err != nil {
30154		return nil, err
30155	}
30156	req.Header = reqHeaders
30157	googleapi.Expand(req.URL, map[string]string{
30158		"profileId": strconv.FormatInt(c.profileId, 10),
30159		"id":        strconv.FormatInt(c.id, 10),
30160	})
30161	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30162}
30163
30164// Do executes the "dfareporting.eventTags.delete" call.
30165func (c *EventTagsDeleteCall) Do(opts ...googleapi.CallOption) error {
30166	gensupport.SetOptions(c.urlParams_, opts...)
30167	res, err := c.doRequest("json")
30168	if err != nil {
30169		return err
30170	}
30171	defer googleapi.CloseBody(res)
30172	if err := googleapi.CheckResponse(res); err != nil {
30173		return err
30174	}
30175	return nil
30176	// {
30177	//   "description": "Deletes an existing event tag.",
30178	//   "httpMethod": "DELETE",
30179	//   "id": "dfareporting.eventTags.delete",
30180	//   "parameterOrder": [
30181	//     "profileId",
30182	//     "id"
30183	//   ],
30184	//   "parameters": {
30185	//     "id": {
30186	//       "description": "Event tag ID.",
30187	//       "format": "int64",
30188	//       "location": "path",
30189	//       "required": true,
30190	//       "type": "string"
30191	//     },
30192	//     "profileId": {
30193	//       "description": "User profile ID associated with this request.",
30194	//       "format": "int64",
30195	//       "location": "path",
30196	//       "required": true,
30197	//       "type": "string"
30198	//     }
30199	//   },
30200	//   "path": "userprofiles/{profileId}/eventTags/{id}",
30201	//   "scopes": [
30202	//     "https://www.googleapis.com/auth/dfatrafficking"
30203	//   ]
30204	// }
30205
30206}
30207
30208// method id "dfareporting.eventTags.get":
30209
30210type EventTagsGetCall struct {
30211	s            *Service
30212	profileId    int64
30213	id           int64
30214	urlParams_   gensupport.URLParams
30215	ifNoneMatch_ string
30216	ctx_         context.Context
30217	header_      http.Header
30218}
30219
30220// Get: Gets one event tag by ID.
30221func (r *EventTagsService) Get(profileId int64, id int64) *EventTagsGetCall {
30222	c := &EventTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30223	c.profileId = profileId
30224	c.id = id
30225	return c
30226}
30227
30228// Fields allows partial responses to be retrieved. See
30229// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30230// for more information.
30231func (c *EventTagsGetCall) Fields(s ...googleapi.Field) *EventTagsGetCall {
30232	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30233	return c
30234}
30235
30236// IfNoneMatch sets the optional parameter which makes the operation
30237// fail if the object's ETag matches the given value. This is useful for
30238// getting updates only after the object has changed since the last
30239// request. Use googleapi.IsNotModified to check whether the response
30240// error from Do is the result of In-None-Match.
30241func (c *EventTagsGetCall) IfNoneMatch(entityTag string) *EventTagsGetCall {
30242	c.ifNoneMatch_ = entityTag
30243	return c
30244}
30245
30246// Context sets the context to be used in this call's Do method. Any
30247// pending HTTP request will be aborted if the provided context is
30248// canceled.
30249func (c *EventTagsGetCall) Context(ctx context.Context) *EventTagsGetCall {
30250	c.ctx_ = ctx
30251	return c
30252}
30253
30254// Header returns an http.Header that can be modified by the caller to
30255// add HTTP headers to the request.
30256func (c *EventTagsGetCall) Header() http.Header {
30257	if c.header_ == nil {
30258		c.header_ = make(http.Header)
30259	}
30260	return c.header_
30261}
30262
30263func (c *EventTagsGetCall) doRequest(alt string) (*http.Response, error) {
30264	reqHeaders := make(http.Header)
30265	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
30266	for k, v := range c.header_ {
30267		reqHeaders[k] = v
30268	}
30269	reqHeaders.Set("User-Agent", c.s.userAgent())
30270	if c.ifNoneMatch_ != "" {
30271		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30272	}
30273	var body io.Reader = nil
30274	c.urlParams_.Set("alt", alt)
30275	c.urlParams_.Set("prettyPrint", "false")
30276	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
30277	urls += "?" + c.urlParams_.Encode()
30278	req, err := http.NewRequest("GET", urls, body)
30279	if err != nil {
30280		return nil, err
30281	}
30282	req.Header = reqHeaders
30283	googleapi.Expand(req.URL, map[string]string{
30284		"profileId": strconv.FormatInt(c.profileId, 10),
30285		"id":        strconv.FormatInt(c.id, 10),
30286	})
30287	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30288}
30289
30290// Do executes the "dfareporting.eventTags.get" call.
30291// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
30292// code is an error. Response headers are in either
30293// *EventTag.ServerResponse.Header or (if a response was returned at
30294// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30295// to check whether the returned error was because
30296// http.StatusNotModified was returned.
30297func (c *EventTagsGetCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
30298	gensupport.SetOptions(c.urlParams_, opts...)
30299	res, err := c.doRequest("json")
30300	if res != nil && res.StatusCode == http.StatusNotModified {
30301		if res.Body != nil {
30302			res.Body.Close()
30303		}
30304		return nil, &googleapi.Error{
30305			Code:   res.StatusCode,
30306			Header: res.Header,
30307		}
30308	}
30309	if err != nil {
30310		return nil, err
30311	}
30312	defer googleapi.CloseBody(res)
30313	if err := googleapi.CheckResponse(res); err != nil {
30314		return nil, err
30315	}
30316	ret := &EventTag{
30317		ServerResponse: googleapi.ServerResponse{
30318			Header:         res.Header,
30319			HTTPStatusCode: res.StatusCode,
30320		},
30321	}
30322	target := &ret
30323	if err := gensupport.DecodeResponse(target, res); err != nil {
30324		return nil, err
30325	}
30326	return ret, nil
30327	// {
30328	//   "description": "Gets one event tag by ID.",
30329	//   "httpMethod": "GET",
30330	//   "id": "dfareporting.eventTags.get",
30331	//   "parameterOrder": [
30332	//     "profileId",
30333	//     "id"
30334	//   ],
30335	//   "parameters": {
30336	//     "id": {
30337	//       "description": "Event tag ID.",
30338	//       "format": "int64",
30339	//       "location": "path",
30340	//       "required": true,
30341	//       "type": "string"
30342	//     },
30343	//     "profileId": {
30344	//       "description": "User profile ID associated with this request.",
30345	//       "format": "int64",
30346	//       "location": "path",
30347	//       "required": true,
30348	//       "type": "string"
30349	//     }
30350	//   },
30351	//   "path": "userprofiles/{profileId}/eventTags/{id}",
30352	//   "response": {
30353	//     "$ref": "EventTag"
30354	//   },
30355	//   "scopes": [
30356	//     "https://www.googleapis.com/auth/dfatrafficking"
30357	//   ]
30358	// }
30359
30360}
30361
30362// method id "dfareporting.eventTags.insert":
30363
30364type EventTagsInsertCall struct {
30365	s          *Service
30366	profileId  int64
30367	eventtag   *EventTag
30368	urlParams_ gensupport.URLParams
30369	ctx_       context.Context
30370	header_    http.Header
30371}
30372
30373// Insert: Inserts a new event tag.
30374func (r *EventTagsService) Insert(profileId int64, eventtag *EventTag) *EventTagsInsertCall {
30375	c := &EventTagsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30376	c.profileId = profileId
30377	c.eventtag = eventtag
30378	return c
30379}
30380
30381// Fields allows partial responses to be retrieved. See
30382// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30383// for more information.
30384func (c *EventTagsInsertCall) Fields(s ...googleapi.Field) *EventTagsInsertCall {
30385	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30386	return c
30387}
30388
30389// Context sets the context to be used in this call's Do method. Any
30390// pending HTTP request will be aborted if the provided context is
30391// canceled.
30392func (c *EventTagsInsertCall) Context(ctx context.Context) *EventTagsInsertCall {
30393	c.ctx_ = ctx
30394	return c
30395}
30396
30397// Header returns an http.Header that can be modified by the caller to
30398// add HTTP headers to the request.
30399func (c *EventTagsInsertCall) Header() http.Header {
30400	if c.header_ == nil {
30401		c.header_ = make(http.Header)
30402	}
30403	return c.header_
30404}
30405
30406func (c *EventTagsInsertCall) doRequest(alt string) (*http.Response, error) {
30407	reqHeaders := make(http.Header)
30408	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
30409	for k, v := range c.header_ {
30410		reqHeaders[k] = v
30411	}
30412	reqHeaders.Set("User-Agent", c.s.userAgent())
30413	var body io.Reader = nil
30414	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
30415	if err != nil {
30416		return nil, err
30417	}
30418	reqHeaders.Set("Content-Type", "application/json")
30419	c.urlParams_.Set("alt", alt)
30420	c.urlParams_.Set("prettyPrint", "false")
30421	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
30422	urls += "?" + c.urlParams_.Encode()
30423	req, err := http.NewRequest("POST", urls, body)
30424	if err != nil {
30425		return nil, err
30426	}
30427	req.Header = reqHeaders
30428	googleapi.Expand(req.URL, map[string]string{
30429		"profileId": strconv.FormatInt(c.profileId, 10),
30430	})
30431	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30432}
30433
30434// Do executes the "dfareporting.eventTags.insert" call.
30435// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
30436// code is an error. Response headers are in either
30437// *EventTag.ServerResponse.Header or (if a response was returned at
30438// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30439// to check whether the returned error was because
30440// http.StatusNotModified was returned.
30441func (c *EventTagsInsertCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
30442	gensupport.SetOptions(c.urlParams_, opts...)
30443	res, err := c.doRequest("json")
30444	if res != nil && res.StatusCode == http.StatusNotModified {
30445		if res.Body != nil {
30446			res.Body.Close()
30447		}
30448		return nil, &googleapi.Error{
30449			Code:   res.StatusCode,
30450			Header: res.Header,
30451		}
30452	}
30453	if err != nil {
30454		return nil, err
30455	}
30456	defer googleapi.CloseBody(res)
30457	if err := googleapi.CheckResponse(res); err != nil {
30458		return nil, err
30459	}
30460	ret := &EventTag{
30461		ServerResponse: googleapi.ServerResponse{
30462			Header:         res.Header,
30463			HTTPStatusCode: res.StatusCode,
30464		},
30465	}
30466	target := &ret
30467	if err := gensupport.DecodeResponse(target, res); err != nil {
30468		return nil, err
30469	}
30470	return ret, nil
30471	// {
30472	//   "description": "Inserts a new event tag.",
30473	//   "httpMethod": "POST",
30474	//   "id": "dfareporting.eventTags.insert",
30475	//   "parameterOrder": [
30476	//     "profileId"
30477	//   ],
30478	//   "parameters": {
30479	//     "profileId": {
30480	//       "description": "User profile ID associated with this request.",
30481	//       "format": "int64",
30482	//       "location": "path",
30483	//       "required": true,
30484	//       "type": "string"
30485	//     }
30486	//   },
30487	//   "path": "userprofiles/{profileId}/eventTags",
30488	//   "request": {
30489	//     "$ref": "EventTag"
30490	//   },
30491	//   "response": {
30492	//     "$ref": "EventTag"
30493	//   },
30494	//   "scopes": [
30495	//     "https://www.googleapis.com/auth/dfatrafficking"
30496	//   ]
30497	// }
30498
30499}
30500
30501// method id "dfareporting.eventTags.list":
30502
30503type EventTagsListCall struct {
30504	s            *Service
30505	profileId    int64
30506	urlParams_   gensupport.URLParams
30507	ifNoneMatch_ string
30508	ctx_         context.Context
30509	header_      http.Header
30510}
30511
30512// List: Retrieves a list of event tags, possibly filtered.
30513func (r *EventTagsService) List(profileId int64) *EventTagsListCall {
30514	c := &EventTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30515	c.profileId = profileId
30516	return c
30517}
30518
30519// AdId sets the optional parameter "adId": Select only event tags that
30520// belong to this ad.
30521func (c *EventTagsListCall) AdId(adId int64) *EventTagsListCall {
30522	c.urlParams_.Set("adId", fmt.Sprint(adId))
30523	return c
30524}
30525
30526// AdvertiserId sets the optional parameter "advertiserId": Select only
30527// event tags that belong to this advertiser.
30528func (c *EventTagsListCall) AdvertiserId(advertiserId int64) *EventTagsListCall {
30529	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30530	return c
30531}
30532
30533// CampaignId sets the optional parameter "campaignId": Select only
30534// event tags that belong to this campaign.
30535func (c *EventTagsListCall) CampaignId(campaignId int64) *EventTagsListCall {
30536	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
30537	return c
30538}
30539
30540// DefinitionsOnly sets the optional parameter "definitionsOnly":
30541// Examine only the specified campaign or advertiser's event tags for
30542// matching selector criteria. When set to false, the parent advertiser
30543// and parent campaign of the specified ad or campaign is examined as
30544// well. In addition, when set to false, the status field is examined as
30545// well, along with the enabledByDefault field. This parameter can not
30546// be set to true when adId is specified as ads do not define their own
30547// even tags.
30548func (c *EventTagsListCall) DefinitionsOnly(definitionsOnly bool) *EventTagsListCall {
30549	c.urlParams_.Set("definitionsOnly", fmt.Sprint(definitionsOnly))
30550	return c
30551}
30552
30553// Enabled sets the optional parameter "enabled": Select only enabled
30554// event tags. What is considered enabled or disabled depends on the
30555// definitionsOnly parameter. When definitionsOnly is set to true, only
30556// the specified advertiser or campaign's event tags' enabledByDefault
30557// field is examined. When definitionsOnly is set to false, the
30558// specified ad or specified campaign's parent advertiser's or parent
30559// campaign's event tags' enabledByDefault and status fields are
30560// examined as well.
30561func (c *EventTagsListCall) Enabled(enabled bool) *EventTagsListCall {
30562	c.urlParams_.Set("enabled", fmt.Sprint(enabled))
30563	return c
30564}
30565
30566// EventTagTypes sets the optional parameter "eventTagTypes": Select
30567// only event tags with the specified event tag types. Event tag types
30568// can be used to specify whether to use a third-party pixel, a
30569// third-party JavaScript URL, or a third-party click-through URL for
30570// either impression or click tracking.
30571//
30572// Possible values:
30573//   "CLICK_THROUGH_EVENT_TAG"
30574//   "IMPRESSION_IMAGE_EVENT_TAG"
30575//   "IMPRESSION_JAVASCRIPT_EVENT_TAG"
30576func (c *EventTagsListCall) EventTagTypes(eventTagTypes ...string) *EventTagsListCall {
30577	c.urlParams_.SetMulti("eventTagTypes", append([]string{}, eventTagTypes...))
30578	return c
30579}
30580
30581// Ids sets the optional parameter "ids": Select only event tags with
30582// these IDs.
30583func (c *EventTagsListCall) Ids(ids ...int64) *EventTagsListCall {
30584	var ids_ []string
30585	for _, v := range ids {
30586		ids_ = append(ids_, fmt.Sprint(v))
30587	}
30588	c.urlParams_.SetMulti("ids", ids_)
30589	return c
30590}
30591
30592// SearchString sets the optional parameter "searchString": Allows
30593// searching for objects by name or ID. Wildcards (*) are allowed. For
30594// example, "eventtag*2015" will return objects with names like
30595// "eventtag June 2015", "eventtag April 2015", or simply "eventtag
30596// 2015". Most of the searches also add wildcards implicitly at the
30597// start and the end of the search string. For example, a search string
30598// of "eventtag" will match objects with name "my eventtag", "eventtag
30599// 2015", or simply "eventtag".
30600func (c *EventTagsListCall) SearchString(searchString string) *EventTagsListCall {
30601	c.urlParams_.Set("searchString", searchString)
30602	return c
30603}
30604
30605// SortField sets the optional parameter "sortField": Field by which to
30606// sort the list.
30607//
30608// Possible values:
30609//   "ID" (default)
30610//   "NAME"
30611func (c *EventTagsListCall) SortField(sortField string) *EventTagsListCall {
30612	c.urlParams_.Set("sortField", sortField)
30613	return c
30614}
30615
30616// SortOrder sets the optional parameter "sortOrder": Order of sorted
30617// results.
30618//
30619// Possible values:
30620//   "ASCENDING" (default)
30621//   "DESCENDING"
30622func (c *EventTagsListCall) SortOrder(sortOrder string) *EventTagsListCall {
30623	c.urlParams_.Set("sortOrder", sortOrder)
30624	return c
30625}
30626
30627// Fields allows partial responses to be retrieved. See
30628// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30629// for more information.
30630func (c *EventTagsListCall) Fields(s ...googleapi.Field) *EventTagsListCall {
30631	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30632	return c
30633}
30634
30635// IfNoneMatch sets the optional parameter which makes the operation
30636// fail if the object's ETag matches the given value. This is useful for
30637// getting updates only after the object has changed since the last
30638// request. Use googleapi.IsNotModified to check whether the response
30639// error from Do is the result of In-None-Match.
30640func (c *EventTagsListCall) IfNoneMatch(entityTag string) *EventTagsListCall {
30641	c.ifNoneMatch_ = entityTag
30642	return c
30643}
30644
30645// Context sets the context to be used in this call's Do method. Any
30646// pending HTTP request will be aborted if the provided context is
30647// canceled.
30648func (c *EventTagsListCall) Context(ctx context.Context) *EventTagsListCall {
30649	c.ctx_ = ctx
30650	return c
30651}
30652
30653// Header returns an http.Header that can be modified by the caller to
30654// add HTTP headers to the request.
30655func (c *EventTagsListCall) Header() http.Header {
30656	if c.header_ == nil {
30657		c.header_ = make(http.Header)
30658	}
30659	return c.header_
30660}
30661
30662func (c *EventTagsListCall) doRequest(alt string) (*http.Response, error) {
30663	reqHeaders := make(http.Header)
30664	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
30665	for k, v := range c.header_ {
30666		reqHeaders[k] = v
30667	}
30668	reqHeaders.Set("User-Agent", c.s.userAgent())
30669	if c.ifNoneMatch_ != "" {
30670		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30671	}
30672	var body io.Reader = nil
30673	c.urlParams_.Set("alt", alt)
30674	c.urlParams_.Set("prettyPrint", "false")
30675	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
30676	urls += "?" + c.urlParams_.Encode()
30677	req, err := http.NewRequest("GET", urls, body)
30678	if err != nil {
30679		return nil, err
30680	}
30681	req.Header = reqHeaders
30682	googleapi.Expand(req.URL, map[string]string{
30683		"profileId": strconv.FormatInt(c.profileId, 10),
30684	})
30685	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30686}
30687
30688// Do executes the "dfareporting.eventTags.list" call.
30689// Exactly one of *EventTagsListResponse or error will be non-nil. Any
30690// non-2xx status code is an error. Response headers are in either
30691// *EventTagsListResponse.ServerResponse.Header or (if a response was
30692// returned at all) in error.(*googleapi.Error).Header. Use
30693// googleapi.IsNotModified to check whether the returned error was
30694// because http.StatusNotModified was returned.
30695func (c *EventTagsListCall) Do(opts ...googleapi.CallOption) (*EventTagsListResponse, error) {
30696	gensupport.SetOptions(c.urlParams_, opts...)
30697	res, err := c.doRequest("json")
30698	if res != nil && res.StatusCode == http.StatusNotModified {
30699		if res.Body != nil {
30700			res.Body.Close()
30701		}
30702		return nil, &googleapi.Error{
30703			Code:   res.StatusCode,
30704			Header: res.Header,
30705		}
30706	}
30707	if err != nil {
30708		return nil, err
30709	}
30710	defer googleapi.CloseBody(res)
30711	if err := googleapi.CheckResponse(res); err != nil {
30712		return nil, err
30713	}
30714	ret := &EventTagsListResponse{
30715		ServerResponse: googleapi.ServerResponse{
30716			Header:         res.Header,
30717			HTTPStatusCode: res.StatusCode,
30718		},
30719	}
30720	target := &ret
30721	if err := gensupport.DecodeResponse(target, res); err != nil {
30722		return nil, err
30723	}
30724	return ret, nil
30725	// {
30726	//   "description": "Retrieves a list of event tags, possibly filtered.",
30727	//   "httpMethod": "GET",
30728	//   "id": "dfareporting.eventTags.list",
30729	//   "parameterOrder": [
30730	//     "profileId"
30731	//   ],
30732	//   "parameters": {
30733	//     "adId": {
30734	//       "description": "Select only event tags that belong to this ad.",
30735	//       "format": "int64",
30736	//       "location": "query",
30737	//       "type": "string"
30738	//     },
30739	//     "advertiserId": {
30740	//       "description": "Select only event tags that belong to this advertiser.",
30741	//       "format": "int64",
30742	//       "location": "query",
30743	//       "type": "string"
30744	//     },
30745	//     "campaignId": {
30746	//       "description": "Select only event tags that belong to this campaign.",
30747	//       "format": "int64",
30748	//       "location": "query",
30749	//       "type": "string"
30750	//     },
30751	//     "definitionsOnly": {
30752	//       "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.",
30753	//       "location": "query",
30754	//       "type": "boolean"
30755	//     },
30756	//     "enabled": {
30757	//       "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.",
30758	//       "location": "query",
30759	//       "type": "boolean"
30760	//     },
30761	//     "eventTagTypes": {
30762	//       "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.",
30763	//       "enum": [
30764	//         "CLICK_THROUGH_EVENT_TAG",
30765	//         "IMPRESSION_IMAGE_EVENT_TAG",
30766	//         "IMPRESSION_JAVASCRIPT_EVENT_TAG"
30767	//       ],
30768	//       "enumDescriptions": [
30769	//         "",
30770	//         "",
30771	//         ""
30772	//       ],
30773	//       "location": "query",
30774	//       "repeated": true,
30775	//       "type": "string"
30776	//     },
30777	//     "ids": {
30778	//       "description": "Select only event tags with these IDs.",
30779	//       "format": "int64",
30780	//       "location": "query",
30781	//       "repeated": true,
30782	//       "type": "string"
30783	//     },
30784	//     "profileId": {
30785	//       "description": "User profile ID associated with this request.",
30786	//       "format": "int64",
30787	//       "location": "path",
30788	//       "required": true,
30789	//       "type": "string"
30790	//     },
30791	//     "searchString": {
30792	//       "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\".",
30793	//       "location": "query",
30794	//       "type": "string"
30795	//     },
30796	//     "sortField": {
30797	//       "default": "ID",
30798	//       "description": "Field by which to sort the list.",
30799	//       "enum": [
30800	//         "ID",
30801	//         "NAME"
30802	//       ],
30803	//       "enumDescriptions": [
30804	//         "",
30805	//         ""
30806	//       ],
30807	//       "location": "query",
30808	//       "type": "string"
30809	//     },
30810	//     "sortOrder": {
30811	//       "default": "ASCENDING",
30812	//       "description": "Order of sorted results.",
30813	//       "enum": [
30814	//         "ASCENDING",
30815	//         "DESCENDING"
30816	//       ],
30817	//       "enumDescriptions": [
30818	//         "",
30819	//         ""
30820	//       ],
30821	//       "location": "query",
30822	//       "type": "string"
30823	//     }
30824	//   },
30825	//   "path": "userprofiles/{profileId}/eventTags",
30826	//   "response": {
30827	//     "$ref": "EventTagsListResponse"
30828	//   },
30829	//   "scopes": [
30830	//     "https://www.googleapis.com/auth/dfatrafficking"
30831	//   ]
30832	// }
30833
30834}
30835
30836// method id "dfareporting.eventTags.patch":
30837
30838type EventTagsPatchCall struct {
30839	s          *Service
30840	profileId  int64
30841	eventtag   *EventTag
30842	urlParams_ gensupport.URLParams
30843	ctx_       context.Context
30844	header_    http.Header
30845}
30846
30847// Patch: Updates an existing event tag. This method supports patch
30848// semantics.
30849func (r *EventTagsService) Patch(profileId int64, id int64, eventtag *EventTag) *EventTagsPatchCall {
30850	c := &EventTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30851	c.profileId = profileId
30852	c.urlParams_.Set("id", fmt.Sprint(id))
30853	c.eventtag = eventtag
30854	return c
30855}
30856
30857// Fields allows partial responses to be retrieved. See
30858// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30859// for more information.
30860func (c *EventTagsPatchCall) Fields(s ...googleapi.Field) *EventTagsPatchCall {
30861	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30862	return c
30863}
30864
30865// Context sets the context to be used in this call's Do method. Any
30866// pending HTTP request will be aborted if the provided context is
30867// canceled.
30868func (c *EventTagsPatchCall) Context(ctx context.Context) *EventTagsPatchCall {
30869	c.ctx_ = ctx
30870	return c
30871}
30872
30873// Header returns an http.Header that can be modified by the caller to
30874// add HTTP headers to the request.
30875func (c *EventTagsPatchCall) Header() http.Header {
30876	if c.header_ == nil {
30877		c.header_ = make(http.Header)
30878	}
30879	return c.header_
30880}
30881
30882func (c *EventTagsPatchCall) doRequest(alt string) (*http.Response, error) {
30883	reqHeaders := make(http.Header)
30884	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
30885	for k, v := range c.header_ {
30886		reqHeaders[k] = v
30887	}
30888	reqHeaders.Set("User-Agent", c.s.userAgent())
30889	var body io.Reader = nil
30890	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
30891	if err != nil {
30892		return nil, err
30893	}
30894	reqHeaders.Set("Content-Type", "application/json")
30895	c.urlParams_.Set("alt", alt)
30896	c.urlParams_.Set("prettyPrint", "false")
30897	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
30898	urls += "?" + c.urlParams_.Encode()
30899	req, err := http.NewRequest("PATCH", urls, body)
30900	if err != nil {
30901		return nil, err
30902	}
30903	req.Header = reqHeaders
30904	googleapi.Expand(req.URL, map[string]string{
30905		"profileId": strconv.FormatInt(c.profileId, 10),
30906	})
30907	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30908}
30909
30910// Do executes the "dfareporting.eventTags.patch" call.
30911// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
30912// code is an error. Response headers are in either
30913// *EventTag.ServerResponse.Header or (if a response was returned at
30914// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30915// to check whether the returned error was because
30916// http.StatusNotModified was returned.
30917func (c *EventTagsPatchCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
30918	gensupport.SetOptions(c.urlParams_, opts...)
30919	res, err := c.doRequest("json")
30920	if res != nil && res.StatusCode == http.StatusNotModified {
30921		if res.Body != nil {
30922			res.Body.Close()
30923		}
30924		return nil, &googleapi.Error{
30925			Code:   res.StatusCode,
30926			Header: res.Header,
30927		}
30928	}
30929	if err != nil {
30930		return nil, err
30931	}
30932	defer googleapi.CloseBody(res)
30933	if err := googleapi.CheckResponse(res); err != nil {
30934		return nil, err
30935	}
30936	ret := &EventTag{
30937		ServerResponse: googleapi.ServerResponse{
30938			Header:         res.Header,
30939			HTTPStatusCode: res.StatusCode,
30940		},
30941	}
30942	target := &ret
30943	if err := gensupport.DecodeResponse(target, res); err != nil {
30944		return nil, err
30945	}
30946	return ret, nil
30947	// {
30948	//   "description": "Updates an existing event tag. This method supports patch semantics.",
30949	//   "httpMethod": "PATCH",
30950	//   "id": "dfareporting.eventTags.patch",
30951	//   "parameterOrder": [
30952	//     "profileId",
30953	//     "id"
30954	//   ],
30955	//   "parameters": {
30956	//     "id": {
30957	//       "description": "Event tag ID.",
30958	//       "format": "int64",
30959	//       "location": "query",
30960	//       "required": true,
30961	//       "type": "string"
30962	//     },
30963	//     "profileId": {
30964	//       "description": "User profile ID associated with this request.",
30965	//       "format": "int64",
30966	//       "location": "path",
30967	//       "required": true,
30968	//       "type": "string"
30969	//     }
30970	//   },
30971	//   "path": "userprofiles/{profileId}/eventTags",
30972	//   "request": {
30973	//     "$ref": "EventTag"
30974	//   },
30975	//   "response": {
30976	//     "$ref": "EventTag"
30977	//   },
30978	//   "scopes": [
30979	//     "https://www.googleapis.com/auth/dfatrafficking"
30980	//   ]
30981	// }
30982
30983}
30984
30985// method id "dfareporting.eventTags.update":
30986
30987type EventTagsUpdateCall struct {
30988	s          *Service
30989	profileId  int64
30990	eventtag   *EventTag
30991	urlParams_ gensupport.URLParams
30992	ctx_       context.Context
30993	header_    http.Header
30994}
30995
30996// Update: Updates an existing event tag.
30997func (r *EventTagsService) Update(profileId int64, eventtag *EventTag) *EventTagsUpdateCall {
30998	c := &EventTagsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30999	c.profileId = profileId
31000	c.eventtag = eventtag
31001	return c
31002}
31003
31004// Fields allows partial responses to be retrieved. See
31005// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31006// for more information.
31007func (c *EventTagsUpdateCall) Fields(s ...googleapi.Field) *EventTagsUpdateCall {
31008	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31009	return c
31010}
31011
31012// Context sets the context to be used in this call's Do method. Any
31013// pending HTTP request will be aborted if the provided context is
31014// canceled.
31015func (c *EventTagsUpdateCall) Context(ctx context.Context) *EventTagsUpdateCall {
31016	c.ctx_ = ctx
31017	return c
31018}
31019
31020// Header returns an http.Header that can be modified by the caller to
31021// add HTTP headers to the request.
31022func (c *EventTagsUpdateCall) Header() http.Header {
31023	if c.header_ == nil {
31024		c.header_ = make(http.Header)
31025	}
31026	return c.header_
31027}
31028
31029func (c *EventTagsUpdateCall) doRequest(alt string) (*http.Response, error) {
31030	reqHeaders := make(http.Header)
31031	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
31032	for k, v := range c.header_ {
31033		reqHeaders[k] = v
31034	}
31035	reqHeaders.Set("User-Agent", c.s.userAgent())
31036	var body io.Reader = nil
31037	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
31038	if err != nil {
31039		return nil, err
31040	}
31041	reqHeaders.Set("Content-Type", "application/json")
31042	c.urlParams_.Set("alt", alt)
31043	c.urlParams_.Set("prettyPrint", "false")
31044	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31045	urls += "?" + c.urlParams_.Encode()
31046	req, err := http.NewRequest("PUT", urls, body)
31047	if err != nil {
31048		return nil, err
31049	}
31050	req.Header = reqHeaders
31051	googleapi.Expand(req.URL, map[string]string{
31052		"profileId": strconv.FormatInt(c.profileId, 10),
31053	})
31054	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31055}
31056
31057// Do executes the "dfareporting.eventTags.update" call.
31058// Exactly one of *EventTag or error will be non-nil. Any non-2xx status
31059// code is an error. Response headers are in either
31060// *EventTag.ServerResponse.Header or (if a response was returned at
31061// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31062// to check whether the returned error was because
31063// http.StatusNotModified was returned.
31064func (c *EventTagsUpdateCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
31065	gensupport.SetOptions(c.urlParams_, opts...)
31066	res, err := c.doRequest("json")
31067	if res != nil && res.StatusCode == http.StatusNotModified {
31068		if res.Body != nil {
31069			res.Body.Close()
31070		}
31071		return nil, &googleapi.Error{
31072			Code:   res.StatusCode,
31073			Header: res.Header,
31074		}
31075	}
31076	if err != nil {
31077		return nil, err
31078	}
31079	defer googleapi.CloseBody(res)
31080	if err := googleapi.CheckResponse(res); err != nil {
31081		return nil, err
31082	}
31083	ret := &EventTag{
31084		ServerResponse: googleapi.ServerResponse{
31085			Header:         res.Header,
31086			HTTPStatusCode: res.StatusCode,
31087		},
31088	}
31089	target := &ret
31090	if err := gensupport.DecodeResponse(target, res); err != nil {
31091		return nil, err
31092	}
31093	return ret, nil
31094	// {
31095	//   "description": "Updates an existing event tag.",
31096	//   "httpMethod": "PUT",
31097	//   "id": "dfareporting.eventTags.update",
31098	//   "parameterOrder": [
31099	//     "profileId"
31100	//   ],
31101	//   "parameters": {
31102	//     "profileId": {
31103	//       "description": "User profile ID associated with this request.",
31104	//       "format": "int64",
31105	//       "location": "path",
31106	//       "required": true,
31107	//       "type": "string"
31108	//     }
31109	//   },
31110	//   "path": "userprofiles/{profileId}/eventTags",
31111	//   "request": {
31112	//     "$ref": "EventTag"
31113	//   },
31114	//   "response": {
31115	//     "$ref": "EventTag"
31116	//   },
31117	//   "scopes": [
31118	//     "https://www.googleapis.com/auth/dfatrafficking"
31119	//   ]
31120	// }
31121
31122}
31123
31124// method id "dfareporting.files.get":
31125
31126type FilesGetCall struct {
31127	s            *Service
31128	reportId     int64
31129	fileId       int64
31130	urlParams_   gensupport.URLParams
31131	ifNoneMatch_ string
31132	ctx_         context.Context
31133	header_      http.Header
31134}
31135
31136// Get: Retrieves a report file by its report ID and file ID. This
31137// method supports media download.
31138func (r *FilesService) Get(reportId int64, fileId int64) *FilesGetCall {
31139	c := &FilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31140	c.reportId = reportId
31141	c.fileId = fileId
31142	return c
31143}
31144
31145// Fields allows partial responses to be retrieved. See
31146// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31147// for more information.
31148func (c *FilesGetCall) Fields(s ...googleapi.Field) *FilesGetCall {
31149	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31150	return c
31151}
31152
31153// IfNoneMatch sets the optional parameter which makes the operation
31154// fail if the object's ETag matches the given value. This is useful for
31155// getting updates only after the object has changed since the last
31156// request. Use googleapi.IsNotModified to check whether the response
31157// error from Do is the result of In-None-Match.
31158func (c *FilesGetCall) IfNoneMatch(entityTag string) *FilesGetCall {
31159	c.ifNoneMatch_ = entityTag
31160	return c
31161}
31162
31163// Context sets the context to be used in this call's Do and Download
31164// methods. Any pending HTTP request will be aborted if the provided
31165// context is canceled.
31166func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
31167	c.ctx_ = ctx
31168	return c
31169}
31170
31171// Header returns an http.Header that can be modified by the caller to
31172// add HTTP headers to the request.
31173func (c *FilesGetCall) Header() http.Header {
31174	if c.header_ == nil {
31175		c.header_ = make(http.Header)
31176	}
31177	return c.header_
31178}
31179
31180func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
31181	reqHeaders := make(http.Header)
31182	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
31183	for k, v := range c.header_ {
31184		reqHeaders[k] = v
31185	}
31186	reqHeaders.Set("User-Agent", c.s.userAgent())
31187	if c.ifNoneMatch_ != "" {
31188		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31189	}
31190	var body io.Reader = nil
31191	c.urlParams_.Set("alt", alt)
31192	c.urlParams_.Set("prettyPrint", "false")
31193	urls := googleapi.ResolveRelative(c.s.BasePath, "reports/{reportId}/files/{fileId}")
31194	urls += "?" + c.urlParams_.Encode()
31195	req, err := http.NewRequest("GET", urls, body)
31196	if err != nil {
31197		return nil, err
31198	}
31199	req.Header = reqHeaders
31200	googleapi.Expand(req.URL, map[string]string{
31201		"reportId": strconv.FormatInt(c.reportId, 10),
31202		"fileId":   strconv.FormatInt(c.fileId, 10),
31203	})
31204	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31205}
31206
31207// Download fetches the API endpoint's "media" value, instead of the normal
31208// API response value. If the returned error is nil, the Response is guaranteed to
31209// have a 2xx status code. Callers must close the Response.Body as usual.
31210func (c *FilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
31211	gensupport.SetOptions(c.urlParams_, opts...)
31212	res, err := c.doRequest("media")
31213	if err != nil {
31214		return nil, err
31215	}
31216	if err := googleapi.CheckMediaResponse(res); err != nil {
31217		res.Body.Close()
31218		return nil, err
31219	}
31220	return res, nil
31221}
31222
31223// Do executes the "dfareporting.files.get" call.
31224// Exactly one of *File or error will be non-nil. Any non-2xx status
31225// code is an error. Response headers are in either
31226// *File.ServerResponse.Header or (if a response was returned at all) in
31227// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
31228// whether the returned error was because http.StatusNotModified was
31229// returned.
31230func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, 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 := &File{
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": "Retrieves a report file by its report ID and file ID. This method supports media download.",
31262	//   "httpMethod": "GET",
31263	//   "id": "dfareporting.files.get",
31264	//   "parameterOrder": [
31265	//     "reportId",
31266	//     "fileId"
31267	//   ],
31268	//   "parameters": {
31269	//     "fileId": {
31270	//       "description": "The ID of the report file.",
31271	//       "format": "int64",
31272	//       "location": "path",
31273	//       "required": true,
31274	//       "type": "string"
31275	//     },
31276	//     "reportId": {
31277	//       "description": "The ID of the report.",
31278	//       "format": "int64",
31279	//       "location": "path",
31280	//       "required": true,
31281	//       "type": "string"
31282	//     }
31283	//   },
31284	//   "path": "reports/{reportId}/files/{fileId}",
31285	//   "response": {
31286	//     "$ref": "File"
31287	//   },
31288	//   "scopes": [
31289	//     "https://www.googleapis.com/auth/dfareporting"
31290	//   ],
31291	//   "supportsMediaDownload": true
31292	// }
31293
31294}
31295
31296// method id "dfareporting.files.list":
31297
31298type FilesListCall struct {
31299	s            *Service
31300	profileId    int64
31301	urlParams_   gensupport.URLParams
31302	ifNoneMatch_ string
31303	ctx_         context.Context
31304	header_      http.Header
31305}
31306
31307// List: Lists files for a user profile.
31308func (r *FilesService) List(profileId int64) *FilesListCall {
31309	c := &FilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31310	c.profileId = profileId
31311	return c
31312}
31313
31314// MaxResults sets the optional parameter "maxResults": Maximum number
31315// of results to return.
31316func (c *FilesListCall) MaxResults(maxResults int64) *FilesListCall {
31317	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
31318	return c
31319}
31320
31321// PageToken sets the optional parameter "pageToken": The value of the
31322// nextToken from the previous result page.
31323func (c *FilesListCall) PageToken(pageToken string) *FilesListCall {
31324	c.urlParams_.Set("pageToken", pageToken)
31325	return c
31326}
31327
31328// Scope sets the optional parameter "scope": The scope that defines
31329// which results are returned.
31330//
31331// Possible values:
31332//   "ALL" - All files in account.
31333//   "MINE" (default) - My files.
31334//   "SHARED_WITH_ME" - Files shared with me.
31335func (c *FilesListCall) Scope(scope string) *FilesListCall {
31336	c.urlParams_.Set("scope", scope)
31337	return c
31338}
31339
31340// SortField sets the optional parameter "sortField": The field by which
31341// to sort the list.
31342//
31343// Possible values:
31344//   "ID" - Sort by file ID.
31345//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastmodifiedAt' field.
31346func (c *FilesListCall) SortField(sortField string) *FilesListCall {
31347	c.urlParams_.Set("sortField", sortField)
31348	return c
31349}
31350
31351// SortOrder sets the optional parameter "sortOrder": Order of sorted
31352// results.
31353//
31354// Possible values:
31355//   "ASCENDING" - Ascending order.
31356//   "DESCENDING" (default) - Descending order.
31357func (c *FilesListCall) SortOrder(sortOrder string) *FilesListCall {
31358	c.urlParams_.Set("sortOrder", sortOrder)
31359	return c
31360}
31361
31362// Fields allows partial responses to be retrieved. See
31363// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31364// for more information.
31365func (c *FilesListCall) Fields(s ...googleapi.Field) *FilesListCall {
31366	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31367	return c
31368}
31369
31370// IfNoneMatch sets the optional parameter which makes the operation
31371// fail if the object's ETag matches the given value. This is useful for
31372// getting updates only after the object has changed since the last
31373// request. Use googleapi.IsNotModified to check whether the response
31374// error from Do is the result of In-None-Match.
31375func (c *FilesListCall) IfNoneMatch(entityTag string) *FilesListCall {
31376	c.ifNoneMatch_ = entityTag
31377	return c
31378}
31379
31380// Context sets the context to be used in this call's Do method. Any
31381// pending HTTP request will be aborted if the provided context is
31382// canceled.
31383func (c *FilesListCall) Context(ctx context.Context) *FilesListCall {
31384	c.ctx_ = ctx
31385	return c
31386}
31387
31388// Header returns an http.Header that can be modified by the caller to
31389// add HTTP headers to the request.
31390func (c *FilesListCall) Header() http.Header {
31391	if c.header_ == nil {
31392		c.header_ = make(http.Header)
31393	}
31394	return c.header_
31395}
31396
31397func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
31398	reqHeaders := make(http.Header)
31399	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
31400	for k, v := range c.header_ {
31401		reqHeaders[k] = v
31402	}
31403	reqHeaders.Set("User-Agent", c.s.userAgent())
31404	if c.ifNoneMatch_ != "" {
31405		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31406	}
31407	var body io.Reader = nil
31408	c.urlParams_.Set("alt", alt)
31409	c.urlParams_.Set("prettyPrint", "false")
31410	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/files")
31411	urls += "?" + c.urlParams_.Encode()
31412	req, err := http.NewRequest("GET", urls, body)
31413	if err != nil {
31414		return nil, err
31415	}
31416	req.Header = reqHeaders
31417	googleapi.Expand(req.URL, map[string]string{
31418		"profileId": strconv.FormatInt(c.profileId, 10),
31419	})
31420	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31421}
31422
31423// Do executes the "dfareporting.files.list" call.
31424// Exactly one of *FileList or error will be non-nil. Any non-2xx status
31425// code is an error. Response headers are in either
31426// *FileList.ServerResponse.Header or (if a response was returned at
31427// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31428// to check whether the returned error was because
31429// http.StatusNotModified was returned.
31430func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
31431	gensupport.SetOptions(c.urlParams_, opts...)
31432	res, err := c.doRequest("json")
31433	if res != nil && res.StatusCode == http.StatusNotModified {
31434		if res.Body != nil {
31435			res.Body.Close()
31436		}
31437		return nil, &googleapi.Error{
31438			Code:   res.StatusCode,
31439			Header: res.Header,
31440		}
31441	}
31442	if err != nil {
31443		return nil, err
31444	}
31445	defer googleapi.CloseBody(res)
31446	if err := googleapi.CheckResponse(res); err != nil {
31447		return nil, err
31448	}
31449	ret := &FileList{
31450		ServerResponse: googleapi.ServerResponse{
31451			Header:         res.Header,
31452			HTTPStatusCode: res.StatusCode,
31453		},
31454	}
31455	target := &ret
31456	if err := gensupport.DecodeResponse(target, res); err != nil {
31457		return nil, err
31458	}
31459	return ret, nil
31460	// {
31461	//   "description": "Lists files for a user profile.",
31462	//   "httpMethod": "GET",
31463	//   "id": "dfareporting.files.list",
31464	//   "parameterOrder": [
31465	//     "profileId"
31466	//   ],
31467	//   "parameters": {
31468	//     "maxResults": {
31469	//       "default": "10",
31470	//       "description": "Maximum number of results to return.",
31471	//       "format": "int32",
31472	//       "location": "query",
31473	//       "maximum": "10",
31474	//       "minimum": "0",
31475	//       "type": "integer"
31476	//     },
31477	//     "pageToken": {
31478	//       "description": "The value of the nextToken from the previous result page.",
31479	//       "location": "query",
31480	//       "type": "string"
31481	//     },
31482	//     "profileId": {
31483	//       "description": "The DFA profile ID.",
31484	//       "format": "int64",
31485	//       "location": "path",
31486	//       "required": true,
31487	//       "type": "string"
31488	//     },
31489	//     "scope": {
31490	//       "default": "MINE",
31491	//       "description": "The scope that defines which results are returned.",
31492	//       "enum": [
31493	//         "ALL",
31494	//         "MINE",
31495	//         "SHARED_WITH_ME"
31496	//       ],
31497	//       "enumDescriptions": [
31498	//         "All files in account.",
31499	//         "My files.",
31500	//         "Files shared with me."
31501	//       ],
31502	//       "location": "query",
31503	//       "type": "string"
31504	//     },
31505	//     "sortField": {
31506	//       "default": "LAST_MODIFIED_TIME",
31507	//       "description": "The field by which to sort the list.",
31508	//       "enum": [
31509	//         "ID",
31510	//         "LAST_MODIFIED_TIME"
31511	//       ],
31512	//       "enumDescriptions": [
31513	//         "Sort by file ID.",
31514	//         "Sort by 'lastmodifiedAt' field."
31515	//       ],
31516	//       "location": "query",
31517	//       "type": "string"
31518	//     },
31519	//     "sortOrder": {
31520	//       "default": "DESCENDING",
31521	//       "description": "Order of sorted results.",
31522	//       "enum": [
31523	//         "ASCENDING",
31524	//         "DESCENDING"
31525	//       ],
31526	//       "enumDescriptions": [
31527	//         "Ascending order.",
31528	//         "Descending order."
31529	//       ],
31530	//       "location": "query",
31531	//       "type": "string"
31532	//     }
31533	//   },
31534	//   "path": "userprofiles/{profileId}/files",
31535	//   "response": {
31536	//     "$ref": "FileList"
31537	//   },
31538	//   "scopes": [
31539	//     "https://www.googleapis.com/auth/dfareporting"
31540	//   ]
31541	// }
31542
31543}
31544
31545// Pages invokes f for each page of results.
31546// A non-nil error returned from f will halt the iteration.
31547// The provided context supersedes any context provided to the Context method.
31548func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
31549	c.ctx_ = ctx
31550	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
31551	for {
31552		x, err := c.Do()
31553		if err != nil {
31554			return err
31555		}
31556		if err := f(x); err != nil {
31557			return err
31558		}
31559		if x.NextPageToken == "" {
31560			return nil
31561		}
31562		c.PageToken(x.NextPageToken)
31563	}
31564}
31565
31566// method id "dfareporting.floodlightActivities.delete":
31567
31568type FloodlightActivitiesDeleteCall struct {
31569	s          *Service
31570	profileId  int64
31571	id         int64
31572	urlParams_ gensupport.URLParams
31573	ctx_       context.Context
31574	header_    http.Header
31575}
31576
31577// Delete: Deletes an existing floodlight activity.
31578func (r *FloodlightActivitiesService) Delete(profileId int64, id int64) *FloodlightActivitiesDeleteCall {
31579	c := &FloodlightActivitiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31580	c.profileId = profileId
31581	c.id = id
31582	return c
31583}
31584
31585// Fields allows partial responses to be retrieved. See
31586// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31587// for more information.
31588func (c *FloodlightActivitiesDeleteCall) Fields(s ...googleapi.Field) *FloodlightActivitiesDeleteCall {
31589	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31590	return c
31591}
31592
31593// Context sets the context to be used in this call's Do method. Any
31594// pending HTTP request will be aborted if the provided context is
31595// canceled.
31596func (c *FloodlightActivitiesDeleteCall) Context(ctx context.Context) *FloodlightActivitiesDeleteCall {
31597	c.ctx_ = ctx
31598	return c
31599}
31600
31601// Header returns an http.Header that can be modified by the caller to
31602// add HTTP headers to the request.
31603func (c *FloodlightActivitiesDeleteCall) Header() http.Header {
31604	if c.header_ == nil {
31605		c.header_ = make(http.Header)
31606	}
31607	return c.header_
31608}
31609
31610func (c *FloodlightActivitiesDeleteCall) doRequest(alt string) (*http.Response, error) {
31611	reqHeaders := make(http.Header)
31612	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
31613	for k, v := range c.header_ {
31614		reqHeaders[k] = v
31615	}
31616	reqHeaders.Set("User-Agent", c.s.userAgent())
31617	var body io.Reader = nil
31618	c.urlParams_.Set("alt", alt)
31619	c.urlParams_.Set("prettyPrint", "false")
31620	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
31621	urls += "?" + c.urlParams_.Encode()
31622	req, err := http.NewRequest("DELETE", urls, body)
31623	if err != nil {
31624		return nil, err
31625	}
31626	req.Header = reqHeaders
31627	googleapi.Expand(req.URL, map[string]string{
31628		"profileId": strconv.FormatInt(c.profileId, 10),
31629		"id":        strconv.FormatInt(c.id, 10),
31630	})
31631	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31632}
31633
31634// Do executes the "dfareporting.floodlightActivities.delete" call.
31635func (c *FloodlightActivitiesDeleteCall) Do(opts ...googleapi.CallOption) error {
31636	gensupport.SetOptions(c.urlParams_, opts...)
31637	res, err := c.doRequest("json")
31638	if err != nil {
31639		return err
31640	}
31641	defer googleapi.CloseBody(res)
31642	if err := googleapi.CheckResponse(res); err != nil {
31643		return err
31644	}
31645	return nil
31646	// {
31647	//   "description": "Deletes an existing floodlight activity.",
31648	//   "httpMethod": "DELETE",
31649	//   "id": "dfareporting.floodlightActivities.delete",
31650	//   "parameterOrder": [
31651	//     "profileId",
31652	//     "id"
31653	//   ],
31654	//   "parameters": {
31655	//     "id": {
31656	//       "description": "Floodlight activity ID.",
31657	//       "format": "int64",
31658	//       "location": "path",
31659	//       "required": true,
31660	//       "type": "string"
31661	//     },
31662	//     "profileId": {
31663	//       "description": "User profile ID associated with this request.",
31664	//       "format": "int64",
31665	//       "location": "path",
31666	//       "required": true,
31667	//       "type": "string"
31668	//     }
31669	//   },
31670	//   "path": "userprofiles/{profileId}/floodlightActivities/{id}",
31671	//   "scopes": [
31672	//     "https://www.googleapis.com/auth/dfatrafficking"
31673	//   ]
31674	// }
31675
31676}
31677
31678// method id "dfareporting.floodlightActivities.generatetag":
31679
31680type FloodlightActivitiesGeneratetagCall struct {
31681	s          *Service
31682	profileId  int64
31683	urlParams_ gensupport.URLParams
31684	ctx_       context.Context
31685	header_    http.Header
31686}
31687
31688// Generatetag: Generates a tag for a floodlight activity.
31689func (r *FloodlightActivitiesService) Generatetag(profileId int64) *FloodlightActivitiesGeneratetagCall {
31690	c := &FloodlightActivitiesGeneratetagCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31691	c.profileId = profileId
31692	return c
31693}
31694
31695// FloodlightActivityId sets the optional parameter
31696// "floodlightActivityId": Floodlight activity ID for which we want to
31697// generate a tag.
31698func (c *FloodlightActivitiesGeneratetagCall) FloodlightActivityId(floodlightActivityId int64) *FloodlightActivitiesGeneratetagCall {
31699	c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
31700	return c
31701}
31702
31703// Fields allows partial responses to be retrieved. See
31704// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31705// for more information.
31706func (c *FloodlightActivitiesGeneratetagCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGeneratetagCall {
31707	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31708	return c
31709}
31710
31711// Context sets the context to be used in this call's Do method. Any
31712// pending HTTP request will be aborted if the provided context is
31713// canceled.
31714func (c *FloodlightActivitiesGeneratetagCall) Context(ctx context.Context) *FloodlightActivitiesGeneratetagCall {
31715	c.ctx_ = ctx
31716	return c
31717}
31718
31719// Header returns an http.Header that can be modified by the caller to
31720// add HTTP headers to the request.
31721func (c *FloodlightActivitiesGeneratetagCall) Header() http.Header {
31722	if c.header_ == nil {
31723		c.header_ = make(http.Header)
31724	}
31725	return c.header_
31726}
31727
31728func (c *FloodlightActivitiesGeneratetagCall) doRequest(alt string) (*http.Response, error) {
31729	reqHeaders := make(http.Header)
31730	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
31731	for k, v := range c.header_ {
31732		reqHeaders[k] = v
31733	}
31734	reqHeaders.Set("User-Agent", c.s.userAgent())
31735	var body io.Reader = nil
31736	c.urlParams_.Set("alt", alt)
31737	c.urlParams_.Set("prettyPrint", "false")
31738	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/generatetag")
31739	urls += "?" + c.urlParams_.Encode()
31740	req, err := http.NewRequest("POST", urls, body)
31741	if err != nil {
31742		return nil, err
31743	}
31744	req.Header = reqHeaders
31745	googleapi.Expand(req.URL, map[string]string{
31746		"profileId": strconv.FormatInt(c.profileId, 10),
31747	})
31748	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31749}
31750
31751// Do executes the "dfareporting.floodlightActivities.generatetag" call.
31752// Exactly one of *FloodlightActivitiesGenerateTagResponse or error will
31753// be non-nil. Any non-2xx status code is an error. Response headers are
31754// in either
31755// *FloodlightActivitiesGenerateTagResponse.ServerResponse.Header or (if
31756// a response was returned at all) in error.(*googleapi.Error).Header.
31757// Use googleapi.IsNotModified to check whether the returned error was
31758// because http.StatusNotModified was returned.
31759func (c *FloodlightActivitiesGeneratetagCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesGenerateTagResponse, error) {
31760	gensupport.SetOptions(c.urlParams_, opts...)
31761	res, err := c.doRequest("json")
31762	if res != nil && res.StatusCode == http.StatusNotModified {
31763		if res.Body != nil {
31764			res.Body.Close()
31765		}
31766		return nil, &googleapi.Error{
31767			Code:   res.StatusCode,
31768			Header: res.Header,
31769		}
31770	}
31771	if err != nil {
31772		return nil, err
31773	}
31774	defer googleapi.CloseBody(res)
31775	if err := googleapi.CheckResponse(res); err != nil {
31776		return nil, err
31777	}
31778	ret := &FloodlightActivitiesGenerateTagResponse{
31779		ServerResponse: googleapi.ServerResponse{
31780			Header:         res.Header,
31781			HTTPStatusCode: res.StatusCode,
31782		},
31783	}
31784	target := &ret
31785	if err := gensupport.DecodeResponse(target, res); err != nil {
31786		return nil, err
31787	}
31788	return ret, nil
31789	// {
31790	//   "description": "Generates a tag for a floodlight activity.",
31791	//   "httpMethod": "POST",
31792	//   "id": "dfareporting.floodlightActivities.generatetag",
31793	//   "parameterOrder": [
31794	//     "profileId"
31795	//   ],
31796	//   "parameters": {
31797	//     "floodlightActivityId": {
31798	//       "description": "Floodlight activity ID for which we want to generate a tag.",
31799	//       "format": "int64",
31800	//       "location": "query",
31801	//       "type": "string"
31802	//     },
31803	//     "profileId": {
31804	//       "description": "User profile ID associated with this request.",
31805	//       "format": "int64",
31806	//       "location": "path",
31807	//       "required": true,
31808	//       "type": "string"
31809	//     }
31810	//   },
31811	//   "path": "userprofiles/{profileId}/floodlightActivities/generatetag",
31812	//   "response": {
31813	//     "$ref": "FloodlightActivitiesGenerateTagResponse"
31814	//   },
31815	//   "scopes": [
31816	//     "https://www.googleapis.com/auth/dfatrafficking"
31817	//   ]
31818	// }
31819
31820}
31821
31822// method id "dfareporting.floodlightActivities.get":
31823
31824type FloodlightActivitiesGetCall struct {
31825	s            *Service
31826	profileId    int64
31827	id           int64
31828	urlParams_   gensupport.URLParams
31829	ifNoneMatch_ string
31830	ctx_         context.Context
31831	header_      http.Header
31832}
31833
31834// Get: Gets one floodlight activity by ID.
31835func (r *FloodlightActivitiesService) Get(profileId int64, id int64) *FloodlightActivitiesGetCall {
31836	c := &FloodlightActivitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31837	c.profileId = profileId
31838	c.id = id
31839	return c
31840}
31841
31842// Fields allows partial responses to be retrieved. See
31843// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31844// for more information.
31845func (c *FloodlightActivitiesGetCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGetCall {
31846	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31847	return c
31848}
31849
31850// IfNoneMatch sets the optional parameter which makes the operation
31851// fail if the object's ETag matches the given value. This is useful for
31852// getting updates only after the object has changed since the last
31853// request. Use googleapi.IsNotModified to check whether the response
31854// error from Do is the result of In-None-Match.
31855func (c *FloodlightActivitiesGetCall) IfNoneMatch(entityTag string) *FloodlightActivitiesGetCall {
31856	c.ifNoneMatch_ = entityTag
31857	return c
31858}
31859
31860// Context sets the context to be used in this call's Do method. Any
31861// pending HTTP request will be aborted if the provided context is
31862// canceled.
31863func (c *FloodlightActivitiesGetCall) Context(ctx context.Context) *FloodlightActivitiesGetCall {
31864	c.ctx_ = ctx
31865	return c
31866}
31867
31868// Header returns an http.Header that can be modified by the caller to
31869// add HTTP headers to the request.
31870func (c *FloodlightActivitiesGetCall) Header() http.Header {
31871	if c.header_ == nil {
31872		c.header_ = make(http.Header)
31873	}
31874	return c.header_
31875}
31876
31877func (c *FloodlightActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
31878	reqHeaders := make(http.Header)
31879	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
31880	for k, v := range c.header_ {
31881		reqHeaders[k] = v
31882	}
31883	reqHeaders.Set("User-Agent", c.s.userAgent())
31884	if c.ifNoneMatch_ != "" {
31885		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31886	}
31887	var body io.Reader = nil
31888	c.urlParams_.Set("alt", alt)
31889	c.urlParams_.Set("prettyPrint", "false")
31890	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
31891	urls += "?" + c.urlParams_.Encode()
31892	req, err := http.NewRequest("GET", urls, body)
31893	if err != nil {
31894		return nil, err
31895	}
31896	req.Header = reqHeaders
31897	googleapi.Expand(req.URL, map[string]string{
31898		"profileId": strconv.FormatInt(c.profileId, 10),
31899		"id":        strconv.FormatInt(c.id, 10),
31900	})
31901	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31902}
31903
31904// Do executes the "dfareporting.floodlightActivities.get" call.
31905// Exactly one of *FloodlightActivity or error will be non-nil. Any
31906// non-2xx status code is an error. Response headers are in either
31907// *FloodlightActivity.ServerResponse.Header or (if a response was
31908// returned at all) in error.(*googleapi.Error).Header. Use
31909// googleapi.IsNotModified to check whether the returned error was
31910// because http.StatusNotModified was returned.
31911func (c *FloodlightActivitiesGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
31912	gensupport.SetOptions(c.urlParams_, opts...)
31913	res, err := c.doRequest("json")
31914	if res != nil && res.StatusCode == http.StatusNotModified {
31915		if res.Body != nil {
31916			res.Body.Close()
31917		}
31918		return nil, &googleapi.Error{
31919			Code:   res.StatusCode,
31920			Header: res.Header,
31921		}
31922	}
31923	if err != nil {
31924		return nil, err
31925	}
31926	defer googleapi.CloseBody(res)
31927	if err := googleapi.CheckResponse(res); err != nil {
31928		return nil, err
31929	}
31930	ret := &FloodlightActivity{
31931		ServerResponse: googleapi.ServerResponse{
31932			Header:         res.Header,
31933			HTTPStatusCode: res.StatusCode,
31934		},
31935	}
31936	target := &ret
31937	if err := gensupport.DecodeResponse(target, res); err != nil {
31938		return nil, err
31939	}
31940	return ret, nil
31941	// {
31942	//   "description": "Gets one floodlight activity by ID.",
31943	//   "httpMethod": "GET",
31944	//   "id": "dfareporting.floodlightActivities.get",
31945	//   "parameterOrder": [
31946	//     "profileId",
31947	//     "id"
31948	//   ],
31949	//   "parameters": {
31950	//     "id": {
31951	//       "description": "Floodlight activity ID.",
31952	//       "format": "int64",
31953	//       "location": "path",
31954	//       "required": true,
31955	//       "type": "string"
31956	//     },
31957	//     "profileId": {
31958	//       "description": "User profile ID associated with this request.",
31959	//       "format": "int64",
31960	//       "location": "path",
31961	//       "required": true,
31962	//       "type": "string"
31963	//     }
31964	//   },
31965	//   "path": "userprofiles/{profileId}/floodlightActivities/{id}",
31966	//   "response": {
31967	//     "$ref": "FloodlightActivity"
31968	//   },
31969	//   "scopes": [
31970	//     "https://www.googleapis.com/auth/dfatrafficking"
31971	//   ]
31972	// }
31973
31974}
31975
31976// method id "dfareporting.floodlightActivities.insert":
31977
31978type FloodlightActivitiesInsertCall struct {
31979	s                  *Service
31980	profileId          int64
31981	floodlightactivity *FloodlightActivity
31982	urlParams_         gensupport.URLParams
31983	ctx_               context.Context
31984	header_            http.Header
31985}
31986
31987// Insert: Inserts a new floodlight activity.
31988func (r *FloodlightActivitiesService) Insert(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesInsertCall {
31989	c := &FloodlightActivitiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31990	c.profileId = profileId
31991	c.floodlightactivity = floodlightactivity
31992	return c
31993}
31994
31995// Fields allows partial responses to be retrieved. See
31996// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31997// for more information.
31998func (c *FloodlightActivitiesInsertCall) Fields(s ...googleapi.Field) *FloodlightActivitiesInsertCall {
31999	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32000	return c
32001}
32002
32003// Context sets the context to be used in this call's Do method. Any
32004// pending HTTP request will be aborted if the provided context is
32005// canceled.
32006func (c *FloodlightActivitiesInsertCall) Context(ctx context.Context) *FloodlightActivitiesInsertCall {
32007	c.ctx_ = ctx
32008	return c
32009}
32010
32011// Header returns an http.Header that can be modified by the caller to
32012// add HTTP headers to the request.
32013func (c *FloodlightActivitiesInsertCall) Header() http.Header {
32014	if c.header_ == nil {
32015		c.header_ = make(http.Header)
32016	}
32017	return c.header_
32018}
32019
32020func (c *FloodlightActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
32021	reqHeaders := make(http.Header)
32022	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
32023	for k, v := range c.header_ {
32024		reqHeaders[k] = v
32025	}
32026	reqHeaders.Set("User-Agent", c.s.userAgent())
32027	var body io.Reader = nil
32028	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
32029	if err != nil {
32030		return nil, err
32031	}
32032	reqHeaders.Set("Content-Type", "application/json")
32033	c.urlParams_.Set("alt", alt)
32034	c.urlParams_.Set("prettyPrint", "false")
32035	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32036	urls += "?" + c.urlParams_.Encode()
32037	req, err := http.NewRequest("POST", urls, body)
32038	if err != nil {
32039		return nil, err
32040	}
32041	req.Header = reqHeaders
32042	googleapi.Expand(req.URL, map[string]string{
32043		"profileId": strconv.FormatInt(c.profileId, 10),
32044	})
32045	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32046}
32047
32048// Do executes the "dfareporting.floodlightActivities.insert" call.
32049// Exactly one of *FloodlightActivity or error will be non-nil. Any
32050// non-2xx status code is an error. Response headers are in either
32051// *FloodlightActivity.ServerResponse.Header or (if a response was
32052// returned at all) in error.(*googleapi.Error).Header. Use
32053// googleapi.IsNotModified to check whether the returned error was
32054// because http.StatusNotModified was returned.
32055func (c *FloodlightActivitiesInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32056	gensupport.SetOptions(c.urlParams_, opts...)
32057	res, err := c.doRequest("json")
32058	if res != nil && res.StatusCode == http.StatusNotModified {
32059		if res.Body != nil {
32060			res.Body.Close()
32061		}
32062		return nil, &googleapi.Error{
32063			Code:   res.StatusCode,
32064			Header: res.Header,
32065		}
32066	}
32067	if err != nil {
32068		return nil, err
32069	}
32070	defer googleapi.CloseBody(res)
32071	if err := googleapi.CheckResponse(res); err != nil {
32072		return nil, err
32073	}
32074	ret := &FloodlightActivity{
32075		ServerResponse: googleapi.ServerResponse{
32076			Header:         res.Header,
32077			HTTPStatusCode: res.StatusCode,
32078		},
32079	}
32080	target := &ret
32081	if err := gensupport.DecodeResponse(target, res); err != nil {
32082		return nil, err
32083	}
32084	return ret, nil
32085	// {
32086	//   "description": "Inserts a new floodlight activity.",
32087	//   "httpMethod": "POST",
32088	//   "id": "dfareporting.floodlightActivities.insert",
32089	//   "parameterOrder": [
32090	//     "profileId"
32091	//   ],
32092	//   "parameters": {
32093	//     "profileId": {
32094	//       "description": "User profile ID associated with this request.",
32095	//       "format": "int64",
32096	//       "location": "path",
32097	//       "required": true,
32098	//       "type": "string"
32099	//     }
32100	//   },
32101	//   "path": "userprofiles/{profileId}/floodlightActivities",
32102	//   "request": {
32103	//     "$ref": "FloodlightActivity"
32104	//   },
32105	//   "response": {
32106	//     "$ref": "FloodlightActivity"
32107	//   },
32108	//   "scopes": [
32109	//     "https://www.googleapis.com/auth/dfatrafficking"
32110	//   ]
32111	// }
32112
32113}
32114
32115// method id "dfareporting.floodlightActivities.list":
32116
32117type FloodlightActivitiesListCall struct {
32118	s            *Service
32119	profileId    int64
32120	urlParams_   gensupport.URLParams
32121	ifNoneMatch_ string
32122	ctx_         context.Context
32123	header_      http.Header
32124}
32125
32126// List: Retrieves a list of floodlight activities, possibly filtered.
32127// This method supports paging.
32128func (r *FloodlightActivitiesService) List(profileId int64) *FloodlightActivitiesListCall {
32129	c := &FloodlightActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32130	c.profileId = profileId
32131	return c
32132}
32133
32134// AdvertiserId sets the optional parameter "advertiserId": Select only
32135// floodlight activities for the specified advertiser ID. Must specify
32136// either ids, advertiserId, or floodlightConfigurationId for a
32137// non-empty result.
32138func (c *FloodlightActivitiesListCall) AdvertiserId(advertiserId int64) *FloodlightActivitiesListCall {
32139	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32140	return c
32141}
32142
32143// FloodlightActivityGroupIds sets the optional parameter
32144// "floodlightActivityGroupIds": Select only floodlight activities with
32145// the specified floodlight activity group IDs.
32146func (c *FloodlightActivitiesListCall) FloodlightActivityGroupIds(floodlightActivityGroupIds ...int64) *FloodlightActivitiesListCall {
32147	var floodlightActivityGroupIds_ []string
32148	for _, v := range floodlightActivityGroupIds {
32149		floodlightActivityGroupIds_ = append(floodlightActivityGroupIds_, fmt.Sprint(v))
32150	}
32151	c.urlParams_.SetMulti("floodlightActivityGroupIds", floodlightActivityGroupIds_)
32152	return c
32153}
32154
32155// FloodlightActivityGroupName sets the optional parameter
32156// "floodlightActivityGroupName": Select only floodlight activities with
32157// the specified floodlight activity group name.
32158func (c *FloodlightActivitiesListCall) FloodlightActivityGroupName(floodlightActivityGroupName string) *FloodlightActivitiesListCall {
32159	c.urlParams_.Set("floodlightActivityGroupName", floodlightActivityGroupName)
32160	return c
32161}
32162
32163// FloodlightActivityGroupTagString sets the optional parameter
32164// "floodlightActivityGroupTagString": Select only floodlight activities
32165// with the specified floodlight activity group tag string.
32166func (c *FloodlightActivitiesListCall) FloodlightActivityGroupTagString(floodlightActivityGroupTagString string) *FloodlightActivitiesListCall {
32167	c.urlParams_.Set("floodlightActivityGroupTagString", floodlightActivityGroupTagString)
32168	return c
32169}
32170
32171// FloodlightActivityGroupType sets the optional parameter
32172// "floodlightActivityGroupType": Select only floodlight activities with
32173// the specified floodlight activity group type.
32174//
32175// Possible values:
32176//   "COUNTER"
32177//   "SALE"
32178func (c *FloodlightActivitiesListCall) FloodlightActivityGroupType(floodlightActivityGroupType string) *FloodlightActivitiesListCall {
32179	c.urlParams_.Set("floodlightActivityGroupType", floodlightActivityGroupType)
32180	return c
32181}
32182
32183// FloodlightConfigurationId sets the optional parameter
32184// "floodlightConfigurationId": Select only floodlight activities for
32185// the specified floodlight configuration ID. Must specify either ids,
32186// advertiserId, or floodlightConfigurationId for a non-empty result.
32187func (c *FloodlightActivitiesListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivitiesListCall {
32188	c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
32189	return c
32190}
32191
32192// Ids sets the optional parameter "ids": Select only floodlight
32193// activities with the specified IDs. Must specify either ids,
32194// advertiserId, or floodlightConfigurationId for a non-empty result.
32195func (c *FloodlightActivitiesListCall) Ids(ids ...int64) *FloodlightActivitiesListCall {
32196	var ids_ []string
32197	for _, v := range ids {
32198		ids_ = append(ids_, fmt.Sprint(v))
32199	}
32200	c.urlParams_.SetMulti("ids", ids_)
32201	return c
32202}
32203
32204// MaxResults sets the optional parameter "maxResults": Maximum number
32205// of results to return.
32206func (c *FloodlightActivitiesListCall) MaxResults(maxResults int64) *FloodlightActivitiesListCall {
32207	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
32208	return c
32209}
32210
32211// PageToken sets the optional parameter "pageToken": Value of the
32212// nextPageToken from the previous result page.
32213func (c *FloodlightActivitiesListCall) PageToken(pageToken string) *FloodlightActivitiesListCall {
32214	c.urlParams_.Set("pageToken", pageToken)
32215	return c
32216}
32217
32218// SearchString sets the optional parameter "searchString": Allows
32219// searching for objects by name or ID. Wildcards (*) are allowed. For
32220// example, "floodlightactivity*2015" will return objects with names
32221// like "floodlightactivity June 2015", "floodlightactivity April 2015",
32222// or simply "floodlightactivity 2015". Most of the searches also add
32223// wildcards implicitly at the start and the end of the search string.
32224// For example, a search string of "floodlightactivity" will match
32225// objects with name "my floodlightactivity activity",
32226// "floodlightactivity 2015", or simply "floodlightactivity".
32227func (c *FloodlightActivitiesListCall) SearchString(searchString string) *FloodlightActivitiesListCall {
32228	c.urlParams_.Set("searchString", searchString)
32229	return c
32230}
32231
32232// SortField sets the optional parameter "sortField": Field by which to
32233// sort the list.
32234//
32235// Possible values:
32236//   "ID" (default)
32237//   "NAME"
32238func (c *FloodlightActivitiesListCall) SortField(sortField string) *FloodlightActivitiesListCall {
32239	c.urlParams_.Set("sortField", sortField)
32240	return c
32241}
32242
32243// SortOrder sets the optional parameter "sortOrder": Order of sorted
32244// results.
32245//
32246// Possible values:
32247//   "ASCENDING" (default)
32248//   "DESCENDING"
32249func (c *FloodlightActivitiesListCall) SortOrder(sortOrder string) *FloodlightActivitiesListCall {
32250	c.urlParams_.Set("sortOrder", sortOrder)
32251	return c
32252}
32253
32254// TagString sets the optional parameter "tagString": Select only
32255// floodlight activities with the specified tag string.
32256func (c *FloodlightActivitiesListCall) TagString(tagString string) *FloodlightActivitiesListCall {
32257	c.urlParams_.Set("tagString", tagString)
32258	return c
32259}
32260
32261// Fields allows partial responses to be retrieved. See
32262// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32263// for more information.
32264func (c *FloodlightActivitiesListCall) Fields(s ...googleapi.Field) *FloodlightActivitiesListCall {
32265	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32266	return c
32267}
32268
32269// IfNoneMatch sets the optional parameter which makes the operation
32270// fail if the object's ETag matches the given value. This is useful for
32271// getting updates only after the object has changed since the last
32272// request. Use googleapi.IsNotModified to check whether the response
32273// error from Do is the result of In-None-Match.
32274func (c *FloodlightActivitiesListCall) IfNoneMatch(entityTag string) *FloodlightActivitiesListCall {
32275	c.ifNoneMatch_ = entityTag
32276	return c
32277}
32278
32279// Context sets the context to be used in this call's Do method. Any
32280// pending HTTP request will be aborted if the provided context is
32281// canceled.
32282func (c *FloodlightActivitiesListCall) Context(ctx context.Context) *FloodlightActivitiesListCall {
32283	c.ctx_ = ctx
32284	return c
32285}
32286
32287// Header returns an http.Header that can be modified by the caller to
32288// add HTTP headers to the request.
32289func (c *FloodlightActivitiesListCall) Header() http.Header {
32290	if c.header_ == nil {
32291		c.header_ = make(http.Header)
32292	}
32293	return c.header_
32294}
32295
32296func (c *FloodlightActivitiesListCall) doRequest(alt string) (*http.Response, error) {
32297	reqHeaders := make(http.Header)
32298	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
32299	for k, v := range c.header_ {
32300		reqHeaders[k] = v
32301	}
32302	reqHeaders.Set("User-Agent", c.s.userAgent())
32303	if c.ifNoneMatch_ != "" {
32304		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32305	}
32306	var body io.Reader = nil
32307	c.urlParams_.Set("alt", alt)
32308	c.urlParams_.Set("prettyPrint", "false")
32309	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32310	urls += "?" + c.urlParams_.Encode()
32311	req, err := http.NewRequest("GET", urls, body)
32312	if err != nil {
32313		return nil, err
32314	}
32315	req.Header = reqHeaders
32316	googleapi.Expand(req.URL, map[string]string{
32317		"profileId": strconv.FormatInt(c.profileId, 10),
32318	})
32319	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32320}
32321
32322// Do executes the "dfareporting.floodlightActivities.list" call.
32323// Exactly one of *FloodlightActivitiesListResponse or error will be
32324// non-nil. Any non-2xx status code is an error. Response headers are in
32325// either *FloodlightActivitiesListResponse.ServerResponse.Header or (if
32326// a response was returned at all) in error.(*googleapi.Error).Header.
32327// Use googleapi.IsNotModified to check whether the returned error was
32328// because http.StatusNotModified was returned.
32329func (c *FloodlightActivitiesListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesListResponse, error) {
32330	gensupport.SetOptions(c.urlParams_, opts...)
32331	res, err := c.doRequest("json")
32332	if res != nil && res.StatusCode == http.StatusNotModified {
32333		if res.Body != nil {
32334			res.Body.Close()
32335		}
32336		return nil, &googleapi.Error{
32337			Code:   res.StatusCode,
32338			Header: res.Header,
32339		}
32340	}
32341	if err != nil {
32342		return nil, err
32343	}
32344	defer googleapi.CloseBody(res)
32345	if err := googleapi.CheckResponse(res); err != nil {
32346		return nil, err
32347	}
32348	ret := &FloodlightActivitiesListResponse{
32349		ServerResponse: googleapi.ServerResponse{
32350			Header:         res.Header,
32351			HTTPStatusCode: res.StatusCode,
32352		},
32353	}
32354	target := &ret
32355	if err := gensupport.DecodeResponse(target, res); err != nil {
32356		return nil, err
32357	}
32358	return ret, nil
32359	// {
32360	//   "description": "Retrieves a list of floodlight activities, possibly filtered. This method supports paging.",
32361	//   "httpMethod": "GET",
32362	//   "id": "dfareporting.floodlightActivities.list",
32363	//   "parameterOrder": [
32364	//     "profileId"
32365	//   ],
32366	//   "parameters": {
32367	//     "advertiserId": {
32368	//       "description": "Select only floodlight activities for the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32369	//       "format": "int64",
32370	//       "location": "query",
32371	//       "type": "string"
32372	//     },
32373	//     "floodlightActivityGroupIds": {
32374	//       "description": "Select only floodlight activities with the specified floodlight activity group IDs.",
32375	//       "format": "int64",
32376	//       "location": "query",
32377	//       "repeated": true,
32378	//       "type": "string"
32379	//     },
32380	//     "floodlightActivityGroupName": {
32381	//       "description": "Select only floodlight activities with the specified floodlight activity group name.",
32382	//       "location": "query",
32383	//       "type": "string"
32384	//     },
32385	//     "floodlightActivityGroupTagString": {
32386	//       "description": "Select only floodlight activities with the specified floodlight activity group tag string.",
32387	//       "location": "query",
32388	//       "type": "string"
32389	//     },
32390	//     "floodlightActivityGroupType": {
32391	//       "description": "Select only floodlight activities with the specified floodlight activity group type.",
32392	//       "enum": [
32393	//         "COUNTER",
32394	//         "SALE"
32395	//       ],
32396	//       "enumDescriptions": [
32397	//         "",
32398	//         ""
32399	//       ],
32400	//       "location": "query",
32401	//       "type": "string"
32402	//     },
32403	//     "floodlightConfigurationId": {
32404	//       "description": "Select only floodlight activities for the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32405	//       "format": "int64",
32406	//       "location": "query",
32407	//       "type": "string"
32408	//     },
32409	//     "ids": {
32410	//       "description": "Select only floodlight activities with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.",
32411	//       "format": "int64",
32412	//       "location": "query",
32413	//       "repeated": true,
32414	//       "type": "string"
32415	//     },
32416	//     "maxResults": {
32417	//       "default": "1000",
32418	//       "description": "Maximum number of results to return.",
32419	//       "format": "int32",
32420	//       "location": "query",
32421	//       "maximum": "1000",
32422	//       "minimum": "0",
32423	//       "type": "integer"
32424	//     },
32425	//     "pageToken": {
32426	//       "description": "Value of the nextPageToken from the previous result page.",
32427	//       "location": "query",
32428	//       "type": "string"
32429	//     },
32430	//     "profileId": {
32431	//       "description": "User profile ID associated with this request.",
32432	//       "format": "int64",
32433	//       "location": "path",
32434	//       "required": true,
32435	//       "type": "string"
32436	//     },
32437	//     "searchString": {
32438	//       "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\".",
32439	//       "location": "query",
32440	//       "type": "string"
32441	//     },
32442	//     "sortField": {
32443	//       "default": "ID",
32444	//       "description": "Field by which to sort the list.",
32445	//       "enum": [
32446	//         "ID",
32447	//         "NAME"
32448	//       ],
32449	//       "enumDescriptions": [
32450	//         "",
32451	//         ""
32452	//       ],
32453	//       "location": "query",
32454	//       "type": "string"
32455	//     },
32456	//     "sortOrder": {
32457	//       "default": "ASCENDING",
32458	//       "description": "Order of sorted results.",
32459	//       "enum": [
32460	//         "ASCENDING",
32461	//         "DESCENDING"
32462	//       ],
32463	//       "enumDescriptions": [
32464	//         "",
32465	//         ""
32466	//       ],
32467	//       "location": "query",
32468	//       "type": "string"
32469	//     },
32470	//     "tagString": {
32471	//       "description": "Select only floodlight activities with the specified tag string.",
32472	//       "location": "query",
32473	//       "type": "string"
32474	//     }
32475	//   },
32476	//   "path": "userprofiles/{profileId}/floodlightActivities",
32477	//   "response": {
32478	//     "$ref": "FloodlightActivitiesListResponse"
32479	//   },
32480	//   "scopes": [
32481	//     "https://www.googleapis.com/auth/dfatrafficking"
32482	//   ]
32483	// }
32484
32485}
32486
32487// Pages invokes f for each page of results.
32488// A non-nil error returned from f will halt the iteration.
32489// The provided context supersedes any context provided to the Context method.
32490func (c *FloodlightActivitiesListCall) Pages(ctx context.Context, f func(*FloodlightActivitiesListResponse) error) error {
32491	c.ctx_ = ctx
32492	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
32493	for {
32494		x, err := c.Do()
32495		if err != nil {
32496			return err
32497		}
32498		if err := f(x); err != nil {
32499			return err
32500		}
32501		if x.NextPageToken == "" {
32502			return nil
32503		}
32504		c.PageToken(x.NextPageToken)
32505	}
32506}
32507
32508// method id "dfareporting.floodlightActivities.patch":
32509
32510type FloodlightActivitiesPatchCall struct {
32511	s                  *Service
32512	profileId          int64
32513	floodlightactivity *FloodlightActivity
32514	urlParams_         gensupport.URLParams
32515	ctx_               context.Context
32516	header_            http.Header
32517}
32518
32519// Patch: Updates an existing floodlight activity. This method supports
32520// patch semantics.
32521func (r *FloodlightActivitiesService) Patch(profileId int64, id int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesPatchCall {
32522	c := &FloodlightActivitiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32523	c.profileId = profileId
32524	c.urlParams_.Set("id", fmt.Sprint(id))
32525	c.floodlightactivity = floodlightactivity
32526	return c
32527}
32528
32529// Fields allows partial responses to be retrieved. See
32530// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32531// for more information.
32532func (c *FloodlightActivitiesPatchCall) Fields(s ...googleapi.Field) *FloodlightActivitiesPatchCall {
32533	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32534	return c
32535}
32536
32537// Context sets the context to be used in this call's Do method. Any
32538// pending HTTP request will be aborted if the provided context is
32539// canceled.
32540func (c *FloodlightActivitiesPatchCall) Context(ctx context.Context) *FloodlightActivitiesPatchCall {
32541	c.ctx_ = ctx
32542	return c
32543}
32544
32545// Header returns an http.Header that can be modified by the caller to
32546// add HTTP headers to the request.
32547func (c *FloodlightActivitiesPatchCall) Header() http.Header {
32548	if c.header_ == nil {
32549		c.header_ = make(http.Header)
32550	}
32551	return c.header_
32552}
32553
32554func (c *FloodlightActivitiesPatchCall) doRequest(alt string) (*http.Response, error) {
32555	reqHeaders := make(http.Header)
32556	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
32557	for k, v := range c.header_ {
32558		reqHeaders[k] = v
32559	}
32560	reqHeaders.Set("User-Agent", c.s.userAgent())
32561	var body io.Reader = nil
32562	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
32563	if err != nil {
32564		return nil, err
32565	}
32566	reqHeaders.Set("Content-Type", "application/json")
32567	c.urlParams_.Set("alt", alt)
32568	c.urlParams_.Set("prettyPrint", "false")
32569	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32570	urls += "?" + c.urlParams_.Encode()
32571	req, err := http.NewRequest("PATCH", urls, body)
32572	if err != nil {
32573		return nil, err
32574	}
32575	req.Header = reqHeaders
32576	googleapi.Expand(req.URL, map[string]string{
32577		"profileId": strconv.FormatInt(c.profileId, 10),
32578	})
32579	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32580}
32581
32582// Do executes the "dfareporting.floodlightActivities.patch" call.
32583// Exactly one of *FloodlightActivity or error will be non-nil. Any
32584// non-2xx status code is an error. Response headers are in either
32585// *FloodlightActivity.ServerResponse.Header or (if a response was
32586// returned at all) in error.(*googleapi.Error).Header. Use
32587// googleapi.IsNotModified to check whether the returned error was
32588// because http.StatusNotModified was returned.
32589func (c *FloodlightActivitiesPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32590	gensupport.SetOptions(c.urlParams_, opts...)
32591	res, err := c.doRequest("json")
32592	if res != nil && res.StatusCode == http.StatusNotModified {
32593		if res.Body != nil {
32594			res.Body.Close()
32595		}
32596		return nil, &googleapi.Error{
32597			Code:   res.StatusCode,
32598			Header: res.Header,
32599		}
32600	}
32601	if err != nil {
32602		return nil, err
32603	}
32604	defer googleapi.CloseBody(res)
32605	if err := googleapi.CheckResponse(res); err != nil {
32606		return nil, err
32607	}
32608	ret := &FloodlightActivity{
32609		ServerResponse: googleapi.ServerResponse{
32610			Header:         res.Header,
32611			HTTPStatusCode: res.StatusCode,
32612		},
32613	}
32614	target := &ret
32615	if err := gensupport.DecodeResponse(target, res); err != nil {
32616		return nil, err
32617	}
32618	return ret, nil
32619	// {
32620	//   "description": "Updates an existing floodlight activity. This method supports patch semantics.",
32621	//   "httpMethod": "PATCH",
32622	//   "id": "dfareporting.floodlightActivities.patch",
32623	//   "parameterOrder": [
32624	//     "profileId",
32625	//     "id"
32626	//   ],
32627	//   "parameters": {
32628	//     "id": {
32629	//       "description": "Floodlight activity ID.",
32630	//       "format": "int64",
32631	//       "location": "query",
32632	//       "required": true,
32633	//       "type": "string"
32634	//     },
32635	//     "profileId": {
32636	//       "description": "User profile ID associated with this request.",
32637	//       "format": "int64",
32638	//       "location": "path",
32639	//       "required": true,
32640	//       "type": "string"
32641	//     }
32642	//   },
32643	//   "path": "userprofiles/{profileId}/floodlightActivities",
32644	//   "request": {
32645	//     "$ref": "FloodlightActivity"
32646	//   },
32647	//   "response": {
32648	//     "$ref": "FloodlightActivity"
32649	//   },
32650	//   "scopes": [
32651	//     "https://www.googleapis.com/auth/dfatrafficking"
32652	//   ]
32653	// }
32654
32655}
32656
32657// method id "dfareporting.floodlightActivities.update":
32658
32659type FloodlightActivitiesUpdateCall struct {
32660	s                  *Service
32661	profileId          int64
32662	floodlightactivity *FloodlightActivity
32663	urlParams_         gensupport.URLParams
32664	ctx_               context.Context
32665	header_            http.Header
32666}
32667
32668// Update: Updates an existing floodlight activity.
32669func (r *FloodlightActivitiesService) Update(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesUpdateCall {
32670	c := &FloodlightActivitiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32671	c.profileId = profileId
32672	c.floodlightactivity = floodlightactivity
32673	return c
32674}
32675
32676// Fields allows partial responses to be retrieved. See
32677// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32678// for more information.
32679func (c *FloodlightActivitiesUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivitiesUpdateCall {
32680	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32681	return c
32682}
32683
32684// Context sets the context to be used in this call's Do method. Any
32685// pending HTTP request will be aborted if the provided context is
32686// canceled.
32687func (c *FloodlightActivitiesUpdateCall) Context(ctx context.Context) *FloodlightActivitiesUpdateCall {
32688	c.ctx_ = ctx
32689	return c
32690}
32691
32692// Header returns an http.Header that can be modified by the caller to
32693// add HTTP headers to the request.
32694func (c *FloodlightActivitiesUpdateCall) Header() http.Header {
32695	if c.header_ == nil {
32696		c.header_ = make(http.Header)
32697	}
32698	return c.header_
32699}
32700
32701func (c *FloodlightActivitiesUpdateCall) doRequest(alt string) (*http.Response, error) {
32702	reqHeaders := make(http.Header)
32703	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
32704	for k, v := range c.header_ {
32705		reqHeaders[k] = v
32706	}
32707	reqHeaders.Set("User-Agent", c.s.userAgent())
32708	var body io.Reader = nil
32709	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
32710	if err != nil {
32711		return nil, err
32712	}
32713	reqHeaders.Set("Content-Type", "application/json")
32714	c.urlParams_.Set("alt", alt)
32715	c.urlParams_.Set("prettyPrint", "false")
32716	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32717	urls += "?" + c.urlParams_.Encode()
32718	req, err := http.NewRequest("PUT", urls, body)
32719	if err != nil {
32720		return nil, err
32721	}
32722	req.Header = reqHeaders
32723	googleapi.Expand(req.URL, map[string]string{
32724		"profileId": strconv.FormatInt(c.profileId, 10),
32725	})
32726	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32727}
32728
32729// Do executes the "dfareporting.floodlightActivities.update" call.
32730// Exactly one of *FloodlightActivity or error will be non-nil. Any
32731// non-2xx status code is an error. Response headers are in either
32732// *FloodlightActivity.ServerResponse.Header or (if a response was
32733// returned at all) in error.(*googleapi.Error).Header. Use
32734// googleapi.IsNotModified to check whether the returned error was
32735// because http.StatusNotModified was returned.
32736func (c *FloodlightActivitiesUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32737	gensupport.SetOptions(c.urlParams_, opts...)
32738	res, err := c.doRequest("json")
32739	if res != nil && res.StatusCode == http.StatusNotModified {
32740		if res.Body != nil {
32741			res.Body.Close()
32742		}
32743		return nil, &googleapi.Error{
32744			Code:   res.StatusCode,
32745			Header: res.Header,
32746		}
32747	}
32748	if err != nil {
32749		return nil, err
32750	}
32751	defer googleapi.CloseBody(res)
32752	if err := googleapi.CheckResponse(res); err != nil {
32753		return nil, err
32754	}
32755	ret := &FloodlightActivity{
32756		ServerResponse: googleapi.ServerResponse{
32757			Header:         res.Header,
32758			HTTPStatusCode: res.StatusCode,
32759		},
32760	}
32761	target := &ret
32762	if err := gensupport.DecodeResponse(target, res); err != nil {
32763		return nil, err
32764	}
32765	return ret, nil
32766	// {
32767	//   "description": "Updates an existing floodlight activity.",
32768	//   "httpMethod": "PUT",
32769	//   "id": "dfareporting.floodlightActivities.update",
32770	//   "parameterOrder": [
32771	//     "profileId"
32772	//   ],
32773	//   "parameters": {
32774	//     "profileId": {
32775	//       "description": "User profile ID associated with this request.",
32776	//       "format": "int64",
32777	//       "location": "path",
32778	//       "required": true,
32779	//       "type": "string"
32780	//     }
32781	//   },
32782	//   "path": "userprofiles/{profileId}/floodlightActivities",
32783	//   "request": {
32784	//     "$ref": "FloodlightActivity"
32785	//   },
32786	//   "response": {
32787	//     "$ref": "FloodlightActivity"
32788	//   },
32789	//   "scopes": [
32790	//     "https://www.googleapis.com/auth/dfatrafficking"
32791	//   ]
32792	// }
32793
32794}
32795
32796// method id "dfareporting.floodlightActivityGroups.get":
32797
32798type FloodlightActivityGroupsGetCall struct {
32799	s            *Service
32800	profileId    int64
32801	id           int64
32802	urlParams_   gensupport.URLParams
32803	ifNoneMatch_ string
32804	ctx_         context.Context
32805	header_      http.Header
32806}
32807
32808// Get: Gets one floodlight activity group by ID.
32809func (r *FloodlightActivityGroupsService) Get(profileId int64, id int64) *FloodlightActivityGroupsGetCall {
32810	c := &FloodlightActivityGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32811	c.profileId = profileId
32812	c.id = id
32813	return c
32814}
32815
32816// Fields allows partial responses to be retrieved. See
32817// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32818// for more information.
32819func (c *FloodlightActivityGroupsGetCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsGetCall {
32820	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32821	return c
32822}
32823
32824// IfNoneMatch sets the optional parameter which makes the operation
32825// fail if the object's ETag matches the given value. This is useful for
32826// getting updates only after the object has changed since the last
32827// request. Use googleapi.IsNotModified to check whether the response
32828// error from Do is the result of In-None-Match.
32829func (c *FloodlightActivityGroupsGetCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsGetCall {
32830	c.ifNoneMatch_ = entityTag
32831	return c
32832}
32833
32834// Context sets the context to be used in this call's Do method. Any
32835// pending HTTP request will be aborted if the provided context is
32836// canceled.
32837func (c *FloodlightActivityGroupsGetCall) Context(ctx context.Context) *FloodlightActivityGroupsGetCall {
32838	c.ctx_ = ctx
32839	return c
32840}
32841
32842// Header returns an http.Header that can be modified by the caller to
32843// add HTTP headers to the request.
32844func (c *FloodlightActivityGroupsGetCall) Header() http.Header {
32845	if c.header_ == nil {
32846		c.header_ = make(http.Header)
32847	}
32848	return c.header_
32849}
32850
32851func (c *FloodlightActivityGroupsGetCall) doRequest(alt string) (*http.Response, error) {
32852	reqHeaders := make(http.Header)
32853	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
32854	for k, v := range c.header_ {
32855		reqHeaders[k] = v
32856	}
32857	reqHeaders.Set("User-Agent", c.s.userAgent())
32858	if c.ifNoneMatch_ != "" {
32859		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32860	}
32861	var body io.Reader = nil
32862	c.urlParams_.Set("alt", alt)
32863	c.urlParams_.Set("prettyPrint", "false")
32864	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups/{id}")
32865	urls += "?" + c.urlParams_.Encode()
32866	req, err := http.NewRequest("GET", urls, body)
32867	if err != nil {
32868		return nil, err
32869	}
32870	req.Header = reqHeaders
32871	googleapi.Expand(req.URL, map[string]string{
32872		"profileId": strconv.FormatInt(c.profileId, 10),
32873		"id":        strconv.FormatInt(c.id, 10),
32874	})
32875	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32876}
32877
32878// Do executes the "dfareporting.floodlightActivityGroups.get" call.
32879// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
32880// non-2xx status code is an error. Response headers are in either
32881// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
32882// returned at all) in error.(*googleapi.Error).Header. Use
32883// googleapi.IsNotModified to check whether the returned error was
32884// because http.StatusNotModified was returned.
32885func (c *FloodlightActivityGroupsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
32886	gensupport.SetOptions(c.urlParams_, opts...)
32887	res, err := c.doRequest("json")
32888	if res != nil && res.StatusCode == http.StatusNotModified {
32889		if res.Body != nil {
32890			res.Body.Close()
32891		}
32892		return nil, &googleapi.Error{
32893			Code:   res.StatusCode,
32894			Header: res.Header,
32895		}
32896	}
32897	if err != nil {
32898		return nil, err
32899	}
32900	defer googleapi.CloseBody(res)
32901	if err := googleapi.CheckResponse(res); err != nil {
32902		return nil, err
32903	}
32904	ret := &FloodlightActivityGroup{
32905		ServerResponse: googleapi.ServerResponse{
32906			Header:         res.Header,
32907			HTTPStatusCode: res.StatusCode,
32908		},
32909	}
32910	target := &ret
32911	if err := gensupport.DecodeResponse(target, res); err != nil {
32912		return nil, err
32913	}
32914	return ret, nil
32915	// {
32916	//   "description": "Gets one floodlight activity group by ID.",
32917	//   "httpMethod": "GET",
32918	//   "id": "dfareporting.floodlightActivityGroups.get",
32919	//   "parameterOrder": [
32920	//     "profileId",
32921	//     "id"
32922	//   ],
32923	//   "parameters": {
32924	//     "id": {
32925	//       "description": "Floodlight activity Group ID.",
32926	//       "format": "int64",
32927	//       "location": "path",
32928	//       "required": true,
32929	//       "type": "string"
32930	//     },
32931	//     "profileId": {
32932	//       "description": "User profile ID associated with this request.",
32933	//       "format": "int64",
32934	//       "location": "path",
32935	//       "required": true,
32936	//       "type": "string"
32937	//     }
32938	//   },
32939	//   "path": "userprofiles/{profileId}/floodlightActivityGroups/{id}",
32940	//   "response": {
32941	//     "$ref": "FloodlightActivityGroup"
32942	//   },
32943	//   "scopes": [
32944	//     "https://www.googleapis.com/auth/dfatrafficking"
32945	//   ]
32946	// }
32947
32948}
32949
32950// method id "dfareporting.floodlightActivityGroups.insert":
32951
32952type FloodlightActivityGroupsInsertCall struct {
32953	s                       *Service
32954	profileId               int64
32955	floodlightactivitygroup *FloodlightActivityGroup
32956	urlParams_              gensupport.URLParams
32957	ctx_                    context.Context
32958	header_                 http.Header
32959}
32960
32961// Insert: Inserts a new floodlight activity group.
32962func (r *FloodlightActivityGroupsService) Insert(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsInsertCall {
32963	c := &FloodlightActivityGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32964	c.profileId = profileId
32965	c.floodlightactivitygroup = floodlightactivitygroup
32966	return c
32967}
32968
32969// Fields allows partial responses to be retrieved. See
32970// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32971// for more information.
32972func (c *FloodlightActivityGroupsInsertCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsInsertCall {
32973	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32974	return c
32975}
32976
32977// Context sets the context to be used in this call's Do method. Any
32978// pending HTTP request will be aborted if the provided context is
32979// canceled.
32980func (c *FloodlightActivityGroupsInsertCall) Context(ctx context.Context) *FloodlightActivityGroupsInsertCall {
32981	c.ctx_ = ctx
32982	return c
32983}
32984
32985// Header returns an http.Header that can be modified by the caller to
32986// add HTTP headers to the request.
32987func (c *FloodlightActivityGroupsInsertCall) Header() http.Header {
32988	if c.header_ == nil {
32989		c.header_ = make(http.Header)
32990	}
32991	return c.header_
32992}
32993
32994func (c *FloodlightActivityGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
32995	reqHeaders := make(http.Header)
32996	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
32997	for k, v := range c.header_ {
32998		reqHeaders[k] = v
32999	}
33000	reqHeaders.Set("User-Agent", c.s.userAgent())
33001	var body io.Reader = nil
33002	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
33003	if err != nil {
33004		return nil, err
33005	}
33006	reqHeaders.Set("Content-Type", "application/json")
33007	c.urlParams_.Set("alt", alt)
33008	c.urlParams_.Set("prettyPrint", "false")
33009	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33010	urls += "?" + c.urlParams_.Encode()
33011	req, err := http.NewRequest("POST", urls, body)
33012	if err != nil {
33013		return nil, err
33014	}
33015	req.Header = reqHeaders
33016	googleapi.Expand(req.URL, map[string]string{
33017		"profileId": strconv.FormatInt(c.profileId, 10),
33018	})
33019	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33020}
33021
33022// Do executes the "dfareporting.floodlightActivityGroups.insert" call.
33023// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33024// non-2xx status code is an error. Response headers are in either
33025// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33026// returned at all) in error.(*googleapi.Error).Header. Use
33027// googleapi.IsNotModified to check whether the returned error was
33028// because http.StatusNotModified was returned.
33029func (c *FloodlightActivityGroupsInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33030	gensupport.SetOptions(c.urlParams_, opts...)
33031	res, err := c.doRequest("json")
33032	if res != nil && res.StatusCode == http.StatusNotModified {
33033		if res.Body != nil {
33034			res.Body.Close()
33035		}
33036		return nil, &googleapi.Error{
33037			Code:   res.StatusCode,
33038			Header: res.Header,
33039		}
33040	}
33041	if err != nil {
33042		return nil, err
33043	}
33044	defer googleapi.CloseBody(res)
33045	if err := googleapi.CheckResponse(res); err != nil {
33046		return nil, err
33047	}
33048	ret := &FloodlightActivityGroup{
33049		ServerResponse: googleapi.ServerResponse{
33050			Header:         res.Header,
33051			HTTPStatusCode: res.StatusCode,
33052		},
33053	}
33054	target := &ret
33055	if err := gensupport.DecodeResponse(target, res); err != nil {
33056		return nil, err
33057	}
33058	return ret, nil
33059	// {
33060	//   "description": "Inserts a new floodlight activity group.",
33061	//   "httpMethod": "POST",
33062	//   "id": "dfareporting.floodlightActivityGroups.insert",
33063	//   "parameterOrder": [
33064	//     "profileId"
33065	//   ],
33066	//   "parameters": {
33067	//     "profileId": {
33068	//       "description": "User profile ID associated with this request.",
33069	//       "format": "int64",
33070	//       "location": "path",
33071	//       "required": true,
33072	//       "type": "string"
33073	//     }
33074	//   },
33075	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
33076	//   "request": {
33077	//     "$ref": "FloodlightActivityGroup"
33078	//   },
33079	//   "response": {
33080	//     "$ref": "FloodlightActivityGroup"
33081	//   },
33082	//   "scopes": [
33083	//     "https://www.googleapis.com/auth/dfatrafficking"
33084	//   ]
33085	// }
33086
33087}
33088
33089// method id "dfareporting.floodlightActivityGroups.list":
33090
33091type FloodlightActivityGroupsListCall struct {
33092	s            *Service
33093	profileId    int64
33094	urlParams_   gensupport.URLParams
33095	ifNoneMatch_ string
33096	ctx_         context.Context
33097	header_      http.Header
33098}
33099
33100// List: Retrieves a list of floodlight activity groups, possibly
33101// filtered. This method supports paging.
33102func (r *FloodlightActivityGroupsService) List(profileId int64) *FloodlightActivityGroupsListCall {
33103	c := &FloodlightActivityGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33104	c.profileId = profileId
33105	return c
33106}
33107
33108// AdvertiserId sets the optional parameter "advertiserId": Select only
33109// floodlight activity groups with the specified advertiser ID. Must
33110// specify either advertiserId or floodlightConfigurationId for a
33111// non-empty result.
33112func (c *FloodlightActivityGroupsListCall) AdvertiserId(advertiserId int64) *FloodlightActivityGroupsListCall {
33113	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
33114	return c
33115}
33116
33117// FloodlightConfigurationId sets the optional parameter
33118// "floodlightConfigurationId": Select only floodlight activity groups
33119// with the specified floodlight configuration ID. Must specify either
33120// advertiserId, or floodlightConfigurationId for a non-empty result.
33121func (c *FloodlightActivityGroupsListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivityGroupsListCall {
33122	c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
33123	return c
33124}
33125
33126// Ids sets the optional parameter "ids": Select only floodlight
33127// activity groups with the specified IDs. Must specify either
33128// advertiserId or floodlightConfigurationId for a non-empty result.
33129func (c *FloodlightActivityGroupsListCall) Ids(ids ...int64) *FloodlightActivityGroupsListCall {
33130	var ids_ []string
33131	for _, v := range ids {
33132		ids_ = append(ids_, fmt.Sprint(v))
33133	}
33134	c.urlParams_.SetMulti("ids", ids_)
33135	return c
33136}
33137
33138// MaxResults sets the optional parameter "maxResults": Maximum number
33139// of results to return.
33140func (c *FloodlightActivityGroupsListCall) MaxResults(maxResults int64) *FloodlightActivityGroupsListCall {
33141	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
33142	return c
33143}
33144
33145// PageToken sets the optional parameter "pageToken": Value of the
33146// nextPageToken from the previous result page.
33147func (c *FloodlightActivityGroupsListCall) PageToken(pageToken string) *FloodlightActivityGroupsListCall {
33148	c.urlParams_.Set("pageToken", pageToken)
33149	return c
33150}
33151
33152// SearchString sets the optional parameter "searchString": Allows
33153// searching for objects by name or ID. Wildcards (*) are allowed. For
33154// example, "floodlightactivitygroup*2015" will return objects with
33155// names like "floodlightactivitygroup June 2015",
33156// "floodlightactivitygroup April 2015", or simply
33157// "floodlightactivitygroup 2015". Most of the searches also add
33158// wildcards implicitly at the start and the end of the search string.
33159// For example, a search string of "floodlightactivitygroup" will match
33160// objects with name "my floodlightactivitygroup activity",
33161// "floodlightactivitygroup 2015", or simply "floodlightactivitygroup".
33162func (c *FloodlightActivityGroupsListCall) SearchString(searchString string) *FloodlightActivityGroupsListCall {
33163	c.urlParams_.Set("searchString", searchString)
33164	return c
33165}
33166
33167// SortField sets the optional parameter "sortField": Field by which to
33168// sort the list.
33169//
33170// Possible values:
33171//   "ID" (default)
33172//   "NAME"
33173func (c *FloodlightActivityGroupsListCall) SortField(sortField string) *FloodlightActivityGroupsListCall {
33174	c.urlParams_.Set("sortField", sortField)
33175	return c
33176}
33177
33178// SortOrder sets the optional parameter "sortOrder": Order of sorted
33179// results.
33180//
33181// Possible values:
33182//   "ASCENDING" (default)
33183//   "DESCENDING"
33184func (c *FloodlightActivityGroupsListCall) SortOrder(sortOrder string) *FloodlightActivityGroupsListCall {
33185	c.urlParams_.Set("sortOrder", sortOrder)
33186	return c
33187}
33188
33189// Type sets the optional parameter "type": Select only floodlight
33190// activity groups with the specified floodlight activity group type.
33191//
33192// Possible values:
33193//   "COUNTER"
33194//   "SALE"
33195func (c *FloodlightActivityGroupsListCall) Type(type_ string) *FloodlightActivityGroupsListCall {
33196	c.urlParams_.Set("type", type_)
33197	return c
33198}
33199
33200// Fields allows partial responses to be retrieved. See
33201// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33202// for more information.
33203func (c *FloodlightActivityGroupsListCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsListCall {
33204	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33205	return c
33206}
33207
33208// IfNoneMatch sets the optional parameter which makes the operation
33209// fail if the object's ETag matches the given value. This is useful for
33210// getting updates only after the object has changed since the last
33211// request. Use googleapi.IsNotModified to check whether the response
33212// error from Do is the result of In-None-Match.
33213func (c *FloodlightActivityGroupsListCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsListCall {
33214	c.ifNoneMatch_ = entityTag
33215	return c
33216}
33217
33218// Context sets the context to be used in this call's Do method. Any
33219// pending HTTP request will be aborted if the provided context is
33220// canceled.
33221func (c *FloodlightActivityGroupsListCall) Context(ctx context.Context) *FloodlightActivityGroupsListCall {
33222	c.ctx_ = ctx
33223	return c
33224}
33225
33226// Header returns an http.Header that can be modified by the caller to
33227// add HTTP headers to the request.
33228func (c *FloodlightActivityGroupsListCall) Header() http.Header {
33229	if c.header_ == nil {
33230		c.header_ = make(http.Header)
33231	}
33232	return c.header_
33233}
33234
33235func (c *FloodlightActivityGroupsListCall) doRequest(alt string) (*http.Response, error) {
33236	reqHeaders := make(http.Header)
33237	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
33238	for k, v := range c.header_ {
33239		reqHeaders[k] = v
33240	}
33241	reqHeaders.Set("User-Agent", c.s.userAgent())
33242	if c.ifNoneMatch_ != "" {
33243		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33244	}
33245	var body io.Reader = nil
33246	c.urlParams_.Set("alt", alt)
33247	c.urlParams_.Set("prettyPrint", "false")
33248	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33249	urls += "?" + c.urlParams_.Encode()
33250	req, err := http.NewRequest("GET", urls, body)
33251	if err != nil {
33252		return nil, err
33253	}
33254	req.Header = reqHeaders
33255	googleapi.Expand(req.URL, map[string]string{
33256		"profileId": strconv.FormatInt(c.profileId, 10),
33257	})
33258	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33259}
33260
33261// Do executes the "dfareporting.floodlightActivityGroups.list" call.
33262// Exactly one of *FloodlightActivityGroupsListResponse or error will be
33263// non-nil. Any non-2xx status code is an error. Response headers are in
33264// either *FloodlightActivityGroupsListResponse.ServerResponse.Header or
33265// (if a response was returned at all) in
33266// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
33267// whether the returned error was because http.StatusNotModified was
33268// returned.
33269func (c *FloodlightActivityGroupsListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroupsListResponse, error) {
33270	gensupport.SetOptions(c.urlParams_, opts...)
33271	res, err := c.doRequest("json")
33272	if res != nil && res.StatusCode == http.StatusNotModified {
33273		if res.Body != nil {
33274			res.Body.Close()
33275		}
33276		return nil, &googleapi.Error{
33277			Code:   res.StatusCode,
33278			Header: res.Header,
33279		}
33280	}
33281	if err != nil {
33282		return nil, err
33283	}
33284	defer googleapi.CloseBody(res)
33285	if err := googleapi.CheckResponse(res); err != nil {
33286		return nil, err
33287	}
33288	ret := &FloodlightActivityGroupsListResponse{
33289		ServerResponse: googleapi.ServerResponse{
33290			Header:         res.Header,
33291			HTTPStatusCode: res.StatusCode,
33292		},
33293	}
33294	target := &ret
33295	if err := gensupport.DecodeResponse(target, res); err != nil {
33296		return nil, err
33297	}
33298	return ret, nil
33299	// {
33300	//   "description": "Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging.",
33301	//   "httpMethod": "GET",
33302	//   "id": "dfareporting.floodlightActivityGroups.list",
33303	//   "parameterOrder": [
33304	//     "profileId"
33305	//   ],
33306	//   "parameters": {
33307	//     "advertiserId": {
33308	//       "description": "Select only floodlight activity groups with the specified advertiser ID. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.",
33309	//       "format": "int64",
33310	//       "location": "query",
33311	//       "type": "string"
33312	//     },
33313	//     "floodlightConfigurationId": {
33314	//       "description": "Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either advertiserId, or floodlightConfigurationId for a non-empty result.",
33315	//       "format": "int64",
33316	//       "location": "query",
33317	//       "type": "string"
33318	//     },
33319	//     "ids": {
33320	//       "description": "Select only floodlight activity groups with the specified IDs. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.",
33321	//       "format": "int64",
33322	//       "location": "query",
33323	//       "repeated": true,
33324	//       "type": "string"
33325	//     },
33326	//     "maxResults": {
33327	//       "default": "1000",
33328	//       "description": "Maximum number of results to return.",
33329	//       "format": "int32",
33330	//       "location": "query",
33331	//       "maximum": "1000",
33332	//       "minimum": "0",
33333	//       "type": "integer"
33334	//     },
33335	//     "pageToken": {
33336	//       "description": "Value of the nextPageToken from the previous result page.",
33337	//       "location": "query",
33338	//       "type": "string"
33339	//     },
33340	//     "profileId": {
33341	//       "description": "User profile ID associated with this request.",
33342	//       "format": "int64",
33343	//       "location": "path",
33344	//       "required": true,
33345	//       "type": "string"
33346	//     },
33347	//     "searchString": {
33348	//       "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\".",
33349	//       "location": "query",
33350	//       "type": "string"
33351	//     },
33352	//     "sortField": {
33353	//       "default": "ID",
33354	//       "description": "Field by which to sort the list.",
33355	//       "enum": [
33356	//         "ID",
33357	//         "NAME"
33358	//       ],
33359	//       "enumDescriptions": [
33360	//         "",
33361	//         ""
33362	//       ],
33363	//       "location": "query",
33364	//       "type": "string"
33365	//     },
33366	//     "sortOrder": {
33367	//       "default": "ASCENDING",
33368	//       "description": "Order of sorted results.",
33369	//       "enum": [
33370	//         "ASCENDING",
33371	//         "DESCENDING"
33372	//       ],
33373	//       "enumDescriptions": [
33374	//         "",
33375	//         ""
33376	//       ],
33377	//       "location": "query",
33378	//       "type": "string"
33379	//     },
33380	//     "type": {
33381	//       "description": "Select only floodlight activity groups with the specified floodlight activity group type.",
33382	//       "enum": [
33383	//         "COUNTER",
33384	//         "SALE"
33385	//       ],
33386	//       "enumDescriptions": [
33387	//         "",
33388	//         ""
33389	//       ],
33390	//       "location": "query",
33391	//       "type": "string"
33392	//     }
33393	//   },
33394	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
33395	//   "response": {
33396	//     "$ref": "FloodlightActivityGroupsListResponse"
33397	//   },
33398	//   "scopes": [
33399	//     "https://www.googleapis.com/auth/dfatrafficking"
33400	//   ]
33401	// }
33402
33403}
33404
33405// Pages invokes f for each page of results.
33406// A non-nil error returned from f will halt the iteration.
33407// The provided context supersedes any context provided to the Context method.
33408func (c *FloodlightActivityGroupsListCall) Pages(ctx context.Context, f func(*FloodlightActivityGroupsListResponse) error) error {
33409	c.ctx_ = ctx
33410	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
33411	for {
33412		x, err := c.Do()
33413		if err != nil {
33414			return err
33415		}
33416		if err := f(x); err != nil {
33417			return err
33418		}
33419		if x.NextPageToken == "" {
33420			return nil
33421		}
33422		c.PageToken(x.NextPageToken)
33423	}
33424}
33425
33426// method id "dfareporting.floodlightActivityGroups.patch":
33427
33428type FloodlightActivityGroupsPatchCall struct {
33429	s                       *Service
33430	profileId               int64
33431	floodlightactivitygroup *FloodlightActivityGroup
33432	urlParams_              gensupport.URLParams
33433	ctx_                    context.Context
33434	header_                 http.Header
33435}
33436
33437// Patch: Updates an existing floodlight activity group. This method
33438// supports patch semantics.
33439func (r *FloodlightActivityGroupsService) Patch(profileId int64, id int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsPatchCall {
33440	c := &FloodlightActivityGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33441	c.profileId = profileId
33442	c.urlParams_.Set("id", fmt.Sprint(id))
33443	c.floodlightactivitygroup = floodlightactivitygroup
33444	return c
33445}
33446
33447// Fields allows partial responses to be retrieved. See
33448// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33449// for more information.
33450func (c *FloodlightActivityGroupsPatchCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsPatchCall {
33451	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33452	return c
33453}
33454
33455// Context sets the context to be used in this call's Do method. Any
33456// pending HTTP request will be aborted if the provided context is
33457// canceled.
33458func (c *FloodlightActivityGroupsPatchCall) Context(ctx context.Context) *FloodlightActivityGroupsPatchCall {
33459	c.ctx_ = ctx
33460	return c
33461}
33462
33463// Header returns an http.Header that can be modified by the caller to
33464// add HTTP headers to the request.
33465func (c *FloodlightActivityGroupsPatchCall) Header() http.Header {
33466	if c.header_ == nil {
33467		c.header_ = make(http.Header)
33468	}
33469	return c.header_
33470}
33471
33472func (c *FloodlightActivityGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
33473	reqHeaders := make(http.Header)
33474	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
33475	for k, v := range c.header_ {
33476		reqHeaders[k] = v
33477	}
33478	reqHeaders.Set("User-Agent", c.s.userAgent())
33479	var body io.Reader = nil
33480	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
33481	if err != nil {
33482		return nil, err
33483	}
33484	reqHeaders.Set("Content-Type", "application/json")
33485	c.urlParams_.Set("alt", alt)
33486	c.urlParams_.Set("prettyPrint", "false")
33487	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33488	urls += "?" + c.urlParams_.Encode()
33489	req, err := http.NewRequest("PATCH", urls, body)
33490	if err != nil {
33491		return nil, err
33492	}
33493	req.Header = reqHeaders
33494	googleapi.Expand(req.URL, map[string]string{
33495		"profileId": strconv.FormatInt(c.profileId, 10),
33496	})
33497	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33498}
33499
33500// Do executes the "dfareporting.floodlightActivityGroups.patch" call.
33501// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33502// non-2xx status code is an error. Response headers are in either
33503// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33504// returned at all) in error.(*googleapi.Error).Header. Use
33505// googleapi.IsNotModified to check whether the returned error was
33506// because http.StatusNotModified was returned.
33507func (c *FloodlightActivityGroupsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33508	gensupport.SetOptions(c.urlParams_, opts...)
33509	res, err := c.doRequest("json")
33510	if res != nil && res.StatusCode == http.StatusNotModified {
33511		if res.Body != nil {
33512			res.Body.Close()
33513		}
33514		return nil, &googleapi.Error{
33515			Code:   res.StatusCode,
33516			Header: res.Header,
33517		}
33518	}
33519	if err != nil {
33520		return nil, err
33521	}
33522	defer googleapi.CloseBody(res)
33523	if err := googleapi.CheckResponse(res); err != nil {
33524		return nil, err
33525	}
33526	ret := &FloodlightActivityGroup{
33527		ServerResponse: googleapi.ServerResponse{
33528			Header:         res.Header,
33529			HTTPStatusCode: res.StatusCode,
33530		},
33531	}
33532	target := &ret
33533	if err := gensupport.DecodeResponse(target, res); err != nil {
33534		return nil, err
33535	}
33536	return ret, nil
33537	// {
33538	//   "description": "Updates an existing floodlight activity group. This method supports patch semantics.",
33539	//   "httpMethod": "PATCH",
33540	//   "id": "dfareporting.floodlightActivityGroups.patch",
33541	//   "parameterOrder": [
33542	//     "profileId",
33543	//     "id"
33544	//   ],
33545	//   "parameters": {
33546	//     "id": {
33547	//       "description": "Floodlight activity Group ID.",
33548	//       "format": "int64",
33549	//       "location": "query",
33550	//       "required": true,
33551	//       "type": "string"
33552	//     },
33553	//     "profileId": {
33554	//       "description": "User profile ID associated with this request.",
33555	//       "format": "int64",
33556	//       "location": "path",
33557	//       "required": true,
33558	//       "type": "string"
33559	//     }
33560	//   },
33561	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
33562	//   "request": {
33563	//     "$ref": "FloodlightActivityGroup"
33564	//   },
33565	//   "response": {
33566	//     "$ref": "FloodlightActivityGroup"
33567	//   },
33568	//   "scopes": [
33569	//     "https://www.googleapis.com/auth/dfatrafficking"
33570	//   ]
33571	// }
33572
33573}
33574
33575// method id "dfareporting.floodlightActivityGroups.update":
33576
33577type FloodlightActivityGroupsUpdateCall struct {
33578	s                       *Service
33579	profileId               int64
33580	floodlightactivitygroup *FloodlightActivityGroup
33581	urlParams_              gensupport.URLParams
33582	ctx_                    context.Context
33583	header_                 http.Header
33584}
33585
33586// Update: Updates an existing floodlight activity group.
33587func (r *FloodlightActivityGroupsService) Update(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsUpdateCall {
33588	c := &FloodlightActivityGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33589	c.profileId = profileId
33590	c.floodlightactivitygroup = floodlightactivitygroup
33591	return c
33592}
33593
33594// Fields allows partial responses to be retrieved. See
33595// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33596// for more information.
33597func (c *FloodlightActivityGroupsUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsUpdateCall {
33598	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33599	return c
33600}
33601
33602// Context sets the context to be used in this call's Do method. Any
33603// pending HTTP request will be aborted if the provided context is
33604// canceled.
33605func (c *FloodlightActivityGroupsUpdateCall) Context(ctx context.Context) *FloodlightActivityGroupsUpdateCall {
33606	c.ctx_ = ctx
33607	return c
33608}
33609
33610// Header returns an http.Header that can be modified by the caller to
33611// add HTTP headers to the request.
33612func (c *FloodlightActivityGroupsUpdateCall) Header() http.Header {
33613	if c.header_ == nil {
33614		c.header_ = make(http.Header)
33615	}
33616	return c.header_
33617}
33618
33619func (c *FloodlightActivityGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
33620	reqHeaders := make(http.Header)
33621	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
33622	for k, v := range c.header_ {
33623		reqHeaders[k] = v
33624	}
33625	reqHeaders.Set("User-Agent", c.s.userAgent())
33626	var body io.Reader = nil
33627	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
33628	if err != nil {
33629		return nil, err
33630	}
33631	reqHeaders.Set("Content-Type", "application/json")
33632	c.urlParams_.Set("alt", alt)
33633	c.urlParams_.Set("prettyPrint", "false")
33634	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33635	urls += "?" + c.urlParams_.Encode()
33636	req, err := http.NewRequest("PUT", urls, body)
33637	if err != nil {
33638		return nil, err
33639	}
33640	req.Header = reqHeaders
33641	googleapi.Expand(req.URL, map[string]string{
33642		"profileId": strconv.FormatInt(c.profileId, 10),
33643	})
33644	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33645}
33646
33647// Do executes the "dfareporting.floodlightActivityGroups.update" call.
33648// Exactly one of *FloodlightActivityGroup or error will be non-nil. Any
33649// non-2xx status code is an error. Response headers are in either
33650// *FloodlightActivityGroup.ServerResponse.Header or (if a response was
33651// returned at all) in error.(*googleapi.Error).Header. Use
33652// googleapi.IsNotModified to check whether the returned error was
33653// because http.StatusNotModified was returned.
33654func (c *FloodlightActivityGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33655	gensupport.SetOptions(c.urlParams_, opts...)
33656	res, err := c.doRequest("json")
33657	if res != nil && res.StatusCode == http.StatusNotModified {
33658		if res.Body != nil {
33659			res.Body.Close()
33660		}
33661		return nil, &googleapi.Error{
33662			Code:   res.StatusCode,
33663			Header: res.Header,
33664		}
33665	}
33666	if err != nil {
33667		return nil, err
33668	}
33669	defer googleapi.CloseBody(res)
33670	if err := googleapi.CheckResponse(res); err != nil {
33671		return nil, err
33672	}
33673	ret := &FloodlightActivityGroup{
33674		ServerResponse: googleapi.ServerResponse{
33675			Header:         res.Header,
33676			HTTPStatusCode: res.StatusCode,
33677		},
33678	}
33679	target := &ret
33680	if err := gensupport.DecodeResponse(target, res); err != nil {
33681		return nil, err
33682	}
33683	return ret, nil
33684	// {
33685	//   "description": "Updates an existing floodlight activity group.",
33686	//   "httpMethod": "PUT",
33687	//   "id": "dfareporting.floodlightActivityGroups.update",
33688	//   "parameterOrder": [
33689	//     "profileId"
33690	//   ],
33691	//   "parameters": {
33692	//     "profileId": {
33693	//       "description": "User profile ID associated with this request.",
33694	//       "format": "int64",
33695	//       "location": "path",
33696	//       "required": true,
33697	//       "type": "string"
33698	//     }
33699	//   },
33700	//   "path": "userprofiles/{profileId}/floodlightActivityGroups",
33701	//   "request": {
33702	//     "$ref": "FloodlightActivityGroup"
33703	//   },
33704	//   "response": {
33705	//     "$ref": "FloodlightActivityGroup"
33706	//   },
33707	//   "scopes": [
33708	//     "https://www.googleapis.com/auth/dfatrafficking"
33709	//   ]
33710	// }
33711
33712}
33713
33714// method id "dfareporting.floodlightConfigurations.get":
33715
33716type FloodlightConfigurationsGetCall struct {
33717	s            *Service
33718	profileId    int64
33719	id           int64
33720	urlParams_   gensupport.URLParams
33721	ifNoneMatch_ string
33722	ctx_         context.Context
33723	header_      http.Header
33724}
33725
33726// Get: Gets one floodlight configuration by ID.
33727func (r *FloodlightConfigurationsService) Get(profileId int64, id int64) *FloodlightConfigurationsGetCall {
33728	c := &FloodlightConfigurationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33729	c.profileId = profileId
33730	c.id = id
33731	return c
33732}
33733
33734// Fields allows partial responses to be retrieved. See
33735// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33736// for more information.
33737func (c *FloodlightConfigurationsGetCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsGetCall {
33738	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33739	return c
33740}
33741
33742// IfNoneMatch sets the optional parameter which makes the operation
33743// fail if the object's ETag matches the given value. This is useful for
33744// getting updates only after the object has changed since the last
33745// request. Use googleapi.IsNotModified to check whether the response
33746// error from Do is the result of In-None-Match.
33747func (c *FloodlightConfigurationsGetCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsGetCall {
33748	c.ifNoneMatch_ = entityTag
33749	return c
33750}
33751
33752// Context sets the context to be used in this call's Do method. Any
33753// pending HTTP request will be aborted if the provided context is
33754// canceled.
33755func (c *FloodlightConfigurationsGetCall) Context(ctx context.Context) *FloodlightConfigurationsGetCall {
33756	c.ctx_ = ctx
33757	return c
33758}
33759
33760// Header returns an http.Header that can be modified by the caller to
33761// add HTTP headers to the request.
33762func (c *FloodlightConfigurationsGetCall) Header() http.Header {
33763	if c.header_ == nil {
33764		c.header_ = make(http.Header)
33765	}
33766	return c.header_
33767}
33768
33769func (c *FloodlightConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
33770	reqHeaders := make(http.Header)
33771	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
33772	for k, v := range c.header_ {
33773		reqHeaders[k] = v
33774	}
33775	reqHeaders.Set("User-Agent", c.s.userAgent())
33776	if c.ifNoneMatch_ != "" {
33777		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33778	}
33779	var body io.Reader = nil
33780	c.urlParams_.Set("alt", alt)
33781	c.urlParams_.Set("prettyPrint", "false")
33782	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations/{id}")
33783	urls += "?" + c.urlParams_.Encode()
33784	req, err := http.NewRequest("GET", urls, body)
33785	if err != nil {
33786		return nil, err
33787	}
33788	req.Header = reqHeaders
33789	googleapi.Expand(req.URL, map[string]string{
33790		"profileId": strconv.FormatInt(c.profileId, 10),
33791		"id":        strconv.FormatInt(c.id, 10),
33792	})
33793	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33794}
33795
33796// Do executes the "dfareporting.floodlightConfigurations.get" call.
33797// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
33798// non-2xx status code is an error. Response headers are in either
33799// *FloodlightConfiguration.ServerResponse.Header or (if a response was
33800// returned at all) in error.(*googleapi.Error).Header. Use
33801// googleapi.IsNotModified to check whether the returned error was
33802// because http.StatusNotModified was returned.
33803func (c *FloodlightConfigurationsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
33804	gensupport.SetOptions(c.urlParams_, opts...)
33805	res, err := c.doRequest("json")
33806	if res != nil && res.StatusCode == http.StatusNotModified {
33807		if res.Body != nil {
33808			res.Body.Close()
33809		}
33810		return nil, &googleapi.Error{
33811			Code:   res.StatusCode,
33812			Header: res.Header,
33813		}
33814	}
33815	if err != nil {
33816		return nil, err
33817	}
33818	defer googleapi.CloseBody(res)
33819	if err := googleapi.CheckResponse(res); err != nil {
33820		return nil, err
33821	}
33822	ret := &FloodlightConfiguration{
33823		ServerResponse: googleapi.ServerResponse{
33824			Header:         res.Header,
33825			HTTPStatusCode: res.StatusCode,
33826		},
33827	}
33828	target := &ret
33829	if err := gensupport.DecodeResponse(target, res); err != nil {
33830		return nil, err
33831	}
33832	return ret, nil
33833	// {
33834	//   "description": "Gets one floodlight configuration by ID.",
33835	//   "httpMethod": "GET",
33836	//   "id": "dfareporting.floodlightConfigurations.get",
33837	//   "parameterOrder": [
33838	//     "profileId",
33839	//     "id"
33840	//   ],
33841	//   "parameters": {
33842	//     "id": {
33843	//       "description": "Floodlight configuration ID.",
33844	//       "format": "int64",
33845	//       "location": "path",
33846	//       "required": true,
33847	//       "type": "string"
33848	//     },
33849	//     "profileId": {
33850	//       "description": "User profile ID associated with this request.",
33851	//       "format": "int64",
33852	//       "location": "path",
33853	//       "required": true,
33854	//       "type": "string"
33855	//     }
33856	//   },
33857	//   "path": "userprofiles/{profileId}/floodlightConfigurations/{id}",
33858	//   "response": {
33859	//     "$ref": "FloodlightConfiguration"
33860	//   },
33861	//   "scopes": [
33862	//     "https://www.googleapis.com/auth/dfatrafficking"
33863	//   ]
33864	// }
33865
33866}
33867
33868// method id "dfareporting.floodlightConfigurations.list":
33869
33870type FloodlightConfigurationsListCall struct {
33871	s            *Service
33872	profileId    int64
33873	urlParams_   gensupport.URLParams
33874	ifNoneMatch_ string
33875	ctx_         context.Context
33876	header_      http.Header
33877}
33878
33879// List: Retrieves a list of floodlight configurations, possibly
33880// filtered.
33881func (r *FloodlightConfigurationsService) List(profileId int64) *FloodlightConfigurationsListCall {
33882	c := &FloodlightConfigurationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33883	c.profileId = profileId
33884	return c
33885}
33886
33887// Ids sets the optional parameter "ids": Set of IDs of floodlight
33888// configurations to retrieve. Required field; otherwise an empty list
33889// will be returned.
33890func (c *FloodlightConfigurationsListCall) Ids(ids ...int64) *FloodlightConfigurationsListCall {
33891	var ids_ []string
33892	for _, v := range ids {
33893		ids_ = append(ids_, fmt.Sprint(v))
33894	}
33895	c.urlParams_.SetMulti("ids", ids_)
33896	return c
33897}
33898
33899// Fields allows partial responses to be retrieved. See
33900// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33901// for more information.
33902func (c *FloodlightConfigurationsListCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsListCall {
33903	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33904	return c
33905}
33906
33907// IfNoneMatch sets the optional parameter which makes the operation
33908// fail if the object's ETag matches the given value. This is useful for
33909// getting updates only after the object has changed since the last
33910// request. Use googleapi.IsNotModified to check whether the response
33911// error from Do is the result of In-None-Match.
33912func (c *FloodlightConfigurationsListCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsListCall {
33913	c.ifNoneMatch_ = entityTag
33914	return c
33915}
33916
33917// Context sets the context to be used in this call's Do method. Any
33918// pending HTTP request will be aborted if the provided context is
33919// canceled.
33920func (c *FloodlightConfigurationsListCall) Context(ctx context.Context) *FloodlightConfigurationsListCall {
33921	c.ctx_ = ctx
33922	return c
33923}
33924
33925// Header returns an http.Header that can be modified by the caller to
33926// add HTTP headers to the request.
33927func (c *FloodlightConfigurationsListCall) Header() http.Header {
33928	if c.header_ == nil {
33929		c.header_ = make(http.Header)
33930	}
33931	return c.header_
33932}
33933
33934func (c *FloodlightConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
33935	reqHeaders := make(http.Header)
33936	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
33937	for k, v := range c.header_ {
33938		reqHeaders[k] = v
33939	}
33940	reqHeaders.Set("User-Agent", c.s.userAgent())
33941	if c.ifNoneMatch_ != "" {
33942		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33943	}
33944	var body io.Reader = nil
33945	c.urlParams_.Set("alt", alt)
33946	c.urlParams_.Set("prettyPrint", "false")
33947	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
33948	urls += "?" + c.urlParams_.Encode()
33949	req, err := http.NewRequest("GET", 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.floodlightConfigurations.list" call.
33961// Exactly one of *FloodlightConfigurationsListResponse or error will be
33962// non-nil. Any non-2xx status code is an error. Response headers are in
33963// either *FloodlightConfigurationsListResponse.ServerResponse.Header or
33964// (if a response was returned at all) in
33965// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
33966// whether the returned error was because http.StatusNotModified was
33967// returned.
33968func (c *FloodlightConfigurationsListCall) Do(opts ...googleapi.CallOption) (*FloodlightConfigurationsListResponse, error) {
33969	gensupport.SetOptions(c.urlParams_, opts...)
33970	res, err := c.doRequest("json")
33971	if res != nil && res.StatusCode == http.StatusNotModified {
33972		if res.Body != nil {
33973			res.Body.Close()
33974		}
33975		return nil, &googleapi.Error{
33976			Code:   res.StatusCode,
33977			Header: res.Header,
33978		}
33979	}
33980	if err != nil {
33981		return nil, err
33982	}
33983	defer googleapi.CloseBody(res)
33984	if err := googleapi.CheckResponse(res); err != nil {
33985		return nil, err
33986	}
33987	ret := &FloodlightConfigurationsListResponse{
33988		ServerResponse: googleapi.ServerResponse{
33989			Header:         res.Header,
33990			HTTPStatusCode: res.StatusCode,
33991		},
33992	}
33993	target := &ret
33994	if err := gensupport.DecodeResponse(target, res); err != nil {
33995		return nil, err
33996	}
33997	return ret, nil
33998	// {
33999	//   "description": "Retrieves a list of floodlight configurations, possibly filtered.",
34000	//   "httpMethod": "GET",
34001	//   "id": "dfareporting.floodlightConfigurations.list",
34002	//   "parameterOrder": [
34003	//     "profileId"
34004	//   ],
34005	//   "parameters": {
34006	//     "ids": {
34007	//       "description": "Set of IDs of floodlight configurations to retrieve. Required field; otherwise an empty list will be returned.",
34008	//       "format": "int64",
34009	//       "location": "query",
34010	//       "repeated": true,
34011	//       "type": "string"
34012	//     },
34013	//     "profileId": {
34014	//       "description": "User profile ID associated with this request.",
34015	//       "format": "int64",
34016	//       "location": "path",
34017	//       "required": true,
34018	//       "type": "string"
34019	//     }
34020	//   },
34021	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34022	//   "response": {
34023	//     "$ref": "FloodlightConfigurationsListResponse"
34024	//   },
34025	//   "scopes": [
34026	//     "https://www.googleapis.com/auth/dfatrafficking"
34027	//   ]
34028	// }
34029
34030}
34031
34032// method id "dfareporting.floodlightConfigurations.patch":
34033
34034type FloodlightConfigurationsPatchCall struct {
34035	s                       *Service
34036	profileId               int64
34037	floodlightconfiguration *FloodlightConfiguration
34038	urlParams_              gensupport.URLParams
34039	ctx_                    context.Context
34040	header_                 http.Header
34041}
34042
34043// Patch: Updates an existing floodlight configuration. This method
34044// supports patch semantics.
34045func (r *FloodlightConfigurationsService) Patch(profileId int64, id int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsPatchCall {
34046	c := &FloodlightConfigurationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34047	c.profileId = profileId
34048	c.urlParams_.Set("id", fmt.Sprint(id))
34049	c.floodlightconfiguration = floodlightconfiguration
34050	return c
34051}
34052
34053// Fields allows partial responses to be retrieved. See
34054// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34055// for more information.
34056func (c *FloodlightConfigurationsPatchCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsPatchCall {
34057	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34058	return c
34059}
34060
34061// Context sets the context to be used in this call's Do method. Any
34062// pending HTTP request will be aborted if the provided context is
34063// canceled.
34064func (c *FloodlightConfigurationsPatchCall) Context(ctx context.Context) *FloodlightConfigurationsPatchCall {
34065	c.ctx_ = ctx
34066	return c
34067}
34068
34069// Header returns an http.Header that can be modified by the caller to
34070// add HTTP headers to the request.
34071func (c *FloodlightConfigurationsPatchCall) Header() http.Header {
34072	if c.header_ == nil {
34073		c.header_ = make(http.Header)
34074	}
34075	return c.header_
34076}
34077
34078func (c *FloodlightConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
34079	reqHeaders := make(http.Header)
34080	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
34081	for k, v := range c.header_ {
34082		reqHeaders[k] = v
34083	}
34084	reqHeaders.Set("User-Agent", c.s.userAgent())
34085	var body io.Reader = nil
34086	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
34087	if err != nil {
34088		return nil, err
34089	}
34090	reqHeaders.Set("Content-Type", "application/json")
34091	c.urlParams_.Set("alt", alt)
34092	c.urlParams_.Set("prettyPrint", "false")
34093	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34094	urls += "?" + c.urlParams_.Encode()
34095	req, err := http.NewRequest("PATCH", urls, body)
34096	if err != nil {
34097		return nil, err
34098	}
34099	req.Header = reqHeaders
34100	googleapi.Expand(req.URL, map[string]string{
34101		"profileId": strconv.FormatInt(c.profileId, 10),
34102	})
34103	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34104}
34105
34106// Do executes the "dfareporting.floodlightConfigurations.patch" call.
34107// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
34108// non-2xx status code is an error. Response headers are in either
34109// *FloodlightConfiguration.ServerResponse.Header or (if a response was
34110// returned at all) in error.(*googleapi.Error).Header. Use
34111// googleapi.IsNotModified to check whether the returned error was
34112// because http.StatusNotModified was returned.
34113func (c *FloodlightConfigurationsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34114	gensupport.SetOptions(c.urlParams_, opts...)
34115	res, err := c.doRequest("json")
34116	if res != nil && res.StatusCode == http.StatusNotModified {
34117		if res.Body != nil {
34118			res.Body.Close()
34119		}
34120		return nil, &googleapi.Error{
34121			Code:   res.StatusCode,
34122			Header: res.Header,
34123		}
34124	}
34125	if err != nil {
34126		return nil, err
34127	}
34128	defer googleapi.CloseBody(res)
34129	if err := googleapi.CheckResponse(res); err != nil {
34130		return nil, err
34131	}
34132	ret := &FloodlightConfiguration{
34133		ServerResponse: googleapi.ServerResponse{
34134			Header:         res.Header,
34135			HTTPStatusCode: res.StatusCode,
34136		},
34137	}
34138	target := &ret
34139	if err := gensupport.DecodeResponse(target, res); err != nil {
34140		return nil, err
34141	}
34142	return ret, nil
34143	// {
34144	//   "description": "Updates an existing floodlight configuration. This method supports patch semantics.",
34145	//   "httpMethod": "PATCH",
34146	//   "id": "dfareporting.floodlightConfigurations.patch",
34147	//   "parameterOrder": [
34148	//     "profileId",
34149	//     "id"
34150	//   ],
34151	//   "parameters": {
34152	//     "id": {
34153	//       "description": "Floodlight configuration ID.",
34154	//       "format": "int64",
34155	//       "location": "query",
34156	//       "required": true,
34157	//       "type": "string"
34158	//     },
34159	//     "profileId": {
34160	//       "description": "User profile ID associated with this request.",
34161	//       "format": "int64",
34162	//       "location": "path",
34163	//       "required": true,
34164	//       "type": "string"
34165	//     }
34166	//   },
34167	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34168	//   "request": {
34169	//     "$ref": "FloodlightConfiguration"
34170	//   },
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.update":
34182
34183type FloodlightConfigurationsUpdateCall struct {
34184	s                       *Service
34185	profileId               int64
34186	floodlightconfiguration *FloodlightConfiguration
34187	urlParams_              gensupport.URLParams
34188	ctx_                    context.Context
34189	header_                 http.Header
34190}
34191
34192// Update: Updates an existing floodlight configuration.
34193func (r *FloodlightConfigurationsService) Update(profileId int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsUpdateCall {
34194	c := &FloodlightConfigurationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34195	c.profileId = profileId
34196	c.floodlightconfiguration = floodlightconfiguration
34197	return c
34198}
34199
34200// Fields allows partial responses to be retrieved. See
34201// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34202// for more information.
34203func (c *FloodlightConfigurationsUpdateCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsUpdateCall {
34204	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34205	return c
34206}
34207
34208// Context sets the context to be used in this call's Do method. Any
34209// pending HTTP request will be aborted if the provided context is
34210// canceled.
34211func (c *FloodlightConfigurationsUpdateCall) Context(ctx context.Context) *FloodlightConfigurationsUpdateCall {
34212	c.ctx_ = ctx
34213	return c
34214}
34215
34216// Header returns an http.Header that can be modified by the caller to
34217// add HTTP headers to the request.
34218func (c *FloodlightConfigurationsUpdateCall) Header() http.Header {
34219	if c.header_ == nil {
34220		c.header_ = make(http.Header)
34221	}
34222	return c.header_
34223}
34224
34225func (c *FloodlightConfigurationsUpdateCall) doRequest(alt string) (*http.Response, error) {
34226	reqHeaders := make(http.Header)
34227	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
34228	for k, v := range c.header_ {
34229		reqHeaders[k] = v
34230	}
34231	reqHeaders.Set("User-Agent", c.s.userAgent())
34232	var body io.Reader = nil
34233	body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
34234	if err != nil {
34235		return nil, err
34236	}
34237	reqHeaders.Set("Content-Type", "application/json")
34238	c.urlParams_.Set("alt", alt)
34239	c.urlParams_.Set("prettyPrint", "false")
34240	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34241	urls += "?" + c.urlParams_.Encode()
34242	req, err := http.NewRequest("PUT", urls, body)
34243	if err != nil {
34244		return nil, err
34245	}
34246	req.Header = reqHeaders
34247	googleapi.Expand(req.URL, map[string]string{
34248		"profileId": strconv.FormatInt(c.profileId, 10),
34249	})
34250	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34251}
34252
34253// Do executes the "dfareporting.floodlightConfigurations.update" call.
34254// Exactly one of *FloodlightConfiguration or error will be non-nil. Any
34255// non-2xx status code is an error. Response headers are in either
34256// *FloodlightConfiguration.ServerResponse.Header or (if a response was
34257// returned at all) in error.(*googleapi.Error).Header. Use
34258// googleapi.IsNotModified to check whether the returned error was
34259// because http.StatusNotModified was returned.
34260func (c *FloodlightConfigurationsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34261	gensupport.SetOptions(c.urlParams_, opts...)
34262	res, err := c.doRequest("json")
34263	if res != nil && res.StatusCode == http.StatusNotModified {
34264		if res.Body != nil {
34265			res.Body.Close()
34266		}
34267		return nil, &googleapi.Error{
34268			Code:   res.StatusCode,
34269			Header: res.Header,
34270		}
34271	}
34272	if err != nil {
34273		return nil, err
34274	}
34275	defer googleapi.CloseBody(res)
34276	if err := googleapi.CheckResponse(res); err != nil {
34277		return nil, err
34278	}
34279	ret := &FloodlightConfiguration{
34280		ServerResponse: googleapi.ServerResponse{
34281			Header:         res.Header,
34282			HTTPStatusCode: res.StatusCode,
34283		},
34284	}
34285	target := &ret
34286	if err := gensupport.DecodeResponse(target, res); err != nil {
34287		return nil, err
34288	}
34289	return ret, nil
34290	// {
34291	//   "description": "Updates an existing floodlight configuration.",
34292	//   "httpMethod": "PUT",
34293	//   "id": "dfareporting.floodlightConfigurations.update",
34294	//   "parameterOrder": [
34295	//     "profileId"
34296	//   ],
34297	//   "parameters": {
34298	//     "profileId": {
34299	//       "description": "User profile ID associated with this request.",
34300	//       "format": "int64",
34301	//       "location": "path",
34302	//       "required": true,
34303	//       "type": "string"
34304	//     }
34305	//   },
34306	//   "path": "userprofiles/{profileId}/floodlightConfigurations",
34307	//   "request": {
34308	//     "$ref": "FloodlightConfiguration"
34309	//   },
34310	//   "response": {
34311	//     "$ref": "FloodlightConfiguration"
34312	//   },
34313	//   "scopes": [
34314	//     "https://www.googleapis.com/auth/dfatrafficking"
34315	//   ]
34316	// }
34317
34318}
34319
34320// method id "dfareporting.inventoryItems.get":
34321
34322type InventoryItemsGetCall struct {
34323	s            *Service
34324	profileId    int64
34325	projectId    int64
34326	id           int64
34327	urlParams_   gensupport.URLParams
34328	ifNoneMatch_ string
34329	ctx_         context.Context
34330	header_      http.Header
34331}
34332
34333// Get: Gets one inventory item by ID.
34334func (r *InventoryItemsService) Get(profileId int64, projectId int64, id int64) *InventoryItemsGetCall {
34335	c := &InventoryItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34336	c.profileId = profileId
34337	c.projectId = projectId
34338	c.id = id
34339	return c
34340}
34341
34342// Fields allows partial responses to be retrieved. See
34343// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34344// for more information.
34345func (c *InventoryItemsGetCall) Fields(s ...googleapi.Field) *InventoryItemsGetCall {
34346	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34347	return c
34348}
34349
34350// IfNoneMatch sets the optional parameter which makes the operation
34351// fail if the object's ETag matches the given value. This is useful for
34352// getting updates only after the object has changed since the last
34353// request. Use googleapi.IsNotModified to check whether the response
34354// error from Do is the result of In-None-Match.
34355func (c *InventoryItemsGetCall) IfNoneMatch(entityTag string) *InventoryItemsGetCall {
34356	c.ifNoneMatch_ = entityTag
34357	return c
34358}
34359
34360// Context sets the context to be used in this call's Do method. Any
34361// pending HTTP request will be aborted if the provided context is
34362// canceled.
34363func (c *InventoryItemsGetCall) Context(ctx context.Context) *InventoryItemsGetCall {
34364	c.ctx_ = ctx
34365	return c
34366}
34367
34368// Header returns an http.Header that can be modified by the caller to
34369// add HTTP headers to the request.
34370func (c *InventoryItemsGetCall) Header() http.Header {
34371	if c.header_ == nil {
34372		c.header_ = make(http.Header)
34373	}
34374	return c.header_
34375}
34376
34377func (c *InventoryItemsGetCall) doRequest(alt string) (*http.Response, error) {
34378	reqHeaders := make(http.Header)
34379	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
34380	for k, v := range c.header_ {
34381		reqHeaders[k] = v
34382	}
34383	reqHeaders.Set("User-Agent", c.s.userAgent())
34384	if c.ifNoneMatch_ != "" {
34385		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34386	}
34387	var body io.Reader = nil
34388	c.urlParams_.Set("alt", alt)
34389	c.urlParams_.Set("prettyPrint", "false")
34390	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}")
34391	urls += "?" + c.urlParams_.Encode()
34392	req, err := http.NewRequest("GET", urls, body)
34393	if err != nil {
34394		return nil, err
34395	}
34396	req.Header = reqHeaders
34397	googleapi.Expand(req.URL, map[string]string{
34398		"profileId": strconv.FormatInt(c.profileId, 10),
34399		"projectId": strconv.FormatInt(c.projectId, 10),
34400		"id":        strconv.FormatInt(c.id, 10),
34401	})
34402	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34403}
34404
34405// Do executes the "dfareporting.inventoryItems.get" call.
34406// Exactly one of *InventoryItem or error will be non-nil. Any non-2xx
34407// status code is an error. Response headers are in either
34408// *InventoryItem.ServerResponse.Header or (if a response was returned
34409// at all) in error.(*googleapi.Error).Header. Use
34410// googleapi.IsNotModified to check whether the returned error was
34411// because http.StatusNotModified was returned.
34412func (c *InventoryItemsGetCall) Do(opts ...googleapi.CallOption) (*InventoryItem, error) {
34413	gensupport.SetOptions(c.urlParams_, opts...)
34414	res, err := c.doRequest("json")
34415	if res != nil && res.StatusCode == http.StatusNotModified {
34416		if res.Body != nil {
34417			res.Body.Close()
34418		}
34419		return nil, &googleapi.Error{
34420			Code:   res.StatusCode,
34421			Header: res.Header,
34422		}
34423	}
34424	if err != nil {
34425		return nil, err
34426	}
34427	defer googleapi.CloseBody(res)
34428	if err := googleapi.CheckResponse(res); err != nil {
34429		return nil, err
34430	}
34431	ret := &InventoryItem{
34432		ServerResponse: googleapi.ServerResponse{
34433			Header:         res.Header,
34434			HTTPStatusCode: res.StatusCode,
34435		},
34436	}
34437	target := &ret
34438	if err := gensupport.DecodeResponse(target, res); err != nil {
34439		return nil, err
34440	}
34441	return ret, nil
34442	// {
34443	//   "description": "Gets one inventory item by ID.",
34444	//   "httpMethod": "GET",
34445	//   "id": "dfareporting.inventoryItems.get",
34446	//   "parameterOrder": [
34447	//     "profileId",
34448	//     "projectId",
34449	//     "id"
34450	//   ],
34451	//   "parameters": {
34452	//     "id": {
34453	//       "description": "Inventory item ID.",
34454	//       "format": "int64",
34455	//       "location": "path",
34456	//       "required": true,
34457	//       "type": "string"
34458	//     },
34459	//     "profileId": {
34460	//       "description": "User profile ID associated with this request.",
34461	//       "format": "int64",
34462	//       "location": "path",
34463	//       "required": true,
34464	//       "type": "string"
34465	//     },
34466	//     "projectId": {
34467	//       "description": "Project ID for order documents.",
34468	//       "format": "int64",
34469	//       "location": "path",
34470	//       "required": true,
34471	//       "type": "string"
34472	//     }
34473	//   },
34474	//   "path": "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}",
34475	//   "response": {
34476	//     "$ref": "InventoryItem"
34477	//   },
34478	//   "scopes": [
34479	//     "https://www.googleapis.com/auth/dfatrafficking"
34480	//   ]
34481	// }
34482
34483}
34484
34485// method id "dfareporting.inventoryItems.list":
34486
34487type InventoryItemsListCall struct {
34488	s            *Service
34489	profileId    int64
34490	projectId    int64
34491	urlParams_   gensupport.URLParams
34492	ifNoneMatch_ string
34493	ctx_         context.Context
34494	header_      http.Header
34495}
34496
34497// List: Retrieves a list of inventory items, possibly filtered. This
34498// method supports paging.
34499func (r *InventoryItemsService) List(profileId int64, projectId int64) *InventoryItemsListCall {
34500	c := &InventoryItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34501	c.profileId = profileId
34502	c.projectId = projectId
34503	return c
34504}
34505
34506// Ids sets the optional parameter "ids": Select only inventory items
34507// with these IDs.
34508func (c *InventoryItemsListCall) Ids(ids ...int64) *InventoryItemsListCall {
34509	var ids_ []string
34510	for _, v := range ids {
34511		ids_ = append(ids_, fmt.Sprint(v))
34512	}
34513	c.urlParams_.SetMulti("ids", ids_)
34514	return c
34515}
34516
34517// InPlan sets the optional parameter "inPlan": Select only inventory
34518// items that are in plan.
34519func (c *InventoryItemsListCall) InPlan(inPlan bool) *InventoryItemsListCall {
34520	c.urlParams_.Set("inPlan", fmt.Sprint(inPlan))
34521	return c
34522}
34523
34524// MaxResults sets the optional parameter "maxResults": Maximum number
34525// of results to return.
34526func (c *InventoryItemsListCall) MaxResults(maxResults int64) *InventoryItemsListCall {
34527	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
34528	return c
34529}
34530
34531// OrderId sets the optional parameter "orderId": Select only inventory
34532// items that belong to specified orders.
34533func (c *InventoryItemsListCall) OrderId(orderId ...int64) *InventoryItemsListCall {
34534	var orderId_ []string
34535	for _, v := range orderId {
34536		orderId_ = append(orderId_, fmt.Sprint(v))
34537	}
34538	c.urlParams_.SetMulti("orderId", orderId_)
34539	return c
34540}
34541
34542// PageToken sets the optional parameter "pageToken": Value of the
34543// nextPageToken from the previous result page.
34544func (c *InventoryItemsListCall) PageToken(pageToken string) *InventoryItemsListCall {
34545	c.urlParams_.Set("pageToken", pageToken)
34546	return c
34547}
34548
34549// SiteId sets the optional parameter "siteId": Select only inventory
34550// items that are associated with these sites.
34551func (c *InventoryItemsListCall) SiteId(siteId ...int64) *InventoryItemsListCall {
34552	var siteId_ []string
34553	for _, v := range siteId {
34554		siteId_ = append(siteId_, fmt.Sprint(v))
34555	}
34556	c.urlParams_.SetMulti("siteId", siteId_)
34557	return c
34558}
34559
34560// SortField sets the optional parameter "sortField": Field by which to
34561// sort the list.
34562//
34563// Possible values:
34564//   "ID" (default)
34565//   "NAME"
34566func (c *InventoryItemsListCall) SortField(sortField string) *InventoryItemsListCall {
34567	c.urlParams_.Set("sortField", sortField)
34568	return c
34569}
34570
34571// SortOrder sets the optional parameter "sortOrder": Order of sorted
34572// results.
34573//
34574// Possible values:
34575//   "ASCENDING" (default)
34576//   "DESCENDING"
34577func (c *InventoryItemsListCall) SortOrder(sortOrder string) *InventoryItemsListCall {
34578	c.urlParams_.Set("sortOrder", sortOrder)
34579	return c
34580}
34581
34582// Type sets the optional parameter "type": Select only inventory items
34583// with this type.
34584//
34585// Possible values:
34586//   "PLANNING_PLACEMENT_TYPE_CREDIT"
34587//   "PLANNING_PLACEMENT_TYPE_REGULAR"
34588func (c *InventoryItemsListCall) Type(type_ string) *InventoryItemsListCall {
34589	c.urlParams_.Set("type", type_)
34590	return c
34591}
34592
34593// Fields allows partial responses to be retrieved. See
34594// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34595// for more information.
34596func (c *InventoryItemsListCall) Fields(s ...googleapi.Field) *InventoryItemsListCall {
34597	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34598	return c
34599}
34600
34601// IfNoneMatch sets the optional parameter which makes the operation
34602// fail if the object's ETag matches the given value. This is useful for
34603// getting updates only after the object has changed since the last
34604// request. Use googleapi.IsNotModified to check whether the response
34605// error from Do is the result of In-None-Match.
34606func (c *InventoryItemsListCall) IfNoneMatch(entityTag string) *InventoryItemsListCall {
34607	c.ifNoneMatch_ = entityTag
34608	return c
34609}
34610
34611// Context sets the context to be used in this call's Do method. Any
34612// pending HTTP request will be aborted if the provided context is
34613// canceled.
34614func (c *InventoryItemsListCall) Context(ctx context.Context) *InventoryItemsListCall {
34615	c.ctx_ = ctx
34616	return c
34617}
34618
34619// Header returns an http.Header that can be modified by the caller to
34620// add HTTP headers to the request.
34621func (c *InventoryItemsListCall) Header() http.Header {
34622	if c.header_ == nil {
34623		c.header_ = make(http.Header)
34624	}
34625	return c.header_
34626}
34627
34628func (c *InventoryItemsListCall) doRequest(alt string) (*http.Response, error) {
34629	reqHeaders := make(http.Header)
34630	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
34631	for k, v := range c.header_ {
34632		reqHeaders[k] = v
34633	}
34634	reqHeaders.Set("User-Agent", c.s.userAgent())
34635	if c.ifNoneMatch_ != "" {
34636		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34637	}
34638	var body io.Reader = nil
34639	c.urlParams_.Set("alt", alt)
34640	c.urlParams_.Set("prettyPrint", "false")
34641	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems")
34642	urls += "?" + c.urlParams_.Encode()
34643	req, err := http.NewRequest("GET", urls, body)
34644	if err != nil {
34645		return nil, err
34646	}
34647	req.Header = reqHeaders
34648	googleapi.Expand(req.URL, map[string]string{
34649		"profileId": strconv.FormatInt(c.profileId, 10),
34650		"projectId": strconv.FormatInt(c.projectId, 10),
34651	})
34652	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34653}
34654
34655// Do executes the "dfareporting.inventoryItems.list" call.
34656// Exactly one of *InventoryItemsListResponse or error will be non-nil.
34657// Any non-2xx status code is an error. Response headers are in either
34658// *InventoryItemsListResponse.ServerResponse.Header or (if a response
34659// was returned at all) in error.(*googleapi.Error).Header. Use
34660// googleapi.IsNotModified to check whether the returned error was
34661// because http.StatusNotModified was returned.
34662func (c *InventoryItemsListCall) Do(opts ...googleapi.CallOption) (*InventoryItemsListResponse, error) {
34663	gensupport.SetOptions(c.urlParams_, opts...)
34664	res, err := c.doRequest("json")
34665	if res != nil && res.StatusCode == http.StatusNotModified {
34666		if res.Body != nil {
34667			res.Body.Close()
34668		}
34669		return nil, &googleapi.Error{
34670			Code:   res.StatusCode,
34671			Header: res.Header,
34672		}
34673	}
34674	if err != nil {
34675		return nil, err
34676	}
34677	defer googleapi.CloseBody(res)
34678	if err := googleapi.CheckResponse(res); err != nil {
34679		return nil, err
34680	}
34681	ret := &InventoryItemsListResponse{
34682		ServerResponse: googleapi.ServerResponse{
34683			Header:         res.Header,
34684			HTTPStatusCode: res.StatusCode,
34685		},
34686	}
34687	target := &ret
34688	if err := gensupport.DecodeResponse(target, res); err != nil {
34689		return nil, err
34690	}
34691	return ret, nil
34692	// {
34693	//   "description": "Retrieves a list of inventory items, possibly filtered. This method supports paging.",
34694	//   "httpMethod": "GET",
34695	//   "id": "dfareporting.inventoryItems.list",
34696	//   "parameterOrder": [
34697	//     "profileId",
34698	//     "projectId"
34699	//   ],
34700	//   "parameters": {
34701	//     "ids": {
34702	//       "description": "Select only inventory items with these IDs.",
34703	//       "format": "int64",
34704	//       "location": "query",
34705	//       "repeated": true,
34706	//       "type": "string"
34707	//     },
34708	//     "inPlan": {
34709	//       "description": "Select only inventory items that are in plan.",
34710	//       "location": "query",
34711	//       "type": "boolean"
34712	//     },
34713	//     "maxResults": {
34714	//       "default": "1000",
34715	//       "description": "Maximum number of results to return.",
34716	//       "format": "int32",
34717	//       "location": "query",
34718	//       "maximum": "1000",
34719	//       "minimum": "0",
34720	//       "type": "integer"
34721	//     },
34722	//     "orderId": {
34723	//       "description": "Select only inventory items that belong to specified orders.",
34724	//       "format": "int64",
34725	//       "location": "query",
34726	//       "repeated": true,
34727	//       "type": "string"
34728	//     },
34729	//     "pageToken": {
34730	//       "description": "Value of the nextPageToken from the previous result page.",
34731	//       "location": "query",
34732	//       "type": "string"
34733	//     },
34734	//     "profileId": {
34735	//       "description": "User profile ID associated with this request.",
34736	//       "format": "int64",
34737	//       "location": "path",
34738	//       "required": true,
34739	//       "type": "string"
34740	//     },
34741	//     "projectId": {
34742	//       "description": "Project ID for order documents.",
34743	//       "format": "int64",
34744	//       "location": "path",
34745	//       "required": true,
34746	//       "type": "string"
34747	//     },
34748	//     "siteId": {
34749	//       "description": "Select only inventory items that are associated with these sites.",
34750	//       "format": "int64",
34751	//       "location": "query",
34752	//       "repeated": true,
34753	//       "type": "string"
34754	//     },
34755	//     "sortField": {
34756	//       "default": "ID",
34757	//       "description": "Field by which to sort the list.",
34758	//       "enum": [
34759	//         "ID",
34760	//         "NAME"
34761	//       ],
34762	//       "enumDescriptions": [
34763	//         "",
34764	//         ""
34765	//       ],
34766	//       "location": "query",
34767	//       "type": "string"
34768	//     },
34769	//     "sortOrder": {
34770	//       "default": "ASCENDING",
34771	//       "description": "Order of sorted results.",
34772	//       "enum": [
34773	//         "ASCENDING",
34774	//         "DESCENDING"
34775	//       ],
34776	//       "enumDescriptions": [
34777	//         "",
34778	//         ""
34779	//       ],
34780	//       "location": "query",
34781	//       "type": "string"
34782	//     },
34783	//     "type": {
34784	//       "description": "Select only inventory items with this type.",
34785	//       "enum": [
34786	//         "PLANNING_PLACEMENT_TYPE_CREDIT",
34787	//         "PLANNING_PLACEMENT_TYPE_REGULAR"
34788	//       ],
34789	//       "enumDescriptions": [
34790	//         "",
34791	//         ""
34792	//       ],
34793	//       "location": "query",
34794	//       "type": "string"
34795	//     }
34796	//   },
34797	//   "path": "userprofiles/{profileId}/projects/{projectId}/inventoryItems",
34798	//   "response": {
34799	//     "$ref": "InventoryItemsListResponse"
34800	//   },
34801	//   "scopes": [
34802	//     "https://www.googleapis.com/auth/dfatrafficking"
34803	//   ]
34804	// }
34805
34806}
34807
34808// Pages invokes f for each page of results.
34809// A non-nil error returned from f will halt the iteration.
34810// The provided context supersedes any context provided to the Context method.
34811func (c *InventoryItemsListCall) Pages(ctx context.Context, f func(*InventoryItemsListResponse) error) error {
34812	c.ctx_ = ctx
34813	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
34814	for {
34815		x, err := c.Do()
34816		if err != nil {
34817			return err
34818		}
34819		if err := f(x); err != nil {
34820			return err
34821		}
34822		if x.NextPageToken == "" {
34823			return nil
34824		}
34825		c.PageToken(x.NextPageToken)
34826	}
34827}
34828
34829// method id "dfareporting.languages.list":
34830
34831type LanguagesListCall struct {
34832	s            *Service
34833	profileId    int64
34834	urlParams_   gensupport.URLParams
34835	ifNoneMatch_ string
34836	ctx_         context.Context
34837	header_      http.Header
34838}
34839
34840// List: Retrieves a list of languages.
34841func (r *LanguagesService) List(profileId int64) *LanguagesListCall {
34842	c := &LanguagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34843	c.profileId = profileId
34844	return c
34845}
34846
34847// Fields allows partial responses to be retrieved. See
34848// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34849// for more information.
34850func (c *LanguagesListCall) Fields(s ...googleapi.Field) *LanguagesListCall {
34851	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34852	return c
34853}
34854
34855// IfNoneMatch sets the optional parameter which makes the operation
34856// fail if the object's ETag matches the given value. This is useful for
34857// getting updates only after the object has changed since the last
34858// request. Use googleapi.IsNotModified to check whether the response
34859// error from Do is the result of In-None-Match.
34860func (c *LanguagesListCall) IfNoneMatch(entityTag string) *LanguagesListCall {
34861	c.ifNoneMatch_ = entityTag
34862	return c
34863}
34864
34865// Context sets the context to be used in this call's Do method. Any
34866// pending HTTP request will be aborted if the provided context is
34867// canceled.
34868func (c *LanguagesListCall) Context(ctx context.Context) *LanguagesListCall {
34869	c.ctx_ = ctx
34870	return c
34871}
34872
34873// Header returns an http.Header that can be modified by the caller to
34874// add HTTP headers to the request.
34875func (c *LanguagesListCall) Header() http.Header {
34876	if c.header_ == nil {
34877		c.header_ = make(http.Header)
34878	}
34879	return c.header_
34880}
34881
34882func (c *LanguagesListCall) doRequest(alt string) (*http.Response, error) {
34883	reqHeaders := make(http.Header)
34884	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
34885	for k, v := range c.header_ {
34886		reqHeaders[k] = v
34887	}
34888	reqHeaders.Set("User-Agent", c.s.userAgent())
34889	if c.ifNoneMatch_ != "" {
34890		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34891	}
34892	var body io.Reader = nil
34893	c.urlParams_.Set("alt", alt)
34894	c.urlParams_.Set("prettyPrint", "false")
34895	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/languages")
34896	urls += "?" + c.urlParams_.Encode()
34897	req, err := http.NewRequest("GET", urls, body)
34898	if err != nil {
34899		return nil, err
34900	}
34901	req.Header = reqHeaders
34902	googleapi.Expand(req.URL, map[string]string{
34903		"profileId": strconv.FormatInt(c.profileId, 10),
34904	})
34905	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34906}
34907
34908// Do executes the "dfareporting.languages.list" call.
34909// Exactly one of *LanguagesListResponse or error will be non-nil. Any
34910// non-2xx status code is an error. Response headers are in either
34911// *LanguagesListResponse.ServerResponse.Header or (if a response was
34912// returned at all) in error.(*googleapi.Error).Header. Use
34913// googleapi.IsNotModified to check whether the returned error was
34914// because http.StatusNotModified was returned.
34915func (c *LanguagesListCall) Do(opts ...googleapi.CallOption) (*LanguagesListResponse, error) {
34916	gensupport.SetOptions(c.urlParams_, opts...)
34917	res, err := c.doRequest("json")
34918	if res != nil && res.StatusCode == http.StatusNotModified {
34919		if res.Body != nil {
34920			res.Body.Close()
34921		}
34922		return nil, &googleapi.Error{
34923			Code:   res.StatusCode,
34924			Header: res.Header,
34925		}
34926	}
34927	if err != nil {
34928		return nil, err
34929	}
34930	defer googleapi.CloseBody(res)
34931	if err := googleapi.CheckResponse(res); err != nil {
34932		return nil, err
34933	}
34934	ret := &LanguagesListResponse{
34935		ServerResponse: googleapi.ServerResponse{
34936			Header:         res.Header,
34937			HTTPStatusCode: res.StatusCode,
34938		},
34939	}
34940	target := &ret
34941	if err := gensupport.DecodeResponse(target, res); err != nil {
34942		return nil, err
34943	}
34944	return ret, nil
34945	// {
34946	//   "description": "Retrieves a list of languages.",
34947	//   "httpMethod": "GET",
34948	//   "id": "dfareporting.languages.list",
34949	//   "parameterOrder": [
34950	//     "profileId"
34951	//   ],
34952	//   "parameters": {
34953	//     "profileId": {
34954	//       "description": "User profile ID associated with this request.",
34955	//       "format": "int64",
34956	//       "location": "path",
34957	//       "required": true,
34958	//       "type": "string"
34959	//     }
34960	//   },
34961	//   "path": "userprofiles/{profileId}/languages",
34962	//   "response": {
34963	//     "$ref": "LanguagesListResponse"
34964	//   },
34965	//   "scopes": [
34966	//     "https://www.googleapis.com/auth/dfatrafficking"
34967	//   ]
34968	// }
34969
34970}
34971
34972// method id "dfareporting.metros.list":
34973
34974type MetrosListCall struct {
34975	s            *Service
34976	profileId    int64
34977	urlParams_   gensupport.URLParams
34978	ifNoneMatch_ string
34979	ctx_         context.Context
34980	header_      http.Header
34981}
34982
34983// List: Retrieves a list of metros.
34984func (r *MetrosService) List(profileId int64) *MetrosListCall {
34985	c := &MetrosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34986	c.profileId = profileId
34987	return c
34988}
34989
34990// Fields allows partial responses to be retrieved. See
34991// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34992// for more information.
34993func (c *MetrosListCall) Fields(s ...googleapi.Field) *MetrosListCall {
34994	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34995	return c
34996}
34997
34998// IfNoneMatch sets the optional parameter which makes the operation
34999// fail if the object's ETag matches the given value. This is useful for
35000// getting updates only after the object has changed since the last
35001// request. Use googleapi.IsNotModified to check whether the response
35002// error from Do is the result of In-None-Match.
35003func (c *MetrosListCall) IfNoneMatch(entityTag string) *MetrosListCall {
35004	c.ifNoneMatch_ = entityTag
35005	return c
35006}
35007
35008// Context sets the context to be used in this call's Do method. Any
35009// pending HTTP request will be aborted if the provided context is
35010// canceled.
35011func (c *MetrosListCall) Context(ctx context.Context) *MetrosListCall {
35012	c.ctx_ = ctx
35013	return c
35014}
35015
35016// Header returns an http.Header that can be modified by the caller to
35017// add HTTP headers to the request.
35018func (c *MetrosListCall) Header() http.Header {
35019	if c.header_ == nil {
35020		c.header_ = make(http.Header)
35021	}
35022	return c.header_
35023}
35024
35025func (c *MetrosListCall) doRequest(alt string) (*http.Response, error) {
35026	reqHeaders := make(http.Header)
35027	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
35028	for k, v := range c.header_ {
35029		reqHeaders[k] = v
35030	}
35031	reqHeaders.Set("User-Agent", c.s.userAgent())
35032	if c.ifNoneMatch_ != "" {
35033		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35034	}
35035	var body io.Reader = nil
35036	c.urlParams_.Set("alt", alt)
35037	c.urlParams_.Set("prettyPrint", "false")
35038	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/metros")
35039	urls += "?" + c.urlParams_.Encode()
35040	req, err := http.NewRequest("GET", urls, body)
35041	if err != nil {
35042		return nil, err
35043	}
35044	req.Header = reqHeaders
35045	googleapi.Expand(req.URL, map[string]string{
35046		"profileId": strconv.FormatInt(c.profileId, 10),
35047	})
35048	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35049}
35050
35051// Do executes the "dfareporting.metros.list" call.
35052// Exactly one of *MetrosListResponse or error will be non-nil. Any
35053// non-2xx status code is an error. Response headers are in either
35054// *MetrosListResponse.ServerResponse.Header or (if a response was
35055// returned at all) in error.(*googleapi.Error).Header. Use
35056// googleapi.IsNotModified to check whether the returned error was
35057// because http.StatusNotModified was returned.
35058func (c *MetrosListCall) Do(opts ...googleapi.CallOption) (*MetrosListResponse, error) {
35059	gensupport.SetOptions(c.urlParams_, opts...)
35060	res, err := c.doRequest("json")
35061	if res != nil && res.StatusCode == http.StatusNotModified {
35062		if res.Body != nil {
35063			res.Body.Close()
35064		}
35065		return nil, &googleapi.Error{
35066			Code:   res.StatusCode,
35067			Header: res.Header,
35068		}
35069	}
35070	if err != nil {
35071		return nil, err
35072	}
35073	defer googleapi.CloseBody(res)
35074	if err := googleapi.CheckResponse(res); err != nil {
35075		return nil, err
35076	}
35077	ret := &MetrosListResponse{
35078		ServerResponse: googleapi.ServerResponse{
35079			Header:         res.Header,
35080			HTTPStatusCode: res.StatusCode,
35081		},
35082	}
35083	target := &ret
35084	if err := gensupport.DecodeResponse(target, res); err != nil {
35085		return nil, err
35086	}
35087	return ret, nil
35088	// {
35089	//   "description": "Retrieves a list of metros.",
35090	//   "httpMethod": "GET",
35091	//   "id": "dfareporting.metros.list",
35092	//   "parameterOrder": [
35093	//     "profileId"
35094	//   ],
35095	//   "parameters": {
35096	//     "profileId": {
35097	//       "description": "User profile ID associated with this request.",
35098	//       "format": "int64",
35099	//       "location": "path",
35100	//       "required": true,
35101	//       "type": "string"
35102	//     }
35103	//   },
35104	//   "path": "userprofiles/{profileId}/metros",
35105	//   "response": {
35106	//     "$ref": "MetrosListResponse"
35107	//   },
35108	//   "scopes": [
35109	//     "https://www.googleapis.com/auth/dfatrafficking"
35110	//   ]
35111	// }
35112
35113}
35114
35115// method id "dfareporting.mobileApps.get":
35116
35117type MobileAppsGetCall struct {
35118	s            *Service
35119	profileId    int64
35120	id           string
35121	urlParams_   gensupport.URLParams
35122	ifNoneMatch_ string
35123	ctx_         context.Context
35124	header_      http.Header
35125}
35126
35127// Get: Gets one mobile app by ID.
35128func (r *MobileAppsService) Get(profileId int64, id string) *MobileAppsGetCall {
35129	c := &MobileAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35130	c.profileId = profileId
35131	c.id = id
35132	return c
35133}
35134
35135// Fields allows partial responses to be retrieved. See
35136// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35137// for more information.
35138func (c *MobileAppsGetCall) Fields(s ...googleapi.Field) *MobileAppsGetCall {
35139	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35140	return c
35141}
35142
35143// IfNoneMatch sets the optional parameter which makes the operation
35144// fail if the object's ETag matches the given value. This is useful for
35145// getting updates only after the object has changed since the last
35146// request. Use googleapi.IsNotModified to check whether the response
35147// error from Do is the result of In-None-Match.
35148func (c *MobileAppsGetCall) IfNoneMatch(entityTag string) *MobileAppsGetCall {
35149	c.ifNoneMatch_ = entityTag
35150	return c
35151}
35152
35153// Context sets the context to be used in this call's Do method. Any
35154// pending HTTP request will be aborted if the provided context is
35155// canceled.
35156func (c *MobileAppsGetCall) Context(ctx context.Context) *MobileAppsGetCall {
35157	c.ctx_ = ctx
35158	return c
35159}
35160
35161// Header returns an http.Header that can be modified by the caller to
35162// add HTTP headers to the request.
35163func (c *MobileAppsGetCall) Header() http.Header {
35164	if c.header_ == nil {
35165		c.header_ = make(http.Header)
35166	}
35167	return c.header_
35168}
35169
35170func (c *MobileAppsGetCall) doRequest(alt string) (*http.Response, error) {
35171	reqHeaders := make(http.Header)
35172	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
35173	for k, v := range c.header_ {
35174		reqHeaders[k] = v
35175	}
35176	reqHeaders.Set("User-Agent", c.s.userAgent())
35177	if c.ifNoneMatch_ != "" {
35178		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35179	}
35180	var body io.Reader = nil
35181	c.urlParams_.Set("alt", alt)
35182	c.urlParams_.Set("prettyPrint", "false")
35183	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileApps/{id}")
35184	urls += "?" + c.urlParams_.Encode()
35185	req, err := http.NewRequest("GET", urls, body)
35186	if err != nil {
35187		return nil, err
35188	}
35189	req.Header = reqHeaders
35190	googleapi.Expand(req.URL, map[string]string{
35191		"profileId": strconv.FormatInt(c.profileId, 10),
35192		"id":        c.id,
35193	})
35194	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35195}
35196
35197// Do executes the "dfareporting.mobileApps.get" call.
35198// Exactly one of *MobileApp or error will be non-nil. Any non-2xx
35199// status code is an error. Response headers are in either
35200// *MobileApp.ServerResponse.Header or (if a response was returned at
35201// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
35202// to check whether the returned error was because
35203// http.StatusNotModified was returned.
35204func (c *MobileAppsGetCall) Do(opts ...googleapi.CallOption) (*MobileApp, error) {
35205	gensupport.SetOptions(c.urlParams_, opts...)
35206	res, err := c.doRequest("json")
35207	if res != nil && res.StatusCode == http.StatusNotModified {
35208		if res.Body != nil {
35209			res.Body.Close()
35210		}
35211		return nil, &googleapi.Error{
35212			Code:   res.StatusCode,
35213			Header: res.Header,
35214		}
35215	}
35216	if err != nil {
35217		return nil, err
35218	}
35219	defer googleapi.CloseBody(res)
35220	if err := googleapi.CheckResponse(res); err != nil {
35221		return nil, err
35222	}
35223	ret := &MobileApp{
35224		ServerResponse: googleapi.ServerResponse{
35225			Header:         res.Header,
35226			HTTPStatusCode: res.StatusCode,
35227		},
35228	}
35229	target := &ret
35230	if err := gensupport.DecodeResponse(target, res); err != nil {
35231		return nil, err
35232	}
35233	return ret, nil
35234	// {
35235	//   "description": "Gets one mobile app by ID.",
35236	//   "httpMethod": "GET",
35237	//   "id": "dfareporting.mobileApps.get",
35238	//   "parameterOrder": [
35239	//     "profileId",
35240	//     "id"
35241	//   ],
35242	//   "parameters": {
35243	//     "id": {
35244	//       "description": "Mobile app ID.",
35245	//       "location": "path",
35246	//       "required": true,
35247	//       "type": "string"
35248	//     },
35249	//     "profileId": {
35250	//       "description": "User profile ID associated with this request.",
35251	//       "format": "int64",
35252	//       "location": "path",
35253	//       "required": true,
35254	//       "type": "string"
35255	//     }
35256	//   },
35257	//   "path": "userprofiles/{profileId}/mobileApps/{id}",
35258	//   "response": {
35259	//     "$ref": "MobileApp"
35260	//   },
35261	//   "scopes": [
35262	//     "https://www.googleapis.com/auth/dfatrafficking"
35263	//   ]
35264	// }
35265
35266}
35267
35268// method id "dfareporting.mobileApps.list":
35269
35270type MobileAppsListCall struct {
35271	s            *Service
35272	profileId    int64
35273	urlParams_   gensupport.URLParams
35274	ifNoneMatch_ string
35275	ctx_         context.Context
35276	header_      http.Header
35277}
35278
35279// List: Retrieves list of available mobile apps.
35280func (r *MobileAppsService) List(profileId int64) *MobileAppsListCall {
35281	c := &MobileAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35282	c.profileId = profileId
35283	return c
35284}
35285
35286// Directories sets the optional parameter "directories": Select only
35287// apps from these directories.
35288//
35289// Possible values:
35290//   "APPLE_APP_STORE"
35291//   "GOOGLE_PLAY_STORE"
35292//   "UNKNOWN"
35293func (c *MobileAppsListCall) Directories(directories ...string) *MobileAppsListCall {
35294	c.urlParams_.SetMulti("directories", append([]string{}, directories...))
35295	return c
35296}
35297
35298// Ids sets the optional parameter "ids": Select only apps with these
35299// IDs.
35300func (c *MobileAppsListCall) Ids(ids ...string) *MobileAppsListCall {
35301	c.urlParams_.SetMulti("ids", append([]string{}, ids...))
35302	return c
35303}
35304
35305// MaxResults sets the optional parameter "maxResults": Maximum number
35306// of results to return.
35307func (c *MobileAppsListCall) MaxResults(maxResults int64) *MobileAppsListCall {
35308	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
35309	return c
35310}
35311
35312// PageToken sets the optional parameter "pageToken": Value of the
35313// nextPageToken from the previous result page.
35314func (c *MobileAppsListCall) PageToken(pageToken string) *MobileAppsListCall {
35315	c.urlParams_.Set("pageToken", pageToken)
35316	return c
35317}
35318
35319// SearchString sets the optional parameter "searchString": Allows
35320// searching for objects by name or ID. Wildcards (*) are allowed. For
35321// example, "app*2015" will return objects with names like "app Jan
35322// 2018", "app Jan 2018", or simply "app 2018". Most of the searches
35323// also add wildcards implicitly at the start and the end of the search
35324// string. For example, a search string of "app" will match objects with
35325// name "my app", "app 2018", or simply "app".
35326func (c *MobileAppsListCall) SearchString(searchString string) *MobileAppsListCall {
35327	c.urlParams_.Set("searchString", searchString)
35328	return c
35329}
35330
35331// Fields allows partial responses to be retrieved. See
35332// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35333// for more information.
35334func (c *MobileAppsListCall) Fields(s ...googleapi.Field) *MobileAppsListCall {
35335	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35336	return c
35337}
35338
35339// IfNoneMatch sets the optional parameter which makes the operation
35340// fail if the object's ETag matches the given value. This is useful for
35341// getting updates only after the object has changed since the last
35342// request. Use googleapi.IsNotModified to check whether the response
35343// error from Do is the result of In-None-Match.
35344func (c *MobileAppsListCall) IfNoneMatch(entityTag string) *MobileAppsListCall {
35345	c.ifNoneMatch_ = entityTag
35346	return c
35347}
35348
35349// Context sets the context to be used in this call's Do method. Any
35350// pending HTTP request will be aborted if the provided context is
35351// canceled.
35352func (c *MobileAppsListCall) Context(ctx context.Context) *MobileAppsListCall {
35353	c.ctx_ = ctx
35354	return c
35355}
35356
35357// Header returns an http.Header that can be modified by the caller to
35358// add HTTP headers to the request.
35359func (c *MobileAppsListCall) Header() http.Header {
35360	if c.header_ == nil {
35361		c.header_ = make(http.Header)
35362	}
35363	return c.header_
35364}
35365
35366func (c *MobileAppsListCall) doRequest(alt string) (*http.Response, error) {
35367	reqHeaders := make(http.Header)
35368	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
35369	for k, v := range c.header_ {
35370		reqHeaders[k] = v
35371	}
35372	reqHeaders.Set("User-Agent", c.s.userAgent())
35373	if c.ifNoneMatch_ != "" {
35374		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35375	}
35376	var body io.Reader = nil
35377	c.urlParams_.Set("alt", alt)
35378	c.urlParams_.Set("prettyPrint", "false")
35379	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileApps")
35380	urls += "?" + c.urlParams_.Encode()
35381	req, err := http.NewRequest("GET", urls, body)
35382	if err != nil {
35383		return nil, err
35384	}
35385	req.Header = reqHeaders
35386	googleapi.Expand(req.URL, map[string]string{
35387		"profileId": strconv.FormatInt(c.profileId, 10),
35388	})
35389	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35390}
35391
35392// Do executes the "dfareporting.mobileApps.list" call.
35393// Exactly one of *MobileAppsListResponse or error will be non-nil. Any
35394// non-2xx status code is an error. Response headers are in either
35395// *MobileAppsListResponse.ServerResponse.Header or (if a response was
35396// returned at all) in error.(*googleapi.Error).Header. Use
35397// googleapi.IsNotModified to check whether the returned error was
35398// because http.StatusNotModified was returned.
35399func (c *MobileAppsListCall) Do(opts ...googleapi.CallOption) (*MobileAppsListResponse, error) {
35400	gensupport.SetOptions(c.urlParams_, opts...)
35401	res, err := c.doRequest("json")
35402	if res != nil && res.StatusCode == http.StatusNotModified {
35403		if res.Body != nil {
35404			res.Body.Close()
35405		}
35406		return nil, &googleapi.Error{
35407			Code:   res.StatusCode,
35408			Header: res.Header,
35409		}
35410	}
35411	if err != nil {
35412		return nil, err
35413	}
35414	defer googleapi.CloseBody(res)
35415	if err := googleapi.CheckResponse(res); err != nil {
35416		return nil, err
35417	}
35418	ret := &MobileAppsListResponse{
35419		ServerResponse: googleapi.ServerResponse{
35420			Header:         res.Header,
35421			HTTPStatusCode: res.StatusCode,
35422		},
35423	}
35424	target := &ret
35425	if err := gensupport.DecodeResponse(target, res); err != nil {
35426		return nil, err
35427	}
35428	return ret, nil
35429	// {
35430	//   "description": "Retrieves list of available mobile apps.",
35431	//   "httpMethod": "GET",
35432	//   "id": "dfareporting.mobileApps.list",
35433	//   "parameterOrder": [
35434	//     "profileId"
35435	//   ],
35436	//   "parameters": {
35437	//     "directories": {
35438	//       "description": "Select only apps from these directories.",
35439	//       "enum": [
35440	//         "APPLE_APP_STORE",
35441	//         "GOOGLE_PLAY_STORE",
35442	//         "UNKNOWN"
35443	//       ],
35444	//       "enumDescriptions": [
35445	//         "",
35446	//         "",
35447	//         ""
35448	//       ],
35449	//       "location": "query",
35450	//       "repeated": true,
35451	//       "type": "string"
35452	//     },
35453	//     "ids": {
35454	//       "description": "Select only apps with these IDs.",
35455	//       "location": "query",
35456	//       "repeated": true,
35457	//       "type": "string"
35458	//     },
35459	//     "maxResults": {
35460	//       "default": "1000",
35461	//       "description": "Maximum number of results to return.",
35462	//       "format": "int32",
35463	//       "location": "query",
35464	//       "maximum": "1000",
35465	//       "minimum": "0",
35466	//       "type": "integer"
35467	//     },
35468	//     "pageToken": {
35469	//       "description": "Value of the nextPageToken from the previous result page.",
35470	//       "location": "query",
35471	//       "type": "string"
35472	//     },
35473	//     "profileId": {
35474	//       "description": "User profile ID associated with this request.",
35475	//       "format": "int64",
35476	//       "location": "path",
35477	//       "required": true,
35478	//       "type": "string"
35479	//     },
35480	//     "searchString": {
35481	//       "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\".",
35482	//       "location": "query",
35483	//       "type": "string"
35484	//     }
35485	//   },
35486	//   "path": "userprofiles/{profileId}/mobileApps",
35487	//   "response": {
35488	//     "$ref": "MobileAppsListResponse"
35489	//   },
35490	//   "scopes": [
35491	//     "https://www.googleapis.com/auth/dfatrafficking"
35492	//   ]
35493	// }
35494
35495}
35496
35497// Pages invokes f for each page of results.
35498// A non-nil error returned from f will halt the iteration.
35499// The provided context supersedes any context provided to the Context method.
35500func (c *MobileAppsListCall) Pages(ctx context.Context, f func(*MobileAppsListResponse) error) error {
35501	c.ctx_ = ctx
35502	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
35503	for {
35504		x, err := c.Do()
35505		if err != nil {
35506			return err
35507		}
35508		if err := f(x); err != nil {
35509			return err
35510		}
35511		if x.NextPageToken == "" {
35512			return nil
35513		}
35514		c.PageToken(x.NextPageToken)
35515	}
35516}
35517
35518// method id "dfareporting.mobileCarriers.get":
35519
35520type MobileCarriersGetCall struct {
35521	s            *Service
35522	profileId    int64
35523	id           int64
35524	urlParams_   gensupport.URLParams
35525	ifNoneMatch_ string
35526	ctx_         context.Context
35527	header_      http.Header
35528}
35529
35530// Get: Gets one mobile carrier by ID.
35531func (r *MobileCarriersService) Get(profileId int64, id int64) *MobileCarriersGetCall {
35532	c := &MobileCarriersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35533	c.profileId = profileId
35534	c.id = id
35535	return c
35536}
35537
35538// Fields allows partial responses to be retrieved. See
35539// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35540// for more information.
35541func (c *MobileCarriersGetCall) Fields(s ...googleapi.Field) *MobileCarriersGetCall {
35542	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35543	return c
35544}
35545
35546// IfNoneMatch sets the optional parameter which makes the operation
35547// fail if the object's ETag matches the given value. This is useful for
35548// getting updates only after the object has changed since the last
35549// request. Use googleapi.IsNotModified to check whether the response
35550// error from Do is the result of In-None-Match.
35551func (c *MobileCarriersGetCall) IfNoneMatch(entityTag string) *MobileCarriersGetCall {
35552	c.ifNoneMatch_ = entityTag
35553	return c
35554}
35555
35556// Context sets the context to be used in this call's Do method. Any
35557// pending HTTP request will be aborted if the provided context is
35558// canceled.
35559func (c *MobileCarriersGetCall) Context(ctx context.Context) *MobileCarriersGetCall {
35560	c.ctx_ = ctx
35561	return c
35562}
35563
35564// Header returns an http.Header that can be modified by the caller to
35565// add HTTP headers to the request.
35566func (c *MobileCarriersGetCall) Header() http.Header {
35567	if c.header_ == nil {
35568		c.header_ = make(http.Header)
35569	}
35570	return c.header_
35571}
35572
35573func (c *MobileCarriersGetCall) doRequest(alt string) (*http.Response, error) {
35574	reqHeaders := make(http.Header)
35575	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
35576	for k, v := range c.header_ {
35577		reqHeaders[k] = v
35578	}
35579	reqHeaders.Set("User-Agent", c.s.userAgent())
35580	if c.ifNoneMatch_ != "" {
35581		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35582	}
35583	var body io.Reader = nil
35584	c.urlParams_.Set("alt", alt)
35585	c.urlParams_.Set("prettyPrint", "false")
35586	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers/{id}")
35587	urls += "?" + c.urlParams_.Encode()
35588	req, err := http.NewRequest("GET", urls, body)
35589	if err != nil {
35590		return nil, err
35591	}
35592	req.Header = reqHeaders
35593	googleapi.Expand(req.URL, map[string]string{
35594		"profileId": strconv.FormatInt(c.profileId, 10),
35595		"id":        strconv.FormatInt(c.id, 10),
35596	})
35597	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35598}
35599
35600// Do executes the "dfareporting.mobileCarriers.get" call.
35601// Exactly one of *MobileCarrier or error will be non-nil. Any non-2xx
35602// status code is an error. Response headers are in either
35603// *MobileCarrier.ServerResponse.Header or (if a response was returned
35604// at all) in error.(*googleapi.Error).Header. Use
35605// googleapi.IsNotModified to check whether the returned error was
35606// because http.StatusNotModified was returned.
35607func (c *MobileCarriersGetCall) Do(opts ...googleapi.CallOption) (*MobileCarrier, error) {
35608	gensupport.SetOptions(c.urlParams_, opts...)
35609	res, err := c.doRequest("json")
35610	if res != nil && res.StatusCode == http.StatusNotModified {
35611		if res.Body != nil {
35612			res.Body.Close()
35613		}
35614		return nil, &googleapi.Error{
35615			Code:   res.StatusCode,
35616			Header: res.Header,
35617		}
35618	}
35619	if err != nil {
35620		return nil, err
35621	}
35622	defer googleapi.CloseBody(res)
35623	if err := googleapi.CheckResponse(res); err != nil {
35624		return nil, err
35625	}
35626	ret := &MobileCarrier{
35627		ServerResponse: googleapi.ServerResponse{
35628			Header:         res.Header,
35629			HTTPStatusCode: res.StatusCode,
35630		},
35631	}
35632	target := &ret
35633	if err := gensupport.DecodeResponse(target, res); err != nil {
35634		return nil, err
35635	}
35636	return ret, nil
35637	// {
35638	//   "description": "Gets one mobile carrier by ID.",
35639	//   "httpMethod": "GET",
35640	//   "id": "dfareporting.mobileCarriers.get",
35641	//   "parameterOrder": [
35642	//     "profileId",
35643	//     "id"
35644	//   ],
35645	//   "parameters": {
35646	//     "id": {
35647	//       "description": "Mobile carrier ID.",
35648	//       "format": "int64",
35649	//       "location": "path",
35650	//       "required": true,
35651	//       "type": "string"
35652	//     },
35653	//     "profileId": {
35654	//       "description": "User profile ID associated with this request.",
35655	//       "format": "int64",
35656	//       "location": "path",
35657	//       "required": true,
35658	//       "type": "string"
35659	//     }
35660	//   },
35661	//   "path": "userprofiles/{profileId}/mobileCarriers/{id}",
35662	//   "response": {
35663	//     "$ref": "MobileCarrier"
35664	//   },
35665	//   "scopes": [
35666	//     "https://www.googleapis.com/auth/dfatrafficking"
35667	//   ]
35668	// }
35669
35670}
35671
35672// method id "dfareporting.mobileCarriers.list":
35673
35674type MobileCarriersListCall struct {
35675	s            *Service
35676	profileId    int64
35677	urlParams_   gensupport.URLParams
35678	ifNoneMatch_ string
35679	ctx_         context.Context
35680	header_      http.Header
35681}
35682
35683// List: Retrieves a list of mobile carriers.
35684func (r *MobileCarriersService) List(profileId int64) *MobileCarriersListCall {
35685	c := &MobileCarriersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35686	c.profileId = profileId
35687	return c
35688}
35689
35690// Fields allows partial responses to be retrieved. See
35691// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35692// for more information.
35693func (c *MobileCarriersListCall) Fields(s ...googleapi.Field) *MobileCarriersListCall {
35694	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35695	return c
35696}
35697
35698// IfNoneMatch sets the optional parameter which makes the operation
35699// fail if the object's ETag matches the given value. This is useful for
35700// getting updates only after the object has changed since the last
35701// request. Use googleapi.IsNotModified to check whether the response
35702// error from Do is the result of In-None-Match.
35703func (c *MobileCarriersListCall) IfNoneMatch(entityTag string) *MobileCarriersListCall {
35704	c.ifNoneMatch_ = entityTag
35705	return c
35706}
35707
35708// Context sets the context to be used in this call's Do method. Any
35709// pending HTTP request will be aborted if the provided context is
35710// canceled.
35711func (c *MobileCarriersListCall) Context(ctx context.Context) *MobileCarriersListCall {
35712	c.ctx_ = ctx
35713	return c
35714}
35715
35716// Header returns an http.Header that can be modified by the caller to
35717// add HTTP headers to the request.
35718func (c *MobileCarriersListCall) Header() http.Header {
35719	if c.header_ == nil {
35720		c.header_ = make(http.Header)
35721	}
35722	return c.header_
35723}
35724
35725func (c *MobileCarriersListCall) doRequest(alt string) (*http.Response, error) {
35726	reqHeaders := make(http.Header)
35727	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
35728	for k, v := range c.header_ {
35729		reqHeaders[k] = v
35730	}
35731	reqHeaders.Set("User-Agent", c.s.userAgent())
35732	if c.ifNoneMatch_ != "" {
35733		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35734	}
35735	var body io.Reader = nil
35736	c.urlParams_.Set("alt", alt)
35737	c.urlParams_.Set("prettyPrint", "false")
35738	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers")
35739	urls += "?" + c.urlParams_.Encode()
35740	req, err := http.NewRequest("GET", urls, body)
35741	if err != nil {
35742		return nil, err
35743	}
35744	req.Header = reqHeaders
35745	googleapi.Expand(req.URL, map[string]string{
35746		"profileId": strconv.FormatInt(c.profileId, 10),
35747	})
35748	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35749}
35750
35751// Do executes the "dfareporting.mobileCarriers.list" call.
35752// Exactly one of *MobileCarriersListResponse or error will be non-nil.
35753// Any non-2xx status code is an error. Response headers are in either
35754// *MobileCarriersListResponse.ServerResponse.Header or (if a response
35755// was returned at all) in error.(*googleapi.Error).Header. Use
35756// googleapi.IsNotModified to check whether the returned error was
35757// because http.StatusNotModified was returned.
35758func (c *MobileCarriersListCall) Do(opts ...googleapi.CallOption) (*MobileCarriersListResponse, error) {
35759	gensupport.SetOptions(c.urlParams_, opts...)
35760	res, err := c.doRequest("json")
35761	if res != nil && res.StatusCode == http.StatusNotModified {
35762		if res.Body != nil {
35763			res.Body.Close()
35764		}
35765		return nil, &googleapi.Error{
35766			Code:   res.StatusCode,
35767			Header: res.Header,
35768		}
35769	}
35770	if err != nil {
35771		return nil, err
35772	}
35773	defer googleapi.CloseBody(res)
35774	if err := googleapi.CheckResponse(res); err != nil {
35775		return nil, err
35776	}
35777	ret := &MobileCarriersListResponse{
35778		ServerResponse: googleapi.ServerResponse{
35779			Header:         res.Header,
35780			HTTPStatusCode: res.StatusCode,
35781		},
35782	}
35783	target := &ret
35784	if err := gensupport.DecodeResponse(target, res); err != nil {
35785		return nil, err
35786	}
35787	return ret, nil
35788	// {
35789	//   "description": "Retrieves a list of mobile carriers.",
35790	//   "httpMethod": "GET",
35791	//   "id": "dfareporting.mobileCarriers.list",
35792	//   "parameterOrder": [
35793	//     "profileId"
35794	//   ],
35795	//   "parameters": {
35796	//     "profileId": {
35797	//       "description": "User profile ID associated with this request.",
35798	//       "format": "int64",
35799	//       "location": "path",
35800	//       "required": true,
35801	//       "type": "string"
35802	//     }
35803	//   },
35804	//   "path": "userprofiles/{profileId}/mobileCarriers",
35805	//   "response": {
35806	//     "$ref": "MobileCarriersListResponse"
35807	//   },
35808	//   "scopes": [
35809	//     "https://www.googleapis.com/auth/dfatrafficking"
35810	//   ]
35811	// }
35812
35813}
35814
35815// method id "dfareporting.operatingSystemVersions.get":
35816
35817type OperatingSystemVersionsGetCall struct {
35818	s            *Service
35819	profileId    int64
35820	id           int64
35821	urlParams_   gensupport.URLParams
35822	ifNoneMatch_ string
35823	ctx_         context.Context
35824	header_      http.Header
35825}
35826
35827// Get: Gets one operating system version by ID.
35828func (r *OperatingSystemVersionsService) Get(profileId int64, id int64) *OperatingSystemVersionsGetCall {
35829	c := &OperatingSystemVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35830	c.profileId = profileId
35831	c.id = id
35832	return c
35833}
35834
35835// Fields allows partial responses to be retrieved. See
35836// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35837// for more information.
35838func (c *OperatingSystemVersionsGetCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsGetCall {
35839	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35840	return c
35841}
35842
35843// IfNoneMatch sets the optional parameter which makes the operation
35844// fail if the object's ETag matches the given value. This is useful for
35845// getting updates only after the object has changed since the last
35846// request. Use googleapi.IsNotModified to check whether the response
35847// error from Do is the result of In-None-Match.
35848func (c *OperatingSystemVersionsGetCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsGetCall {
35849	c.ifNoneMatch_ = entityTag
35850	return c
35851}
35852
35853// Context sets the context to be used in this call's Do method. Any
35854// pending HTTP request will be aborted if the provided context is
35855// canceled.
35856func (c *OperatingSystemVersionsGetCall) Context(ctx context.Context) *OperatingSystemVersionsGetCall {
35857	c.ctx_ = ctx
35858	return c
35859}
35860
35861// Header returns an http.Header that can be modified by the caller to
35862// add HTTP headers to the request.
35863func (c *OperatingSystemVersionsGetCall) Header() http.Header {
35864	if c.header_ == nil {
35865		c.header_ = make(http.Header)
35866	}
35867	return c.header_
35868}
35869
35870func (c *OperatingSystemVersionsGetCall) doRequest(alt string) (*http.Response, error) {
35871	reqHeaders := make(http.Header)
35872	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
35873	for k, v := range c.header_ {
35874		reqHeaders[k] = v
35875	}
35876	reqHeaders.Set("User-Agent", c.s.userAgent())
35877	if c.ifNoneMatch_ != "" {
35878		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35879	}
35880	var body io.Reader = nil
35881	c.urlParams_.Set("alt", alt)
35882	c.urlParams_.Set("prettyPrint", "false")
35883	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions/{id}")
35884	urls += "?" + c.urlParams_.Encode()
35885	req, err := http.NewRequest("GET", urls, body)
35886	if err != nil {
35887		return nil, err
35888	}
35889	req.Header = reqHeaders
35890	googleapi.Expand(req.URL, map[string]string{
35891		"profileId": strconv.FormatInt(c.profileId, 10),
35892		"id":        strconv.FormatInt(c.id, 10),
35893	})
35894	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35895}
35896
35897// Do executes the "dfareporting.operatingSystemVersions.get" call.
35898// Exactly one of *OperatingSystemVersion or error will be non-nil. Any
35899// non-2xx status code is an error. Response headers are in either
35900// *OperatingSystemVersion.ServerResponse.Header or (if a response was
35901// returned at all) in error.(*googleapi.Error).Header. Use
35902// googleapi.IsNotModified to check whether the returned error was
35903// because http.StatusNotModified was returned.
35904func (c *OperatingSystemVersionsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersion, error) {
35905	gensupport.SetOptions(c.urlParams_, opts...)
35906	res, err := c.doRequest("json")
35907	if res != nil && res.StatusCode == http.StatusNotModified {
35908		if res.Body != nil {
35909			res.Body.Close()
35910		}
35911		return nil, &googleapi.Error{
35912			Code:   res.StatusCode,
35913			Header: res.Header,
35914		}
35915	}
35916	if err != nil {
35917		return nil, err
35918	}
35919	defer googleapi.CloseBody(res)
35920	if err := googleapi.CheckResponse(res); err != nil {
35921		return nil, err
35922	}
35923	ret := &OperatingSystemVersion{
35924		ServerResponse: googleapi.ServerResponse{
35925			Header:         res.Header,
35926			HTTPStatusCode: res.StatusCode,
35927		},
35928	}
35929	target := &ret
35930	if err := gensupport.DecodeResponse(target, res); err != nil {
35931		return nil, err
35932	}
35933	return ret, nil
35934	// {
35935	//   "description": "Gets one operating system version by ID.",
35936	//   "httpMethod": "GET",
35937	//   "id": "dfareporting.operatingSystemVersions.get",
35938	//   "parameterOrder": [
35939	//     "profileId",
35940	//     "id"
35941	//   ],
35942	//   "parameters": {
35943	//     "id": {
35944	//       "description": "Operating system version ID.",
35945	//       "format": "int64",
35946	//       "location": "path",
35947	//       "required": true,
35948	//       "type": "string"
35949	//     },
35950	//     "profileId": {
35951	//       "description": "User profile ID associated with this request.",
35952	//       "format": "int64",
35953	//       "location": "path",
35954	//       "required": true,
35955	//       "type": "string"
35956	//     }
35957	//   },
35958	//   "path": "userprofiles/{profileId}/operatingSystemVersions/{id}",
35959	//   "response": {
35960	//     "$ref": "OperatingSystemVersion"
35961	//   },
35962	//   "scopes": [
35963	//     "https://www.googleapis.com/auth/dfatrafficking"
35964	//   ]
35965	// }
35966
35967}
35968
35969// method id "dfareporting.operatingSystemVersions.list":
35970
35971type OperatingSystemVersionsListCall struct {
35972	s            *Service
35973	profileId    int64
35974	urlParams_   gensupport.URLParams
35975	ifNoneMatch_ string
35976	ctx_         context.Context
35977	header_      http.Header
35978}
35979
35980// List: Retrieves a list of operating system versions.
35981func (r *OperatingSystemVersionsService) List(profileId int64) *OperatingSystemVersionsListCall {
35982	c := &OperatingSystemVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35983	c.profileId = profileId
35984	return c
35985}
35986
35987// Fields allows partial responses to be retrieved. See
35988// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35989// for more information.
35990func (c *OperatingSystemVersionsListCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsListCall {
35991	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35992	return c
35993}
35994
35995// IfNoneMatch sets the optional parameter which makes the operation
35996// fail if the object's ETag matches the given value. This is useful for
35997// getting updates only after the object has changed since the last
35998// request. Use googleapi.IsNotModified to check whether the response
35999// error from Do is the result of In-None-Match.
36000func (c *OperatingSystemVersionsListCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsListCall {
36001	c.ifNoneMatch_ = entityTag
36002	return c
36003}
36004
36005// Context sets the context to be used in this call's Do method. Any
36006// pending HTTP request will be aborted if the provided context is
36007// canceled.
36008func (c *OperatingSystemVersionsListCall) Context(ctx context.Context) *OperatingSystemVersionsListCall {
36009	c.ctx_ = ctx
36010	return c
36011}
36012
36013// Header returns an http.Header that can be modified by the caller to
36014// add HTTP headers to the request.
36015func (c *OperatingSystemVersionsListCall) Header() http.Header {
36016	if c.header_ == nil {
36017		c.header_ = make(http.Header)
36018	}
36019	return c.header_
36020}
36021
36022func (c *OperatingSystemVersionsListCall) doRequest(alt string) (*http.Response, error) {
36023	reqHeaders := make(http.Header)
36024	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
36025	for k, v := range c.header_ {
36026		reqHeaders[k] = v
36027	}
36028	reqHeaders.Set("User-Agent", c.s.userAgent())
36029	if c.ifNoneMatch_ != "" {
36030		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36031	}
36032	var body io.Reader = nil
36033	c.urlParams_.Set("alt", alt)
36034	c.urlParams_.Set("prettyPrint", "false")
36035	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions")
36036	urls += "?" + c.urlParams_.Encode()
36037	req, err := http.NewRequest("GET", urls, body)
36038	if err != nil {
36039		return nil, err
36040	}
36041	req.Header = reqHeaders
36042	googleapi.Expand(req.URL, map[string]string{
36043		"profileId": strconv.FormatInt(c.profileId, 10),
36044	})
36045	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36046}
36047
36048// Do executes the "dfareporting.operatingSystemVersions.list" call.
36049// Exactly one of *OperatingSystemVersionsListResponse or error will be
36050// non-nil. Any non-2xx status code is an error. Response headers are in
36051// either *OperatingSystemVersionsListResponse.ServerResponse.Header or
36052// (if a response was returned at all) in
36053// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
36054// whether the returned error was because http.StatusNotModified was
36055// returned.
36056func (c *OperatingSystemVersionsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersionsListResponse, error) {
36057	gensupport.SetOptions(c.urlParams_, opts...)
36058	res, err := c.doRequest("json")
36059	if res != nil && res.StatusCode == http.StatusNotModified {
36060		if res.Body != nil {
36061			res.Body.Close()
36062		}
36063		return nil, &googleapi.Error{
36064			Code:   res.StatusCode,
36065			Header: res.Header,
36066		}
36067	}
36068	if err != nil {
36069		return nil, err
36070	}
36071	defer googleapi.CloseBody(res)
36072	if err := googleapi.CheckResponse(res); err != nil {
36073		return nil, err
36074	}
36075	ret := &OperatingSystemVersionsListResponse{
36076		ServerResponse: googleapi.ServerResponse{
36077			Header:         res.Header,
36078			HTTPStatusCode: res.StatusCode,
36079		},
36080	}
36081	target := &ret
36082	if err := gensupport.DecodeResponse(target, res); err != nil {
36083		return nil, err
36084	}
36085	return ret, nil
36086	// {
36087	//   "description": "Retrieves a list of operating system versions.",
36088	//   "httpMethod": "GET",
36089	//   "id": "dfareporting.operatingSystemVersions.list",
36090	//   "parameterOrder": [
36091	//     "profileId"
36092	//   ],
36093	//   "parameters": {
36094	//     "profileId": {
36095	//       "description": "User profile ID associated with this request.",
36096	//       "format": "int64",
36097	//       "location": "path",
36098	//       "required": true,
36099	//       "type": "string"
36100	//     }
36101	//   },
36102	//   "path": "userprofiles/{profileId}/operatingSystemVersions",
36103	//   "response": {
36104	//     "$ref": "OperatingSystemVersionsListResponse"
36105	//   },
36106	//   "scopes": [
36107	//     "https://www.googleapis.com/auth/dfatrafficking"
36108	//   ]
36109	// }
36110
36111}
36112
36113// method id "dfareporting.operatingSystems.get":
36114
36115type OperatingSystemsGetCall struct {
36116	s            *Service
36117	profileId    int64
36118	dartId       int64
36119	urlParams_   gensupport.URLParams
36120	ifNoneMatch_ string
36121	ctx_         context.Context
36122	header_      http.Header
36123}
36124
36125// Get: Gets one operating system by DART ID.
36126func (r *OperatingSystemsService) Get(profileId int64, dartId int64) *OperatingSystemsGetCall {
36127	c := &OperatingSystemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36128	c.profileId = profileId
36129	c.dartId = dartId
36130	return c
36131}
36132
36133// Fields allows partial responses to be retrieved. See
36134// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36135// for more information.
36136func (c *OperatingSystemsGetCall) Fields(s ...googleapi.Field) *OperatingSystemsGetCall {
36137	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36138	return c
36139}
36140
36141// IfNoneMatch sets the optional parameter which makes the operation
36142// fail if the object's ETag matches the given value. This is useful for
36143// getting updates only after the object has changed since the last
36144// request. Use googleapi.IsNotModified to check whether the response
36145// error from Do is the result of In-None-Match.
36146func (c *OperatingSystemsGetCall) IfNoneMatch(entityTag string) *OperatingSystemsGetCall {
36147	c.ifNoneMatch_ = entityTag
36148	return c
36149}
36150
36151// Context sets the context to be used in this call's Do method. Any
36152// pending HTTP request will be aborted if the provided context is
36153// canceled.
36154func (c *OperatingSystemsGetCall) Context(ctx context.Context) *OperatingSystemsGetCall {
36155	c.ctx_ = ctx
36156	return c
36157}
36158
36159// Header returns an http.Header that can be modified by the caller to
36160// add HTTP headers to the request.
36161func (c *OperatingSystemsGetCall) Header() http.Header {
36162	if c.header_ == nil {
36163		c.header_ = make(http.Header)
36164	}
36165	return c.header_
36166}
36167
36168func (c *OperatingSystemsGetCall) doRequest(alt string) (*http.Response, error) {
36169	reqHeaders := make(http.Header)
36170	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
36171	for k, v := range c.header_ {
36172		reqHeaders[k] = v
36173	}
36174	reqHeaders.Set("User-Agent", c.s.userAgent())
36175	if c.ifNoneMatch_ != "" {
36176		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36177	}
36178	var body io.Reader = nil
36179	c.urlParams_.Set("alt", alt)
36180	c.urlParams_.Set("prettyPrint", "false")
36181	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems/{dartId}")
36182	urls += "?" + c.urlParams_.Encode()
36183	req, err := http.NewRequest("GET", urls, body)
36184	if err != nil {
36185		return nil, err
36186	}
36187	req.Header = reqHeaders
36188	googleapi.Expand(req.URL, map[string]string{
36189		"profileId": strconv.FormatInt(c.profileId, 10),
36190		"dartId":    strconv.FormatInt(c.dartId, 10),
36191	})
36192	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36193}
36194
36195// Do executes the "dfareporting.operatingSystems.get" call.
36196// Exactly one of *OperatingSystem or error will be non-nil. Any non-2xx
36197// status code is an error. Response headers are in either
36198// *OperatingSystem.ServerResponse.Header or (if a response was returned
36199// at all) in error.(*googleapi.Error).Header. Use
36200// googleapi.IsNotModified to check whether the returned error was
36201// because http.StatusNotModified was returned.
36202func (c *OperatingSystemsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystem, error) {
36203	gensupport.SetOptions(c.urlParams_, opts...)
36204	res, err := c.doRequest("json")
36205	if res != nil && res.StatusCode == http.StatusNotModified {
36206		if res.Body != nil {
36207			res.Body.Close()
36208		}
36209		return nil, &googleapi.Error{
36210			Code:   res.StatusCode,
36211			Header: res.Header,
36212		}
36213	}
36214	if err != nil {
36215		return nil, err
36216	}
36217	defer googleapi.CloseBody(res)
36218	if err := googleapi.CheckResponse(res); err != nil {
36219		return nil, err
36220	}
36221	ret := &OperatingSystem{
36222		ServerResponse: googleapi.ServerResponse{
36223			Header:         res.Header,
36224			HTTPStatusCode: res.StatusCode,
36225		},
36226	}
36227	target := &ret
36228	if err := gensupport.DecodeResponse(target, res); err != nil {
36229		return nil, err
36230	}
36231	return ret, nil
36232	// {
36233	//   "description": "Gets one operating system by DART ID.",
36234	//   "httpMethod": "GET",
36235	//   "id": "dfareporting.operatingSystems.get",
36236	//   "parameterOrder": [
36237	//     "profileId",
36238	//     "dartId"
36239	//   ],
36240	//   "parameters": {
36241	//     "dartId": {
36242	//       "description": "Operating system DART ID.",
36243	//       "format": "int64",
36244	//       "location": "path",
36245	//       "required": true,
36246	//       "type": "string"
36247	//     },
36248	//     "profileId": {
36249	//       "description": "User profile ID associated with this request.",
36250	//       "format": "int64",
36251	//       "location": "path",
36252	//       "required": true,
36253	//       "type": "string"
36254	//     }
36255	//   },
36256	//   "path": "userprofiles/{profileId}/operatingSystems/{dartId}",
36257	//   "response": {
36258	//     "$ref": "OperatingSystem"
36259	//   },
36260	//   "scopes": [
36261	//     "https://www.googleapis.com/auth/dfatrafficking"
36262	//   ]
36263	// }
36264
36265}
36266
36267// method id "dfareporting.operatingSystems.list":
36268
36269type OperatingSystemsListCall struct {
36270	s            *Service
36271	profileId    int64
36272	urlParams_   gensupport.URLParams
36273	ifNoneMatch_ string
36274	ctx_         context.Context
36275	header_      http.Header
36276}
36277
36278// List: Retrieves a list of operating systems.
36279func (r *OperatingSystemsService) List(profileId int64) *OperatingSystemsListCall {
36280	c := &OperatingSystemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36281	c.profileId = profileId
36282	return c
36283}
36284
36285// Fields allows partial responses to be retrieved. See
36286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36287// for more information.
36288func (c *OperatingSystemsListCall) Fields(s ...googleapi.Field) *OperatingSystemsListCall {
36289	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36290	return c
36291}
36292
36293// IfNoneMatch sets the optional parameter which makes the operation
36294// fail if the object's ETag matches the given value. This is useful for
36295// getting updates only after the object has changed since the last
36296// request. Use googleapi.IsNotModified to check whether the response
36297// error from Do is the result of In-None-Match.
36298func (c *OperatingSystemsListCall) IfNoneMatch(entityTag string) *OperatingSystemsListCall {
36299	c.ifNoneMatch_ = entityTag
36300	return c
36301}
36302
36303// Context sets the context to be used in this call's Do method. Any
36304// pending HTTP request will be aborted if the provided context is
36305// canceled.
36306func (c *OperatingSystemsListCall) Context(ctx context.Context) *OperatingSystemsListCall {
36307	c.ctx_ = ctx
36308	return c
36309}
36310
36311// Header returns an http.Header that can be modified by the caller to
36312// add HTTP headers to the request.
36313func (c *OperatingSystemsListCall) Header() http.Header {
36314	if c.header_ == nil {
36315		c.header_ = make(http.Header)
36316	}
36317	return c.header_
36318}
36319
36320func (c *OperatingSystemsListCall) doRequest(alt string) (*http.Response, error) {
36321	reqHeaders := make(http.Header)
36322	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
36323	for k, v := range c.header_ {
36324		reqHeaders[k] = v
36325	}
36326	reqHeaders.Set("User-Agent", c.s.userAgent())
36327	if c.ifNoneMatch_ != "" {
36328		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36329	}
36330	var body io.Reader = nil
36331	c.urlParams_.Set("alt", alt)
36332	c.urlParams_.Set("prettyPrint", "false")
36333	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems")
36334	urls += "?" + c.urlParams_.Encode()
36335	req, err := http.NewRequest("GET", urls, body)
36336	if err != nil {
36337		return nil, err
36338	}
36339	req.Header = reqHeaders
36340	googleapi.Expand(req.URL, map[string]string{
36341		"profileId": strconv.FormatInt(c.profileId, 10),
36342	})
36343	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36344}
36345
36346// Do executes the "dfareporting.operatingSystems.list" call.
36347// Exactly one of *OperatingSystemsListResponse or error will be
36348// non-nil. Any non-2xx status code is an error. Response headers are in
36349// either *OperatingSystemsListResponse.ServerResponse.Header or (if a
36350// response was returned at all) in error.(*googleapi.Error).Header. Use
36351// googleapi.IsNotModified to check whether the returned error was
36352// because http.StatusNotModified was returned.
36353func (c *OperatingSystemsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemsListResponse, error) {
36354	gensupport.SetOptions(c.urlParams_, opts...)
36355	res, err := c.doRequest("json")
36356	if res != nil && res.StatusCode == http.StatusNotModified {
36357		if res.Body != nil {
36358			res.Body.Close()
36359		}
36360		return nil, &googleapi.Error{
36361			Code:   res.StatusCode,
36362			Header: res.Header,
36363		}
36364	}
36365	if err != nil {
36366		return nil, err
36367	}
36368	defer googleapi.CloseBody(res)
36369	if err := googleapi.CheckResponse(res); err != nil {
36370		return nil, err
36371	}
36372	ret := &OperatingSystemsListResponse{
36373		ServerResponse: googleapi.ServerResponse{
36374			Header:         res.Header,
36375			HTTPStatusCode: res.StatusCode,
36376		},
36377	}
36378	target := &ret
36379	if err := gensupport.DecodeResponse(target, res); err != nil {
36380		return nil, err
36381	}
36382	return ret, nil
36383	// {
36384	//   "description": "Retrieves a list of operating systems.",
36385	//   "httpMethod": "GET",
36386	//   "id": "dfareporting.operatingSystems.list",
36387	//   "parameterOrder": [
36388	//     "profileId"
36389	//   ],
36390	//   "parameters": {
36391	//     "profileId": {
36392	//       "description": "User profile ID associated with this request.",
36393	//       "format": "int64",
36394	//       "location": "path",
36395	//       "required": true,
36396	//       "type": "string"
36397	//     }
36398	//   },
36399	//   "path": "userprofiles/{profileId}/operatingSystems",
36400	//   "response": {
36401	//     "$ref": "OperatingSystemsListResponse"
36402	//   },
36403	//   "scopes": [
36404	//     "https://www.googleapis.com/auth/dfatrafficking"
36405	//   ]
36406	// }
36407
36408}
36409
36410// method id "dfareporting.orderDocuments.get":
36411
36412type OrderDocumentsGetCall struct {
36413	s            *Service
36414	profileId    int64
36415	projectId    int64
36416	id           int64
36417	urlParams_   gensupport.URLParams
36418	ifNoneMatch_ string
36419	ctx_         context.Context
36420	header_      http.Header
36421}
36422
36423// Get: Gets one order document by ID.
36424func (r *OrderDocumentsService) Get(profileId int64, projectId int64, id int64) *OrderDocumentsGetCall {
36425	c := &OrderDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36426	c.profileId = profileId
36427	c.projectId = projectId
36428	c.id = id
36429	return c
36430}
36431
36432// Fields allows partial responses to be retrieved. See
36433// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36434// for more information.
36435func (c *OrderDocumentsGetCall) Fields(s ...googleapi.Field) *OrderDocumentsGetCall {
36436	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36437	return c
36438}
36439
36440// IfNoneMatch sets the optional parameter which makes the operation
36441// fail if the object's ETag matches the given value. This is useful for
36442// getting updates only after the object has changed since the last
36443// request. Use googleapi.IsNotModified to check whether the response
36444// error from Do is the result of In-None-Match.
36445func (c *OrderDocumentsGetCall) IfNoneMatch(entityTag string) *OrderDocumentsGetCall {
36446	c.ifNoneMatch_ = entityTag
36447	return c
36448}
36449
36450// Context sets the context to be used in this call's Do method. Any
36451// pending HTTP request will be aborted if the provided context is
36452// canceled.
36453func (c *OrderDocumentsGetCall) Context(ctx context.Context) *OrderDocumentsGetCall {
36454	c.ctx_ = ctx
36455	return c
36456}
36457
36458// Header returns an http.Header that can be modified by the caller to
36459// add HTTP headers to the request.
36460func (c *OrderDocumentsGetCall) Header() http.Header {
36461	if c.header_ == nil {
36462		c.header_ = make(http.Header)
36463	}
36464	return c.header_
36465}
36466
36467func (c *OrderDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
36468	reqHeaders := make(http.Header)
36469	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
36470	for k, v := range c.header_ {
36471		reqHeaders[k] = v
36472	}
36473	reqHeaders.Set("User-Agent", c.s.userAgent())
36474	if c.ifNoneMatch_ != "" {
36475		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36476	}
36477	var body io.Reader = nil
36478	c.urlParams_.Set("alt", alt)
36479	c.urlParams_.Set("prettyPrint", "false")
36480	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}")
36481	urls += "?" + c.urlParams_.Encode()
36482	req, err := http.NewRequest("GET", urls, body)
36483	if err != nil {
36484		return nil, err
36485	}
36486	req.Header = reqHeaders
36487	googleapi.Expand(req.URL, map[string]string{
36488		"profileId": strconv.FormatInt(c.profileId, 10),
36489		"projectId": strconv.FormatInt(c.projectId, 10),
36490		"id":        strconv.FormatInt(c.id, 10),
36491	})
36492	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36493}
36494
36495// Do executes the "dfareporting.orderDocuments.get" call.
36496// Exactly one of *OrderDocument or error will be non-nil. Any non-2xx
36497// status code is an error. Response headers are in either
36498// *OrderDocument.ServerResponse.Header or (if a response was returned
36499// at all) in error.(*googleapi.Error).Header. Use
36500// googleapi.IsNotModified to check whether the returned error was
36501// because http.StatusNotModified was returned.
36502func (c *OrderDocumentsGetCall) Do(opts ...googleapi.CallOption) (*OrderDocument, error) {
36503	gensupport.SetOptions(c.urlParams_, opts...)
36504	res, err := c.doRequest("json")
36505	if res != nil && res.StatusCode == http.StatusNotModified {
36506		if res.Body != nil {
36507			res.Body.Close()
36508		}
36509		return nil, &googleapi.Error{
36510			Code:   res.StatusCode,
36511			Header: res.Header,
36512		}
36513	}
36514	if err != nil {
36515		return nil, err
36516	}
36517	defer googleapi.CloseBody(res)
36518	if err := googleapi.CheckResponse(res); err != nil {
36519		return nil, err
36520	}
36521	ret := &OrderDocument{
36522		ServerResponse: googleapi.ServerResponse{
36523			Header:         res.Header,
36524			HTTPStatusCode: res.StatusCode,
36525		},
36526	}
36527	target := &ret
36528	if err := gensupport.DecodeResponse(target, res); err != nil {
36529		return nil, err
36530	}
36531	return ret, nil
36532	// {
36533	//   "description": "Gets one order document by ID.",
36534	//   "httpMethod": "GET",
36535	//   "id": "dfareporting.orderDocuments.get",
36536	//   "parameterOrder": [
36537	//     "profileId",
36538	//     "projectId",
36539	//     "id"
36540	//   ],
36541	//   "parameters": {
36542	//     "id": {
36543	//       "description": "Order document ID.",
36544	//       "format": "int64",
36545	//       "location": "path",
36546	//       "required": true,
36547	//       "type": "string"
36548	//     },
36549	//     "profileId": {
36550	//       "description": "User profile ID associated with this request.",
36551	//       "format": "int64",
36552	//       "location": "path",
36553	//       "required": true,
36554	//       "type": "string"
36555	//     },
36556	//     "projectId": {
36557	//       "description": "Project ID for order documents.",
36558	//       "format": "int64",
36559	//       "location": "path",
36560	//       "required": true,
36561	//       "type": "string"
36562	//     }
36563	//   },
36564	//   "path": "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}",
36565	//   "response": {
36566	//     "$ref": "OrderDocument"
36567	//   },
36568	//   "scopes": [
36569	//     "https://www.googleapis.com/auth/dfatrafficking"
36570	//   ]
36571	// }
36572
36573}
36574
36575// method id "dfareporting.orderDocuments.list":
36576
36577type OrderDocumentsListCall struct {
36578	s            *Service
36579	profileId    int64
36580	projectId    int64
36581	urlParams_   gensupport.URLParams
36582	ifNoneMatch_ string
36583	ctx_         context.Context
36584	header_      http.Header
36585}
36586
36587// List: Retrieves a list of order documents, possibly filtered. This
36588// method supports paging.
36589func (r *OrderDocumentsService) List(profileId int64, projectId int64) *OrderDocumentsListCall {
36590	c := &OrderDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36591	c.profileId = profileId
36592	c.projectId = projectId
36593	return c
36594}
36595
36596// Approved sets the optional parameter "approved": Select only order
36597// documents that have been approved by at least one user.
36598func (c *OrderDocumentsListCall) Approved(approved bool) *OrderDocumentsListCall {
36599	c.urlParams_.Set("approved", fmt.Sprint(approved))
36600	return c
36601}
36602
36603// Ids sets the optional parameter "ids": Select only order documents
36604// with these IDs.
36605func (c *OrderDocumentsListCall) Ids(ids ...int64) *OrderDocumentsListCall {
36606	var ids_ []string
36607	for _, v := range ids {
36608		ids_ = append(ids_, fmt.Sprint(v))
36609	}
36610	c.urlParams_.SetMulti("ids", ids_)
36611	return c
36612}
36613
36614// MaxResults sets the optional parameter "maxResults": Maximum number
36615// of results to return.
36616func (c *OrderDocumentsListCall) MaxResults(maxResults int64) *OrderDocumentsListCall {
36617	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36618	return c
36619}
36620
36621// OrderId sets the optional parameter "orderId": Select only order
36622// documents for specified orders.
36623func (c *OrderDocumentsListCall) OrderId(orderId ...int64) *OrderDocumentsListCall {
36624	var orderId_ []string
36625	for _, v := range orderId {
36626		orderId_ = append(orderId_, fmt.Sprint(v))
36627	}
36628	c.urlParams_.SetMulti("orderId", orderId_)
36629	return c
36630}
36631
36632// PageToken sets the optional parameter "pageToken": Value of the
36633// nextPageToken from the previous result page.
36634func (c *OrderDocumentsListCall) PageToken(pageToken string) *OrderDocumentsListCall {
36635	c.urlParams_.Set("pageToken", pageToken)
36636	return c
36637}
36638
36639// SearchString sets the optional parameter "searchString": Allows
36640// searching for order documents by name or ID. Wildcards (*) are
36641// allowed. For example, "orderdocument*2015" will return order
36642// documents with names like "orderdocument June 2015", "orderdocument
36643// April 2015", or simply "orderdocument 2015". Most of the searches
36644// also add wildcards implicitly at the start and the end of the search
36645// string. For example, a search string of "orderdocument" will match
36646// order documents with name "my orderdocument", "orderdocument 2015",
36647// or simply "orderdocument".
36648func (c *OrderDocumentsListCall) SearchString(searchString string) *OrderDocumentsListCall {
36649	c.urlParams_.Set("searchString", searchString)
36650	return c
36651}
36652
36653// SiteId sets the optional parameter "siteId": Select only order
36654// documents that are associated with these sites.
36655func (c *OrderDocumentsListCall) SiteId(siteId ...int64) *OrderDocumentsListCall {
36656	var siteId_ []string
36657	for _, v := range siteId {
36658		siteId_ = append(siteId_, fmt.Sprint(v))
36659	}
36660	c.urlParams_.SetMulti("siteId", siteId_)
36661	return c
36662}
36663
36664// SortField sets the optional parameter "sortField": Field by which to
36665// sort the list.
36666//
36667// Possible values:
36668//   "ID" (default)
36669//   "NAME"
36670func (c *OrderDocumentsListCall) SortField(sortField string) *OrderDocumentsListCall {
36671	c.urlParams_.Set("sortField", sortField)
36672	return c
36673}
36674
36675// SortOrder sets the optional parameter "sortOrder": Order of sorted
36676// results.
36677//
36678// Possible values:
36679//   "ASCENDING" (default)
36680//   "DESCENDING"
36681func (c *OrderDocumentsListCall) SortOrder(sortOrder string) *OrderDocumentsListCall {
36682	c.urlParams_.Set("sortOrder", sortOrder)
36683	return c
36684}
36685
36686// Fields allows partial responses to be retrieved. See
36687// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36688// for more information.
36689func (c *OrderDocumentsListCall) Fields(s ...googleapi.Field) *OrderDocumentsListCall {
36690	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36691	return c
36692}
36693
36694// IfNoneMatch sets the optional parameter which makes the operation
36695// fail if the object's ETag matches the given value. This is useful for
36696// getting updates only after the object has changed since the last
36697// request. Use googleapi.IsNotModified to check whether the response
36698// error from Do is the result of In-None-Match.
36699func (c *OrderDocumentsListCall) IfNoneMatch(entityTag string) *OrderDocumentsListCall {
36700	c.ifNoneMatch_ = entityTag
36701	return c
36702}
36703
36704// Context sets the context to be used in this call's Do method. Any
36705// pending HTTP request will be aborted if the provided context is
36706// canceled.
36707func (c *OrderDocumentsListCall) Context(ctx context.Context) *OrderDocumentsListCall {
36708	c.ctx_ = ctx
36709	return c
36710}
36711
36712// Header returns an http.Header that can be modified by the caller to
36713// add HTTP headers to the request.
36714func (c *OrderDocumentsListCall) Header() http.Header {
36715	if c.header_ == nil {
36716		c.header_ = make(http.Header)
36717	}
36718	return c.header_
36719}
36720
36721func (c *OrderDocumentsListCall) doRequest(alt string) (*http.Response, error) {
36722	reqHeaders := make(http.Header)
36723	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
36724	for k, v := range c.header_ {
36725		reqHeaders[k] = v
36726	}
36727	reqHeaders.Set("User-Agent", c.s.userAgent())
36728	if c.ifNoneMatch_ != "" {
36729		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36730	}
36731	var body io.Reader = nil
36732	c.urlParams_.Set("alt", alt)
36733	c.urlParams_.Set("prettyPrint", "false")
36734	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments")
36735	urls += "?" + c.urlParams_.Encode()
36736	req, err := http.NewRequest("GET", urls, body)
36737	if err != nil {
36738		return nil, err
36739	}
36740	req.Header = reqHeaders
36741	googleapi.Expand(req.URL, map[string]string{
36742		"profileId": strconv.FormatInt(c.profileId, 10),
36743		"projectId": strconv.FormatInt(c.projectId, 10),
36744	})
36745	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36746}
36747
36748// Do executes the "dfareporting.orderDocuments.list" call.
36749// Exactly one of *OrderDocumentsListResponse or error will be non-nil.
36750// Any non-2xx status code is an error. Response headers are in either
36751// *OrderDocumentsListResponse.ServerResponse.Header or (if a response
36752// was returned at all) in error.(*googleapi.Error).Header. Use
36753// googleapi.IsNotModified to check whether the returned error was
36754// because http.StatusNotModified was returned.
36755func (c *OrderDocumentsListCall) Do(opts ...googleapi.CallOption) (*OrderDocumentsListResponse, error) {
36756	gensupport.SetOptions(c.urlParams_, opts...)
36757	res, err := c.doRequest("json")
36758	if res != nil && res.StatusCode == http.StatusNotModified {
36759		if res.Body != nil {
36760			res.Body.Close()
36761		}
36762		return nil, &googleapi.Error{
36763			Code:   res.StatusCode,
36764			Header: res.Header,
36765		}
36766	}
36767	if err != nil {
36768		return nil, err
36769	}
36770	defer googleapi.CloseBody(res)
36771	if err := googleapi.CheckResponse(res); err != nil {
36772		return nil, err
36773	}
36774	ret := &OrderDocumentsListResponse{
36775		ServerResponse: googleapi.ServerResponse{
36776			Header:         res.Header,
36777			HTTPStatusCode: res.StatusCode,
36778		},
36779	}
36780	target := &ret
36781	if err := gensupport.DecodeResponse(target, res); err != nil {
36782		return nil, err
36783	}
36784	return ret, nil
36785	// {
36786	//   "description": "Retrieves a list of order documents, possibly filtered. This method supports paging.",
36787	//   "httpMethod": "GET",
36788	//   "id": "dfareporting.orderDocuments.list",
36789	//   "parameterOrder": [
36790	//     "profileId",
36791	//     "projectId"
36792	//   ],
36793	//   "parameters": {
36794	//     "approved": {
36795	//       "description": "Select only order documents that have been approved by at least one user.",
36796	//       "location": "query",
36797	//       "type": "boolean"
36798	//     },
36799	//     "ids": {
36800	//       "description": "Select only order documents with these IDs.",
36801	//       "format": "int64",
36802	//       "location": "query",
36803	//       "repeated": true,
36804	//       "type": "string"
36805	//     },
36806	//     "maxResults": {
36807	//       "default": "1000",
36808	//       "description": "Maximum number of results to return.",
36809	//       "format": "int32",
36810	//       "location": "query",
36811	//       "maximum": "1000",
36812	//       "minimum": "0",
36813	//       "type": "integer"
36814	//     },
36815	//     "orderId": {
36816	//       "description": "Select only order documents for specified orders.",
36817	//       "format": "int64",
36818	//       "location": "query",
36819	//       "repeated": true,
36820	//       "type": "string"
36821	//     },
36822	//     "pageToken": {
36823	//       "description": "Value of the nextPageToken from the previous result page.",
36824	//       "location": "query",
36825	//       "type": "string"
36826	//     },
36827	//     "profileId": {
36828	//       "description": "User profile ID associated with this request.",
36829	//       "format": "int64",
36830	//       "location": "path",
36831	//       "required": true,
36832	//       "type": "string"
36833	//     },
36834	//     "projectId": {
36835	//       "description": "Project ID for order documents.",
36836	//       "format": "int64",
36837	//       "location": "path",
36838	//       "required": true,
36839	//       "type": "string"
36840	//     },
36841	//     "searchString": {
36842	//       "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\".",
36843	//       "location": "query",
36844	//       "type": "string"
36845	//     },
36846	//     "siteId": {
36847	//       "description": "Select only order documents that are associated with these sites.",
36848	//       "format": "int64",
36849	//       "location": "query",
36850	//       "repeated": true,
36851	//       "type": "string"
36852	//     },
36853	//     "sortField": {
36854	//       "default": "ID",
36855	//       "description": "Field by which to sort the list.",
36856	//       "enum": [
36857	//         "ID",
36858	//         "NAME"
36859	//       ],
36860	//       "enumDescriptions": [
36861	//         "",
36862	//         ""
36863	//       ],
36864	//       "location": "query",
36865	//       "type": "string"
36866	//     },
36867	//     "sortOrder": {
36868	//       "default": "ASCENDING",
36869	//       "description": "Order of sorted results.",
36870	//       "enum": [
36871	//         "ASCENDING",
36872	//         "DESCENDING"
36873	//       ],
36874	//       "enumDescriptions": [
36875	//         "",
36876	//         ""
36877	//       ],
36878	//       "location": "query",
36879	//       "type": "string"
36880	//     }
36881	//   },
36882	//   "path": "userprofiles/{profileId}/projects/{projectId}/orderDocuments",
36883	//   "response": {
36884	//     "$ref": "OrderDocumentsListResponse"
36885	//   },
36886	//   "scopes": [
36887	//     "https://www.googleapis.com/auth/dfatrafficking"
36888	//   ]
36889	// }
36890
36891}
36892
36893// Pages invokes f for each page of results.
36894// A non-nil error returned from f will halt the iteration.
36895// The provided context supersedes any context provided to the Context method.
36896func (c *OrderDocumentsListCall) Pages(ctx context.Context, f func(*OrderDocumentsListResponse) error) error {
36897	c.ctx_ = ctx
36898	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
36899	for {
36900		x, err := c.Do()
36901		if err != nil {
36902			return err
36903		}
36904		if err := f(x); err != nil {
36905			return err
36906		}
36907		if x.NextPageToken == "" {
36908			return nil
36909		}
36910		c.PageToken(x.NextPageToken)
36911	}
36912}
36913
36914// method id "dfareporting.orders.get":
36915
36916type OrdersGetCall struct {
36917	s            *Service
36918	profileId    int64
36919	projectId    int64
36920	id           int64
36921	urlParams_   gensupport.URLParams
36922	ifNoneMatch_ string
36923	ctx_         context.Context
36924	header_      http.Header
36925}
36926
36927// Get: Gets one order by ID.
36928func (r *OrdersService) Get(profileId int64, projectId int64, id int64) *OrdersGetCall {
36929	c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36930	c.profileId = profileId
36931	c.projectId = projectId
36932	c.id = id
36933	return c
36934}
36935
36936// Fields allows partial responses to be retrieved. See
36937// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36938// for more information.
36939func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall {
36940	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36941	return c
36942}
36943
36944// IfNoneMatch sets the optional parameter which makes the operation
36945// fail if the object's ETag matches the given value. This is useful for
36946// getting updates only after the object has changed since the last
36947// request. Use googleapi.IsNotModified to check whether the response
36948// error from Do is the result of In-None-Match.
36949func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall {
36950	c.ifNoneMatch_ = entityTag
36951	return c
36952}
36953
36954// Context sets the context to be used in this call's Do method. Any
36955// pending HTTP request will be aborted if the provided context is
36956// canceled.
36957func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
36958	c.ctx_ = ctx
36959	return c
36960}
36961
36962// Header returns an http.Header that can be modified by the caller to
36963// add HTTP headers to the request.
36964func (c *OrdersGetCall) Header() http.Header {
36965	if c.header_ == nil {
36966		c.header_ = make(http.Header)
36967	}
36968	return c.header_
36969}
36970
36971func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
36972	reqHeaders := make(http.Header)
36973	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
36974	for k, v := range c.header_ {
36975		reqHeaders[k] = v
36976	}
36977	reqHeaders.Set("User-Agent", c.s.userAgent())
36978	if c.ifNoneMatch_ != "" {
36979		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36980	}
36981	var body io.Reader = nil
36982	c.urlParams_.Set("alt", alt)
36983	c.urlParams_.Set("prettyPrint", "false")
36984	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders/{id}")
36985	urls += "?" + c.urlParams_.Encode()
36986	req, err := http.NewRequest("GET", urls, body)
36987	if err != nil {
36988		return nil, err
36989	}
36990	req.Header = reqHeaders
36991	googleapi.Expand(req.URL, map[string]string{
36992		"profileId": strconv.FormatInt(c.profileId, 10),
36993		"projectId": strconv.FormatInt(c.projectId, 10),
36994		"id":        strconv.FormatInt(c.id, 10),
36995	})
36996	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36997}
36998
36999// Do executes the "dfareporting.orders.get" call.
37000// Exactly one of *Order or error will be non-nil. Any non-2xx status
37001// code is an error. Response headers are in either
37002// *Order.ServerResponse.Header or (if a response was returned at all)
37003// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
37004// check whether the returned error was because http.StatusNotModified
37005// was returned.
37006func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) {
37007	gensupport.SetOptions(c.urlParams_, opts...)
37008	res, err := c.doRequest("json")
37009	if res != nil && res.StatusCode == http.StatusNotModified {
37010		if res.Body != nil {
37011			res.Body.Close()
37012		}
37013		return nil, &googleapi.Error{
37014			Code:   res.StatusCode,
37015			Header: res.Header,
37016		}
37017	}
37018	if err != nil {
37019		return nil, err
37020	}
37021	defer googleapi.CloseBody(res)
37022	if err := googleapi.CheckResponse(res); err != nil {
37023		return nil, err
37024	}
37025	ret := &Order{
37026		ServerResponse: googleapi.ServerResponse{
37027			Header:         res.Header,
37028			HTTPStatusCode: res.StatusCode,
37029		},
37030	}
37031	target := &ret
37032	if err := gensupport.DecodeResponse(target, res); err != nil {
37033		return nil, err
37034	}
37035	return ret, nil
37036	// {
37037	//   "description": "Gets one order by ID.",
37038	//   "httpMethod": "GET",
37039	//   "id": "dfareporting.orders.get",
37040	//   "parameterOrder": [
37041	//     "profileId",
37042	//     "projectId",
37043	//     "id"
37044	//   ],
37045	//   "parameters": {
37046	//     "id": {
37047	//       "description": "Order ID.",
37048	//       "format": "int64",
37049	//       "location": "path",
37050	//       "required": true,
37051	//       "type": "string"
37052	//     },
37053	//     "profileId": {
37054	//       "description": "User profile ID associated with this request.",
37055	//       "format": "int64",
37056	//       "location": "path",
37057	//       "required": true,
37058	//       "type": "string"
37059	//     },
37060	//     "projectId": {
37061	//       "description": "Project ID for orders.",
37062	//       "format": "int64",
37063	//       "location": "path",
37064	//       "required": true,
37065	//       "type": "string"
37066	//     }
37067	//   },
37068	//   "path": "userprofiles/{profileId}/projects/{projectId}/orders/{id}",
37069	//   "response": {
37070	//     "$ref": "Order"
37071	//   },
37072	//   "scopes": [
37073	//     "https://www.googleapis.com/auth/dfatrafficking"
37074	//   ]
37075	// }
37076
37077}
37078
37079// method id "dfareporting.orders.list":
37080
37081type OrdersListCall struct {
37082	s            *Service
37083	profileId    int64
37084	projectId    int64
37085	urlParams_   gensupport.URLParams
37086	ifNoneMatch_ string
37087	ctx_         context.Context
37088	header_      http.Header
37089}
37090
37091// List: Retrieves a list of orders, possibly filtered. This method
37092// supports paging.
37093func (r *OrdersService) List(profileId int64, projectId int64) *OrdersListCall {
37094	c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37095	c.profileId = profileId
37096	c.projectId = projectId
37097	return c
37098}
37099
37100// Ids sets the optional parameter "ids": Select only orders with these
37101// IDs.
37102func (c *OrdersListCall) Ids(ids ...int64) *OrdersListCall {
37103	var ids_ []string
37104	for _, v := range ids {
37105		ids_ = append(ids_, fmt.Sprint(v))
37106	}
37107	c.urlParams_.SetMulti("ids", ids_)
37108	return c
37109}
37110
37111// MaxResults sets the optional parameter "maxResults": Maximum number
37112// of results to return.
37113func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall {
37114	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37115	return c
37116}
37117
37118// PageToken sets the optional parameter "pageToken": Value of the
37119// nextPageToken from the previous result page.
37120func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall {
37121	c.urlParams_.Set("pageToken", pageToken)
37122	return c
37123}
37124
37125// SearchString sets the optional parameter "searchString": Allows
37126// searching for orders by name or ID. Wildcards (*) are allowed. For
37127// example, "order*2015" will return orders with names like "order June
37128// 2015", "order April 2015", or simply "order 2015". Most of the
37129// searches also add wildcards implicitly at the start and the end of
37130// the search string. For example, a search string of "order" will match
37131// orders with name "my order", "order 2015", or simply "order".
37132func (c *OrdersListCall) SearchString(searchString string) *OrdersListCall {
37133	c.urlParams_.Set("searchString", searchString)
37134	return c
37135}
37136
37137// SiteId sets the optional parameter "siteId": Select only orders that
37138// are associated with these site IDs.
37139func (c *OrdersListCall) SiteId(siteId ...int64) *OrdersListCall {
37140	var siteId_ []string
37141	for _, v := range siteId {
37142		siteId_ = append(siteId_, fmt.Sprint(v))
37143	}
37144	c.urlParams_.SetMulti("siteId", siteId_)
37145	return c
37146}
37147
37148// SortField sets the optional parameter "sortField": Field by which to
37149// sort the list.
37150//
37151// Possible values:
37152//   "ID" (default)
37153//   "NAME"
37154func (c *OrdersListCall) SortField(sortField string) *OrdersListCall {
37155	c.urlParams_.Set("sortField", sortField)
37156	return c
37157}
37158
37159// SortOrder sets the optional parameter "sortOrder": Order of sorted
37160// results.
37161//
37162// Possible values:
37163//   "ASCENDING" (default)
37164//   "DESCENDING"
37165func (c *OrdersListCall) SortOrder(sortOrder string) *OrdersListCall {
37166	c.urlParams_.Set("sortOrder", sortOrder)
37167	return c
37168}
37169
37170// Fields allows partial responses to be retrieved. See
37171// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37172// for more information.
37173func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall {
37174	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37175	return c
37176}
37177
37178// IfNoneMatch sets the optional parameter which makes the operation
37179// fail if the object's ETag matches the given value. This is useful for
37180// getting updates only after the object has changed since the last
37181// request. Use googleapi.IsNotModified to check whether the response
37182// error from Do is the result of In-None-Match.
37183func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall {
37184	c.ifNoneMatch_ = entityTag
37185	return c
37186}
37187
37188// Context sets the context to be used in this call's Do method. Any
37189// pending HTTP request will be aborted if the provided context is
37190// canceled.
37191func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
37192	c.ctx_ = ctx
37193	return c
37194}
37195
37196// Header returns an http.Header that can be modified by the caller to
37197// add HTTP headers to the request.
37198func (c *OrdersListCall) Header() http.Header {
37199	if c.header_ == nil {
37200		c.header_ = make(http.Header)
37201	}
37202	return c.header_
37203}
37204
37205func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
37206	reqHeaders := make(http.Header)
37207	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
37208	for k, v := range c.header_ {
37209		reqHeaders[k] = v
37210	}
37211	reqHeaders.Set("User-Agent", c.s.userAgent())
37212	if c.ifNoneMatch_ != "" {
37213		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37214	}
37215	var body io.Reader = nil
37216	c.urlParams_.Set("alt", alt)
37217	c.urlParams_.Set("prettyPrint", "false")
37218	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders")
37219	urls += "?" + c.urlParams_.Encode()
37220	req, err := http.NewRequest("GET", urls, body)
37221	if err != nil {
37222		return nil, err
37223	}
37224	req.Header = reqHeaders
37225	googleapi.Expand(req.URL, map[string]string{
37226		"profileId": strconv.FormatInt(c.profileId, 10),
37227		"projectId": strconv.FormatInt(c.projectId, 10),
37228	})
37229	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37230}
37231
37232// Do executes the "dfareporting.orders.list" call.
37233// Exactly one of *OrdersListResponse or error will be non-nil. Any
37234// non-2xx status code is an error. Response headers are in either
37235// *OrdersListResponse.ServerResponse.Header or (if a response was
37236// returned at all) in error.(*googleapi.Error).Header. Use
37237// googleapi.IsNotModified to check whether the returned error was
37238// because http.StatusNotModified was returned.
37239func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) {
37240	gensupport.SetOptions(c.urlParams_, opts...)
37241	res, err := c.doRequest("json")
37242	if res != nil && res.StatusCode == http.StatusNotModified {
37243		if res.Body != nil {
37244			res.Body.Close()
37245		}
37246		return nil, &googleapi.Error{
37247			Code:   res.StatusCode,
37248			Header: res.Header,
37249		}
37250	}
37251	if err != nil {
37252		return nil, err
37253	}
37254	defer googleapi.CloseBody(res)
37255	if err := googleapi.CheckResponse(res); err != nil {
37256		return nil, err
37257	}
37258	ret := &OrdersListResponse{
37259		ServerResponse: googleapi.ServerResponse{
37260			Header:         res.Header,
37261			HTTPStatusCode: res.StatusCode,
37262		},
37263	}
37264	target := &ret
37265	if err := gensupport.DecodeResponse(target, res); err != nil {
37266		return nil, err
37267	}
37268	return ret, nil
37269	// {
37270	//   "description": "Retrieves a list of orders, possibly filtered. This method supports paging.",
37271	//   "httpMethod": "GET",
37272	//   "id": "dfareporting.orders.list",
37273	//   "parameterOrder": [
37274	//     "profileId",
37275	//     "projectId"
37276	//   ],
37277	//   "parameters": {
37278	//     "ids": {
37279	//       "description": "Select only orders with these IDs.",
37280	//       "format": "int64",
37281	//       "location": "query",
37282	//       "repeated": true,
37283	//       "type": "string"
37284	//     },
37285	//     "maxResults": {
37286	//       "default": "1000",
37287	//       "description": "Maximum number of results to return.",
37288	//       "format": "int32",
37289	//       "location": "query",
37290	//       "maximum": "1000",
37291	//       "minimum": "0",
37292	//       "type": "integer"
37293	//     },
37294	//     "pageToken": {
37295	//       "description": "Value of the nextPageToken from the previous result page.",
37296	//       "location": "query",
37297	//       "type": "string"
37298	//     },
37299	//     "profileId": {
37300	//       "description": "User profile ID associated with this request.",
37301	//       "format": "int64",
37302	//       "location": "path",
37303	//       "required": true,
37304	//       "type": "string"
37305	//     },
37306	//     "projectId": {
37307	//       "description": "Project ID for orders.",
37308	//       "format": "int64",
37309	//       "location": "path",
37310	//       "required": true,
37311	//       "type": "string"
37312	//     },
37313	//     "searchString": {
37314	//       "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\".",
37315	//       "location": "query",
37316	//       "type": "string"
37317	//     },
37318	//     "siteId": {
37319	//       "description": "Select only orders that are associated with these site IDs.",
37320	//       "format": "int64",
37321	//       "location": "query",
37322	//       "repeated": true,
37323	//       "type": "string"
37324	//     },
37325	//     "sortField": {
37326	//       "default": "ID",
37327	//       "description": "Field by which to sort the list.",
37328	//       "enum": [
37329	//         "ID",
37330	//         "NAME"
37331	//       ],
37332	//       "enumDescriptions": [
37333	//         "",
37334	//         ""
37335	//       ],
37336	//       "location": "query",
37337	//       "type": "string"
37338	//     },
37339	//     "sortOrder": {
37340	//       "default": "ASCENDING",
37341	//       "description": "Order of sorted results.",
37342	//       "enum": [
37343	//         "ASCENDING",
37344	//         "DESCENDING"
37345	//       ],
37346	//       "enumDescriptions": [
37347	//         "",
37348	//         ""
37349	//       ],
37350	//       "location": "query",
37351	//       "type": "string"
37352	//     }
37353	//   },
37354	//   "path": "userprofiles/{profileId}/projects/{projectId}/orders",
37355	//   "response": {
37356	//     "$ref": "OrdersListResponse"
37357	//   },
37358	//   "scopes": [
37359	//     "https://www.googleapis.com/auth/dfatrafficking"
37360	//   ]
37361	// }
37362
37363}
37364
37365// Pages invokes f for each page of results.
37366// A non-nil error returned from f will halt the iteration.
37367// The provided context supersedes any context provided to the Context method.
37368func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error {
37369	c.ctx_ = ctx
37370	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37371	for {
37372		x, err := c.Do()
37373		if err != nil {
37374			return err
37375		}
37376		if err := f(x); err != nil {
37377			return err
37378		}
37379		if x.NextPageToken == "" {
37380			return nil
37381		}
37382		c.PageToken(x.NextPageToken)
37383	}
37384}
37385
37386// method id "dfareporting.placementGroups.get":
37387
37388type PlacementGroupsGetCall struct {
37389	s            *Service
37390	profileId    int64
37391	id           int64
37392	urlParams_   gensupport.URLParams
37393	ifNoneMatch_ string
37394	ctx_         context.Context
37395	header_      http.Header
37396}
37397
37398// Get: Gets one placement group by ID.
37399func (r *PlacementGroupsService) Get(profileId int64, id int64) *PlacementGroupsGetCall {
37400	c := &PlacementGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37401	c.profileId = profileId
37402	c.id = id
37403	return c
37404}
37405
37406// Fields allows partial responses to be retrieved. See
37407// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37408// for more information.
37409func (c *PlacementGroupsGetCall) Fields(s ...googleapi.Field) *PlacementGroupsGetCall {
37410	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37411	return c
37412}
37413
37414// IfNoneMatch sets the optional parameter which makes the operation
37415// fail if the object's ETag matches the given value. This is useful for
37416// getting updates only after the object has changed since the last
37417// request. Use googleapi.IsNotModified to check whether the response
37418// error from Do is the result of In-None-Match.
37419func (c *PlacementGroupsGetCall) IfNoneMatch(entityTag string) *PlacementGroupsGetCall {
37420	c.ifNoneMatch_ = entityTag
37421	return c
37422}
37423
37424// Context sets the context to be used in this call's Do method. Any
37425// pending HTTP request will be aborted if the provided context is
37426// canceled.
37427func (c *PlacementGroupsGetCall) Context(ctx context.Context) *PlacementGroupsGetCall {
37428	c.ctx_ = ctx
37429	return c
37430}
37431
37432// Header returns an http.Header that can be modified by the caller to
37433// add HTTP headers to the request.
37434func (c *PlacementGroupsGetCall) Header() http.Header {
37435	if c.header_ == nil {
37436		c.header_ = make(http.Header)
37437	}
37438	return c.header_
37439}
37440
37441func (c *PlacementGroupsGetCall) doRequest(alt string) (*http.Response, error) {
37442	reqHeaders := make(http.Header)
37443	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
37444	for k, v := range c.header_ {
37445		reqHeaders[k] = v
37446	}
37447	reqHeaders.Set("User-Agent", c.s.userAgent())
37448	if c.ifNoneMatch_ != "" {
37449		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37450	}
37451	var body io.Reader = nil
37452	c.urlParams_.Set("alt", alt)
37453	c.urlParams_.Set("prettyPrint", "false")
37454	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups/{id}")
37455	urls += "?" + c.urlParams_.Encode()
37456	req, err := http.NewRequest("GET", urls, body)
37457	if err != nil {
37458		return nil, err
37459	}
37460	req.Header = reqHeaders
37461	googleapi.Expand(req.URL, map[string]string{
37462		"profileId": strconv.FormatInt(c.profileId, 10),
37463		"id":        strconv.FormatInt(c.id, 10),
37464	})
37465	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37466}
37467
37468// Do executes the "dfareporting.placementGroups.get" call.
37469// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
37470// status code is an error. Response headers are in either
37471// *PlacementGroup.ServerResponse.Header or (if a response was returned
37472// at all) in error.(*googleapi.Error).Header. Use
37473// googleapi.IsNotModified to check whether the returned error was
37474// because http.StatusNotModified was returned.
37475func (c *PlacementGroupsGetCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
37476	gensupport.SetOptions(c.urlParams_, opts...)
37477	res, err := c.doRequest("json")
37478	if res != nil && res.StatusCode == http.StatusNotModified {
37479		if res.Body != nil {
37480			res.Body.Close()
37481		}
37482		return nil, &googleapi.Error{
37483			Code:   res.StatusCode,
37484			Header: res.Header,
37485		}
37486	}
37487	if err != nil {
37488		return nil, err
37489	}
37490	defer googleapi.CloseBody(res)
37491	if err := googleapi.CheckResponse(res); err != nil {
37492		return nil, err
37493	}
37494	ret := &PlacementGroup{
37495		ServerResponse: googleapi.ServerResponse{
37496			Header:         res.Header,
37497			HTTPStatusCode: res.StatusCode,
37498		},
37499	}
37500	target := &ret
37501	if err := gensupport.DecodeResponse(target, res); err != nil {
37502		return nil, err
37503	}
37504	return ret, nil
37505	// {
37506	//   "description": "Gets one placement group by ID.",
37507	//   "httpMethod": "GET",
37508	//   "id": "dfareporting.placementGroups.get",
37509	//   "parameterOrder": [
37510	//     "profileId",
37511	//     "id"
37512	//   ],
37513	//   "parameters": {
37514	//     "id": {
37515	//       "description": "Placement group ID.",
37516	//       "format": "int64",
37517	//       "location": "path",
37518	//       "required": true,
37519	//       "type": "string"
37520	//     },
37521	//     "profileId": {
37522	//       "description": "User profile ID associated with this request.",
37523	//       "format": "int64",
37524	//       "location": "path",
37525	//       "required": true,
37526	//       "type": "string"
37527	//     }
37528	//   },
37529	//   "path": "userprofiles/{profileId}/placementGroups/{id}",
37530	//   "response": {
37531	//     "$ref": "PlacementGroup"
37532	//   },
37533	//   "scopes": [
37534	//     "https://www.googleapis.com/auth/dfatrafficking"
37535	//   ]
37536	// }
37537
37538}
37539
37540// method id "dfareporting.placementGroups.insert":
37541
37542type PlacementGroupsInsertCall struct {
37543	s              *Service
37544	profileId      int64
37545	placementgroup *PlacementGroup
37546	urlParams_     gensupport.URLParams
37547	ctx_           context.Context
37548	header_        http.Header
37549}
37550
37551// Insert: Inserts a new placement group.
37552func (r *PlacementGroupsService) Insert(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsInsertCall {
37553	c := &PlacementGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37554	c.profileId = profileId
37555	c.placementgroup = placementgroup
37556	return c
37557}
37558
37559// Fields allows partial responses to be retrieved. See
37560// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37561// for more information.
37562func (c *PlacementGroupsInsertCall) Fields(s ...googleapi.Field) *PlacementGroupsInsertCall {
37563	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37564	return c
37565}
37566
37567// Context sets the context to be used in this call's Do method. Any
37568// pending HTTP request will be aborted if the provided context is
37569// canceled.
37570func (c *PlacementGroupsInsertCall) Context(ctx context.Context) *PlacementGroupsInsertCall {
37571	c.ctx_ = ctx
37572	return c
37573}
37574
37575// Header returns an http.Header that can be modified by the caller to
37576// add HTTP headers to the request.
37577func (c *PlacementGroupsInsertCall) Header() http.Header {
37578	if c.header_ == nil {
37579		c.header_ = make(http.Header)
37580	}
37581	return c.header_
37582}
37583
37584func (c *PlacementGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
37585	reqHeaders := make(http.Header)
37586	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
37587	for k, v := range c.header_ {
37588		reqHeaders[k] = v
37589	}
37590	reqHeaders.Set("User-Agent", c.s.userAgent())
37591	var body io.Reader = nil
37592	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
37593	if err != nil {
37594		return nil, err
37595	}
37596	reqHeaders.Set("Content-Type", "application/json")
37597	c.urlParams_.Set("alt", alt)
37598	c.urlParams_.Set("prettyPrint", "false")
37599	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
37600	urls += "?" + c.urlParams_.Encode()
37601	req, err := http.NewRequest("POST", urls, body)
37602	if err != nil {
37603		return nil, err
37604	}
37605	req.Header = reqHeaders
37606	googleapi.Expand(req.URL, map[string]string{
37607		"profileId": strconv.FormatInt(c.profileId, 10),
37608	})
37609	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37610}
37611
37612// Do executes the "dfareporting.placementGroups.insert" call.
37613// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
37614// status code is an error. Response headers are in either
37615// *PlacementGroup.ServerResponse.Header or (if a response was returned
37616// at all) in error.(*googleapi.Error).Header. Use
37617// googleapi.IsNotModified to check whether the returned error was
37618// because http.StatusNotModified was returned.
37619func (c *PlacementGroupsInsertCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
37620	gensupport.SetOptions(c.urlParams_, opts...)
37621	res, err := c.doRequest("json")
37622	if res != nil && res.StatusCode == http.StatusNotModified {
37623		if res.Body != nil {
37624			res.Body.Close()
37625		}
37626		return nil, &googleapi.Error{
37627			Code:   res.StatusCode,
37628			Header: res.Header,
37629		}
37630	}
37631	if err != nil {
37632		return nil, err
37633	}
37634	defer googleapi.CloseBody(res)
37635	if err := googleapi.CheckResponse(res); err != nil {
37636		return nil, err
37637	}
37638	ret := &PlacementGroup{
37639		ServerResponse: googleapi.ServerResponse{
37640			Header:         res.Header,
37641			HTTPStatusCode: res.StatusCode,
37642		},
37643	}
37644	target := &ret
37645	if err := gensupport.DecodeResponse(target, res); err != nil {
37646		return nil, err
37647	}
37648	return ret, nil
37649	// {
37650	//   "description": "Inserts a new placement group.",
37651	//   "httpMethod": "POST",
37652	//   "id": "dfareporting.placementGroups.insert",
37653	//   "parameterOrder": [
37654	//     "profileId"
37655	//   ],
37656	//   "parameters": {
37657	//     "profileId": {
37658	//       "description": "User profile ID associated with this request.",
37659	//       "format": "int64",
37660	//       "location": "path",
37661	//       "required": true,
37662	//       "type": "string"
37663	//     }
37664	//   },
37665	//   "path": "userprofiles/{profileId}/placementGroups",
37666	//   "request": {
37667	//     "$ref": "PlacementGroup"
37668	//   },
37669	//   "response": {
37670	//     "$ref": "PlacementGroup"
37671	//   },
37672	//   "scopes": [
37673	//     "https://www.googleapis.com/auth/dfatrafficking"
37674	//   ]
37675	// }
37676
37677}
37678
37679// method id "dfareporting.placementGroups.list":
37680
37681type PlacementGroupsListCall struct {
37682	s            *Service
37683	profileId    int64
37684	urlParams_   gensupport.URLParams
37685	ifNoneMatch_ string
37686	ctx_         context.Context
37687	header_      http.Header
37688}
37689
37690// List: Retrieves a list of placement groups, possibly filtered. This
37691// method supports paging.
37692func (r *PlacementGroupsService) List(profileId int64) *PlacementGroupsListCall {
37693	c := &PlacementGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37694	c.profileId = profileId
37695	return c
37696}
37697
37698// AdvertiserIds sets the optional parameter "advertiserIds": Select
37699// only placement groups that belong to these advertisers.
37700func (c *PlacementGroupsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementGroupsListCall {
37701	var advertiserIds_ []string
37702	for _, v := range advertiserIds {
37703		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
37704	}
37705	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
37706	return c
37707}
37708
37709// Archived sets the optional parameter "archived": Select only archived
37710// placements. Don't set this field to select both archived and
37711// non-archived placements.
37712func (c *PlacementGroupsListCall) Archived(archived bool) *PlacementGroupsListCall {
37713	c.urlParams_.Set("archived", fmt.Sprint(archived))
37714	return c
37715}
37716
37717// CampaignIds sets the optional parameter "campaignIds": Select only
37718// placement groups that belong to these campaigns.
37719func (c *PlacementGroupsListCall) CampaignIds(campaignIds ...int64) *PlacementGroupsListCall {
37720	var campaignIds_ []string
37721	for _, v := range campaignIds {
37722		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
37723	}
37724	c.urlParams_.SetMulti("campaignIds", campaignIds_)
37725	return c
37726}
37727
37728// ContentCategoryIds sets the optional parameter "contentCategoryIds":
37729// Select only placement groups that are associated with these content
37730// categories.
37731func (c *PlacementGroupsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementGroupsListCall {
37732	var contentCategoryIds_ []string
37733	for _, v := range contentCategoryIds {
37734		contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
37735	}
37736	c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
37737	return c
37738}
37739
37740// DirectorySiteIds sets the optional parameter "directorySiteIds":
37741// Select only placement groups that are associated with these directory
37742// sites.
37743func (c *PlacementGroupsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementGroupsListCall {
37744	var directorySiteIds_ []string
37745	for _, v := range directorySiteIds {
37746		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
37747	}
37748	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
37749	return c
37750}
37751
37752// Ids sets the optional parameter "ids": Select only placement groups
37753// with these IDs.
37754func (c *PlacementGroupsListCall) Ids(ids ...int64) *PlacementGroupsListCall {
37755	var ids_ []string
37756	for _, v := range ids {
37757		ids_ = append(ids_, fmt.Sprint(v))
37758	}
37759	c.urlParams_.SetMulti("ids", ids_)
37760	return c
37761}
37762
37763// MaxEndDate sets the optional parameter "maxEndDate": Select only
37764// placements or placement groups whose end date is on or before the
37765// specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
37766func (c *PlacementGroupsListCall) MaxEndDate(maxEndDate string) *PlacementGroupsListCall {
37767	c.urlParams_.Set("maxEndDate", maxEndDate)
37768	return c
37769}
37770
37771// MaxResults sets the optional parameter "maxResults": Maximum number
37772// of results to return.
37773func (c *PlacementGroupsListCall) MaxResults(maxResults int64) *PlacementGroupsListCall {
37774	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37775	return c
37776}
37777
37778// MaxStartDate sets the optional parameter "maxStartDate": Select only
37779// placements or placement groups whose start date is on or before the
37780// specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
37781func (c *PlacementGroupsListCall) MaxStartDate(maxStartDate string) *PlacementGroupsListCall {
37782	c.urlParams_.Set("maxStartDate", maxStartDate)
37783	return c
37784}
37785
37786// MinEndDate sets the optional parameter "minEndDate": Select only
37787// placements or placement groups whose end date is on or after the
37788// specified minEndDate. The date should be formatted as "yyyy-MM-dd".
37789func (c *PlacementGroupsListCall) MinEndDate(minEndDate string) *PlacementGroupsListCall {
37790	c.urlParams_.Set("minEndDate", minEndDate)
37791	return c
37792}
37793
37794// MinStartDate sets the optional parameter "minStartDate": Select only
37795// placements or placement groups whose start date is on or after the
37796// specified minStartDate. The date should be formatted as "yyyy-MM-dd".
37797func (c *PlacementGroupsListCall) MinStartDate(minStartDate string) *PlacementGroupsListCall {
37798	c.urlParams_.Set("minStartDate", minStartDate)
37799	return c
37800}
37801
37802// PageToken sets the optional parameter "pageToken": Value of the
37803// nextPageToken from the previous result page.
37804func (c *PlacementGroupsListCall) PageToken(pageToken string) *PlacementGroupsListCall {
37805	c.urlParams_.Set("pageToken", pageToken)
37806	return c
37807}
37808
37809// PlacementGroupType sets the optional parameter "placementGroupType":
37810// Select only placement groups belonging with this group type. A
37811// package is a simple group of placements that acts as a single pricing
37812// point for a group of tags. A roadblock is a group of placements that
37813// not only acts as a single pricing point but also assumes that all the
37814// tags in it will be served at the same time. A roadblock requires one
37815// of its assigned placements to be marked as primary for reporting.
37816//
37817// Possible values:
37818//   "PLACEMENT_PACKAGE"
37819//   "PLACEMENT_ROADBLOCK"
37820func (c *PlacementGroupsListCall) PlacementGroupType(placementGroupType string) *PlacementGroupsListCall {
37821	c.urlParams_.Set("placementGroupType", placementGroupType)
37822	return c
37823}
37824
37825// PlacementStrategyIds sets the optional parameter
37826// "placementStrategyIds": Select only placement groups that are
37827// associated with these placement strategies.
37828func (c *PlacementGroupsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementGroupsListCall {
37829	var placementStrategyIds_ []string
37830	for _, v := range placementStrategyIds {
37831		placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
37832	}
37833	c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
37834	return c
37835}
37836
37837// PricingTypes sets the optional parameter "pricingTypes": Select only
37838// placement groups with these pricing types.
37839//
37840// Possible values:
37841//   "PRICING_TYPE_CPA"
37842//   "PRICING_TYPE_CPC"
37843//   "PRICING_TYPE_CPM"
37844//   "PRICING_TYPE_CPM_ACTIVEVIEW"
37845//   "PRICING_TYPE_FLAT_RATE_CLICKS"
37846//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
37847func (c *PlacementGroupsListCall) PricingTypes(pricingTypes ...string) *PlacementGroupsListCall {
37848	c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
37849	return c
37850}
37851
37852// SearchString sets the optional parameter "searchString": Allows
37853// searching for placement groups by name or ID. Wildcards (*) are
37854// allowed. For example, "placement*2015" will return placement groups
37855// with names like "placement group June 2015", "placement group May
37856// 2015", or simply "placements 2015". Most of the searches also add
37857// wildcards implicitly at the start and the end of the search string.
37858// For example, a search string of "placementgroup" will match placement
37859// groups with name "my placementgroup", "placementgroup 2015", or
37860// simply "placementgroup".
37861func (c *PlacementGroupsListCall) SearchString(searchString string) *PlacementGroupsListCall {
37862	c.urlParams_.Set("searchString", searchString)
37863	return c
37864}
37865
37866// SiteIds sets the optional parameter "siteIds": Select only placement
37867// groups that are associated with these sites.
37868func (c *PlacementGroupsListCall) SiteIds(siteIds ...int64) *PlacementGroupsListCall {
37869	var siteIds_ []string
37870	for _, v := range siteIds {
37871		siteIds_ = append(siteIds_, fmt.Sprint(v))
37872	}
37873	c.urlParams_.SetMulti("siteIds", siteIds_)
37874	return c
37875}
37876
37877// SortField sets the optional parameter "sortField": Field by which to
37878// sort the list.
37879//
37880// Possible values:
37881//   "ID" (default)
37882//   "NAME"
37883func (c *PlacementGroupsListCall) SortField(sortField string) *PlacementGroupsListCall {
37884	c.urlParams_.Set("sortField", sortField)
37885	return c
37886}
37887
37888// SortOrder sets the optional parameter "sortOrder": Order of sorted
37889// results.
37890//
37891// Possible values:
37892//   "ASCENDING" (default)
37893//   "DESCENDING"
37894func (c *PlacementGroupsListCall) SortOrder(sortOrder string) *PlacementGroupsListCall {
37895	c.urlParams_.Set("sortOrder", sortOrder)
37896	return c
37897}
37898
37899// Fields allows partial responses to be retrieved. See
37900// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37901// for more information.
37902func (c *PlacementGroupsListCall) Fields(s ...googleapi.Field) *PlacementGroupsListCall {
37903	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37904	return c
37905}
37906
37907// IfNoneMatch sets the optional parameter which makes the operation
37908// fail if the object's ETag matches the given value. This is useful for
37909// getting updates only after the object has changed since the last
37910// request. Use googleapi.IsNotModified to check whether the response
37911// error from Do is the result of In-None-Match.
37912func (c *PlacementGroupsListCall) IfNoneMatch(entityTag string) *PlacementGroupsListCall {
37913	c.ifNoneMatch_ = entityTag
37914	return c
37915}
37916
37917// Context sets the context to be used in this call's Do method. Any
37918// pending HTTP request will be aborted if the provided context is
37919// canceled.
37920func (c *PlacementGroupsListCall) Context(ctx context.Context) *PlacementGroupsListCall {
37921	c.ctx_ = ctx
37922	return c
37923}
37924
37925// Header returns an http.Header that can be modified by the caller to
37926// add HTTP headers to the request.
37927func (c *PlacementGroupsListCall) Header() http.Header {
37928	if c.header_ == nil {
37929		c.header_ = make(http.Header)
37930	}
37931	return c.header_
37932}
37933
37934func (c *PlacementGroupsListCall) doRequest(alt string) (*http.Response, error) {
37935	reqHeaders := make(http.Header)
37936	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
37937	for k, v := range c.header_ {
37938		reqHeaders[k] = v
37939	}
37940	reqHeaders.Set("User-Agent", c.s.userAgent())
37941	if c.ifNoneMatch_ != "" {
37942		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37943	}
37944	var body io.Reader = nil
37945	c.urlParams_.Set("alt", alt)
37946	c.urlParams_.Set("prettyPrint", "false")
37947	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
37948	urls += "?" + c.urlParams_.Encode()
37949	req, err := http.NewRequest("GET", urls, body)
37950	if err != nil {
37951		return nil, err
37952	}
37953	req.Header = reqHeaders
37954	googleapi.Expand(req.URL, map[string]string{
37955		"profileId": strconv.FormatInt(c.profileId, 10),
37956	})
37957	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37958}
37959
37960// Do executes the "dfareporting.placementGroups.list" call.
37961// Exactly one of *PlacementGroupsListResponse or error will be non-nil.
37962// Any non-2xx status code is an error. Response headers are in either
37963// *PlacementGroupsListResponse.ServerResponse.Header or (if a response
37964// was returned at all) in error.(*googleapi.Error).Header. Use
37965// googleapi.IsNotModified to check whether the returned error was
37966// because http.StatusNotModified was returned.
37967func (c *PlacementGroupsListCall) Do(opts ...googleapi.CallOption) (*PlacementGroupsListResponse, error) {
37968	gensupport.SetOptions(c.urlParams_, opts...)
37969	res, err := c.doRequest("json")
37970	if res != nil && res.StatusCode == http.StatusNotModified {
37971		if res.Body != nil {
37972			res.Body.Close()
37973		}
37974		return nil, &googleapi.Error{
37975			Code:   res.StatusCode,
37976			Header: res.Header,
37977		}
37978	}
37979	if err != nil {
37980		return nil, err
37981	}
37982	defer googleapi.CloseBody(res)
37983	if err := googleapi.CheckResponse(res); err != nil {
37984		return nil, err
37985	}
37986	ret := &PlacementGroupsListResponse{
37987		ServerResponse: googleapi.ServerResponse{
37988			Header:         res.Header,
37989			HTTPStatusCode: res.StatusCode,
37990		},
37991	}
37992	target := &ret
37993	if err := gensupport.DecodeResponse(target, res); err != nil {
37994		return nil, err
37995	}
37996	return ret, nil
37997	// {
37998	//   "description": "Retrieves a list of placement groups, possibly filtered. This method supports paging.",
37999	//   "httpMethod": "GET",
38000	//   "id": "dfareporting.placementGroups.list",
38001	//   "parameterOrder": [
38002	//     "profileId"
38003	//   ],
38004	//   "parameters": {
38005	//     "advertiserIds": {
38006	//       "description": "Select only placement groups that belong to these advertisers.",
38007	//       "format": "int64",
38008	//       "location": "query",
38009	//       "repeated": true,
38010	//       "type": "string"
38011	//     },
38012	//     "archived": {
38013	//       "description": "Select only archived placements. Don't set this field to select both archived and non-archived placements.",
38014	//       "location": "query",
38015	//       "type": "boolean"
38016	//     },
38017	//     "campaignIds": {
38018	//       "description": "Select only placement groups that belong to these campaigns.",
38019	//       "format": "int64",
38020	//       "location": "query",
38021	//       "repeated": true,
38022	//       "type": "string"
38023	//     },
38024	//     "contentCategoryIds": {
38025	//       "description": "Select only placement groups that are associated with these content categories.",
38026	//       "format": "int64",
38027	//       "location": "query",
38028	//       "repeated": true,
38029	//       "type": "string"
38030	//     },
38031	//     "directorySiteIds": {
38032	//       "description": "Select only placement groups that are associated with these directory sites.",
38033	//       "format": "int64",
38034	//       "location": "query",
38035	//       "repeated": true,
38036	//       "type": "string"
38037	//     },
38038	//     "ids": {
38039	//       "description": "Select only placement groups with these IDs.",
38040	//       "format": "int64",
38041	//       "location": "query",
38042	//       "repeated": true,
38043	//       "type": "string"
38044	//     },
38045	//     "maxEndDate": {
38046	//       "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\".",
38047	//       "location": "query",
38048	//       "type": "string"
38049	//     },
38050	//     "maxResults": {
38051	//       "default": "800",
38052	//       "description": "Maximum number of results to return.",
38053	//       "format": "int32",
38054	//       "location": "query",
38055	//       "maximum": "800",
38056	//       "minimum": "0",
38057	//       "type": "integer"
38058	//     },
38059	//     "maxStartDate": {
38060	//       "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\".",
38061	//       "location": "query",
38062	//       "type": "string"
38063	//     },
38064	//     "minEndDate": {
38065	//       "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\".",
38066	//       "location": "query",
38067	//       "type": "string"
38068	//     },
38069	//     "minStartDate": {
38070	//       "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\".",
38071	//       "location": "query",
38072	//       "type": "string"
38073	//     },
38074	//     "pageToken": {
38075	//       "description": "Value of the nextPageToken from the previous result page.",
38076	//       "location": "query",
38077	//       "type": "string"
38078	//     },
38079	//     "placementGroupType": {
38080	//       "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.",
38081	//       "enum": [
38082	//         "PLACEMENT_PACKAGE",
38083	//         "PLACEMENT_ROADBLOCK"
38084	//       ],
38085	//       "enumDescriptions": [
38086	//         "",
38087	//         ""
38088	//       ],
38089	//       "location": "query",
38090	//       "type": "string"
38091	//     },
38092	//     "placementStrategyIds": {
38093	//       "description": "Select only placement groups that are associated with these placement strategies.",
38094	//       "format": "int64",
38095	//       "location": "query",
38096	//       "repeated": true,
38097	//       "type": "string"
38098	//     },
38099	//     "pricingTypes": {
38100	//       "description": "Select only placement groups with these pricing types.",
38101	//       "enum": [
38102	//         "PRICING_TYPE_CPA",
38103	//         "PRICING_TYPE_CPC",
38104	//         "PRICING_TYPE_CPM",
38105	//         "PRICING_TYPE_CPM_ACTIVEVIEW",
38106	//         "PRICING_TYPE_FLAT_RATE_CLICKS",
38107	//         "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
38108	//       ],
38109	//       "enumDescriptions": [
38110	//         "",
38111	//         "",
38112	//         "",
38113	//         "",
38114	//         "",
38115	//         ""
38116	//       ],
38117	//       "location": "query",
38118	//       "repeated": true,
38119	//       "type": "string"
38120	//     },
38121	//     "profileId": {
38122	//       "description": "User profile ID associated with this request.",
38123	//       "format": "int64",
38124	//       "location": "path",
38125	//       "required": true,
38126	//       "type": "string"
38127	//     },
38128	//     "searchString": {
38129	//       "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\".",
38130	//       "location": "query",
38131	//       "type": "string"
38132	//     },
38133	//     "siteIds": {
38134	//       "description": "Select only placement groups that are associated with these sites.",
38135	//       "format": "int64",
38136	//       "location": "query",
38137	//       "repeated": true,
38138	//       "type": "string"
38139	//     },
38140	//     "sortField": {
38141	//       "default": "ID",
38142	//       "description": "Field by which to sort the list.",
38143	//       "enum": [
38144	//         "ID",
38145	//         "NAME"
38146	//       ],
38147	//       "enumDescriptions": [
38148	//         "",
38149	//         ""
38150	//       ],
38151	//       "location": "query",
38152	//       "type": "string"
38153	//     },
38154	//     "sortOrder": {
38155	//       "default": "ASCENDING",
38156	//       "description": "Order of sorted results.",
38157	//       "enum": [
38158	//         "ASCENDING",
38159	//         "DESCENDING"
38160	//       ],
38161	//       "enumDescriptions": [
38162	//         "",
38163	//         ""
38164	//       ],
38165	//       "location": "query",
38166	//       "type": "string"
38167	//     }
38168	//   },
38169	//   "path": "userprofiles/{profileId}/placementGroups",
38170	//   "response": {
38171	//     "$ref": "PlacementGroupsListResponse"
38172	//   },
38173	//   "scopes": [
38174	//     "https://www.googleapis.com/auth/dfatrafficking"
38175	//   ]
38176	// }
38177
38178}
38179
38180// Pages invokes f for each page of results.
38181// A non-nil error returned from f will halt the iteration.
38182// The provided context supersedes any context provided to the Context method.
38183func (c *PlacementGroupsListCall) Pages(ctx context.Context, f func(*PlacementGroupsListResponse) error) error {
38184	c.ctx_ = ctx
38185	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
38186	for {
38187		x, err := c.Do()
38188		if err != nil {
38189			return err
38190		}
38191		if err := f(x); err != nil {
38192			return err
38193		}
38194		if x.NextPageToken == "" {
38195			return nil
38196		}
38197		c.PageToken(x.NextPageToken)
38198	}
38199}
38200
38201// method id "dfareporting.placementGroups.patch":
38202
38203type PlacementGroupsPatchCall struct {
38204	s              *Service
38205	profileId      int64
38206	placementgroup *PlacementGroup
38207	urlParams_     gensupport.URLParams
38208	ctx_           context.Context
38209	header_        http.Header
38210}
38211
38212// Patch: Updates an existing placement group. This method supports
38213// patch semantics.
38214func (r *PlacementGroupsService) Patch(profileId int64, id int64, placementgroup *PlacementGroup) *PlacementGroupsPatchCall {
38215	c := &PlacementGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38216	c.profileId = profileId
38217	c.urlParams_.Set("id", fmt.Sprint(id))
38218	c.placementgroup = placementgroup
38219	return c
38220}
38221
38222// Fields allows partial responses to be retrieved. See
38223// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38224// for more information.
38225func (c *PlacementGroupsPatchCall) Fields(s ...googleapi.Field) *PlacementGroupsPatchCall {
38226	c.urlParams_.Set("fields", googleapi.CombineFields(s))
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 *PlacementGroupsPatchCall) Context(ctx context.Context) *PlacementGroupsPatchCall {
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 *PlacementGroupsPatchCall) Header() http.Header {
38241	if c.header_ == nil {
38242		c.header_ = make(http.Header)
38243	}
38244	return c.header_
38245}
38246
38247func (c *PlacementGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
38248	reqHeaders := make(http.Header)
38249	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
38250	for k, v := range c.header_ {
38251		reqHeaders[k] = v
38252	}
38253	reqHeaders.Set("User-Agent", c.s.userAgent())
38254	var body io.Reader = nil
38255	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
38256	if err != nil {
38257		return nil, err
38258	}
38259	reqHeaders.Set("Content-Type", "application/json")
38260	c.urlParams_.Set("alt", alt)
38261	c.urlParams_.Set("prettyPrint", "false")
38262	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38263	urls += "?" + c.urlParams_.Encode()
38264	req, err := http.NewRequest("PATCH", urls, body)
38265	if err != nil {
38266		return nil, err
38267	}
38268	req.Header = reqHeaders
38269	googleapi.Expand(req.URL, map[string]string{
38270		"profileId": strconv.FormatInt(c.profileId, 10),
38271	})
38272	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38273}
38274
38275// Do executes the "dfareporting.placementGroups.patch" call.
38276// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
38277// status code is an error. Response headers are in either
38278// *PlacementGroup.ServerResponse.Header or (if a response was returned
38279// at all) in error.(*googleapi.Error).Header. Use
38280// googleapi.IsNotModified to check whether the returned error was
38281// because http.StatusNotModified was returned.
38282func (c *PlacementGroupsPatchCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
38283	gensupport.SetOptions(c.urlParams_, opts...)
38284	res, err := c.doRequest("json")
38285	if res != nil && res.StatusCode == http.StatusNotModified {
38286		if res.Body != nil {
38287			res.Body.Close()
38288		}
38289		return nil, &googleapi.Error{
38290			Code:   res.StatusCode,
38291			Header: res.Header,
38292		}
38293	}
38294	if err != nil {
38295		return nil, err
38296	}
38297	defer googleapi.CloseBody(res)
38298	if err := googleapi.CheckResponse(res); err != nil {
38299		return nil, err
38300	}
38301	ret := &PlacementGroup{
38302		ServerResponse: googleapi.ServerResponse{
38303			Header:         res.Header,
38304			HTTPStatusCode: res.StatusCode,
38305		},
38306	}
38307	target := &ret
38308	if err := gensupport.DecodeResponse(target, res); err != nil {
38309		return nil, err
38310	}
38311	return ret, nil
38312	// {
38313	//   "description": "Updates an existing placement group. This method supports patch semantics.",
38314	//   "httpMethod": "PATCH",
38315	//   "id": "dfareporting.placementGroups.patch",
38316	//   "parameterOrder": [
38317	//     "profileId",
38318	//     "id"
38319	//   ],
38320	//   "parameters": {
38321	//     "id": {
38322	//       "description": "Placement group ID.",
38323	//       "format": "int64",
38324	//       "location": "query",
38325	//       "required": true,
38326	//       "type": "string"
38327	//     },
38328	//     "profileId": {
38329	//       "description": "User profile ID associated with this request.",
38330	//       "format": "int64",
38331	//       "location": "path",
38332	//       "required": true,
38333	//       "type": "string"
38334	//     }
38335	//   },
38336	//   "path": "userprofiles/{profileId}/placementGroups",
38337	//   "request": {
38338	//     "$ref": "PlacementGroup"
38339	//   },
38340	//   "response": {
38341	//     "$ref": "PlacementGroup"
38342	//   },
38343	//   "scopes": [
38344	//     "https://www.googleapis.com/auth/dfatrafficking"
38345	//   ]
38346	// }
38347
38348}
38349
38350// method id "dfareporting.placementGroups.update":
38351
38352type PlacementGroupsUpdateCall struct {
38353	s              *Service
38354	profileId      int64
38355	placementgroup *PlacementGroup
38356	urlParams_     gensupport.URLParams
38357	ctx_           context.Context
38358	header_        http.Header
38359}
38360
38361// Update: Updates an existing placement group.
38362func (r *PlacementGroupsService) Update(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsUpdateCall {
38363	c := &PlacementGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38364	c.profileId = profileId
38365	c.placementgroup = placementgroup
38366	return c
38367}
38368
38369// Fields allows partial responses to be retrieved. See
38370// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38371// for more information.
38372func (c *PlacementGroupsUpdateCall) Fields(s ...googleapi.Field) *PlacementGroupsUpdateCall {
38373	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38374	return c
38375}
38376
38377// Context sets the context to be used in this call's Do method. Any
38378// pending HTTP request will be aborted if the provided context is
38379// canceled.
38380func (c *PlacementGroupsUpdateCall) Context(ctx context.Context) *PlacementGroupsUpdateCall {
38381	c.ctx_ = ctx
38382	return c
38383}
38384
38385// Header returns an http.Header that can be modified by the caller to
38386// add HTTP headers to the request.
38387func (c *PlacementGroupsUpdateCall) Header() http.Header {
38388	if c.header_ == nil {
38389		c.header_ = make(http.Header)
38390	}
38391	return c.header_
38392}
38393
38394func (c *PlacementGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
38395	reqHeaders := make(http.Header)
38396	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
38397	for k, v := range c.header_ {
38398		reqHeaders[k] = v
38399	}
38400	reqHeaders.Set("User-Agent", c.s.userAgent())
38401	var body io.Reader = nil
38402	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
38403	if err != nil {
38404		return nil, err
38405	}
38406	reqHeaders.Set("Content-Type", "application/json")
38407	c.urlParams_.Set("alt", alt)
38408	c.urlParams_.Set("prettyPrint", "false")
38409	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38410	urls += "?" + c.urlParams_.Encode()
38411	req, err := http.NewRequest("PUT", urls, body)
38412	if err != nil {
38413		return nil, err
38414	}
38415	req.Header = reqHeaders
38416	googleapi.Expand(req.URL, map[string]string{
38417		"profileId": strconv.FormatInt(c.profileId, 10),
38418	})
38419	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38420}
38421
38422// Do executes the "dfareporting.placementGroups.update" call.
38423// Exactly one of *PlacementGroup or error will be non-nil. Any non-2xx
38424// status code is an error. Response headers are in either
38425// *PlacementGroup.ServerResponse.Header or (if a response was returned
38426// at all) in error.(*googleapi.Error).Header. Use
38427// googleapi.IsNotModified to check whether the returned error was
38428// because http.StatusNotModified was returned.
38429func (c *PlacementGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
38430	gensupport.SetOptions(c.urlParams_, opts...)
38431	res, err := c.doRequest("json")
38432	if res != nil && res.StatusCode == http.StatusNotModified {
38433		if res.Body != nil {
38434			res.Body.Close()
38435		}
38436		return nil, &googleapi.Error{
38437			Code:   res.StatusCode,
38438			Header: res.Header,
38439		}
38440	}
38441	if err != nil {
38442		return nil, err
38443	}
38444	defer googleapi.CloseBody(res)
38445	if err := googleapi.CheckResponse(res); err != nil {
38446		return nil, err
38447	}
38448	ret := &PlacementGroup{
38449		ServerResponse: googleapi.ServerResponse{
38450			Header:         res.Header,
38451			HTTPStatusCode: res.StatusCode,
38452		},
38453	}
38454	target := &ret
38455	if err := gensupport.DecodeResponse(target, res); err != nil {
38456		return nil, err
38457	}
38458	return ret, nil
38459	// {
38460	//   "description": "Updates an existing placement group.",
38461	//   "httpMethod": "PUT",
38462	//   "id": "dfareporting.placementGroups.update",
38463	//   "parameterOrder": [
38464	//     "profileId"
38465	//   ],
38466	//   "parameters": {
38467	//     "profileId": {
38468	//       "description": "User profile ID associated with this request.",
38469	//       "format": "int64",
38470	//       "location": "path",
38471	//       "required": true,
38472	//       "type": "string"
38473	//     }
38474	//   },
38475	//   "path": "userprofiles/{profileId}/placementGroups",
38476	//   "request": {
38477	//     "$ref": "PlacementGroup"
38478	//   },
38479	//   "response": {
38480	//     "$ref": "PlacementGroup"
38481	//   },
38482	//   "scopes": [
38483	//     "https://www.googleapis.com/auth/dfatrafficking"
38484	//   ]
38485	// }
38486
38487}
38488
38489// method id "dfareporting.placementStrategies.delete":
38490
38491type PlacementStrategiesDeleteCall struct {
38492	s          *Service
38493	profileId  int64
38494	id         int64
38495	urlParams_ gensupport.URLParams
38496	ctx_       context.Context
38497	header_    http.Header
38498}
38499
38500// Delete: Deletes an existing placement strategy.
38501func (r *PlacementStrategiesService) Delete(profileId int64, id int64) *PlacementStrategiesDeleteCall {
38502	c := &PlacementStrategiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38503	c.profileId = profileId
38504	c.id = id
38505	return c
38506}
38507
38508// Fields allows partial responses to be retrieved. See
38509// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38510// for more information.
38511func (c *PlacementStrategiesDeleteCall) Fields(s ...googleapi.Field) *PlacementStrategiesDeleteCall {
38512	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38513	return c
38514}
38515
38516// Context sets the context to be used in this call's Do method. Any
38517// pending HTTP request will be aborted if the provided context is
38518// canceled.
38519func (c *PlacementStrategiesDeleteCall) Context(ctx context.Context) *PlacementStrategiesDeleteCall {
38520	c.ctx_ = ctx
38521	return c
38522}
38523
38524// Header returns an http.Header that can be modified by the caller to
38525// add HTTP headers to the request.
38526func (c *PlacementStrategiesDeleteCall) Header() http.Header {
38527	if c.header_ == nil {
38528		c.header_ = make(http.Header)
38529	}
38530	return c.header_
38531}
38532
38533func (c *PlacementStrategiesDeleteCall) doRequest(alt string) (*http.Response, error) {
38534	reqHeaders := make(http.Header)
38535	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
38536	for k, v := range c.header_ {
38537		reqHeaders[k] = v
38538	}
38539	reqHeaders.Set("User-Agent", c.s.userAgent())
38540	var body io.Reader = nil
38541	c.urlParams_.Set("alt", alt)
38542	c.urlParams_.Set("prettyPrint", "false")
38543	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
38544	urls += "?" + c.urlParams_.Encode()
38545	req, err := http.NewRequest("DELETE", urls, body)
38546	if err != nil {
38547		return nil, err
38548	}
38549	req.Header = reqHeaders
38550	googleapi.Expand(req.URL, map[string]string{
38551		"profileId": strconv.FormatInt(c.profileId, 10),
38552		"id":        strconv.FormatInt(c.id, 10),
38553	})
38554	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38555}
38556
38557// Do executes the "dfareporting.placementStrategies.delete" call.
38558func (c *PlacementStrategiesDeleteCall) Do(opts ...googleapi.CallOption) error {
38559	gensupport.SetOptions(c.urlParams_, opts...)
38560	res, err := c.doRequest("json")
38561	if err != nil {
38562		return err
38563	}
38564	defer googleapi.CloseBody(res)
38565	if err := googleapi.CheckResponse(res); err != nil {
38566		return err
38567	}
38568	return nil
38569	// {
38570	//   "description": "Deletes an existing placement strategy.",
38571	//   "httpMethod": "DELETE",
38572	//   "id": "dfareporting.placementStrategies.delete",
38573	//   "parameterOrder": [
38574	//     "profileId",
38575	//     "id"
38576	//   ],
38577	//   "parameters": {
38578	//     "id": {
38579	//       "description": "Placement strategy ID.",
38580	//       "format": "int64",
38581	//       "location": "path",
38582	//       "required": true,
38583	//       "type": "string"
38584	//     },
38585	//     "profileId": {
38586	//       "description": "User profile ID associated with this request.",
38587	//       "format": "int64",
38588	//       "location": "path",
38589	//       "required": true,
38590	//       "type": "string"
38591	//     }
38592	//   },
38593	//   "path": "userprofiles/{profileId}/placementStrategies/{id}",
38594	//   "scopes": [
38595	//     "https://www.googleapis.com/auth/dfatrafficking"
38596	//   ]
38597	// }
38598
38599}
38600
38601// method id "dfareporting.placementStrategies.get":
38602
38603type PlacementStrategiesGetCall struct {
38604	s            *Service
38605	profileId    int64
38606	id           int64
38607	urlParams_   gensupport.URLParams
38608	ifNoneMatch_ string
38609	ctx_         context.Context
38610	header_      http.Header
38611}
38612
38613// Get: Gets one placement strategy by ID.
38614func (r *PlacementStrategiesService) Get(profileId int64, id int64) *PlacementStrategiesGetCall {
38615	c := &PlacementStrategiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38616	c.profileId = profileId
38617	c.id = id
38618	return c
38619}
38620
38621// Fields allows partial responses to be retrieved. See
38622// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38623// for more information.
38624func (c *PlacementStrategiesGetCall) Fields(s ...googleapi.Field) *PlacementStrategiesGetCall {
38625	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38626	return c
38627}
38628
38629// IfNoneMatch sets the optional parameter which makes the operation
38630// fail if the object's ETag matches the given value. This is useful for
38631// getting updates only after the object has changed since the last
38632// request. Use googleapi.IsNotModified to check whether the response
38633// error from Do is the result of In-None-Match.
38634func (c *PlacementStrategiesGetCall) IfNoneMatch(entityTag string) *PlacementStrategiesGetCall {
38635	c.ifNoneMatch_ = entityTag
38636	return c
38637}
38638
38639// Context sets the context to be used in this call's Do method. Any
38640// pending HTTP request will be aborted if the provided context is
38641// canceled.
38642func (c *PlacementStrategiesGetCall) Context(ctx context.Context) *PlacementStrategiesGetCall {
38643	c.ctx_ = ctx
38644	return c
38645}
38646
38647// Header returns an http.Header that can be modified by the caller to
38648// add HTTP headers to the request.
38649func (c *PlacementStrategiesGetCall) Header() http.Header {
38650	if c.header_ == nil {
38651		c.header_ = make(http.Header)
38652	}
38653	return c.header_
38654}
38655
38656func (c *PlacementStrategiesGetCall) doRequest(alt string) (*http.Response, error) {
38657	reqHeaders := make(http.Header)
38658	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
38659	for k, v := range c.header_ {
38660		reqHeaders[k] = v
38661	}
38662	reqHeaders.Set("User-Agent", c.s.userAgent())
38663	if c.ifNoneMatch_ != "" {
38664		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38665	}
38666	var body io.Reader = nil
38667	c.urlParams_.Set("alt", alt)
38668	c.urlParams_.Set("prettyPrint", "false")
38669	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
38670	urls += "?" + c.urlParams_.Encode()
38671	req, err := http.NewRequest("GET", urls, body)
38672	if err != nil {
38673		return nil, err
38674	}
38675	req.Header = reqHeaders
38676	googleapi.Expand(req.URL, map[string]string{
38677		"profileId": strconv.FormatInt(c.profileId, 10),
38678		"id":        strconv.FormatInt(c.id, 10),
38679	})
38680	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38681}
38682
38683// Do executes the "dfareporting.placementStrategies.get" call.
38684// Exactly one of *PlacementStrategy or error will be non-nil. Any
38685// non-2xx status code is an error. Response headers are in either
38686// *PlacementStrategy.ServerResponse.Header or (if a response was
38687// returned at all) in error.(*googleapi.Error).Header. Use
38688// googleapi.IsNotModified to check whether the returned error was
38689// because http.StatusNotModified was returned.
38690func (c *PlacementStrategiesGetCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
38691	gensupport.SetOptions(c.urlParams_, opts...)
38692	res, err := c.doRequest("json")
38693	if res != nil && res.StatusCode == http.StatusNotModified {
38694		if res.Body != nil {
38695			res.Body.Close()
38696		}
38697		return nil, &googleapi.Error{
38698			Code:   res.StatusCode,
38699			Header: res.Header,
38700		}
38701	}
38702	if err != nil {
38703		return nil, err
38704	}
38705	defer googleapi.CloseBody(res)
38706	if err := googleapi.CheckResponse(res); err != nil {
38707		return nil, err
38708	}
38709	ret := &PlacementStrategy{
38710		ServerResponse: googleapi.ServerResponse{
38711			Header:         res.Header,
38712			HTTPStatusCode: res.StatusCode,
38713		},
38714	}
38715	target := &ret
38716	if err := gensupport.DecodeResponse(target, res); err != nil {
38717		return nil, err
38718	}
38719	return ret, nil
38720	// {
38721	//   "description": "Gets one placement strategy by ID.",
38722	//   "httpMethod": "GET",
38723	//   "id": "dfareporting.placementStrategies.get",
38724	//   "parameterOrder": [
38725	//     "profileId",
38726	//     "id"
38727	//   ],
38728	//   "parameters": {
38729	//     "id": {
38730	//       "description": "Placement strategy ID.",
38731	//       "format": "int64",
38732	//       "location": "path",
38733	//       "required": true,
38734	//       "type": "string"
38735	//     },
38736	//     "profileId": {
38737	//       "description": "User profile ID associated with this request.",
38738	//       "format": "int64",
38739	//       "location": "path",
38740	//       "required": true,
38741	//       "type": "string"
38742	//     }
38743	//   },
38744	//   "path": "userprofiles/{profileId}/placementStrategies/{id}",
38745	//   "response": {
38746	//     "$ref": "PlacementStrategy"
38747	//   },
38748	//   "scopes": [
38749	//     "https://www.googleapis.com/auth/dfatrafficking"
38750	//   ]
38751	// }
38752
38753}
38754
38755// method id "dfareporting.placementStrategies.insert":
38756
38757type PlacementStrategiesInsertCall struct {
38758	s                 *Service
38759	profileId         int64
38760	placementstrategy *PlacementStrategy
38761	urlParams_        gensupport.URLParams
38762	ctx_              context.Context
38763	header_           http.Header
38764}
38765
38766// Insert: Inserts a new placement strategy.
38767func (r *PlacementStrategiesService) Insert(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesInsertCall {
38768	c := &PlacementStrategiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38769	c.profileId = profileId
38770	c.placementstrategy = placementstrategy
38771	return c
38772}
38773
38774// Fields allows partial responses to be retrieved. See
38775// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38776// for more information.
38777func (c *PlacementStrategiesInsertCall) Fields(s ...googleapi.Field) *PlacementStrategiesInsertCall {
38778	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38779	return c
38780}
38781
38782// Context sets the context to be used in this call's Do method. Any
38783// pending HTTP request will be aborted if the provided context is
38784// canceled.
38785func (c *PlacementStrategiesInsertCall) Context(ctx context.Context) *PlacementStrategiesInsertCall {
38786	c.ctx_ = ctx
38787	return c
38788}
38789
38790// Header returns an http.Header that can be modified by the caller to
38791// add HTTP headers to the request.
38792func (c *PlacementStrategiesInsertCall) Header() http.Header {
38793	if c.header_ == nil {
38794		c.header_ = make(http.Header)
38795	}
38796	return c.header_
38797}
38798
38799func (c *PlacementStrategiesInsertCall) doRequest(alt string) (*http.Response, error) {
38800	reqHeaders := make(http.Header)
38801	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
38802	for k, v := range c.header_ {
38803		reqHeaders[k] = v
38804	}
38805	reqHeaders.Set("User-Agent", c.s.userAgent())
38806	var body io.Reader = nil
38807	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
38808	if err != nil {
38809		return nil, err
38810	}
38811	reqHeaders.Set("Content-Type", "application/json")
38812	c.urlParams_.Set("alt", alt)
38813	c.urlParams_.Set("prettyPrint", "false")
38814	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
38815	urls += "?" + c.urlParams_.Encode()
38816	req, err := http.NewRequest("POST", urls, body)
38817	if err != nil {
38818		return nil, err
38819	}
38820	req.Header = reqHeaders
38821	googleapi.Expand(req.URL, map[string]string{
38822		"profileId": strconv.FormatInt(c.profileId, 10),
38823	})
38824	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38825}
38826
38827// Do executes the "dfareporting.placementStrategies.insert" call.
38828// Exactly one of *PlacementStrategy or error will be non-nil. Any
38829// non-2xx status code is an error. Response headers are in either
38830// *PlacementStrategy.ServerResponse.Header or (if a response was
38831// returned at all) in error.(*googleapi.Error).Header. Use
38832// googleapi.IsNotModified to check whether the returned error was
38833// because http.StatusNotModified was returned.
38834func (c *PlacementStrategiesInsertCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
38835	gensupport.SetOptions(c.urlParams_, opts...)
38836	res, err := c.doRequest("json")
38837	if res != nil && res.StatusCode == http.StatusNotModified {
38838		if res.Body != nil {
38839			res.Body.Close()
38840		}
38841		return nil, &googleapi.Error{
38842			Code:   res.StatusCode,
38843			Header: res.Header,
38844		}
38845	}
38846	if err != nil {
38847		return nil, err
38848	}
38849	defer googleapi.CloseBody(res)
38850	if err := googleapi.CheckResponse(res); err != nil {
38851		return nil, err
38852	}
38853	ret := &PlacementStrategy{
38854		ServerResponse: googleapi.ServerResponse{
38855			Header:         res.Header,
38856			HTTPStatusCode: res.StatusCode,
38857		},
38858	}
38859	target := &ret
38860	if err := gensupport.DecodeResponse(target, res); err != nil {
38861		return nil, err
38862	}
38863	return ret, nil
38864	// {
38865	//   "description": "Inserts a new placement strategy.",
38866	//   "httpMethod": "POST",
38867	//   "id": "dfareporting.placementStrategies.insert",
38868	//   "parameterOrder": [
38869	//     "profileId"
38870	//   ],
38871	//   "parameters": {
38872	//     "profileId": {
38873	//       "description": "User profile ID associated with this request.",
38874	//       "format": "int64",
38875	//       "location": "path",
38876	//       "required": true,
38877	//       "type": "string"
38878	//     }
38879	//   },
38880	//   "path": "userprofiles/{profileId}/placementStrategies",
38881	//   "request": {
38882	//     "$ref": "PlacementStrategy"
38883	//   },
38884	//   "response": {
38885	//     "$ref": "PlacementStrategy"
38886	//   },
38887	//   "scopes": [
38888	//     "https://www.googleapis.com/auth/dfatrafficking"
38889	//   ]
38890	// }
38891
38892}
38893
38894// method id "dfareporting.placementStrategies.list":
38895
38896type PlacementStrategiesListCall struct {
38897	s            *Service
38898	profileId    int64
38899	urlParams_   gensupport.URLParams
38900	ifNoneMatch_ string
38901	ctx_         context.Context
38902	header_      http.Header
38903}
38904
38905// List: Retrieves a list of placement strategies, possibly filtered.
38906// This method supports paging.
38907func (r *PlacementStrategiesService) List(profileId int64) *PlacementStrategiesListCall {
38908	c := &PlacementStrategiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38909	c.profileId = profileId
38910	return c
38911}
38912
38913// Ids sets the optional parameter "ids": Select only placement
38914// strategies with these IDs.
38915func (c *PlacementStrategiesListCall) Ids(ids ...int64) *PlacementStrategiesListCall {
38916	var ids_ []string
38917	for _, v := range ids {
38918		ids_ = append(ids_, fmt.Sprint(v))
38919	}
38920	c.urlParams_.SetMulti("ids", ids_)
38921	return c
38922}
38923
38924// MaxResults sets the optional parameter "maxResults": Maximum number
38925// of results to return.
38926func (c *PlacementStrategiesListCall) MaxResults(maxResults int64) *PlacementStrategiesListCall {
38927	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
38928	return c
38929}
38930
38931// PageToken sets the optional parameter "pageToken": Value of the
38932// nextPageToken from the previous result page.
38933func (c *PlacementStrategiesListCall) PageToken(pageToken string) *PlacementStrategiesListCall {
38934	c.urlParams_.Set("pageToken", pageToken)
38935	return c
38936}
38937
38938// SearchString sets the optional parameter "searchString": Allows
38939// searching for objects by name or ID. Wildcards (*) are allowed. For
38940// example, "placementstrategy*2015" will return objects with names like
38941// "placementstrategy June 2015", "placementstrategy April 2015", or
38942// simply "placementstrategy 2015". Most of the searches also add
38943// wildcards implicitly at the start and the end of the search string.
38944// For example, a search string of "placementstrategy" will match
38945// objects with name "my placementstrategy", "placementstrategy 2015",
38946// or simply "placementstrategy".
38947func (c *PlacementStrategiesListCall) SearchString(searchString string) *PlacementStrategiesListCall {
38948	c.urlParams_.Set("searchString", searchString)
38949	return c
38950}
38951
38952// SortField sets the optional parameter "sortField": Field by which to
38953// sort the list.
38954//
38955// Possible values:
38956//   "ID" (default)
38957//   "NAME"
38958func (c *PlacementStrategiesListCall) SortField(sortField string) *PlacementStrategiesListCall {
38959	c.urlParams_.Set("sortField", sortField)
38960	return c
38961}
38962
38963// SortOrder sets the optional parameter "sortOrder": Order of sorted
38964// results.
38965//
38966// Possible values:
38967//   "ASCENDING" (default)
38968//   "DESCENDING"
38969func (c *PlacementStrategiesListCall) SortOrder(sortOrder string) *PlacementStrategiesListCall {
38970	c.urlParams_.Set("sortOrder", sortOrder)
38971	return c
38972}
38973
38974// Fields allows partial responses to be retrieved. See
38975// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38976// for more information.
38977func (c *PlacementStrategiesListCall) Fields(s ...googleapi.Field) *PlacementStrategiesListCall {
38978	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38979	return c
38980}
38981
38982// IfNoneMatch sets the optional parameter which makes the operation
38983// fail if the object's ETag matches the given value. This is useful for
38984// getting updates only after the object has changed since the last
38985// request. Use googleapi.IsNotModified to check whether the response
38986// error from Do is the result of In-None-Match.
38987func (c *PlacementStrategiesListCall) IfNoneMatch(entityTag string) *PlacementStrategiesListCall {
38988	c.ifNoneMatch_ = entityTag
38989	return c
38990}
38991
38992// Context sets the context to be used in this call's Do method. Any
38993// pending HTTP request will be aborted if the provided context is
38994// canceled.
38995func (c *PlacementStrategiesListCall) Context(ctx context.Context) *PlacementStrategiesListCall {
38996	c.ctx_ = ctx
38997	return c
38998}
38999
39000// Header returns an http.Header that can be modified by the caller to
39001// add HTTP headers to the request.
39002func (c *PlacementStrategiesListCall) Header() http.Header {
39003	if c.header_ == nil {
39004		c.header_ = make(http.Header)
39005	}
39006	return c.header_
39007}
39008
39009func (c *PlacementStrategiesListCall) doRequest(alt string) (*http.Response, error) {
39010	reqHeaders := make(http.Header)
39011	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
39012	for k, v := range c.header_ {
39013		reqHeaders[k] = v
39014	}
39015	reqHeaders.Set("User-Agent", c.s.userAgent())
39016	if c.ifNoneMatch_ != "" {
39017		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39018	}
39019	var body io.Reader = nil
39020	c.urlParams_.Set("alt", alt)
39021	c.urlParams_.Set("prettyPrint", "false")
39022	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39023	urls += "?" + c.urlParams_.Encode()
39024	req, err := http.NewRequest("GET", urls, body)
39025	if err != nil {
39026		return nil, err
39027	}
39028	req.Header = reqHeaders
39029	googleapi.Expand(req.URL, map[string]string{
39030		"profileId": strconv.FormatInt(c.profileId, 10),
39031	})
39032	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39033}
39034
39035// Do executes the "dfareporting.placementStrategies.list" call.
39036// Exactly one of *PlacementStrategiesListResponse or error will be
39037// non-nil. Any non-2xx status code is an error. Response headers are in
39038// either *PlacementStrategiesListResponse.ServerResponse.Header or (if
39039// a response was returned at all) in error.(*googleapi.Error).Header.
39040// Use googleapi.IsNotModified to check whether the returned error was
39041// because http.StatusNotModified was returned.
39042func (c *PlacementStrategiesListCall) Do(opts ...googleapi.CallOption) (*PlacementStrategiesListResponse, error) {
39043	gensupport.SetOptions(c.urlParams_, opts...)
39044	res, err := c.doRequest("json")
39045	if res != nil && res.StatusCode == http.StatusNotModified {
39046		if res.Body != nil {
39047			res.Body.Close()
39048		}
39049		return nil, &googleapi.Error{
39050			Code:   res.StatusCode,
39051			Header: res.Header,
39052		}
39053	}
39054	if err != nil {
39055		return nil, err
39056	}
39057	defer googleapi.CloseBody(res)
39058	if err := googleapi.CheckResponse(res); err != nil {
39059		return nil, err
39060	}
39061	ret := &PlacementStrategiesListResponse{
39062		ServerResponse: googleapi.ServerResponse{
39063			Header:         res.Header,
39064			HTTPStatusCode: res.StatusCode,
39065		},
39066	}
39067	target := &ret
39068	if err := gensupport.DecodeResponse(target, res); err != nil {
39069		return nil, err
39070	}
39071	return ret, nil
39072	// {
39073	//   "description": "Retrieves a list of placement strategies, possibly filtered. This method supports paging.",
39074	//   "httpMethod": "GET",
39075	//   "id": "dfareporting.placementStrategies.list",
39076	//   "parameterOrder": [
39077	//     "profileId"
39078	//   ],
39079	//   "parameters": {
39080	//     "ids": {
39081	//       "description": "Select only placement strategies with these IDs.",
39082	//       "format": "int64",
39083	//       "location": "query",
39084	//       "repeated": true,
39085	//       "type": "string"
39086	//     },
39087	//     "maxResults": {
39088	//       "default": "1000",
39089	//       "description": "Maximum number of results to return.",
39090	//       "format": "int32",
39091	//       "location": "query",
39092	//       "maximum": "1000",
39093	//       "minimum": "0",
39094	//       "type": "integer"
39095	//     },
39096	//     "pageToken": {
39097	//       "description": "Value of the nextPageToken from the previous result page.",
39098	//       "location": "query",
39099	//       "type": "string"
39100	//     },
39101	//     "profileId": {
39102	//       "description": "User profile ID associated with this request.",
39103	//       "format": "int64",
39104	//       "location": "path",
39105	//       "required": true,
39106	//       "type": "string"
39107	//     },
39108	//     "searchString": {
39109	//       "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\".",
39110	//       "location": "query",
39111	//       "type": "string"
39112	//     },
39113	//     "sortField": {
39114	//       "default": "ID",
39115	//       "description": "Field by which to sort the list.",
39116	//       "enum": [
39117	//         "ID",
39118	//         "NAME"
39119	//       ],
39120	//       "enumDescriptions": [
39121	//         "",
39122	//         ""
39123	//       ],
39124	//       "location": "query",
39125	//       "type": "string"
39126	//     },
39127	//     "sortOrder": {
39128	//       "default": "ASCENDING",
39129	//       "description": "Order of sorted results.",
39130	//       "enum": [
39131	//         "ASCENDING",
39132	//         "DESCENDING"
39133	//       ],
39134	//       "enumDescriptions": [
39135	//         "",
39136	//         ""
39137	//       ],
39138	//       "location": "query",
39139	//       "type": "string"
39140	//     }
39141	//   },
39142	//   "path": "userprofiles/{profileId}/placementStrategies",
39143	//   "response": {
39144	//     "$ref": "PlacementStrategiesListResponse"
39145	//   },
39146	//   "scopes": [
39147	//     "https://www.googleapis.com/auth/dfatrafficking"
39148	//   ]
39149	// }
39150
39151}
39152
39153// Pages invokes f for each page of results.
39154// A non-nil error returned from f will halt the iteration.
39155// The provided context supersedes any context provided to the Context method.
39156func (c *PlacementStrategiesListCall) Pages(ctx context.Context, f func(*PlacementStrategiesListResponse) error) error {
39157	c.ctx_ = ctx
39158	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
39159	for {
39160		x, err := c.Do()
39161		if err != nil {
39162			return err
39163		}
39164		if err := f(x); err != nil {
39165			return err
39166		}
39167		if x.NextPageToken == "" {
39168			return nil
39169		}
39170		c.PageToken(x.NextPageToken)
39171	}
39172}
39173
39174// method id "dfareporting.placementStrategies.patch":
39175
39176type PlacementStrategiesPatchCall struct {
39177	s                 *Service
39178	profileId         int64
39179	placementstrategy *PlacementStrategy
39180	urlParams_        gensupport.URLParams
39181	ctx_              context.Context
39182	header_           http.Header
39183}
39184
39185// Patch: Updates an existing placement strategy. This method supports
39186// patch semantics.
39187func (r *PlacementStrategiesService) Patch(profileId int64, id int64, placementstrategy *PlacementStrategy) *PlacementStrategiesPatchCall {
39188	c := &PlacementStrategiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39189	c.profileId = profileId
39190	c.urlParams_.Set("id", fmt.Sprint(id))
39191	c.placementstrategy = placementstrategy
39192	return c
39193}
39194
39195// Fields allows partial responses to be retrieved. See
39196// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39197// for more information.
39198func (c *PlacementStrategiesPatchCall) Fields(s ...googleapi.Field) *PlacementStrategiesPatchCall {
39199	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39200	return c
39201}
39202
39203// Context sets the context to be used in this call's Do method. Any
39204// pending HTTP request will be aborted if the provided context is
39205// canceled.
39206func (c *PlacementStrategiesPatchCall) Context(ctx context.Context) *PlacementStrategiesPatchCall {
39207	c.ctx_ = ctx
39208	return c
39209}
39210
39211// Header returns an http.Header that can be modified by the caller to
39212// add HTTP headers to the request.
39213func (c *PlacementStrategiesPatchCall) Header() http.Header {
39214	if c.header_ == nil {
39215		c.header_ = make(http.Header)
39216	}
39217	return c.header_
39218}
39219
39220func (c *PlacementStrategiesPatchCall) doRequest(alt string) (*http.Response, error) {
39221	reqHeaders := make(http.Header)
39222	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
39223	for k, v := range c.header_ {
39224		reqHeaders[k] = v
39225	}
39226	reqHeaders.Set("User-Agent", c.s.userAgent())
39227	var body io.Reader = nil
39228	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39229	if err != nil {
39230		return nil, err
39231	}
39232	reqHeaders.Set("Content-Type", "application/json")
39233	c.urlParams_.Set("alt", alt)
39234	c.urlParams_.Set("prettyPrint", "false")
39235	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39236	urls += "?" + c.urlParams_.Encode()
39237	req, err := http.NewRequest("PATCH", urls, body)
39238	if err != nil {
39239		return nil, err
39240	}
39241	req.Header = reqHeaders
39242	googleapi.Expand(req.URL, map[string]string{
39243		"profileId": strconv.FormatInt(c.profileId, 10),
39244	})
39245	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39246}
39247
39248// Do executes the "dfareporting.placementStrategies.patch" call.
39249// Exactly one of *PlacementStrategy or error will be non-nil. Any
39250// non-2xx status code is an error. Response headers are in either
39251// *PlacementStrategy.ServerResponse.Header or (if a response was
39252// returned at all) in error.(*googleapi.Error).Header. Use
39253// googleapi.IsNotModified to check whether the returned error was
39254// because http.StatusNotModified was returned.
39255func (c *PlacementStrategiesPatchCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39256	gensupport.SetOptions(c.urlParams_, opts...)
39257	res, err := c.doRequest("json")
39258	if res != nil && res.StatusCode == http.StatusNotModified {
39259		if res.Body != nil {
39260			res.Body.Close()
39261		}
39262		return nil, &googleapi.Error{
39263			Code:   res.StatusCode,
39264			Header: res.Header,
39265		}
39266	}
39267	if err != nil {
39268		return nil, err
39269	}
39270	defer googleapi.CloseBody(res)
39271	if err := googleapi.CheckResponse(res); err != nil {
39272		return nil, err
39273	}
39274	ret := &PlacementStrategy{
39275		ServerResponse: googleapi.ServerResponse{
39276			Header:         res.Header,
39277			HTTPStatusCode: res.StatusCode,
39278		},
39279	}
39280	target := &ret
39281	if err := gensupport.DecodeResponse(target, res); err != nil {
39282		return nil, err
39283	}
39284	return ret, nil
39285	// {
39286	//   "description": "Updates an existing placement strategy. This method supports patch semantics.",
39287	//   "httpMethod": "PATCH",
39288	//   "id": "dfareporting.placementStrategies.patch",
39289	//   "parameterOrder": [
39290	//     "profileId",
39291	//     "id"
39292	//   ],
39293	//   "parameters": {
39294	//     "id": {
39295	//       "description": "Placement strategy ID.",
39296	//       "format": "int64",
39297	//       "location": "query",
39298	//       "required": true,
39299	//       "type": "string"
39300	//     },
39301	//     "profileId": {
39302	//       "description": "User profile ID associated with this request.",
39303	//       "format": "int64",
39304	//       "location": "path",
39305	//       "required": true,
39306	//       "type": "string"
39307	//     }
39308	//   },
39309	//   "path": "userprofiles/{profileId}/placementStrategies",
39310	//   "request": {
39311	//     "$ref": "PlacementStrategy"
39312	//   },
39313	//   "response": {
39314	//     "$ref": "PlacementStrategy"
39315	//   },
39316	//   "scopes": [
39317	//     "https://www.googleapis.com/auth/dfatrafficking"
39318	//   ]
39319	// }
39320
39321}
39322
39323// method id "dfareporting.placementStrategies.update":
39324
39325type PlacementStrategiesUpdateCall struct {
39326	s                 *Service
39327	profileId         int64
39328	placementstrategy *PlacementStrategy
39329	urlParams_        gensupport.URLParams
39330	ctx_              context.Context
39331	header_           http.Header
39332}
39333
39334// Update: Updates an existing placement strategy.
39335func (r *PlacementStrategiesService) Update(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesUpdateCall {
39336	c := &PlacementStrategiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39337	c.profileId = profileId
39338	c.placementstrategy = placementstrategy
39339	return c
39340}
39341
39342// Fields allows partial responses to be retrieved. See
39343// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39344// for more information.
39345func (c *PlacementStrategiesUpdateCall) Fields(s ...googleapi.Field) *PlacementStrategiesUpdateCall {
39346	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39347	return c
39348}
39349
39350// Context sets the context to be used in this call's Do method. Any
39351// pending HTTP request will be aborted if the provided context is
39352// canceled.
39353func (c *PlacementStrategiesUpdateCall) Context(ctx context.Context) *PlacementStrategiesUpdateCall {
39354	c.ctx_ = ctx
39355	return c
39356}
39357
39358// Header returns an http.Header that can be modified by the caller to
39359// add HTTP headers to the request.
39360func (c *PlacementStrategiesUpdateCall) Header() http.Header {
39361	if c.header_ == nil {
39362		c.header_ = make(http.Header)
39363	}
39364	return c.header_
39365}
39366
39367func (c *PlacementStrategiesUpdateCall) doRequest(alt string) (*http.Response, error) {
39368	reqHeaders := make(http.Header)
39369	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
39370	for k, v := range c.header_ {
39371		reqHeaders[k] = v
39372	}
39373	reqHeaders.Set("User-Agent", c.s.userAgent())
39374	var body io.Reader = nil
39375	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39376	if err != nil {
39377		return nil, err
39378	}
39379	reqHeaders.Set("Content-Type", "application/json")
39380	c.urlParams_.Set("alt", alt)
39381	c.urlParams_.Set("prettyPrint", "false")
39382	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39383	urls += "?" + c.urlParams_.Encode()
39384	req, err := http.NewRequest("PUT", urls, body)
39385	if err != nil {
39386		return nil, err
39387	}
39388	req.Header = reqHeaders
39389	googleapi.Expand(req.URL, map[string]string{
39390		"profileId": strconv.FormatInt(c.profileId, 10),
39391	})
39392	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39393}
39394
39395// Do executes the "dfareporting.placementStrategies.update" call.
39396// Exactly one of *PlacementStrategy or error will be non-nil. Any
39397// non-2xx status code is an error. Response headers are in either
39398// *PlacementStrategy.ServerResponse.Header or (if a response was
39399// returned at all) in error.(*googleapi.Error).Header. Use
39400// googleapi.IsNotModified to check whether the returned error was
39401// because http.StatusNotModified was returned.
39402func (c *PlacementStrategiesUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39403	gensupport.SetOptions(c.urlParams_, opts...)
39404	res, err := c.doRequest("json")
39405	if res != nil && res.StatusCode == http.StatusNotModified {
39406		if res.Body != nil {
39407			res.Body.Close()
39408		}
39409		return nil, &googleapi.Error{
39410			Code:   res.StatusCode,
39411			Header: res.Header,
39412		}
39413	}
39414	if err != nil {
39415		return nil, err
39416	}
39417	defer googleapi.CloseBody(res)
39418	if err := googleapi.CheckResponse(res); err != nil {
39419		return nil, err
39420	}
39421	ret := &PlacementStrategy{
39422		ServerResponse: googleapi.ServerResponse{
39423			Header:         res.Header,
39424			HTTPStatusCode: res.StatusCode,
39425		},
39426	}
39427	target := &ret
39428	if err := gensupport.DecodeResponse(target, res); err != nil {
39429		return nil, err
39430	}
39431	return ret, nil
39432	// {
39433	//   "description": "Updates an existing placement strategy.",
39434	//   "httpMethod": "PUT",
39435	//   "id": "dfareporting.placementStrategies.update",
39436	//   "parameterOrder": [
39437	//     "profileId"
39438	//   ],
39439	//   "parameters": {
39440	//     "profileId": {
39441	//       "description": "User profile ID associated with this request.",
39442	//       "format": "int64",
39443	//       "location": "path",
39444	//       "required": true,
39445	//       "type": "string"
39446	//     }
39447	//   },
39448	//   "path": "userprofiles/{profileId}/placementStrategies",
39449	//   "request": {
39450	//     "$ref": "PlacementStrategy"
39451	//   },
39452	//   "response": {
39453	//     "$ref": "PlacementStrategy"
39454	//   },
39455	//   "scopes": [
39456	//     "https://www.googleapis.com/auth/dfatrafficking"
39457	//   ]
39458	// }
39459
39460}
39461
39462// method id "dfareporting.placements.generatetags":
39463
39464type PlacementsGeneratetagsCall struct {
39465	s          *Service
39466	profileId  int64
39467	urlParams_ gensupport.URLParams
39468	ctx_       context.Context
39469	header_    http.Header
39470}
39471
39472// Generatetags: Generates tags for a placement.
39473func (r *PlacementsService) Generatetags(profileId int64) *PlacementsGeneratetagsCall {
39474	c := &PlacementsGeneratetagsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39475	c.profileId = profileId
39476	return c
39477}
39478
39479// CampaignId sets the optional parameter "campaignId": Generate
39480// placements belonging to this campaign. This is a required field.
39481func (c *PlacementsGeneratetagsCall) CampaignId(campaignId int64) *PlacementsGeneratetagsCall {
39482	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
39483	return c
39484}
39485
39486// PlacementIds sets the optional parameter "placementIds": Generate
39487// tags for these placements.
39488func (c *PlacementsGeneratetagsCall) PlacementIds(placementIds ...int64) *PlacementsGeneratetagsCall {
39489	var placementIds_ []string
39490	for _, v := range placementIds {
39491		placementIds_ = append(placementIds_, fmt.Sprint(v))
39492	}
39493	c.urlParams_.SetMulti("placementIds", placementIds_)
39494	return c
39495}
39496
39497// TagFormats sets the optional parameter "tagFormats": Tag formats to
39498// generate for these placements.
39499//
39500// Note: PLACEMENT_TAG_STANDARD can only be generated for 1x1
39501// placements.
39502//
39503// Possible values:
39504//   "PLACEMENT_TAG_CLICK_COMMANDS"
39505//   "PLACEMENT_TAG_IFRAME_ILAYER"
39506//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
39507//   "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
39508//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
39509//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
39510//   "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4"
39511//   "PLACEMENT_TAG_INTERNAL_REDIRECT"
39512//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
39513//   "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
39514//   "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
39515//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
39516//   "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
39517//   "PLACEMENT_TAG_JAVASCRIPT"
39518//   "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
39519//   "PLACEMENT_TAG_STANDARD"
39520//   "PLACEMENT_TAG_TRACKING"
39521//   "PLACEMENT_TAG_TRACKING_IFRAME"
39522//   "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
39523func (c *PlacementsGeneratetagsCall) TagFormats(tagFormats ...string) *PlacementsGeneratetagsCall {
39524	c.urlParams_.SetMulti("tagFormats", append([]string{}, tagFormats...))
39525	return c
39526}
39527
39528// Fields allows partial responses to be retrieved. See
39529// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39530// for more information.
39531func (c *PlacementsGeneratetagsCall) Fields(s ...googleapi.Field) *PlacementsGeneratetagsCall {
39532	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39533	return c
39534}
39535
39536// Context sets the context to be used in this call's Do method. Any
39537// pending HTTP request will be aborted if the provided context is
39538// canceled.
39539func (c *PlacementsGeneratetagsCall) Context(ctx context.Context) *PlacementsGeneratetagsCall {
39540	c.ctx_ = ctx
39541	return c
39542}
39543
39544// Header returns an http.Header that can be modified by the caller to
39545// add HTTP headers to the request.
39546func (c *PlacementsGeneratetagsCall) Header() http.Header {
39547	if c.header_ == nil {
39548		c.header_ = make(http.Header)
39549	}
39550	return c.header_
39551}
39552
39553func (c *PlacementsGeneratetagsCall) doRequest(alt string) (*http.Response, error) {
39554	reqHeaders := make(http.Header)
39555	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
39556	for k, v := range c.header_ {
39557		reqHeaders[k] = v
39558	}
39559	reqHeaders.Set("User-Agent", c.s.userAgent())
39560	var body io.Reader = nil
39561	c.urlParams_.Set("alt", alt)
39562	c.urlParams_.Set("prettyPrint", "false")
39563	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/generatetags")
39564	urls += "?" + c.urlParams_.Encode()
39565	req, err := http.NewRequest("POST", urls, body)
39566	if err != nil {
39567		return nil, err
39568	}
39569	req.Header = reqHeaders
39570	googleapi.Expand(req.URL, map[string]string{
39571		"profileId": strconv.FormatInt(c.profileId, 10),
39572	})
39573	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39574}
39575
39576// Do executes the "dfareporting.placements.generatetags" call.
39577// Exactly one of *PlacementsGenerateTagsResponse or error will be
39578// non-nil. Any non-2xx status code is an error. Response headers are in
39579// either *PlacementsGenerateTagsResponse.ServerResponse.Header or (if a
39580// response was returned at all) in error.(*googleapi.Error).Header. Use
39581// googleapi.IsNotModified to check whether the returned error was
39582// because http.StatusNotModified was returned.
39583func (c *PlacementsGeneratetagsCall) Do(opts ...googleapi.CallOption) (*PlacementsGenerateTagsResponse, error) {
39584	gensupport.SetOptions(c.urlParams_, opts...)
39585	res, err := c.doRequest("json")
39586	if res != nil && res.StatusCode == http.StatusNotModified {
39587		if res.Body != nil {
39588			res.Body.Close()
39589		}
39590		return nil, &googleapi.Error{
39591			Code:   res.StatusCode,
39592			Header: res.Header,
39593		}
39594	}
39595	if err != nil {
39596		return nil, err
39597	}
39598	defer googleapi.CloseBody(res)
39599	if err := googleapi.CheckResponse(res); err != nil {
39600		return nil, err
39601	}
39602	ret := &PlacementsGenerateTagsResponse{
39603		ServerResponse: googleapi.ServerResponse{
39604			Header:         res.Header,
39605			HTTPStatusCode: res.StatusCode,
39606		},
39607	}
39608	target := &ret
39609	if err := gensupport.DecodeResponse(target, res); err != nil {
39610		return nil, err
39611	}
39612	return ret, nil
39613	// {
39614	//   "description": "Generates tags for a placement.",
39615	//   "httpMethod": "POST",
39616	//   "id": "dfareporting.placements.generatetags",
39617	//   "parameterOrder": [
39618	//     "profileId"
39619	//   ],
39620	//   "parameters": {
39621	//     "campaignId": {
39622	//       "description": "Generate placements belonging to this campaign. This is a required field.",
39623	//       "format": "int64",
39624	//       "location": "query",
39625	//       "type": "string"
39626	//     },
39627	//     "placementIds": {
39628	//       "description": "Generate tags for these placements.",
39629	//       "format": "int64",
39630	//       "location": "query",
39631	//       "repeated": true,
39632	//       "type": "string"
39633	//     },
39634	//     "profileId": {
39635	//       "description": "User profile ID associated with this request.",
39636	//       "format": "int64",
39637	//       "location": "path",
39638	//       "required": true,
39639	//       "type": "string"
39640	//     },
39641	//     "tagFormats": {
39642	//       "description": "Tag formats to generate for these placements.\n\nNote: PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.",
39643	//       "enum": [
39644	//         "PLACEMENT_TAG_CLICK_COMMANDS",
39645	//         "PLACEMENT_TAG_IFRAME_ILAYER",
39646	//         "PLACEMENT_TAG_IFRAME_JAVASCRIPT",
39647	//         "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY",
39648	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH",
39649	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3",
39650	//         "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4",
39651	//         "PLACEMENT_TAG_INTERNAL_REDIRECT",
39652	//         "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT",
39653	//         "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY",
39654	//         "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT",
39655	//         "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT",
39656	//         "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY",
39657	//         "PLACEMENT_TAG_JAVASCRIPT",
39658	//         "PLACEMENT_TAG_JAVASCRIPT_LEGACY",
39659	//         "PLACEMENT_TAG_STANDARD",
39660	//         "PLACEMENT_TAG_TRACKING",
39661	//         "PLACEMENT_TAG_TRACKING_IFRAME",
39662	//         "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
39663	//       ],
39664	//       "enumDescriptions": [
39665	//         "",
39666	//         "",
39667	//         "",
39668	//         "",
39669	//         "",
39670	//         "",
39671	//         "",
39672	//         "",
39673	//         "",
39674	//         "",
39675	//         "",
39676	//         "",
39677	//         "",
39678	//         "",
39679	//         "",
39680	//         "",
39681	//         "",
39682	//         "",
39683	//         ""
39684	//       ],
39685	//       "location": "query",
39686	//       "repeated": true,
39687	//       "type": "string"
39688	//     }
39689	//   },
39690	//   "path": "userprofiles/{profileId}/placements/generatetags",
39691	//   "response": {
39692	//     "$ref": "PlacementsGenerateTagsResponse"
39693	//   },
39694	//   "scopes": [
39695	//     "https://www.googleapis.com/auth/dfatrafficking"
39696	//   ]
39697	// }
39698
39699}
39700
39701// method id "dfareporting.placements.get":
39702
39703type PlacementsGetCall struct {
39704	s            *Service
39705	profileId    int64
39706	id           int64
39707	urlParams_   gensupport.URLParams
39708	ifNoneMatch_ string
39709	ctx_         context.Context
39710	header_      http.Header
39711}
39712
39713// Get: Gets one placement by ID.
39714func (r *PlacementsService) Get(profileId int64, id int64) *PlacementsGetCall {
39715	c := &PlacementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39716	c.profileId = profileId
39717	c.id = id
39718	return c
39719}
39720
39721// Fields allows partial responses to be retrieved. See
39722// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39723// for more information.
39724func (c *PlacementsGetCall) Fields(s ...googleapi.Field) *PlacementsGetCall {
39725	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39726	return c
39727}
39728
39729// IfNoneMatch sets the optional parameter which makes the operation
39730// fail if the object's ETag matches the given value. This is useful for
39731// getting updates only after the object has changed since the last
39732// request. Use googleapi.IsNotModified to check whether the response
39733// error from Do is the result of In-None-Match.
39734func (c *PlacementsGetCall) IfNoneMatch(entityTag string) *PlacementsGetCall {
39735	c.ifNoneMatch_ = entityTag
39736	return c
39737}
39738
39739// Context sets the context to be used in this call's Do method. Any
39740// pending HTTP request will be aborted if the provided context is
39741// canceled.
39742func (c *PlacementsGetCall) Context(ctx context.Context) *PlacementsGetCall {
39743	c.ctx_ = ctx
39744	return c
39745}
39746
39747// Header returns an http.Header that can be modified by the caller to
39748// add HTTP headers to the request.
39749func (c *PlacementsGetCall) Header() http.Header {
39750	if c.header_ == nil {
39751		c.header_ = make(http.Header)
39752	}
39753	return c.header_
39754}
39755
39756func (c *PlacementsGetCall) doRequest(alt string) (*http.Response, error) {
39757	reqHeaders := make(http.Header)
39758	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
39759	for k, v := range c.header_ {
39760		reqHeaders[k] = v
39761	}
39762	reqHeaders.Set("User-Agent", c.s.userAgent())
39763	if c.ifNoneMatch_ != "" {
39764		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39765	}
39766	var body io.Reader = nil
39767	c.urlParams_.Set("alt", alt)
39768	c.urlParams_.Set("prettyPrint", "false")
39769	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/{id}")
39770	urls += "?" + c.urlParams_.Encode()
39771	req, err := http.NewRequest("GET", urls, body)
39772	if err != nil {
39773		return nil, err
39774	}
39775	req.Header = reqHeaders
39776	googleapi.Expand(req.URL, map[string]string{
39777		"profileId": strconv.FormatInt(c.profileId, 10),
39778		"id":        strconv.FormatInt(c.id, 10),
39779	})
39780	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39781}
39782
39783// Do executes the "dfareporting.placements.get" call.
39784// Exactly one of *Placement or error will be non-nil. Any non-2xx
39785// status code is an error. Response headers are in either
39786// *Placement.ServerResponse.Header or (if a response was returned at
39787// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39788// to check whether the returned error was because
39789// http.StatusNotModified was returned.
39790func (c *PlacementsGetCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
39791	gensupport.SetOptions(c.urlParams_, opts...)
39792	res, err := c.doRequest("json")
39793	if res != nil && res.StatusCode == http.StatusNotModified {
39794		if res.Body != nil {
39795			res.Body.Close()
39796		}
39797		return nil, &googleapi.Error{
39798			Code:   res.StatusCode,
39799			Header: res.Header,
39800		}
39801	}
39802	if err != nil {
39803		return nil, err
39804	}
39805	defer googleapi.CloseBody(res)
39806	if err := googleapi.CheckResponse(res); err != nil {
39807		return nil, err
39808	}
39809	ret := &Placement{
39810		ServerResponse: googleapi.ServerResponse{
39811			Header:         res.Header,
39812			HTTPStatusCode: res.StatusCode,
39813		},
39814	}
39815	target := &ret
39816	if err := gensupport.DecodeResponse(target, res); err != nil {
39817		return nil, err
39818	}
39819	return ret, nil
39820	// {
39821	//   "description": "Gets one placement by ID.",
39822	//   "httpMethod": "GET",
39823	//   "id": "dfareporting.placements.get",
39824	//   "parameterOrder": [
39825	//     "profileId",
39826	//     "id"
39827	//   ],
39828	//   "parameters": {
39829	//     "id": {
39830	//       "description": "Placement ID.",
39831	//       "format": "int64",
39832	//       "location": "path",
39833	//       "required": true,
39834	//       "type": "string"
39835	//     },
39836	//     "profileId": {
39837	//       "description": "User profile ID associated with this request.",
39838	//       "format": "int64",
39839	//       "location": "path",
39840	//       "required": true,
39841	//       "type": "string"
39842	//     }
39843	//   },
39844	//   "path": "userprofiles/{profileId}/placements/{id}",
39845	//   "response": {
39846	//     "$ref": "Placement"
39847	//   },
39848	//   "scopes": [
39849	//     "https://www.googleapis.com/auth/dfatrafficking"
39850	//   ]
39851	// }
39852
39853}
39854
39855// method id "dfareporting.placements.insert":
39856
39857type PlacementsInsertCall struct {
39858	s          *Service
39859	profileId  int64
39860	placement  *Placement
39861	urlParams_ gensupport.URLParams
39862	ctx_       context.Context
39863	header_    http.Header
39864}
39865
39866// Insert: Inserts a new placement.
39867func (r *PlacementsService) Insert(profileId int64, placement *Placement) *PlacementsInsertCall {
39868	c := &PlacementsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39869	c.profileId = profileId
39870	c.placement = placement
39871	return c
39872}
39873
39874// Fields allows partial responses to be retrieved. See
39875// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39876// for more information.
39877func (c *PlacementsInsertCall) Fields(s ...googleapi.Field) *PlacementsInsertCall {
39878	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39879	return c
39880}
39881
39882// Context sets the context to be used in this call's Do method. Any
39883// pending HTTP request will be aborted if the provided context is
39884// canceled.
39885func (c *PlacementsInsertCall) Context(ctx context.Context) *PlacementsInsertCall {
39886	c.ctx_ = ctx
39887	return c
39888}
39889
39890// Header returns an http.Header that can be modified by the caller to
39891// add HTTP headers to the request.
39892func (c *PlacementsInsertCall) Header() http.Header {
39893	if c.header_ == nil {
39894		c.header_ = make(http.Header)
39895	}
39896	return c.header_
39897}
39898
39899func (c *PlacementsInsertCall) doRequest(alt string) (*http.Response, error) {
39900	reqHeaders := make(http.Header)
39901	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
39902	for k, v := range c.header_ {
39903		reqHeaders[k] = v
39904	}
39905	reqHeaders.Set("User-Agent", c.s.userAgent())
39906	var body io.Reader = nil
39907	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
39908	if err != nil {
39909		return nil, err
39910	}
39911	reqHeaders.Set("Content-Type", "application/json")
39912	c.urlParams_.Set("alt", alt)
39913	c.urlParams_.Set("prettyPrint", "false")
39914	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
39915	urls += "?" + c.urlParams_.Encode()
39916	req, err := http.NewRequest("POST", urls, body)
39917	if err != nil {
39918		return nil, err
39919	}
39920	req.Header = reqHeaders
39921	googleapi.Expand(req.URL, map[string]string{
39922		"profileId": strconv.FormatInt(c.profileId, 10),
39923	})
39924	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39925}
39926
39927// Do executes the "dfareporting.placements.insert" call.
39928// Exactly one of *Placement or error will be non-nil. Any non-2xx
39929// status code is an error. Response headers are in either
39930// *Placement.ServerResponse.Header or (if a response was returned at
39931// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39932// to check whether the returned error was because
39933// http.StatusNotModified was returned.
39934func (c *PlacementsInsertCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
39935	gensupport.SetOptions(c.urlParams_, opts...)
39936	res, err := c.doRequest("json")
39937	if res != nil && res.StatusCode == http.StatusNotModified {
39938		if res.Body != nil {
39939			res.Body.Close()
39940		}
39941		return nil, &googleapi.Error{
39942			Code:   res.StatusCode,
39943			Header: res.Header,
39944		}
39945	}
39946	if err != nil {
39947		return nil, err
39948	}
39949	defer googleapi.CloseBody(res)
39950	if err := googleapi.CheckResponse(res); err != nil {
39951		return nil, err
39952	}
39953	ret := &Placement{
39954		ServerResponse: googleapi.ServerResponse{
39955			Header:         res.Header,
39956			HTTPStatusCode: res.StatusCode,
39957		},
39958	}
39959	target := &ret
39960	if err := gensupport.DecodeResponse(target, res); err != nil {
39961		return nil, err
39962	}
39963	return ret, nil
39964	// {
39965	//   "description": "Inserts a new placement.",
39966	//   "httpMethod": "POST",
39967	//   "id": "dfareporting.placements.insert",
39968	//   "parameterOrder": [
39969	//     "profileId"
39970	//   ],
39971	//   "parameters": {
39972	//     "profileId": {
39973	//       "description": "User profile ID associated with this request.",
39974	//       "format": "int64",
39975	//       "location": "path",
39976	//       "required": true,
39977	//       "type": "string"
39978	//     }
39979	//   },
39980	//   "path": "userprofiles/{profileId}/placements",
39981	//   "request": {
39982	//     "$ref": "Placement"
39983	//   },
39984	//   "response": {
39985	//     "$ref": "Placement"
39986	//   },
39987	//   "scopes": [
39988	//     "https://www.googleapis.com/auth/dfatrafficking"
39989	//   ]
39990	// }
39991
39992}
39993
39994// method id "dfareporting.placements.list":
39995
39996type PlacementsListCall struct {
39997	s            *Service
39998	profileId    int64
39999	urlParams_   gensupport.URLParams
40000	ifNoneMatch_ string
40001	ctx_         context.Context
40002	header_      http.Header
40003}
40004
40005// List: Retrieves a list of placements, possibly filtered. This method
40006// supports paging.
40007func (r *PlacementsService) List(profileId int64) *PlacementsListCall {
40008	c := &PlacementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40009	c.profileId = profileId
40010	return c
40011}
40012
40013// AdvertiserIds sets the optional parameter "advertiserIds": Select
40014// only placements that belong to these advertisers.
40015func (c *PlacementsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementsListCall {
40016	var advertiserIds_ []string
40017	for _, v := range advertiserIds {
40018		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
40019	}
40020	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
40021	return c
40022}
40023
40024// Archived sets the optional parameter "archived": Select only archived
40025// placements. Don't set this field to select both archived and
40026// non-archived placements.
40027func (c *PlacementsListCall) Archived(archived bool) *PlacementsListCall {
40028	c.urlParams_.Set("archived", fmt.Sprint(archived))
40029	return c
40030}
40031
40032// CampaignIds sets the optional parameter "campaignIds": Select only
40033// placements that belong to these campaigns.
40034func (c *PlacementsListCall) CampaignIds(campaignIds ...int64) *PlacementsListCall {
40035	var campaignIds_ []string
40036	for _, v := range campaignIds {
40037		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
40038	}
40039	c.urlParams_.SetMulti("campaignIds", campaignIds_)
40040	return c
40041}
40042
40043// Compatibilities sets the optional parameter "compatibilities": Select
40044// only placements that are associated with these compatibilities.
40045// DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop
40046// or on mobile devices for regular or interstitial ads respectively.
40047// APP and APP_INTERSTITIAL are for rendering in mobile apps.
40048// IN_STREAM_VIDEO refers to rendering in in-stream video ads developed
40049// with the VAST standard.
40050//
40051// Possible values:
40052//   "APP"
40053//   "APP_INTERSTITIAL"
40054//   "DISPLAY"
40055//   "DISPLAY_INTERSTITIAL"
40056//   "IN_STREAM_AUDIO"
40057//   "IN_STREAM_VIDEO"
40058func (c *PlacementsListCall) Compatibilities(compatibilities ...string) *PlacementsListCall {
40059	c.urlParams_.SetMulti("compatibilities", append([]string{}, compatibilities...))
40060	return c
40061}
40062
40063// ContentCategoryIds sets the optional parameter "contentCategoryIds":
40064// Select only placements that are associated with these content
40065// categories.
40066func (c *PlacementsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementsListCall {
40067	var contentCategoryIds_ []string
40068	for _, v := range contentCategoryIds {
40069		contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
40070	}
40071	c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
40072	return c
40073}
40074
40075// DirectorySiteIds sets the optional parameter "directorySiteIds":
40076// Select only placements that are associated with these directory
40077// sites.
40078func (c *PlacementsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementsListCall {
40079	var directorySiteIds_ []string
40080	for _, v := range directorySiteIds {
40081		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
40082	}
40083	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
40084	return c
40085}
40086
40087// GroupIds sets the optional parameter "groupIds": Select only
40088// placements that belong to these placement groups.
40089func (c *PlacementsListCall) GroupIds(groupIds ...int64) *PlacementsListCall {
40090	var groupIds_ []string
40091	for _, v := range groupIds {
40092		groupIds_ = append(groupIds_, fmt.Sprint(v))
40093	}
40094	c.urlParams_.SetMulti("groupIds", groupIds_)
40095	return c
40096}
40097
40098// Ids sets the optional parameter "ids": Select only placements with
40099// these IDs.
40100func (c *PlacementsListCall) Ids(ids ...int64) *PlacementsListCall {
40101	var ids_ []string
40102	for _, v := range ids {
40103		ids_ = append(ids_, fmt.Sprint(v))
40104	}
40105	c.urlParams_.SetMulti("ids", ids_)
40106	return c
40107}
40108
40109// MaxEndDate sets the optional parameter "maxEndDate": Select only
40110// placements or placement groups whose end date is on or before the
40111// specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
40112func (c *PlacementsListCall) MaxEndDate(maxEndDate string) *PlacementsListCall {
40113	c.urlParams_.Set("maxEndDate", maxEndDate)
40114	return c
40115}
40116
40117// MaxResults sets the optional parameter "maxResults": Maximum number
40118// of results to return.
40119func (c *PlacementsListCall) MaxResults(maxResults int64) *PlacementsListCall {
40120	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
40121	return c
40122}
40123
40124// MaxStartDate sets the optional parameter "maxStartDate": Select only
40125// placements or placement groups whose start date is on or before the
40126// specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
40127func (c *PlacementsListCall) MaxStartDate(maxStartDate string) *PlacementsListCall {
40128	c.urlParams_.Set("maxStartDate", maxStartDate)
40129	return c
40130}
40131
40132// MinEndDate sets the optional parameter "minEndDate": Select only
40133// placements or placement groups whose end date is on or after the
40134// specified minEndDate. The date should be formatted as "yyyy-MM-dd".
40135func (c *PlacementsListCall) MinEndDate(minEndDate string) *PlacementsListCall {
40136	c.urlParams_.Set("minEndDate", minEndDate)
40137	return c
40138}
40139
40140// MinStartDate sets the optional parameter "minStartDate": Select only
40141// placements or placement groups whose start date is on or after the
40142// specified minStartDate. The date should be formatted as "yyyy-MM-dd".
40143func (c *PlacementsListCall) MinStartDate(minStartDate string) *PlacementsListCall {
40144	c.urlParams_.Set("minStartDate", minStartDate)
40145	return c
40146}
40147
40148// PageToken sets the optional parameter "pageToken": Value of the
40149// nextPageToken from the previous result page.
40150func (c *PlacementsListCall) PageToken(pageToken string) *PlacementsListCall {
40151	c.urlParams_.Set("pageToken", pageToken)
40152	return c
40153}
40154
40155// PaymentSource sets the optional parameter "paymentSource": Select
40156// only placements with this payment source.
40157//
40158// Possible values:
40159//   "PLACEMENT_AGENCY_PAID"
40160//   "PLACEMENT_PUBLISHER_PAID"
40161func (c *PlacementsListCall) PaymentSource(paymentSource string) *PlacementsListCall {
40162	c.urlParams_.Set("paymentSource", paymentSource)
40163	return c
40164}
40165
40166// PlacementStrategyIds sets the optional parameter
40167// "placementStrategyIds": Select only placements that are associated
40168// with these placement strategies.
40169func (c *PlacementsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementsListCall {
40170	var placementStrategyIds_ []string
40171	for _, v := range placementStrategyIds {
40172		placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
40173	}
40174	c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
40175	return c
40176}
40177
40178// PricingTypes sets the optional parameter "pricingTypes": Select only
40179// placements with these pricing types.
40180//
40181// Possible values:
40182//   "PRICING_TYPE_CPA"
40183//   "PRICING_TYPE_CPC"
40184//   "PRICING_TYPE_CPM"
40185//   "PRICING_TYPE_CPM_ACTIVEVIEW"
40186//   "PRICING_TYPE_FLAT_RATE_CLICKS"
40187//   "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
40188func (c *PlacementsListCall) PricingTypes(pricingTypes ...string) *PlacementsListCall {
40189	c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
40190	return c
40191}
40192
40193// SearchString sets the optional parameter "searchString": Allows
40194// searching for placements by name or ID. Wildcards (*) are allowed.
40195// For example, "placement*2015" will return placements with names like
40196// "placement June 2015", "placement May 2015", or simply "placements
40197// 2015". Most of the searches also add wildcards implicitly at the
40198// start and the end of the search string. For example, a search string
40199// of "placement" will match placements with name "my placement",
40200// "placement 2015", or simply "placement".
40201func (c *PlacementsListCall) SearchString(searchString string) *PlacementsListCall {
40202	c.urlParams_.Set("searchString", searchString)
40203	return c
40204}
40205
40206// SiteIds sets the optional parameter "siteIds": Select only placements
40207// that are associated with these sites.
40208func (c *PlacementsListCall) SiteIds(siteIds ...int64) *PlacementsListCall {
40209	var siteIds_ []string
40210	for _, v := range siteIds {
40211		siteIds_ = append(siteIds_, fmt.Sprint(v))
40212	}
40213	c.urlParams_.SetMulti("siteIds", siteIds_)
40214	return c
40215}
40216
40217// SizeIds sets the optional parameter "sizeIds": Select only placements
40218// that are associated with these sizes.
40219func (c *PlacementsListCall) SizeIds(sizeIds ...int64) *PlacementsListCall {
40220	var sizeIds_ []string
40221	for _, v := range sizeIds {
40222		sizeIds_ = append(sizeIds_, fmt.Sprint(v))
40223	}
40224	c.urlParams_.SetMulti("sizeIds", sizeIds_)
40225	return c
40226}
40227
40228// SortField sets the optional parameter "sortField": Field by which to
40229// sort the list.
40230//
40231// Possible values:
40232//   "ID" (default)
40233//   "NAME"
40234func (c *PlacementsListCall) SortField(sortField string) *PlacementsListCall {
40235	c.urlParams_.Set("sortField", sortField)
40236	return c
40237}
40238
40239// SortOrder sets the optional parameter "sortOrder": Order of sorted
40240// results.
40241//
40242// Possible values:
40243//   "ASCENDING" (default)
40244//   "DESCENDING"
40245func (c *PlacementsListCall) SortOrder(sortOrder string) *PlacementsListCall {
40246	c.urlParams_.Set("sortOrder", sortOrder)
40247	return c
40248}
40249
40250// Fields allows partial responses to be retrieved. See
40251// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40252// for more information.
40253func (c *PlacementsListCall) Fields(s ...googleapi.Field) *PlacementsListCall {
40254	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40255	return c
40256}
40257
40258// IfNoneMatch sets the optional parameter which makes the operation
40259// fail if the object's ETag matches the given value. This is useful for
40260// getting updates only after the object has changed since the last
40261// request. Use googleapi.IsNotModified to check whether the response
40262// error from Do is the result of In-None-Match.
40263func (c *PlacementsListCall) IfNoneMatch(entityTag string) *PlacementsListCall {
40264	c.ifNoneMatch_ = entityTag
40265	return c
40266}
40267
40268// Context sets the context to be used in this call's Do method. Any
40269// pending HTTP request will be aborted if the provided context is
40270// canceled.
40271func (c *PlacementsListCall) Context(ctx context.Context) *PlacementsListCall {
40272	c.ctx_ = ctx
40273	return c
40274}
40275
40276// Header returns an http.Header that can be modified by the caller to
40277// add HTTP headers to the request.
40278func (c *PlacementsListCall) Header() http.Header {
40279	if c.header_ == nil {
40280		c.header_ = make(http.Header)
40281	}
40282	return c.header_
40283}
40284
40285func (c *PlacementsListCall) doRequest(alt string) (*http.Response, error) {
40286	reqHeaders := make(http.Header)
40287	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
40288	for k, v := range c.header_ {
40289		reqHeaders[k] = v
40290	}
40291	reqHeaders.Set("User-Agent", c.s.userAgent())
40292	if c.ifNoneMatch_ != "" {
40293		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40294	}
40295	var body io.Reader = nil
40296	c.urlParams_.Set("alt", alt)
40297	c.urlParams_.Set("prettyPrint", "false")
40298	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40299	urls += "?" + c.urlParams_.Encode()
40300	req, err := http.NewRequest("GET", urls, body)
40301	if err != nil {
40302		return nil, err
40303	}
40304	req.Header = reqHeaders
40305	googleapi.Expand(req.URL, map[string]string{
40306		"profileId": strconv.FormatInt(c.profileId, 10),
40307	})
40308	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40309}
40310
40311// Do executes the "dfareporting.placements.list" call.
40312// Exactly one of *PlacementsListResponse or error will be non-nil. Any
40313// non-2xx status code is an error. Response headers are in either
40314// *PlacementsListResponse.ServerResponse.Header or (if a response was
40315// returned at all) in error.(*googleapi.Error).Header. Use
40316// googleapi.IsNotModified to check whether the returned error was
40317// because http.StatusNotModified was returned.
40318func (c *PlacementsListCall) Do(opts ...googleapi.CallOption) (*PlacementsListResponse, error) {
40319	gensupport.SetOptions(c.urlParams_, opts...)
40320	res, err := c.doRequest("json")
40321	if res != nil && res.StatusCode == http.StatusNotModified {
40322		if res.Body != nil {
40323			res.Body.Close()
40324		}
40325		return nil, &googleapi.Error{
40326			Code:   res.StatusCode,
40327			Header: res.Header,
40328		}
40329	}
40330	if err != nil {
40331		return nil, err
40332	}
40333	defer googleapi.CloseBody(res)
40334	if err := googleapi.CheckResponse(res); err != nil {
40335		return nil, err
40336	}
40337	ret := &PlacementsListResponse{
40338		ServerResponse: googleapi.ServerResponse{
40339			Header:         res.Header,
40340			HTTPStatusCode: res.StatusCode,
40341		},
40342	}
40343	target := &ret
40344	if err := gensupport.DecodeResponse(target, res); err != nil {
40345		return nil, err
40346	}
40347	return ret, nil
40348	// {
40349	//   "description": "Retrieves a list of placements, possibly filtered. This method supports paging.",
40350	//   "httpMethod": "GET",
40351	//   "id": "dfareporting.placements.list",
40352	//   "parameterOrder": [
40353	//     "profileId"
40354	//   ],
40355	//   "parameters": {
40356	//     "advertiserIds": {
40357	//       "description": "Select only placements that belong to these advertisers.",
40358	//       "format": "int64",
40359	//       "location": "query",
40360	//       "repeated": true,
40361	//       "type": "string"
40362	//     },
40363	//     "archived": {
40364	//       "description": "Select only archived placements. Don't set this field to select both archived and non-archived placements.",
40365	//       "location": "query",
40366	//       "type": "boolean"
40367	//     },
40368	//     "campaignIds": {
40369	//       "description": "Select only placements that belong to these campaigns.",
40370	//       "format": "int64",
40371	//       "location": "query",
40372	//       "repeated": true,
40373	//       "type": "string"
40374	//     },
40375	//     "compatibilities": {
40376	//       "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.",
40377	//       "enum": [
40378	//         "APP",
40379	//         "APP_INTERSTITIAL",
40380	//         "DISPLAY",
40381	//         "DISPLAY_INTERSTITIAL",
40382	//         "IN_STREAM_AUDIO",
40383	//         "IN_STREAM_VIDEO"
40384	//       ],
40385	//       "enumDescriptions": [
40386	//         "",
40387	//         "",
40388	//         "",
40389	//         "",
40390	//         "",
40391	//         ""
40392	//       ],
40393	//       "location": "query",
40394	//       "repeated": true,
40395	//       "type": "string"
40396	//     },
40397	//     "contentCategoryIds": {
40398	//       "description": "Select only placements that are associated with these content categories.",
40399	//       "format": "int64",
40400	//       "location": "query",
40401	//       "repeated": true,
40402	//       "type": "string"
40403	//     },
40404	//     "directorySiteIds": {
40405	//       "description": "Select only placements that are associated with these directory sites.",
40406	//       "format": "int64",
40407	//       "location": "query",
40408	//       "repeated": true,
40409	//       "type": "string"
40410	//     },
40411	//     "groupIds": {
40412	//       "description": "Select only placements that belong to these placement groups.",
40413	//       "format": "int64",
40414	//       "location": "query",
40415	//       "repeated": true,
40416	//       "type": "string"
40417	//     },
40418	//     "ids": {
40419	//       "description": "Select only placements with these IDs.",
40420	//       "format": "int64",
40421	//       "location": "query",
40422	//       "repeated": true,
40423	//       "type": "string"
40424	//     },
40425	//     "maxEndDate": {
40426	//       "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\".",
40427	//       "location": "query",
40428	//       "type": "string"
40429	//     },
40430	//     "maxResults": {
40431	//       "default": "1000",
40432	//       "description": "Maximum number of results to return.",
40433	//       "format": "int32",
40434	//       "location": "query",
40435	//       "maximum": "1000",
40436	//       "minimum": "0",
40437	//       "type": "integer"
40438	//     },
40439	//     "maxStartDate": {
40440	//       "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\".",
40441	//       "location": "query",
40442	//       "type": "string"
40443	//     },
40444	//     "minEndDate": {
40445	//       "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\".",
40446	//       "location": "query",
40447	//       "type": "string"
40448	//     },
40449	//     "minStartDate": {
40450	//       "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\".",
40451	//       "location": "query",
40452	//       "type": "string"
40453	//     },
40454	//     "pageToken": {
40455	//       "description": "Value of the nextPageToken from the previous result page.",
40456	//       "location": "query",
40457	//       "type": "string"
40458	//     },
40459	//     "paymentSource": {
40460	//       "description": "Select only placements with this payment source.",
40461	//       "enum": [
40462	//         "PLACEMENT_AGENCY_PAID",
40463	//         "PLACEMENT_PUBLISHER_PAID"
40464	//       ],
40465	//       "enumDescriptions": [
40466	//         "",
40467	//         ""
40468	//       ],
40469	//       "location": "query",
40470	//       "type": "string"
40471	//     },
40472	//     "placementStrategyIds": {
40473	//       "description": "Select only placements that are associated with these placement strategies.",
40474	//       "format": "int64",
40475	//       "location": "query",
40476	//       "repeated": true,
40477	//       "type": "string"
40478	//     },
40479	//     "pricingTypes": {
40480	//       "description": "Select only placements with these pricing types.",
40481	//       "enum": [
40482	//         "PRICING_TYPE_CPA",
40483	//         "PRICING_TYPE_CPC",
40484	//         "PRICING_TYPE_CPM",
40485	//         "PRICING_TYPE_CPM_ACTIVEVIEW",
40486	//         "PRICING_TYPE_FLAT_RATE_CLICKS",
40487	//         "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
40488	//       ],
40489	//       "enumDescriptions": [
40490	//         "",
40491	//         "",
40492	//         "",
40493	//         "",
40494	//         "",
40495	//         ""
40496	//       ],
40497	//       "location": "query",
40498	//       "repeated": true,
40499	//       "type": "string"
40500	//     },
40501	//     "profileId": {
40502	//       "description": "User profile ID associated with this request.",
40503	//       "format": "int64",
40504	//       "location": "path",
40505	//       "required": true,
40506	//       "type": "string"
40507	//     },
40508	//     "searchString": {
40509	//       "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\".",
40510	//       "location": "query",
40511	//       "type": "string"
40512	//     },
40513	//     "siteIds": {
40514	//       "description": "Select only placements that are associated with these sites.",
40515	//       "format": "int64",
40516	//       "location": "query",
40517	//       "repeated": true,
40518	//       "type": "string"
40519	//     },
40520	//     "sizeIds": {
40521	//       "description": "Select only placements that are associated with these sizes.",
40522	//       "format": "int64",
40523	//       "location": "query",
40524	//       "repeated": true,
40525	//       "type": "string"
40526	//     },
40527	//     "sortField": {
40528	//       "default": "ID",
40529	//       "description": "Field by which to sort the list.",
40530	//       "enum": [
40531	//         "ID",
40532	//         "NAME"
40533	//       ],
40534	//       "enumDescriptions": [
40535	//         "",
40536	//         ""
40537	//       ],
40538	//       "location": "query",
40539	//       "type": "string"
40540	//     },
40541	//     "sortOrder": {
40542	//       "default": "ASCENDING",
40543	//       "description": "Order of sorted results.",
40544	//       "enum": [
40545	//         "ASCENDING",
40546	//         "DESCENDING"
40547	//       ],
40548	//       "enumDescriptions": [
40549	//         "",
40550	//         ""
40551	//       ],
40552	//       "location": "query",
40553	//       "type": "string"
40554	//     }
40555	//   },
40556	//   "path": "userprofiles/{profileId}/placements",
40557	//   "response": {
40558	//     "$ref": "PlacementsListResponse"
40559	//   },
40560	//   "scopes": [
40561	//     "https://www.googleapis.com/auth/dfatrafficking"
40562	//   ]
40563	// }
40564
40565}
40566
40567// Pages invokes f for each page of results.
40568// A non-nil error returned from f will halt the iteration.
40569// The provided context supersedes any context provided to the Context method.
40570func (c *PlacementsListCall) Pages(ctx context.Context, f func(*PlacementsListResponse) error) error {
40571	c.ctx_ = ctx
40572	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
40573	for {
40574		x, err := c.Do()
40575		if err != nil {
40576			return err
40577		}
40578		if err := f(x); err != nil {
40579			return err
40580		}
40581		if x.NextPageToken == "" {
40582			return nil
40583		}
40584		c.PageToken(x.NextPageToken)
40585	}
40586}
40587
40588// method id "dfareporting.placements.patch":
40589
40590type PlacementsPatchCall struct {
40591	s          *Service
40592	profileId  int64
40593	placement  *Placement
40594	urlParams_ gensupport.URLParams
40595	ctx_       context.Context
40596	header_    http.Header
40597}
40598
40599// Patch: Updates an existing placement. This method supports patch
40600// semantics.
40601func (r *PlacementsService) Patch(profileId int64, id int64, placement *Placement) *PlacementsPatchCall {
40602	c := &PlacementsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40603	c.profileId = profileId
40604	c.urlParams_.Set("id", fmt.Sprint(id))
40605	c.placement = placement
40606	return c
40607}
40608
40609// Fields allows partial responses to be retrieved. See
40610// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40611// for more information.
40612func (c *PlacementsPatchCall) Fields(s ...googleapi.Field) *PlacementsPatchCall {
40613	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40614	return c
40615}
40616
40617// Context sets the context to be used in this call's Do method. Any
40618// pending HTTP request will be aborted if the provided context is
40619// canceled.
40620func (c *PlacementsPatchCall) Context(ctx context.Context) *PlacementsPatchCall {
40621	c.ctx_ = ctx
40622	return c
40623}
40624
40625// Header returns an http.Header that can be modified by the caller to
40626// add HTTP headers to the request.
40627func (c *PlacementsPatchCall) Header() http.Header {
40628	if c.header_ == nil {
40629		c.header_ = make(http.Header)
40630	}
40631	return c.header_
40632}
40633
40634func (c *PlacementsPatchCall) doRequest(alt string) (*http.Response, error) {
40635	reqHeaders := make(http.Header)
40636	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
40637	for k, v := range c.header_ {
40638		reqHeaders[k] = v
40639	}
40640	reqHeaders.Set("User-Agent", c.s.userAgent())
40641	var body io.Reader = nil
40642	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
40643	if err != nil {
40644		return nil, err
40645	}
40646	reqHeaders.Set("Content-Type", "application/json")
40647	c.urlParams_.Set("alt", alt)
40648	c.urlParams_.Set("prettyPrint", "false")
40649	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40650	urls += "?" + c.urlParams_.Encode()
40651	req, err := http.NewRequest("PATCH", urls, body)
40652	if err != nil {
40653		return nil, err
40654	}
40655	req.Header = reqHeaders
40656	googleapi.Expand(req.URL, map[string]string{
40657		"profileId": strconv.FormatInt(c.profileId, 10),
40658	})
40659	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40660}
40661
40662// Do executes the "dfareporting.placements.patch" call.
40663// Exactly one of *Placement or error will be non-nil. Any non-2xx
40664// status code is an error. Response headers are in either
40665// *Placement.ServerResponse.Header or (if a response was returned at
40666// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40667// to check whether the returned error was because
40668// http.StatusNotModified was returned.
40669func (c *PlacementsPatchCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40670	gensupport.SetOptions(c.urlParams_, opts...)
40671	res, err := c.doRequest("json")
40672	if res != nil && res.StatusCode == http.StatusNotModified {
40673		if res.Body != nil {
40674			res.Body.Close()
40675		}
40676		return nil, &googleapi.Error{
40677			Code:   res.StatusCode,
40678			Header: res.Header,
40679		}
40680	}
40681	if err != nil {
40682		return nil, err
40683	}
40684	defer googleapi.CloseBody(res)
40685	if err := googleapi.CheckResponse(res); err != nil {
40686		return nil, err
40687	}
40688	ret := &Placement{
40689		ServerResponse: googleapi.ServerResponse{
40690			Header:         res.Header,
40691			HTTPStatusCode: res.StatusCode,
40692		},
40693	}
40694	target := &ret
40695	if err := gensupport.DecodeResponse(target, res); err != nil {
40696		return nil, err
40697	}
40698	return ret, nil
40699	// {
40700	//   "description": "Updates an existing placement. This method supports patch semantics.",
40701	//   "httpMethod": "PATCH",
40702	//   "id": "dfareporting.placements.patch",
40703	//   "parameterOrder": [
40704	//     "profileId",
40705	//     "id"
40706	//   ],
40707	//   "parameters": {
40708	//     "id": {
40709	//       "description": "Placement ID.",
40710	//       "format": "int64",
40711	//       "location": "query",
40712	//       "required": true,
40713	//       "type": "string"
40714	//     },
40715	//     "profileId": {
40716	//       "description": "User profile ID associated with this request.",
40717	//       "format": "int64",
40718	//       "location": "path",
40719	//       "required": true,
40720	//       "type": "string"
40721	//     }
40722	//   },
40723	//   "path": "userprofiles/{profileId}/placements",
40724	//   "request": {
40725	//     "$ref": "Placement"
40726	//   },
40727	//   "response": {
40728	//     "$ref": "Placement"
40729	//   },
40730	//   "scopes": [
40731	//     "https://www.googleapis.com/auth/dfatrafficking"
40732	//   ]
40733	// }
40734
40735}
40736
40737// method id "dfareporting.placements.update":
40738
40739type PlacementsUpdateCall struct {
40740	s          *Service
40741	profileId  int64
40742	placement  *Placement
40743	urlParams_ gensupport.URLParams
40744	ctx_       context.Context
40745	header_    http.Header
40746}
40747
40748// Update: Updates an existing placement.
40749func (r *PlacementsService) Update(profileId int64, placement *Placement) *PlacementsUpdateCall {
40750	c := &PlacementsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40751	c.profileId = profileId
40752	c.placement = placement
40753	return c
40754}
40755
40756// Fields allows partial responses to be retrieved. See
40757// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40758// for more information.
40759func (c *PlacementsUpdateCall) Fields(s ...googleapi.Field) *PlacementsUpdateCall {
40760	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40761	return c
40762}
40763
40764// Context sets the context to be used in this call's Do method. Any
40765// pending HTTP request will be aborted if the provided context is
40766// canceled.
40767func (c *PlacementsUpdateCall) Context(ctx context.Context) *PlacementsUpdateCall {
40768	c.ctx_ = ctx
40769	return c
40770}
40771
40772// Header returns an http.Header that can be modified by the caller to
40773// add HTTP headers to the request.
40774func (c *PlacementsUpdateCall) Header() http.Header {
40775	if c.header_ == nil {
40776		c.header_ = make(http.Header)
40777	}
40778	return c.header_
40779}
40780
40781func (c *PlacementsUpdateCall) doRequest(alt string) (*http.Response, error) {
40782	reqHeaders := make(http.Header)
40783	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
40784	for k, v := range c.header_ {
40785		reqHeaders[k] = v
40786	}
40787	reqHeaders.Set("User-Agent", c.s.userAgent())
40788	var body io.Reader = nil
40789	body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
40790	if err != nil {
40791		return nil, err
40792	}
40793	reqHeaders.Set("Content-Type", "application/json")
40794	c.urlParams_.Set("alt", alt)
40795	c.urlParams_.Set("prettyPrint", "false")
40796	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40797	urls += "?" + c.urlParams_.Encode()
40798	req, err := http.NewRequest("PUT", urls, body)
40799	if err != nil {
40800		return nil, err
40801	}
40802	req.Header = reqHeaders
40803	googleapi.Expand(req.URL, map[string]string{
40804		"profileId": strconv.FormatInt(c.profileId, 10),
40805	})
40806	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40807}
40808
40809// Do executes the "dfareporting.placements.update" call.
40810// Exactly one of *Placement or error will be non-nil. Any non-2xx
40811// status code is an error. Response headers are in either
40812// *Placement.ServerResponse.Header or (if a response was returned at
40813// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40814// to check whether the returned error was because
40815// http.StatusNotModified was returned.
40816func (c *PlacementsUpdateCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40817	gensupport.SetOptions(c.urlParams_, opts...)
40818	res, err := c.doRequest("json")
40819	if res != nil && res.StatusCode == http.StatusNotModified {
40820		if res.Body != nil {
40821			res.Body.Close()
40822		}
40823		return nil, &googleapi.Error{
40824			Code:   res.StatusCode,
40825			Header: res.Header,
40826		}
40827	}
40828	if err != nil {
40829		return nil, err
40830	}
40831	defer googleapi.CloseBody(res)
40832	if err := googleapi.CheckResponse(res); err != nil {
40833		return nil, err
40834	}
40835	ret := &Placement{
40836		ServerResponse: googleapi.ServerResponse{
40837			Header:         res.Header,
40838			HTTPStatusCode: res.StatusCode,
40839		},
40840	}
40841	target := &ret
40842	if err := gensupport.DecodeResponse(target, res); err != nil {
40843		return nil, err
40844	}
40845	return ret, nil
40846	// {
40847	//   "description": "Updates an existing placement.",
40848	//   "httpMethod": "PUT",
40849	//   "id": "dfareporting.placements.update",
40850	//   "parameterOrder": [
40851	//     "profileId"
40852	//   ],
40853	//   "parameters": {
40854	//     "profileId": {
40855	//       "description": "User profile ID associated with this request.",
40856	//       "format": "int64",
40857	//       "location": "path",
40858	//       "required": true,
40859	//       "type": "string"
40860	//     }
40861	//   },
40862	//   "path": "userprofiles/{profileId}/placements",
40863	//   "request": {
40864	//     "$ref": "Placement"
40865	//   },
40866	//   "response": {
40867	//     "$ref": "Placement"
40868	//   },
40869	//   "scopes": [
40870	//     "https://www.googleapis.com/auth/dfatrafficking"
40871	//   ]
40872	// }
40873
40874}
40875
40876// method id "dfareporting.platformTypes.get":
40877
40878type PlatformTypesGetCall struct {
40879	s            *Service
40880	profileId    int64
40881	id           int64
40882	urlParams_   gensupport.URLParams
40883	ifNoneMatch_ string
40884	ctx_         context.Context
40885	header_      http.Header
40886}
40887
40888// Get: Gets one platform type by ID.
40889func (r *PlatformTypesService) Get(profileId int64, id int64) *PlatformTypesGetCall {
40890	c := &PlatformTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40891	c.profileId = profileId
40892	c.id = id
40893	return c
40894}
40895
40896// Fields allows partial responses to be retrieved. See
40897// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40898// for more information.
40899func (c *PlatformTypesGetCall) Fields(s ...googleapi.Field) *PlatformTypesGetCall {
40900	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40901	return c
40902}
40903
40904// IfNoneMatch sets the optional parameter which makes the operation
40905// fail if the object's ETag matches the given value. This is useful for
40906// getting updates only after the object has changed since the last
40907// request. Use googleapi.IsNotModified to check whether the response
40908// error from Do is the result of In-None-Match.
40909func (c *PlatformTypesGetCall) IfNoneMatch(entityTag string) *PlatformTypesGetCall {
40910	c.ifNoneMatch_ = entityTag
40911	return c
40912}
40913
40914// Context sets the context to be used in this call's Do method. Any
40915// pending HTTP request will be aborted if the provided context is
40916// canceled.
40917func (c *PlatformTypesGetCall) Context(ctx context.Context) *PlatformTypesGetCall {
40918	c.ctx_ = ctx
40919	return c
40920}
40921
40922// Header returns an http.Header that can be modified by the caller to
40923// add HTTP headers to the request.
40924func (c *PlatformTypesGetCall) Header() http.Header {
40925	if c.header_ == nil {
40926		c.header_ = make(http.Header)
40927	}
40928	return c.header_
40929}
40930
40931func (c *PlatformTypesGetCall) doRequest(alt string) (*http.Response, error) {
40932	reqHeaders := make(http.Header)
40933	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
40934	for k, v := range c.header_ {
40935		reqHeaders[k] = v
40936	}
40937	reqHeaders.Set("User-Agent", c.s.userAgent())
40938	if c.ifNoneMatch_ != "" {
40939		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40940	}
40941	var body io.Reader = nil
40942	c.urlParams_.Set("alt", alt)
40943	c.urlParams_.Set("prettyPrint", "false")
40944	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes/{id}")
40945	urls += "?" + c.urlParams_.Encode()
40946	req, err := http.NewRequest("GET", urls, body)
40947	if err != nil {
40948		return nil, err
40949	}
40950	req.Header = reqHeaders
40951	googleapi.Expand(req.URL, map[string]string{
40952		"profileId": strconv.FormatInt(c.profileId, 10),
40953		"id":        strconv.FormatInt(c.id, 10),
40954	})
40955	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40956}
40957
40958// Do executes the "dfareporting.platformTypes.get" call.
40959// Exactly one of *PlatformType or error will be non-nil. Any non-2xx
40960// status code is an error. Response headers are in either
40961// *PlatformType.ServerResponse.Header or (if a response was returned at
40962// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40963// to check whether the returned error was because
40964// http.StatusNotModified was returned.
40965func (c *PlatformTypesGetCall) Do(opts ...googleapi.CallOption) (*PlatformType, error) {
40966	gensupport.SetOptions(c.urlParams_, opts...)
40967	res, err := c.doRequest("json")
40968	if res != nil && res.StatusCode == http.StatusNotModified {
40969		if res.Body != nil {
40970			res.Body.Close()
40971		}
40972		return nil, &googleapi.Error{
40973			Code:   res.StatusCode,
40974			Header: res.Header,
40975		}
40976	}
40977	if err != nil {
40978		return nil, err
40979	}
40980	defer googleapi.CloseBody(res)
40981	if err := googleapi.CheckResponse(res); err != nil {
40982		return nil, err
40983	}
40984	ret := &PlatformType{
40985		ServerResponse: googleapi.ServerResponse{
40986			Header:         res.Header,
40987			HTTPStatusCode: res.StatusCode,
40988		},
40989	}
40990	target := &ret
40991	if err := gensupport.DecodeResponse(target, res); err != nil {
40992		return nil, err
40993	}
40994	return ret, nil
40995	// {
40996	//   "description": "Gets one platform type by ID.",
40997	//   "httpMethod": "GET",
40998	//   "id": "dfareporting.platformTypes.get",
40999	//   "parameterOrder": [
41000	//     "profileId",
41001	//     "id"
41002	//   ],
41003	//   "parameters": {
41004	//     "id": {
41005	//       "description": "Platform type ID.",
41006	//       "format": "int64",
41007	//       "location": "path",
41008	//       "required": true,
41009	//       "type": "string"
41010	//     },
41011	//     "profileId": {
41012	//       "description": "User profile ID associated with this request.",
41013	//       "format": "int64",
41014	//       "location": "path",
41015	//       "required": true,
41016	//       "type": "string"
41017	//     }
41018	//   },
41019	//   "path": "userprofiles/{profileId}/platformTypes/{id}",
41020	//   "response": {
41021	//     "$ref": "PlatformType"
41022	//   },
41023	//   "scopes": [
41024	//     "https://www.googleapis.com/auth/dfatrafficking"
41025	//   ]
41026	// }
41027
41028}
41029
41030// method id "dfareporting.platformTypes.list":
41031
41032type PlatformTypesListCall struct {
41033	s            *Service
41034	profileId    int64
41035	urlParams_   gensupport.URLParams
41036	ifNoneMatch_ string
41037	ctx_         context.Context
41038	header_      http.Header
41039}
41040
41041// List: Retrieves a list of platform types.
41042func (r *PlatformTypesService) List(profileId int64) *PlatformTypesListCall {
41043	c := &PlatformTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41044	c.profileId = profileId
41045	return c
41046}
41047
41048// Fields allows partial responses to be retrieved. See
41049// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41050// for more information.
41051func (c *PlatformTypesListCall) Fields(s ...googleapi.Field) *PlatformTypesListCall {
41052	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41053	return c
41054}
41055
41056// IfNoneMatch sets the optional parameter which makes the operation
41057// fail if the object's ETag matches the given value. This is useful for
41058// getting updates only after the object has changed since the last
41059// request. Use googleapi.IsNotModified to check whether the response
41060// error from Do is the result of In-None-Match.
41061func (c *PlatformTypesListCall) IfNoneMatch(entityTag string) *PlatformTypesListCall {
41062	c.ifNoneMatch_ = entityTag
41063	return c
41064}
41065
41066// Context sets the context to be used in this call's Do method. Any
41067// pending HTTP request will be aborted if the provided context is
41068// canceled.
41069func (c *PlatformTypesListCall) Context(ctx context.Context) *PlatformTypesListCall {
41070	c.ctx_ = ctx
41071	return c
41072}
41073
41074// Header returns an http.Header that can be modified by the caller to
41075// add HTTP headers to the request.
41076func (c *PlatformTypesListCall) Header() http.Header {
41077	if c.header_ == nil {
41078		c.header_ = make(http.Header)
41079	}
41080	return c.header_
41081}
41082
41083func (c *PlatformTypesListCall) doRequest(alt string) (*http.Response, error) {
41084	reqHeaders := make(http.Header)
41085	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
41086	for k, v := range c.header_ {
41087		reqHeaders[k] = v
41088	}
41089	reqHeaders.Set("User-Agent", c.s.userAgent())
41090	if c.ifNoneMatch_ != "" {
41091		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41092	}
41093	var body io.Reader = nil
41094	c.urlParams_.Set("alt", alt)
41095	c.urlParams_.Set("prettyPrint", "false")
41096	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes")
41097	urls += "?" + c.urlParams_.Encode()
41098	req, err := http.NewRequest("GET", urls, body)
41099	if err != nil {
41100		return nil, err
41101	}
41102	req.Header = reqHeaders
41103	googleapi.Expand(req.URL, map[string]string{
41104		"profileId": strconv.FormatInt(c.profileId, 10),
41105	})
41106	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41107}
41108
41109// Do executes the "dfareporting.platformTypes.list" call.
41110// Exactly one of *PlatformTypesListResponse or error will be non-nil.
41111// Any non-2xx status code is an error. Response headers are in either
41112// *PlatformTypesListResponse.ServerResponse.Header or (if a response
41113// was returned at all) in error.(*googleapi.Error).Header. Use
41114// googleapi.IsNotModified to check whether the returned error was
41115// because http.StatusNotModified was returned.
41116func (c *PlatformTypesListCall) Do(opts ...googleapi.CallOption) (*PlatformTypesListResponse, error) {
41117	gensupport.SetOptions(c.urlParams_, opts...)
41118	res, err := c.doRequest("json")
41119	if res != nil && res.StatusCode == http.StatusNotModified {
41120		if res.Body != nil {
41121			res.Body.Close()
41122		}
41123		return nil, &googleapi.Error{
41124			Code:   res.StatusCode,
41125			Header: res.Header,
41126		}
41127	}
41128	if err != nil {
41129		return nil, err
41130	}
41131	defer googleapi.CloseBody(res)
41132	if err := googleapi.CheckResponse(res); err != nil {
41133		return nil, err
41134	}
41135	ret := &PlatformTypesListResponse{
41136		ServerResponse: googleapi.ServerResponse{
41137			Header:         res.Header,
41138			HTTPStatusCode: res.StatusCode,
41139		},
41140	}
41141	target := &ret
41142	if err := gensupport.DecodeResponse(target, res); err != nil {
41143		return nil, err
41144	}
41145	return ret, nil
41146	// {
41147	//   "description": "Retrieves a list of platform types.",
41148	//   "httpMethod": "GET",
41149	//   "id": "dfareporting.platformTypes.list",
41150	//   "parameterOrder": [
41151	//     "profileId"
41152	//   ],
41153	//   "parameters": {
41154	//     "profileId": {
41155	//       "description": "User profile ID associated with this request.",
41156	//       "format": "int64",
41157	//       "location": "path",
41158	//       "required": true,
41159	//       "type": "string"
41160	//     }
41161	//   },
41162	//   "path": "userprofiles/{profileId}/platformTypes",
41163	//   "response": {
41164	//     "$ref": "PlatformTypesListResponse"
41165	//   },
41166	//   "scopes": [
41167	//     "https://www.googleapis.com/auth/dfatrafficking"
41168	//   ]
41169	// }
41170
41171}
41172
41173// method id "dfareporting.postalCodes.get":
41174
41175type PostalCodesGetCall struct {
41176	s            *Service
41177	profileId    int64
41178	code         string
41179	urlParams_   gensupport.URLParams
41180	ifNoneMatch_ string
41181	ctx_         context.Context
41182	header_      http.Header
41183}
41184
41185// Get: Gets one postal code by ID.
41186func (r *PostalCodesService) Get(profileId int64, code string) *PostalCodesGetCall {
41187	c := &PostalCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41188	c.profileId = profileId
41189	c.code = code
41190	return c
41191}
41192
41193// Fields allows partial responses to be retrieved. See
41194// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41195// for more information.
41196func (c *PostalCodesGetCall) Fields(s ...googleapi.Field) *PostalCodesGetCall {
41197	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41198	return c
41199}
41200
41201// IfNoneMatch sets the optional parameter which makes the operation
41202// fail if the object's ETag matches the given value. This is useful for
41203// getting updates only after the object has changed since the last
41204// request. Use googleapi.IsNotModified to check whether the response
41205// error from Do is the result of In-None-Match.
41206func (c *PostalCodesGetCall) IfNoneMatch(entityTag string) *PostalCodesGetCall {
41207	c.ifNoneMatch_ = entityTag
41208	return c
41209}
41210
41211// Context sets the context to be used in this call's Do method. Any
41212// pending HTTP request will be aborted if the provided context is
41213// canceled.
41214func (c *PostalCodesGetCall) Context(ctx context.Context) *PostalCodesGetCall {
41215	c.ctx_ = ctx
41216	return c
41217}
41218
41219// Header returns an http.Header that can be modified by the caller to
41220// add HTTP headers to the request.
41221func (c *PostalCodesGetCall) Header() http.Header {
41222	if c.header_ == nil {
41223		c.header_ = make(http.Header)
41224	}
41225	return c.header_
41226}
41227
41228func (c *PostalCodesGetCall) doRequest(alt string) (*http.Response, error) {
41229	reqHeaders := make(http.Header)
41230	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
41231	for k, v := range c.header_ {
41232		reqHeaders[k] = v
41233	}
41234	reqHeaders.Set("User-Agent", c.s.userAgent())
41235	if c.ifNoneMatch_ != "" {
41236		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41237	}
41238	var body io.Reader = nil
41239	c.urlParams_.Set("alt", alt)
41240	c.urlParams_.Set("prettyPrint", "false")
41241	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes/{code}")
41242	urls += "?" + c.urlParams_.Encode()
41243	req, err := http.NewRequest("GET", urls, body)
41244	if err != nil {
41245		return nil, err
41246	}
41247	req.Header = reqHeaders
41248	googleapi.Expand(req.URL, map[string]string{
41249		"profileId": strconv.FormatInt(c.profileId, 10),
41250		"code":      c.code,
41251	})
41252	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41253}
41254
41255// Do executes the "dfareporting.postalCodes.get" call.
41256// Exactly one of *PostalCode or error will be non-nil. Any non-2xx
41257// status code is an error. Response headers are in either
41258// *PostalCode.ServerResponse.Header or (if a response was returned at
41259// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41260// to check whether the returned error was because
41261// http.StatusNotModified was returned.
41262func (c *PostalCodesGetCall) Do(opts ...googleapi.CallOption) (*PostalCode, error) {
41263	gensupport.SetOptions(c.urlParams_, opts...)
41264	res, err := c.doRequest("json")
41265	if res != nil && res.StatusCode == http.StatusNotModified {
41266		if res.Body != nil {
41267			res.Body.Close()
41268		}
41269		return nil, &googleapi.Error{
41270			Code:   res.StatusCode,
41271			Header: res.Header,
41272		}
41273	}
41274	if err != nil {
41275		return nil, err
41276	}
41277	defer googleapi.CloseBody(res)
41278	if err := googleapi.CheckResponse(res); err != nil {
41279		return nil, err
41280	}
41281	ret := &PostalCode{
41282		ServerResponse: googleapi.ServerResponse{
41283			Header:         res.Header,
41284			HTTPStatusCode: res.StatusCode,
41285		},
41286	}
41287	target := &ret
41288	if err := gensupport.DecodeResponse(target, res); err != nil {
41289		return nil, err
41290	}
41291	return ret, nil
41292	// {
41293	//   "description": "Gets one postal code by ID.",
41294	//   "httpMethod": "GET",
41295	//   "id": "dfareporting.postalCodes.get",
41296	//   "parameterOrder": [
41297	//     "profileId",
41298	//     "code"
41299	//   ],
41300	//   "parameters": {
41301	//     "code": {
41302	//       "description": "Postal code ID.",
41303	//       "location": "path",
41304	//       "required": true,
41305	//       "type": "string"
41306	//     },
41307	//     "profileId": {
41308	//       "description": "User profile ID associated with this request.",
41309	//       "format": "int64",
41310	//       "location": "path",
41311	//       "required": true,
41312	//       "type": "string"
41313	//     }
41314	//   },
41315	//   "path": "userprofiles/{profileId}/postalCodes/{code}",
41316	//   "response": {
41317	//     "$ref": "PostalCode"
41318	//   },
41319	//   "scopes": [
41320	//     "https://www.googleapis.com/auth/dfatrafficking"
41321	//   ]
41322	// }
41323
41324}
41325
41326// method id "dfareporting.postalCodes.list":
41327
41328type PostalCodesListCall struct {
41329	s            *Service
41330	profileId    int64
41331	urlParams_   gensupport.URLParams
41332	ifNoneMatch_ string
41333	ctx_         context.Context
41334	header_      http.Header
41335}
41336
41337// List: Retrieves a list of postal codes.
41338func (r *PostalCodesService) List(profileId int64) *PostalCodesListCall {
41339	c := &PostalCodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41340	c.profileId = profileId
41341	return c
41342}
41343
41344// Fields allows partial responses to be retrieved. See
41345// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41346// for more information.
41347func (c *PostalCodesListCall) Fields(s ...googleapi.Field) *PostalCodesListCall {
41348	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41349	return c
41350}
41351
41352// IfNoneMatch sets the optional parameter which makes the operation
41353// fail if the object's ETag matches the given value. This is useful for
41354// getting updates only after the object has changed since the last
41355// request. Use googleapi.IsNotModified to check whether the response
41356// error from Do is the result of In-None-Match.
41357func (c *PostalCodesListCall) IfNoneMatch(entityTag string) *PostalCodesListCall {
41358	c.ifNoneMatch_ = entityTag
41359	return c
41360}
41361
41362// Context sets the context to be used in this call's Do method. Any
41363// pending HTTP request will be aborted if the provided context is
41364// canceled.
41365func (c *PostalCodesListCall) Context(ctx context.Context) *PostalCodesListCall {
41366	c.ctx_ = ctx
41367	return c
41368}
41369
41370// Header returns an http.Header that can be modified by the caller to
41371// add HTTP headers to the request.
41372func (c *PostalCodesListCall) Header() http.Header {
41373	if c.header_ == nil {
41374		c.header_ = make(http.Header)
41375	}
41376	return c.header_
41377}
41378
41379func (c *PostalCodesListCall) doRequest(alt string) (*http.Response, error) {
41380	reqHeaders := make(http.Header)
41381	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
41382	for k, v := range c.header_ {
41383		reqHeaders[k] = v
41384	}
41385	reqHeaders.Set("User-Agent", c.s.userAgent())
41386	if c.ifNoneMatch_ != "" {
41387		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41388	}
41389	var body io.Reader = nil
41390	c.urlParams_.Set("alt", alt)
41391	c.urlParams_.Set("prettyPrint", "false")
41392	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes")
41393	urls += "?" + c.urlParams_.Encode()
41394	req, err := http.NewRequest("GET", urls, body)
41395	if err != nil {
41396		return nil, err
41397	}
41398	req.Header = reqHeaders
41399	googleapi.Expand(req.URL, map[string]string{
41400		"profileId": strconv.FormatInt(c.profileId, 10),
41401	})
41402	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41403}
41404
41405// Do executes the "dfareporting.postalCodes.list" call.
41406// Exactly one of *PostalCodesListResponse or error will be non-nil. Any
41407// non-2xx status code is an error. Response headers are in either
41408// *PostalCodesListResponse.ServerResponse.Header or (if a response was
41409// returned at all) in error.(*googleapi.Error).Header. Use
41410// googleapi.IsNotModified to check whether the returned error was
41411// because http.StatusNotModified was returned.
41412func (c *PostalCodesListCall) Do(opts ...googleapi.CallOption) (*PostalCodesListResponse, error) {
41413	gensupport.SetOptions(c.urlParams_, opts...)
41414	res, err := c.doRequest("json")
41415	if res != nil && res.StatusCode == http.StatusNotModified {
41416		if res.Body != nil {
41417			res.Body.Close()
41418		}
41419		return nil, &googleapi.Error{
41420			Code:   res.StatusCode,
41421			Header: res.Header,
41422		}
41423	}
41424	if err != nil {
41425		return nil, err
41426	}
41427	defer googleapi.CloseBody(res)
41428	if err := googleapi.CheckResponse(res); err != nil {
41429		return nil, err
41430	}
41431	ret := &PostalCodesListResponse{
41432		ServerResponse: googleapi.ServerResponse{
41433			Header:         res.Header,
41434			HTTPStatusCode: res.StatusCode,
41435		},
41436	}
41437	target := &ret
41438	if err := gensupport.DecodeResponse(target, res); err != nil {
41439		return nil, err
41440	}
41441	return ret, nil
41442	// {
41443	//   "description": "Retrieves a list of postal codes.",
41444	//   "httpMethod": "GET",
41445	//   "id": "dfareporting.postalCodes.list",
41446	//   "parameterOrder": [
41447	//     "profileId"
41448	//   ],
41449	//   "parameters": {
41450	//     "profileId": {
41451	//       "description": "User profile ID associated with this request.",
41452	//       "format": "int64",
41453	//       "location": "path",
41454	//       "required": true,
41455	//       "type": "string"
41456	//     }
41457	//   },
41458	//   "path": "userprofiles/{profileId}/postalCodes",
41459	//   "response": {
41460	//     "$ref": "PostalCodesListResponse"
41461	//   },
41462	//   "scopes": [
41463	//     "https://www.googleapis.com/auth/dfatrafficking"
41464	//   ]
41465	// }
41466
41467}
41468
41469// method id "dfareporting.projects.get":
41470
41471type ProjectsGetCall struct {
41472	s            *Service
41473	profileId    int64
41474	id           int64
41475	urlParams_   gensupport.URLParams
41476	ifNoneMatch_ string
41477	ctx_         context.Context
41478	header_      http.Header
41479}
41480
41481// Get: Gets one project by ID.
41482func (r *ProjectsService) Get(profileId int64, id int64) *ProjectsGetCall {
41483	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41484	c.profileId = profileId
41485	c.id = id
41486	return c
41487}
41488
41489// Fields allows partial responses to be retrieved. See
41490// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41491// for more information.
41492func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
41493	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41494	return c
41495}
41496
41497// IfNoneMatch sets the optional parameter which makes the operation
41498// fail if the object's ETag matches the given value. This is useful for
41499// getting updates only after the object has changed since the last
41500// request. Use googleapi.IsNotModified to check whether the response
41501// error from Do is the result of In-None-Match.
41502func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
41503	c.ifNoneMatch_ = entityTag
41504	return c
41505}
41506
41507// Context sets the context to be used in this call's Do method. Any
41508// pending HTTP request will be aborted if the provided context is
41509// canceled.
41510func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
41511	c.ctx_ = ctx
41512	return c
41513}
41514
41515// Header returns an http.Header that can be modified by the caller to
41516// add HTTP headers to the request.
41517func (c *ProjectsGetCall) Header() http.Header {
41518	if c.header_ == nil {
41519		c.header_ = make(http.Header)
41520	}
41521	return c.header_
41522}
41523
41524func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
41525	reqHeaders := make(http.Header)
41526	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
41527	for k, v := range c.header_ {
41528		reqHeaders[k] = v
41529	}
41530	reqHeaders.Set("User-Agent", c.s.userAgent())
41531	if c.ifNoneMatch_ != "" {
41532		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41533	}
41534	var body io.Reader = nil
41535	c.urlParams_.Set("alt", alt)
41536	c.urlParams_.Set("prettyPrint", "false")
41537	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{id}")
41538	urls += "?" + c.urlParams_.Encode()
41539	req, err := http.NewRequest("GET", urls, body)
41540	if err != nil {
41541		return nil, err
41542	}
41543	req.Header = reqHeaders
41544	googleapi.Expand(req.URL, map[string]string{
41545		"profileId": strconv.FormatInt(c.profileId, 10),
41546		"id":        strconv.FormatInt(c.id, 10),
41547	})
41548	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41549}
41550
41551// Do executes the "dfareporting.projects.get" call.
41552// Exactly one of *Project or error will be non-nil. Any non-2xx status
41553// code is an error. Response headers are in either
41554// *Project.ServerResponse.Header or (if a response was returned at all)
41555// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
41556// check whether the returned error was because http.StatusNotModified
41557// was returned.
41558func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
41559	gensupport.SetOptions(c.urlParams_, opts...)
41560	res, err := c.doRequest("json")
41561	if res != nil && res.StatusCode == http.StatusNotModified {
41562		if res.Body != nil {
41563			res.Body.Close()
41564		}
41565		return nil, &googleapi.Error{
41566			Code:   res.StatusCode,
41567			Header: res.Header,
41568		}
41569	}
41570	if err != nil {
41571		return nil, err
41572	}
41573	defer googleapi.CloseBody(res)
41574	if err := googleapi.CheckResponse(res); err != nil {
41575		return nil, err
41576	}
41577	ret := &Project{
41578		ServerResponse: googleapi.ServerResponse{
41579			Header:         res.Header,
41580			HTTPStatusCode: res.StatusCode,
41581		},
41582	}
41583	target := &ret
41584	if err := gensupport.DecodeResponse(target, res); err != nil {
41585		return nil, err
41586	}
41587	return ret, nil
41588	// {
41589	//   "description": "Gets one project by ID.",
41590	//   "httpMethod": "GET",
41591	//   "id": "dfareporting.projects.get",
41592	//   "parameterOrder": [
41593	//     "profileId",
41594	//     "id"
41595	//   ],
41596	//   "parameters": {
41597	//     "id": {
41598	//       "description": "Project ID.",
41599	//       "format": "int64",
41600	//       "location": "path",
41601	//       "required": true,
41602	//       "type": "string"
41603	//     },
41604	//     "profileId": {
41605	//       "description": "User profile ID associated with this request.",
41606	//       "format": "int64",
41607	//       "location": "path",
41608	//       "required": true,
41609	//       "type": "string"
41610	//     }
41611	//   },
41612	//   "path": "userprofiles/{profileId}/projects/{id}",
41613	//   "response": {
41614	//     "$ref": "Project"
41615	//   },
41616	//   "scopes": [
41617	//     "https://www.googleapis.com/auth/dfatrafficking"
41618	//   ]
41619	// }
41620
41621}
41622
41623// method id "dfareporting.projects.list":
41624
41625type ProjectsListCall struct {
41626	s            *Service
41627	profileId    int64
41628	urlParams_   gensupport.URLParams
41629	ifNoneMatch_ string
41630	ctx_         context.Context
41631	header_      http.Header
41632}
41633
41634// List: Retrieves a list of projects, possibly filtered. This method
41635// supports paging.
41636func (r *ProjectsService) List(profileId int64) *ProjectsListCall {
41637	c := &ProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41638	c.profileId = profileId
41639	return c
41640}
41641
41642// AdvertiserIds sets the optional parameter "advertiserIds": Select
41643// only projects with these advertiser IDs.
41644func (c *ProjectsListCall) AdvertiserIds(advertiserIds ...int64) *ProjectsListCall {
41645	var advertiserIds_ []string
41646	for _, v := range advertiserIds {
41647		advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
41648	}
41649	c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
41650	return c
41651}
41652
41653// Ids sets the optional parameter "ids": Select only projects with
41654// these IDs.
41655func (c *ProjectsListCall) Ids(ids ...int64) *ProjectsListCall {
41656	var ids_ []string
41657	for _, v := range ids {
41658		ids_ = append(ids_, fmt.Sprint(v))
41659	}
41660	c.urlParams_.SetMulti("ids", ids_)
41661	return c
41662}
41663
41664// MaxResults sets the optional parameter "maxResults": Maximum number
41665// of results to return.
41666func (c *ProjectsListCall) MaxResults(maxResults int64) *ProjectsListCall {
41667	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
41668	return c
41669}
41670
41671// PageToken sets the optional parameter "pageToken": Value of the
41672// nextPageToken from the previous result page.
41673func (c *ProjectsListCall) PageToken(pageToken string) *ProjectsListCall {
41674	c.urlParams_.Set("pageToken", pageToken)
41675	return c
41676}
41677
41678// SearchString sets the optional parameter "searchString": Allows
41679// searching for projects by name or ID. Wildcards (*) are allowed. For
41680// example, "project*2015" will return projects with names like "project
41681// June 2015", "project April 2015", or simply "project 2015". Most of
41682// the searches also add wildcards implicitly at the start and the end
41683// of the search string. For example, a search string of "project" will
41684// match projects with name "my project", "project 2015", or simply
41685// "project".
41686func (c *ProjectsListCall) SearchString(searchString string) *ProjectsListCall {
41687	c.urlParams_.Set("searchString", searchString)
41688	return c
41689}
41690
41691// SortField sets the optional parameter "sortField": Field by which to
41692// sort the list.
41693//
41694// Possible values:
41695//   "ID" (default)
41696//   "NAME"
41697func (c *ProjectsListCall) SortField(sortField string) *ProjectsListCall {
41698	c.urlParams_.Set("sortField", sortField)
41699	return c
41700}
41701
41702// SortOrder sets the optional parameter "sortOrder": Order of sorted
41703// results.
41704//
41705// Possible values:
41706//   "ASCENDING" (default)
41707//   "DESCENDING"
41708func (c *ProjectsListCall) SortOrder(sortOrder string) *ProjectsListCall {
41709	c.urlParams_.Set("sortOrder", sortOrder)
41710	return c
41711}
41712
41713// Fields allows partial responses to be retrieved. See
41714// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41715// for more information.
41716func (c *ProjectsListCall) Fields(s ...googleapi.Field) *ProjectsListCall {
41717	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41718	return c
41719}
41720
41721// IfNoneMatch sets the optional parameter which makes the operation
41722// fail if the object's ETag matches the given value. This is useful for
41723// getting updates only after the object has changed since the last
41724// request. Use googleapi.IsNotModified to check whether the response
41725// error from Do is the result of In-None-Match.
41726func (c *ProjectsListCall) IfNoneMatch(entityTag string) *ProjectsListCall {
41727	c.ifNoneMatch_ = entityTag
41728	return c
41729}
41730
41731// Context sets the context to be used in this call's Do method. Any
41732// pending HTTP request will be aborted if the provided context is
41733// canceled.
41734func (c *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
41735	c.ctx_ = ctx
41736	return c
41737}
41738
41739// Header returns an http.Header that can be modified by the caller to
41740// add HTTP headers to the request.
41741func (c *ProjectsListCall) Header() http.Header {
41742	if c.header_ == nil {
41743		c.header_ = make(http.Header)
41744	}
41745	return c.header_
41746}
41747
41748func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
41749	reqHeaders := make(http.Header)
41750	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
41751	for k, v := range c.header_ {
41752		reqHeaders[k] = v
41753	}
41754	reqHeaders.Set("User-Agent", c.s.userAgent())
41755	if c.ifNoneMatch_ != "" {
41756		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41757	}
41758	var body io.Reader = nil
41759	c.urlParams_.Set("alt", alt)
41760	c.urlParams_.Set("prettyPrint", "false")
41761	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects")
41762	urls += "?" + c.urlParams_.Encode()
41763	req, err := http.NewRequest("GET", urls, body)
41764	if err != nil {
41765		return nil, err
41766	}
41767	req.Header = reqHeaders
41768	googleapi.Expand(req.URL, map[string]string{
41769		"profileId": strconv.FormatInt(c.profileId, 10),
41770	})
41771	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41772}
41773
41774// Do executes the "dfareporting.projects.list" call.
41775// Exactly one of *ProjectsListResponse or error will be non-nil. Any
41776// non-2xx status code is an error. Response headers are in either
41777// *ProjectsListResponse.ServerResponse.Header or (if a response was
41778// returned at all) in error.(*googleapi.Error).Header. Use
41779// googleapi.IsNotModified to check whether the returned error was
41780// because http.StatusNotModified was returned.
41781func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ProjectsListResponse, error) {
41782	gensupport.SetOptions(c.urlParams_, opts...)
41783	res, err := c.doRequest("json")
41784	if res != nil && res.StatusCode == http.StatusNotModified {
41785		if res.Body != nil {
41786			res.Body.Close()
41787		}
41788		return nil, &googleapi.Error{
41789			Code:   res.StatusCode,
41790			Header: res.Header,
41791		}
41792	}
41793	if err != nil {
41794		return nil, err
41795	}
41796	defer googleapi.CloseBody(res)
41797	if err := googleapi.CheckResponse(res); err != nil {
41798		return nil, err
41799	}
41800	ret := &ProjectsListResponse{
41801		ServerResponse: googleapi.ServerResponse{
41802			Header:         res.Header,
41803			HTTPStatusCode: res.StatusCode,
41804		},
41805	}
41806	target := &ret
41807	if err := gensupport.DecodeResponse(target, res); err != nil {
41808		return nil, err
41809	}
41810	return ret, nil
41811	// {
41812	//   "description": "Retrieves a list of projects, possibly filtered. This method supports paging.",
41813	//   "httpMethod": "GET",
41814	//   "id": "dfareporting.projects.list",
41815	//   "parameterOrder": [
41816	//     "profileId"
41817	//   ],
41818	//   "parameters": {
41819	//     "advertiserIds": {
41820	//       "description": "Select only projects with these advertiser IDs.",
41821	//       "format": "int64",
41822	//       "location": "query",
41823	//       "repeated": true,
41824	//       "type": "string"
41825	//     },
41826	//     "ids": {
41827	//       "description": "Select only projects with these IDs.",
41828	//       "format": "int64",
41829	//       "location": "query",
41830	//       "repeated": true,
41831	//       "type": "string"
41832	//     },
41833	//     "maxResults": {
41834	//       "default": "1000",
41835	//       "description": "Maximum number of results to return.",
41836	//       "format": "int32",
41837	//       "location": "query",
41838	//       "maximum": "1000",
41839	//       "minimum": "0",
41840	//       "type": "integer"
41841	//     },
41842	//     "pageToken": {
41843	//       "description": "Value of the nextPageToken from the previous result page.",
41844	//       "location": "query",
41845	//       "type": "string"
41846	//     },
41847	//     "profileId": {
41848	//       "description": "User profile ID associated with this request.",
41849	//       "format": "int64",
41850	//       "location": "path",
41851	//       "required": true,
41852	//       "type": "string"
41853	//     },
41854	//     "searchString": {
41855	//       "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\".",
41856	//       "location": "query",
41857	//       "type": "string"
41858	//     },
41859	//     "sortField": {
41860	//       "default": "ID",
41861	//       "description": "Field by which to sort the list.",
41862	//       "enum": [
41863	//         "ID",
41864	//         "NAME"
41865	//       ],
41866	//       "enumDescriptions": [
41867	//         "",
41868	//         ""
41869	//       ],
41870	//       "location": "query",
41871	//       "type": "string"
41872	//     },
41873	//     "sortOrder": {
41874	//       "default": "ASCENDING",
41875	//       "description": "Order of sorted results.",
41876	//       "enum": [
41877	//         "ASCENDING",
41878	//         "DESCENDING"
41879	//       ],
41880	//       "enumDescriptions": [
41881	//         "",
41882	//         ""
41883	//       ],
41884	//       "location": "query",
41885	//       "type": "string"
41886	//     }
41887	//   },
41888	//   "path": "userprofiles/{profileId}/projects",
41889	//   "response": {
41890	//     "$ref": "ProjectsListResponse"
41891	//   },
41892	//   "scopes": [
41893	//     "https://www.googleapis.com/auth/dfatrafficking"
41894	//   ]
41895	// }
41896
41897}
41898
41899// Pages invokes f for each page of results.
41900// A non-nil error returned from f will halt the iteration.
41901// The provided context supersedes any context provided to the Context method.
41902func (c *ProjectsListCall) Pages(ctx context.Context, f func(*ProjectsListResponse) error) error {
41903	c.ctx_ = ctx
41904	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
41905	for {
41906		x, err := c.Do()
41907		if err != nil {
41908			return err
41909		}
41910		if err := f(x); err != nil {
41911			return err
41912		}
41913		if x.NextPageToken == "" {
41914			return nil
41915		}
41916		c.PageToken(x.NextPageToken)
41917	}
41918}
41919
41920// method id "dfareporting.regions.list":
41921
41922type RegionsListCall struct {
41923	s            *Service
41924	profileId    int64
41925	urlParams_   gensupport.URLParams
41926	ifNoneMatch_ string
41927	ctx_         context.Context
41928	header_      http.Header
41929}
41930
41931// List: Retrieves a list of regions.
41932func (r *RegionsService) List(profileId int64) *RegionsListCall {
41933	c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41934	c.profileId = profileId
41935	return c
41936}
41937
41938// Fields allows partial responses to be retrieved. See
41939// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41940// for more information.
41941func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall {
41942	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41943	return c
41944}
41945
41946// IfNoneMatch sets the optional parameter which makes the operation
41947// fail if the object's ETag matches the given value. This is useful for
41948// getting updates only after the object has changed since the last
41949// request. Use googleapi.IsNotModified to check whether the response
41950// error from Do is the result of In-None-Match.
41951func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall {
41952	c.ifNoneMatch_ = entityTag
41953	return c
41954}
41955
41956// Context sets the context to be used in this call's Do method. Any
41957// pending HTTP request will be aborted if the provided context is
41958// canceled.
41959func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
41960	c.ctx_ = ctx
41961	return c
41962}
41963
41964// Header returns an http.Header that can be modified by the caller to
41965// add HTTP headers to the request.
41966func (c *RegionsListCall) Header() http.Header {
41967	if c.header_ == nil {
41968		c.header_ = make(http.Header)
41969	}
41970	return c.header_
41971}
41972
41973func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
41974	reqHeaders := make(http.Header)
41975	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
41976	for k, v := range c.header_ {
41977		reqHeaders[k] = v
41978	}
41979	reqHeaders.Set("User-Agent", c.s.userAgent())
41980	if c.ifNoneMatch_ != "" {
41981		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41982	}
41983	var body io.Reader = nil
41984	c.urlParams_.Set("alt", alt)
41985	c.urlParams_.Set("prettyPrint", "false")
41986	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/regions")
41987	urls += "?" + c.urlParams_.Encode()
41988	req, err := http.NewRequest("GET", urls, body)
41989	if err != nil {
41990		return nil, err
41991	}
41992	req.Header = reqHeaders
41993	googleapi.Expand(req.URL, map[string]string{
41994		"profileId": strconv.FormatInt(c.profileId, 10),
41995	})
41996	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41997}
41998
41999// Do executes the "dfareporting.regions.list" call.
42000// Exactly one of *RegionsListResponse or error will be non-nil. Any
42001// non-2xx status code is an error. Response headers are in either
42002// *RegionsListResponse.ServerResponse.Header or (if a response was
42003// returned at all) in error.(*googleapi.Error).Header. Use
42004// googleapi.IsNotModified to check whether the returned error was
42005// because http.StatusNotModified was returned.
42006func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionsListResponse, error) {
42007	gensupport.SetOptions(c.urlParams_, opts...)
42008	res, err := c.doRequest("json")
42009	if res != nil && res.StatusCode == http.StatusNotModified {
42010		if res.Body != nil {
42011			res.Body.Close()
42012		}
42013		return nil, &googleapi.Error{
42014			Code:   res.StatusCode,
42015			Header: res.Header,
42016		}
42017	}
42018	if err != nil {
42019		return nil, err
42020	}
42021	defer googleapi.CloseBody(res)
42022	if err := googleapi.CheckResponse(res); err != nil {
42023		return nil, err
42024	}
42025	ret := &RegionsListResponse{
42026		ServerResponse: googleapi.ServerResponse{
42027			Header:         res.Header,
42028			HTTPStatusCode: res.StatusCode,
42029		},
42030	}
42031	target := &ret
42032	if err := gensupport.DecodeResponse(target, res); err != nil {
42033		return nil, err
42034	}
42035	return ret, nil
42036	// {
42037	//   "description": "Retrieves a list of regions.",
42038	//   "httpMethod": "GET",
42039	//   "id": "dfareporting.regions.list",
42040	//   "parameterOrder": [
42041	//     "profileId"
42042	//   ],
42043	//   "parameters": {
42044	//     "profileId": {
42045	//       "description": "User profile ID associated with this request.",
42046	//       "format": "int64",
42047	//       "location": "path",
42048	//       "required": true,
42049	//       "type": "string"
42050	//     }
42051	//   },
42052	//   "path": "userprofiles/{profileId}/regions",
42053	//   "response": {
42054	//     "$ref": "RegionsListResponse"
42055	//   },
42056	//   "scopes": [
42057	//     "https://www.googleapis.com/auth/dfatrafficking"
42058	//   ]
42059	// }
42060
42061}
42062
42063// method id "dfareporting.remarketingListShares.get":
42064
42065type RemarketingListSharesGetCall struct {
42066	s                 *Service
42067	profileId         int64
42068	remarketingListId int64
42069	urlParams_        gensupport.URLParams
42070	ifNoneMatch_      string
42071	ctx_              context.Context
42072	header_           http.Header
42073}
42074
42075// Get: Gets one remarketing list share by remarketing list ID.
42076func (r *RemarketingListSharesService) Get(profileId int64, remarketingListId int64) *RemarketingListSharesGetCall {
42077	c := &RemarketingListSharesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42078	c.profileId = profileId
42079	c.remarketingListId = remarketingListId
42080	return c
42081}
42082
42083// Fields allows partial responses to be retrieved. See
42084// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42085// for more information.
42086func (c *RemarketingListSharesGetCall) Fields(s ...googleapi.Field) *RemarketingListSharesGetCall {
42087	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42088	return c
42089}
42090
42091// IfNoneMatch sets the optional parameter which makes the operation
42092// fail if the object's ETag matches the given value. This is useful for
42093// getting updates only after the object has changed since the last
42094// request. Use googleapi.IsNotModified to check whether the response
42095// error from Do is the result of In-None-Match.
42096func (c *RemarketingListSharesGetCall) IfNoneMatch(entityTag string) *RemarketingListSharesGetCall {
42097	c.ifNoneMatch_ = entityTag
42098	return c
42099}
42100
42101// Context sets the context to be used in this call's Do method. Any
42102// pending HTTP request will be aborted if the provided context is
42103// canceled.
42104func (c *RemarketingListSharesGetCall) Context(ctx context.Context) *RemarketingListSharesGetCall {
42105	c.ctx_ = ctx
42106	return c
42107}
42108
42109// Header returns an http.Header that can be modified by the caller to
42110// add HTTP headers to the request.
42111func (c *RemarketingListSharesGetCall) Header() http.Header {
42112	if c.header_ == nil {
42113		c.header_ = make(http.Header)
42114	}
42115	return c.header_
42116}
42117
42118func (c *RemarketingListSharesGetCall) doRequest(alt string) (*http.Response, error) {
42119	reqHeaders := make(http.Header)
42120	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
42121	for k, v := range c.header_ {
42122		reqHeaders[k] = v
42123	}
42124	reqHeaders.Set("User-Agent", c.s.userAgent())
42125	if c.ifNoneMatch_ != "" {
42126		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42127	}
42128	var body io.Reader = nil
42129	c.urlParams_.Set("alt", alt)
42130	c.urlParams_.Set("prettyPrint", "false")
42131	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares/{remarketingListId}")
42132	urls += "?" + c.urlParams_.Encode()
42133	req, err := http.NewRequest("GET", urls, body)
42134	if err != nil {
42135		return nil, err
42136	}
42137	req.Header = reqHeaders
42138	googleapi.Expand(req.URL, map[string]string{
42139		"profileId":         strconv.FormatInt(c.profileId, 10),
42140		"remarketingListId": strconv.FormatInt(c.remarketingListId, 10),
42141	})
42142	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42143}
42144
42145// Do executes the "dfareporting.remarketingListShares.get" call.
42146// Exactly one of *RemarketingListShare or error will be non-nil. Any
42147// non-2xx status code is an error. Response headers are in either
42148// *RemarketingListShare.ServerResponse.Header or (if a response was
42149// returned at all) in error.(*googleapi.Error).Header. Use
42150// googleapi.IsNotModified to check whether the returned error was
42151// because http.StatusNotModified was returned.
42152func (c *RemarketingListSharesGetCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42153	gensupport.SetOptions(c.urlParams_, opts...)
42154	res, err := c.doRequest("json")
42155	if res != nil && res.StatusCode == http.StatusNotModified {
42156		if res.Body != nil {
42157			res.Body.Close()
42158		}
42159		return nil, &googleapi.Error{
42160			Code:   res.StatusCode,
42161			Header: res.Header,
42162		}
42163	}
42164	if err != nil {
42165		return nil, err
42166	}
42167	defer googleapi.CloseBody(res)
42168	if err := googleapi.CheckResponse(res); err != nil {
42169		return nil, err
42170	}
42171	ret := &RemarketingListShare{
42172		ServerResponse: googleapi.ServerResponse{
42173			Header:         res.Header,
42174			HTTPStatusCode: res.StatusCode,
42175		},
42176	}
42177	target := &ret
42178	if err := gensupport.DecodeResponse(target, res); err != nil {
42179		return nil, err
42180	}
42181	return ret, nil
42182	// {
42183	//   "description": "Gets one remarketing list share by remarketing list ID.",
42184	//   "httpMethod": "GET",
42185	//   "id": "dfareporting.remarketingListShares.get",
42186	//   "parameterOrder": [
42187	//     "profileId",
42188	//     "remarketingListId"
42189	//   ],
42190	//   "parameters": {
42191	//     "profileId": {
42192	//       "description": "User profile ID associated with this request.",
42193	//       "format": "int64",
42194	//       "location": "path",
42195	//       "required": true,
42196	//       "type": "string"
42197	//     },
42198	//     "remarketingListId": {
42199	//       "description": "Remarketing list ID.",
42200	//       "format": "int64",
42201	//       "location": "path",
42202	//       "required": true,
42203	//       "type": "string"
42204	//     }
42205	//   },
42206	//   "path": "userprofiles/{profileId}/remarketingListShares/{remarketingListId}",
42207	//   "response": {
42208	//     "$ref": "RemarketingListShare"
42209	//   },
42210	//   "scopes": [
42211	//     "https://www.googleapis.com/auth/dfatrafficking"
42212	//   ]
42213	// }
42214
42215}
42216
42217// method id "dfareporting.remarketingListShares.patch":
42218
42219type RemarketingListSharesPatchCall struct {
42220	s                    *Service
42221	profileId            int64
42222	remarketinglistshare *RemarketingListShare
42223	urlParams_           gensupport.URLParams
42224	ctx_                 context.Context
42225	header_              http.Header
42226}
42227
42228// Patch: Updates an existing remarketing list share. This method
42229// supports patch semantics.
42230func (r *RemarketingListSharesService) Patch(profileId int64, remarketingListId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesPatchCall {
42231	c := &RemarketingListSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42232	c.profileId = profileId
42233	c.urlParams_.Set("remarketingListId", fmt.Sprint(remarketingListId))
42234	c.remarketinglistshare = remarketinglistshare
42235	return c
42236}
42237
42238// Fields allows partial responses to be retrieved. See
42239// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42240// for more information.
42241func (c *RemarketingListSharesPatchCall) Fields(s ...googleapi.Field) *RemarketingListSharesPatchCall {
42242	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42243	return c
42244}
42245
42246// Context sets the context to be used in this call's Do method. Any
42247// pending HTTP request will be aborted if the provided context is
42248// canceled.
42249func (c *RemarketingListSharesPatchCall) Context(ctx context.Context) *RemarketingListSharesPatchCall {
42250	c.ctx_ = ctx
42251	return c
42252}
42253
42254// Header returns an http.Header that can be modified by the caller to
42255// add HTTP headers to the request.
42256func (c *RemarketingListSharesPatchCall) Header() http.Header {
42257	if c.header_ == nil {
42258		c.header_ = make(http.Header)
42259	}
42260	return c.header_
42261}
42262
42263func (c *RemarketingListSharesPatchCall) doRequest(alt string) (*http.Response, error) {
42264	reqHeaders := make(http.Header)
42265	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
42266	for k, v := range c.header_ {
42267		reqHeaders[k] = v
42268	}
42269	reqHeaders.Set("User-Agent", c.s.userAgent())
42270	var body io.Reader = nil
42271	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
42272	if err != nil {
42273		return nil, err
42274	}
42275	reqHeaders.Set("Content-Type", "application/json")
42276	c.urlParams_.Set("alt", alt)
42277	c.urlParams_.Set("prettyPrint", "false")
42278	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
42279	urls += "?" + c.urlParams_.Encode()
42280	req, err := http.NewRequest("PATCH", urls, body)
42281	if err != nil {
42282		return nil, err
42283	}
42284	req.Header = reqHeaders
42285	googleapi.Expand(req.URL, map[string]string{
42286		"profileId": strconv.FormatInt(c.profileId, 10),
42287	})
42288	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42289}
42290
42291// Do executes the "dfareporting.remarketingListShares.patch" call.
42292// Exactly one of *RemarketingListShare or error will be non-nil. Any
42293// non-2xx status code is an error. Response headers are in either
42294// *RemarketingListShare.ServerResponse.Header or (if a response was
42295// returned at all) in error.(*googleapi.Error).Header. Use
42296// googleapi.IsNotModified to check whether the returned error was
42297// because http.StatusNotModified was returned.
42298func (c *RemarketingListSharesPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42299	gensupport.SetOptions(c.urlParams_, opts...)
42300	res, err := c.doRequest("json")
42301	if res != nil && res.StatusCode == http.StatusNotModified {
42302		if res.Body != nil {
42303			res.Body.Close()
42304		}
42305		return nil, &googleapi.Error{
42306			Code:   res.StatusCode,
42307			Header: res.Header,
42308		}
42309	}
42310	if err != nil {
42311		return nil, err
42312	}
42313	defer googleapi.CloseBody(res)
42314	if err := googleapi.CheckResponse(res); err != nil {
42315		return nil, err
42316	}
42317	ret := &RemarketingListShare{
42318		ServerResponse: googleapi.ServerResponse{
42319			Header:         res.Header,
42320			HTTPStatusCode: res.StatusCode,
42321		},
42322	}
42323	target := &ret
42324	if err := gensupport.DecodeResponse(target, res); err != nil {
42325		return nil, err
42326	}
42327	return ret, nil
42328	// {
42329	//   "description": "Updates an existing remarketing list share. This method supports patch semantics.",
42330	//   "httpMethod": "PATCH",
42331	//   "id": "dfareporting.remarketingListShares.patch",
42332	//   "parameterOrder": [
42333	//     "profileId",
42334	//     "remarketingListId"
42335	//   ],
42336	//   "parameters": {
42337	//     "profileId": {
42338	//       "description": "User profile ID associated with this request.",
42339	//       "format": "int64",
42340	//       "location": "path",
42341	//       "required": true,
42342	//       "type": "string"
42343	//     },
42344	//     "remarketingListId": {
42345	//       "description": "Remarketing list ID.",
42346	//       "format": "int64",
42347	//       "location": "query",
42348	//       "required": true,
42349	//       "type": "string"
42350	//     }
42351	//   },
42352	//   "path": "userprofiles/{profileId}/remarketingListShares",
42353	//   "request": {
42354	//     "$ref": "RemarketingListShare"
42355	//   },
42356	//   "response": {
42357	//     "$ref": "RemarketingListShare"
42358	//   },
42359	//   "scopes": [
42360	//     "https://www.googleapis.com/auth/dfatrafficking"
42361	//   ]
42362	// }
42363
42364}
42365
42366// method id "dfareporting.remarketingListShares.update":
42367
42368type RemarketingListSharesUpdateCall struct {
42369	s                    *Service
42370	profileId            int64
42371	remarketinglistshare *RemarketingListShare
42372	urlParams_           gensupport.URLParams
42373	ctx_                 context.Context
42374	header_              http.Header
42375}
42376
42377// Update: Updates an existing remarketing list share.
42378func (r *RemarketingListSharesService) Update(profileId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesUpdateCall {
42379	c := &RemarketingListSharesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42380	c.profileId = profileId
42381	c.remarketinglistshare = remarketinglistshare
42382	return c
42383}
42384
42385// Fields allows partial responses to be retrieved. See
42386// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42387// for more information.
42388func (c *RemarketingListSharesUpdateCall) Fields(s ...googleapi.Field) *RemarketingListSharesUpdateCall {
42389	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42390	return c
42391}
42392
42393// Context sets the context to be used in this call's Do method. Any
42394// pending HTTP request will be aborted if the provided context is
42395// canceled.
42396func (c *RemarketingListSharesUpdateCall) Context(ctx context.Context) *RemarketingListSharesUpdateCall {
42397	c.ctx_ = ctx
42398	return c
42399}
42400
42401// Header returns an http.Header that can be modified by the caller to
42402// add HTTP headers to the request.
42403func (c *RemarketingListSharesUpdateCall) Header() http.Header {
42404	if c.header_ == nil {
42405		c.header_ = make(http.Header)
42406	}
42407	return c.header_
42408}
42409
42410func (c *RemarketingListSharesUpdateCall) doRequest(alt string) (*http.Response, error) {
42411	reqHeaders := make(http.Header)
42412	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
42413	for k, v := range c.header_ {
42414		reqHeaders[k] = v
42415	}
42416	reqHeaders.Set("User-Agent", c.s.userAgent())
42417	var body io.Reader = nil
42418	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
42419	if err != nil {
42420		return nil, err
42421	}
42422	reqHeaders.Set("Content-Type", "application/json")
42423	c.urlParams_.Set("alt", alt)
42424	c.urlParams_.Set("prettyPrint", "false")
42425	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
42426	urls += "?" + c.urlParams_.Encode()
42427	req, err := http.NewRequest("PUT", urls, body)
42428	if err != nil {
42429		return nil, err
42430	}
42431	req.Header = reqHeaders
42432	googleapi.Expand(req.URL, map[string]string{
42433		"profileId": strconv.FormatInt(c.profileId, 10),
42434	})
42435	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42436}
42437
42438// Do executes the "dfareporting.remarketingListShares.update" call.
42439// Exactly one of *RemarketingListShare or error will be non-nil. Any
42440// non-2xx status code is an error. Response headers are in either
42441// *RemarketingListShare.ServerResponse.Header or (if a response was
42442// returned at all) in error.(*googleapi.Error).Header. Use
42443// googleapi.IsNotModified to check whether the returned error was
42444// because http.StatusNotModified was returned.
42445func (c *RemarketingListSharesUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42446	gensupport.SetOptions(c.urlParams_, opts...)
42447	res, err := c.doRequest("json")
42448	if res != nil && res.StatusCode == http.StatusNotModified {
42449		if res.Body != nil {
42450			res.Body.Close()
42451		}
42452		return nil, &googleapi.Error{
42453			Code:   res.StatusCode,
42454			Header: res.Header,
42455		}
42456	}
42457	if err != nil {
42458		return nil, err
42459	}
42460	defer googleapi.CloseBody(res)
42461	if err := googleapi.CheckResponse(res); err != nil {
42462		return nil, err
42463	}
42464	ret := &RemarketingListShare{
42465		ServerResponse: googleapi.ServerResponse{
42466			Header:         res.Header,
42467			HTTPStatusCode: res.StatusCode,
42468		},
42469	}
42470	target := &ret
42471	if err := gensupport.DecodeResponse(target, res); err != nil {
42472		return nil, err
42473	}
42474	return ret, nil
42475	// {
42476	//   "description": "Updates an existing remarketing list share.",
42477	//   "httpMethod": "PUT",
42478	//   "id": "dfareporting.remarketingListShares.update",
42479	//   "parameterOrder": [
42480	//     "profileId"
42481	//   ],
42482	//   "parameters": {
42483	//     "profileId": {
42484	//       "description": "User profile ID associated with this request.",
42485	//       "format": "int64",
42486	//       "location": "path",
42487	//       "required": true,
42488	//       "type": "string"
42489	//     }
42490	//   },
42491	//   "path": "userprofiles/{profileId}/remarketingListShares",
42492	//   "request": {
42493	//     "$ref": "RemarketingListShare"
42494	//   },
42495	//   "response": {
42496	//     "$ref": "RemarketingListShare"
42497	//   },
42498	//   "scopes": [
42499	//     "https://www.googleapis.com/auth/dfatrafficking"
42500	//   ]
42501	// }
42502
42503}
42504
42505// method id "dfareporting.remarketingLists.get":
42506
42507type RemarketingListsGetCall struct {
42508	s            *Service
42509	profileId    int64
42510	id           int64
42511	urlParams_   gensupport.URLParams
42512	ifNoneMatch_ string
42513	ctx_         context.Context
42514	header_      http.Header
42515}
42516
42517// Get: Gets one remarketing list by ID.
42518func (r *RemarketingListsService) Get(profileId int64, id int64) *RemarketingListsGetCall {
42519	c := &RemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42520	c.profileId = profileId
42521	c.id = id
42522	return c
42523}
42524
42525// Fields allows partial responses to be retrieved. See
42526// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42527// for more information.
42528func (c *RemarketingListsGetCall) Fields(s ...googleapi.Field) *RemarketingListsGetCall {
42529	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42530	return c
42531}
42532
42533// IfNoneMatch sets the optional parameter which makes the operation
42534// fail if the object's ETag matches the given value. This is useful for
42535// getting updates only after the object has changed since the last
42536// request. Use googleapi.IsNotModified to check whether the response
42537// error from Do is the result of In-None-Match.
42538func (c *RemarketingListsGetCall) IfNoneMatch(entityTag string) *RemarketingListsGetCall {
42539	c.ifNoneMatch_ = entityTag
42540	return c
42541}
42542
42543// Context sets the context to be used in this call's Do method. Any
42544// pending HTTP request will be aborted if the provided context is
42545// canceled.
42546func (c *RemarketingListsGetCall) Context(ctx context.Context) *RemarketingListsGetCall {
42547	c.ctx_ = ctx
42548	return c
42549}
42550
42551// Header returns an http.Header that can be modified by the caller to
42552// add HTTP headers to the request.
42553func (c *RemarketingListsGetCall) Header() http.Header {
42554	if c.header_ == nil {
42555		c.header_ = make(http.Header)
42556	}
42557	return c.header_
42558}
42559
42560func (c *RemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
42561	reqHeaders := make(http.Header)
42562	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
42563	for k, v := range c.header_ {
42564		reqHeaders[k] = v
42565	}
42566	reqHeaders.Set("User-Agent", c.s.userAgent())
42567	if c.ifNoneMatch_ != "" {
42568		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42569	}
42570	var body io.Reader = nil
42571	c.urlParams_.Set("alt", alt)
42572	c.urlParams_.Set("prettyPrint", "false")
42573	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists/{id}")
42574	urls += "?" + c.urlParams_.Encode()
42575	req, err := http.NewRequest("GET", urls, body)
42576	if err != nil {
42577		return nil, err
42578	}
42579	req.Header = reqHeaders
42580	googleapi.Expand(req.URL, map[string]string{
42581		"profileId": strconv.FormatInt(c.profileId, 10),
42582		"id":        strconv.FormatInt(c.id, 10),
42583	})
42584	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42585}
42586
42587// Do executes the "dfareporting.remarketingLists.get" call.
42588// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
42589// status code is an error. Response headers are in either
42590// *RemarketingList.ServerResponse.Header or (if a response was returned
42591// at all) in error.(*googleapi.Error).Header. Use
42592// googleapi.IsNotModified to check whether the returned error was
42593// because http.StatusNotModified was returned.
42594func (c *RemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
42595	gensupport.SetOptions(c.urlParams_, opts...)
42596	res, err := c.doRequest("json")
42597	if res != nil && res.StatusCode == http.StatusNotModified {
42598		if res.Body != nil {
42599			res.Body.Close()
42600		}
42601		return nil, &googleapi.Error{
42602			Code:   res.StatusCode,
42603			Header: res.Header,
42604		}
42605	}
42606	if err != nil {
42607		return nil, err
42608	}
42609	defer googleapi.CloseBody(res)
42610	if err := googleapi.CheckResponse(res); err != nil {
42611		return nil, err
42612	}
42613	ret := &RemarketingList{
42614		ServerResponse: googleapi.ServerResponse{
42615			Header:         res.Header,
42616			HTTPStatusCode: res.StatusCode,
42617		},
42618	}
42619	target := &ret
42620	if err := gensupport.DecodeResponse(target, res); err != nil {
42621		return nil, err
42622	}
42623	return ret, nil
42624	// {
42625	//   "description": "Gets one remarketing list by ID.",
42626	//   "httpMethod": "GET",
42627	//   "id": "dfareporting.remarketingLists.get",
42628	//   "parameterOrder": [
42629	//     "profileId",
42630	//     "id"
42631	//   ],
42632	//   "parameters": {
42633	//     "id": {
42634	//       "description": "Remarketing list ID.",
42635	//       "format": "int64",
42636	//       "location": "path",
42637	//       "required": true,
42638	//       "type": "string"
42639	//     },
42640	//     "profileId": {
42641	//       "description": "User profile ID associated with this request.",
42642	//       "format": "int64",
42643	//       "location": "path",
42644	//       "required": true,
42645	//       "type": "string"
42646	//     }
42647	//   },
42648	//   "path": "userprofiles/{profileId}/remarketingLists/{id}",
42649	//   "response": {
42650	//     "$ref": "RemarketingList"
42651	//   },
42652	//   "scopes": [
42653	//     "https://www.googleapis.com/auth/dfatrafficking"
42654	//   ]
42655	// }
42656
42657}
42658
42659// method id "dfareporting.remarketingLists.insert":
42660
42661type RemarketingListsInsertCall struct {
42662	s               *Service
42663	profileId       int64
42664	remarketinglist *RemarketingList
42665	urlParams_      gensupport.URLParams
42666	ctx_            context.Context
42667	header_         http.Header
42668}
42669
42670// Insert: Inserts a new remarketing list.
42671func (r *RemarketingListsService) Insert(profileId int64, remarketinglist *RemarketingList) *RemarketingListsInsertCall {
42672	c := &RemarketingListsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42673	c.profileId = profileId
42674	c.remarketinglist = remarketinglist
42675	return c
42676}
42677
42678// Fields allows partial responses to be retrieved. See
42679// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42680// for more information.
42681func (c *RemarketingListsInsertCall) Fields(s ...googleapi.Field) *RemarketingListsInsertCall {
42682	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42683	return c
42684}
42685
42686// Context sets the context to be used in this call's Do method. Any
42687// pending HTTP request will be aborted if the provided context is
42688// canceled.
42689func (c *RemarketingListsInsertCall) Context(ctx context.Context) *RemarketingListsInsertCall {
42690	c.ctx_ = ctx
42691	return c
42692}
42693
42694// Header returns an http.Header that can be modified by the caller to
42695// add HTTP headers to the request.
42696func (c *RemarketingListsInsertCall) Header() http.Header {
42697	if c.header_ == nil {
42698		c.header_ = make(http.Header)
42699	}
42700	return c.header_
42701}
42702
42703func (c *RemarketingListsInsertCall) doRequest(alt string) (*http.Response, error) {
42704	reqHeaders := make(http.Header)
42705	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
42706	for k, v := range c.header_ {
42707		reqHeaders[k] = v
42708	}
42709	reqHeaders.Set("User-Agent", c.s.userAgent())
42710	var body io.Reader = nil
42711	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
42712	if err != nil {
42713		return nil, err
42714	}
42715	reqHeaders.Set("Content-Type", "application/json")
42716	c.urlParams_.Set("alt", alt)
42717	c.urlParams_.Set("prettyPrint", "false")
42718	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
42719	urls += "?" + c.urlParams_.Encode()
42720	req, err := http.NewRequest("POST", urls, body)
42721	if err != nil {
42722		return nil, err
42723	}
42724	req.Header = reqHeaders
42725	googleapi.Expand(req.URL, map[string]string{
42726		"profileId": strconv.FormatInt(c.profileId, 10),
42727	})
42728	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42729}
42730
42731// Do executes the "dfareporting.remarketingLists.insert" call.
42732// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
42733// status code is an error. Response headers are in either
42734// *RemarketingList.ServerResponse.Header or (if a response was returned
42735// at all) in error.(*googleapi.Error).Header. Use
42736// googleapi.IsNotModified to check whether the returned error was
42737// because http.StatusNotModified was returned.
42738func (c *RemarketingListsInsertCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
42739	gensupport.SetOptions(c.urlParams_, opts...)
42740	res, err := c.doRequest("json")
42741	if res != nil && res.StatusCode == http.StatusNotModified {
42742		if res.Body != nil {
42743			res.Body.Close()
42744		}
42745		return nil, &googleapi.Error{
42746			Code:   res.StatusCode,
42747			Header: res.Header,
42748		}
42749	}
42750	if err != nil {
42751		return nil, err
42752	}
42753	defer googleapi.CloseBody(res)
42754	if err := googleapi.CheckResponse(res); err != nil {
42755		return nil, err
42756	}
42757	ret := &RemarketingList{
42758		ServerResponse: googleapi.ServerResponse{
42759			Header:         res.Header,
42760			HTTPStatusCode: res.StatusCode,
42761		},
42762	}
42763	target := &ret
42764	if err := gensupport.DecodeResponse(target, res); err != nil {
42765		return nil, err
42766	}
42767	return ret, nil
42768	// {
42769	//   "description": "Inserts a new remarketing list.",
42770	//   "httpMethod": "POST",
42771	//   "id": "dfareporting.remarketingLists.insert",
42772	//   "parameterOrder": [
42773	//     "profileId"
42774	//   ],
42775	//   "parameters": {
42776	//     "profileId": {
42777	//       "description": "User profile ID associated with this request.",
42778	//       "format": "int64",
42779	//       "location": "path",
42780	//       "required": true,
42781	//       "type": "string"
42782	//     }
42783	//   },
42784	//   "path": "userprofiles/{profileId}/remarketingLists",
42785	//   "request": {
42786	//     "$ref": "RemarketingList"
42787	//   },
42788	//   "response": {
42789	//     "$ref": "RemarketingList"
42790	//   },
42791	//   "scopes": [
42792	//     "https://www.googleapis.com/auth/dfatrafficking"
42793	//   ]
42794	// }
42795
42796}
42797
42798// method id "dfareporting.remarketingLists.list":
42799
42800type RemarketingListsListCall struct {
42801	s            *Service
42802	profileId    int64
42803	urlParams_   gensupport.URLParams
42804	ifNoneMatch_ string
42805	ctx_         context.Context
42806	header_      http.Header
42807}
42808
42809// List: Retrieves a list of remarketing lists, possibly filtered. This
42810// method supports paging.
42811func (r *RemarketingListsService) List(profileId int64, advertiserId int64) *RemarketingListsListCall {
42812	c := &RemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42813	c.profileId = profileId
42814	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
42815	return c
42816}
42817
42818// Active sets the optional parameter "active": Select only active or
42819// only inactive remarketing lists.
42820func (c *RemarketingListsListCall) Active(active bool) *RemarketingListsListCall {
42821	c.urlParams_.Set("active", fmt.Sprint(active))
42822	return c
42823}
42824
42825// FloodlightActivityId sets the optional parameter
42826// "floodlightActivityId": Select only remarketing lists that have this
42827// floodlight activity ID.
42828func (c *RemarketingListsListCall) FloodlightActivityId(floodlightActivityId int64) *RemarketingListsListCall {
42829	c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
42830	return c
42831}
42832
42833// MaxResults sets the optional parameter "maxResults": Maximum number
42834// of results to return.
42835func (c *RemarketingListsListCall) MaxResults(maxResults int64) *RemarketingListsListCall {
42836	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
42837	return c
42838}
42839
42840// Name sets the optional parameter "name": Allows searching for objects
42841// by name or ID. Wildcards (*) are allowed. For example, "remarketing
42842// list*2015" will return objects with names like "remarketing list June
42843// 2015", "remarketing list April 2015", or simply "remarketing list
42844// 2015". Most of the searches also add wildcards implicitly at the
42845// start and the end of the search string. For example, a search string
42846// of "remarketing list" will match objects with name "my remarketing
42847// list", "remarketing list 2015", or simply "remarketing list".
42848func (c *RemarketingListsListCall) Name(name string) *RemarketingListsListCall {
42849	c.urlParams_.Set("name", name)
42850	return c
42851}
42852
42853// PageToken sets the optional parameter "pageToken": Value of the
42854// nextPageToken from the previous result page.
42855func (c *RemarketingListsListCall) PageToken(pageToken string) *RemarketingListsListCall {
42856	c.urlParams_.Set("pageToken", pageToken)
42857	return c
42858}
42859
42860// SortField sets the optional parameter "sortField": Field by which to
42861// sort the list.
42862//
42863// Possible values:
42864//   "ID" (default)
42865//   "NAME"
42866func (c *RemarketingListsListCall) SortField(sortField string) *RemarketingListsListCall {
42867	c.urlParams_.Set("sortField", sortField)
42868	return c
42869}
42870
42871// SortOrder sets the optional parameter "sortOrder": Order of sorted
42872// results.
42873//
42874// Possible values:
42875//   "ASCENDING" (default)
42876//   "DESCENDING"
42877func (c *RemarketingListsListCall) SortOrder(sortOrder string) *RemarketingListsListCall {
42878	c.urlParams_.Set("sortOrder", sortOrder)
42879	return c
42880}
42881
42882// Fields allows partial responses to be retrieved. See
42883// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42884// for more information.
42885func (c *RemarketingListsListCall) Fields(s ...googleapi.Field) *RemarketingListsListCall {
42886	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42887	return c
42888}
42889
42890// IfNoneMatch sets the optional parameter which makes the operation
42891// fail if the object's ETag matches the given value. This is useful for
42892// getting updates only after the object has changed since the last
42893// request. Use googleapi.IsNotModified to check whether the response
42894// error from Do is the result of In-None-Match.
42895func (c *RemarketingListsListCall) IfNoneMatch(entityTag string) *RemarketingListsListCall {
42896	c.ifNoneMatch_ = entityTag
42897	return c
42898}
42899
42900// Context sets the context to be used in this call's Do method. Any
42901// pending HTTP request will be aborted if the provided context is
42902// canceled.
42903func (c *RemarketingListsListCall) Context(ctx context.Context) *RemarketingListsListCall {
42904	c.ctx_ = ctx
42905	return c
42906}
42907
42908// Header returns an http.Header that can be modified by the caller to
42909// add HTTP headers to the request.
42910func (c *RemarketingListsListCall) Header() http.Header {
42911	if c.header_ == nil {
42912		c.header_ = make(http.Header)
42913	}
42914	return c.header_
42915}
42916
42917func (c *RemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
42918	reqHeaders := make(http.Header)
42919	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
42920	for k, v := range c.header_ {
42921		reqHeaders[k] = v
42922	}
42923	reqHeaders.Set("User-Agent", c.s.userAgent())
42924	if c.ifNoneMatch_ != "" {
42925		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42926	}
42927	var body io.Reader = nil
42928	c.urlParams_.Set("alt", alt)
42929	c.urlParams_.Set("prettyPrint", "false")
42930	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
42931	urls += "?" + c.urlParams_.Encode()
42932	req, err := http.NewRequest("GET", urls, body)
42933	if err != nil {
42934		return nil, err
42935	}
42936	req.Header = reqHeaders
42937	googleapi.Expand(req.URL, map[string]string{
42938		"profileId": strconv.FormatInt(c.profileId, 10),
42939	})
42940	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42941}
42942
42943// Do executes the "dfareporting.remarketingLists.list" call.
42944// Exactly one of *RemarketingListsListResponse or error will be
42945// non-nil. Any non-2xx status code is an error. Response headers are in
42946// either *RemarketingListsListResponse.ServerResponse.Header or (if a
42947// response was returned at all) in error.(*googleapi.Error).Header. Use
42948// googleapi.IsNotModified to check whether the returned error was
42949// because http.StatusNotModified was returned.
42950func (c *RemarketingListsListCall) Do(opts ...googleapi.CallOption) (*RemarketingListsListResponse, error) {
42951	gensupport.SetOptions(c.urlParams_, opts...)
42952	res, err := c.doRequest("json")
42953	if res != nil && res.StatusCode == http.StatusNotModified {
42954		if res.Body != nil {
42955			res.Body.Close()
42956		}
42957		return nil, &googleapi.Error{
42958			Code:   res.StatusCode,
42959			Header: res.Header,
42960		}
42961	}
42962	if err != nil {
42963		return nil, err
42964	}
42965	defer googleapi.CloseBody(res)
42966	if err := googleapi.CheckResponse(res); err != nil {
42967		return nil, err
42968	}
42969	ret := &RemarketingListsListResponse{
42970		ServerResponse: googleapi.ServerResponse{
42971			Header:         res.Header,
42972			HTTPStatusCode: res.StatusCode,
42973		},
42974	}
42975	target := &ret
42976	if err := gensupport.DecodeResponse(target, res); err != nil {
42977		return nil, err
42978	}
42979	return ret, nil
42980	// {
42981	//   "description": "Retrieves a list of remarketing lists, possibly filtered. This method supports paging.",
42982	//   "httpMethod": "GET",
42983	//   "id": "dfareporting.remarketingLists.list",
42984	//   "parameterOrder": [
42985	//     "profileId",
42986	//     "advertiserId"
42987	//   ],
42988	//   "parameters": {
42989	//     "active": {
42990	//       "description": "Select only active or only inactive remarketing lists.",
42991	//       "location": "query",
42992	//       "type": "boolean"
42993	//     },
42994	//     "advertiserId": {
42995	//       "description": "Select only remarketing lists owned by this advertiser.",
42996	//       "format": "int64",
42997	//       "location": "query",
42998	//       "required": true,
42999	//       "type": "string"
43000	//     },
43001	//     "floodlightActivityId": {
43002	//       "description": "Select only remarketing lists that have this floodlight activity ID.",
43003	//       "format": "int64",
43004	//       "location": "query",
43005	//       "type": "string"
43006	//     },
43007	//     "maxResults": {
43008	//       "default": "1000",
43009	//       "description": "Maximum number of results to return.",
43010	//       "format": "int32",
43011	//       "location": "query",
43012	//       "maximum": "1000",
43013	//       "minimum": "0",
43014	//       "type": "integer"
43015	//     },
43016	//     "name": {
43017	//       "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\".",
43018	//       "location": "query",
43019	//       "type": "string"
43020	//     },
43021	//     "pageToken": {
43022	//       "description": "Value of the nextPageToken from the previous result page.",
43023	//       "location": "query",
43024	//       "type": "string"
43025	//     },
43026	//     "profileId": {
43027	//       "description": "User profile ID associated with this request.",
43028	//       "format": "int64",
43029	//       "location": "path",
43030	//       "required": true,
43031	//       "type": "string"
43032	//     },
43033	//     "sortField": {
43034	//       "default": "ID",
43035	//       "description": "Field by which to sort the list.",
43036	//       "enum": [
43037	//         "ID",
43038	//         "NAME"
43039	//       ],
43040	//       "enumDescriptions": [
43041	//         "",
43042	//         ""
43043	//       ],
43044	//       "location": "query",
43045	//       "type": "string"
43046	//     },
43047	//     "sortOrder": {
43048	//       "default": "ASCENDING",
43049	//       "description": "Order of sorted results.",
43050	//       "enum": [
43051	//         "ASCENDING",
43052	//         "DESCENDING"
43053	//       ],
43054	//       "enumDescriptions": [
43055	//         "",
43056	//         ""
43057	//       ],
43058	//       "location": "query",
43059	//       "type": "string"
43060	//     }
43061	//   },
43062	//   "path": "userprofiles/{profileId}/remarketingLists",
43063	//   "response": {
43064	//     "$ref": "RemarketingListsListResponse"
43065	//   },
43066	//   "scopes": [
43067	//     "https://www.googleapis.com/auth/dfatrafficking"
43068	//   ]
43069	// }
43070
43071}
43072
43073// Pages invokes f for each page of results.
43074// A non-nil error returned from f will halt the iteration.
43075// The provided context supersedes any context provided to the Context method.
43076func (c *RemarketingListsListCall) Pages(ctx context.Context, f func(*RemarketingListsListResponse) error) error {
43077	c.ctx_ = ctx
43078	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
43079	for {
43080		x, err := c.Do()
43081		if err != nil {
43082			return err
43083		}
43084		if err := f(x); err != nil {
43085			return err
43086		}
43087		if x.NextPageToken == "" {
43088			return nil
43089		}
43090		c.PageToken(x.NextPageToken)
43091	}
43092}
43093
43094// method id "dfareporting.remarketingLists.patch":
43095
43096type RemarketingListsPatchCall struct {
43097	s               *Service
43098	profileId       int64
43099	remarketinglist *RemarketingList
43100	urlParams_      gensupport.URLParams
43101	ctx_            context.Context
43102	header_         http.Header
43103}
43104
43105// Patch: Updates an existing remarketing list. This method supports
43106// patch semantics.
43107func (r *RemarketingListsService) Patch(profileId int64, id int64, remarketinglist *RemarketingList) *RemarketingListsPatchCall {
43108	c := &RemarketingListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43109	c.profileId = profileId
43110	c.urlParams_.Set("id", fmt.Sprint(id))
43111	c.remarketinglist = remarketinglist
43112	return c
43113}
43114
43115// Fields allows partial responses to be retrieved. See
43116// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43117// for more information.
43118func (c *RemarketingListsPatchCall) Fields(s ...googleapi.Field) *RemarketingListsPatchCall {
43119	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43120	return c
43121}
43122
43123// Context sets the context to be used in this call's Do method. Any
43124// pending HTTP request will be aborted if the provided context is
43125// canceled.
43126func (c *RemarketingListsPatchCall) Context(ctx context.Context) *RemarketingListsPatchCall {
43127	c.ctx_ = ctx
43128	return c
43129}
43130
43131// Header returns an http.Header that can be modified by the caller to
43132// add HTTP headers to the request.
43133func (c *RemarketingListsPatchCall) Header() http.Header {
43134	if c.header_ == nil {
43135		c.header_ = make(http.Header)
43136	}
43137	return c.header_
43138}
43139
43140func (c *RemarketingListsPatchCall) doRequest(alt string) (*http.Response, error) {
43141	reqHeaders := make(http.Header)
43142	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
43143	for k, v := range c.header_ {
43144		reqHeaders[k] = v
43145	}
43146	reqHeaders.Set("User-Agent", c.s.userAgent())
43147	var body io.Reader = nil
43148	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
43149	if err != nil {
43150		return nil, err
43151	}
43152	reqHeaders.Set("Content-Type", "application/json")
43153	c.urlParams_.Set("alt", alt)
43154	c.urlParams_.Set("prettyPrint", "false")
43155	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43156	urls += "?" + c.urlParams_.Encode()
43157	req, err := http.NewRequest("PATCH", urls, body)
43158	if err != nil {
43159		return nil, err
43160	}
43161	req.Header = reqHeaders
43162	googleapi.Expand(req.URL, map[string]string{
43163		"profileId": strconv.FormatInt(c.profileId, 10),
43164	})
43165	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43166}
43167
43168// Do executes the "dfareporting.remarketingLists.patch" call.
43169// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
43170// status code is an error. Response headers are in either
43171// *RemarketingList.ServerResponse.Header or (if a response was returned
43172// at all) in error.(*googleapi.Error).Header. Use
43173// googleapi.IsNotModified to check whether the returned error was
43174// because http.StatusNotModified was returned.
43175func (c *RemarketingListsPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43176	gensupport.SetOptions(c.urlParams_, opts...)
43177	res, err := c.doRequest("json")
43178	if res != nil && res.StatusCode == http.StatusNotModified {
43179		if res.Body != nil {
43180			res.Body.Close()
43181		}
43182		return nil, &googleapi.Error{
43183			Code:   res.StatusCode,
43184			Header: res.Header,
43185		}
43186	}
43187	if err != nil {
43188		return nil, err
43189	}
43190	defer googleapi.CloseBody(res)
43191	if err := googleapi.CheckResponse(res); err != nil {
43192		return nil, err
43193	}
43194	ret := &RemarketingList{
43195		ServerResponse: googleapi.ServerResponse{
43196			Header:         res.Header,
43197			HTTPStatusCode: res.StatusCode,
43198		},
43199	}
43200	target := &ret
43201	if err := gensupport.DecodeResponse(target, res); err != nil {
43202		return nil, err
43203	}
43204	return ret, nil
43205	// {
43206	//   "description": "Updates an existing remarketing list. This method supports patch semantics.",
43207	//   "httpMethod": "PATCH",
43208	//   "id": "dfareporting.remarketingLists.patch",
43209	//   "parameterOrder": [
43210	//     "profileId",
43211	//     "id"
43212	//   ],
43213	//   "parameters": {
43214	//     "id": {
43215	//       "description": "Remarketing list ID.",
43216	//       "format": "int64",
43217	//       "location": "query",
43218	//       "required": true,
43219	//       "type": "string"
43220	//     },
43221	//     "profileId": {
43222	//       "description": "User profile ID associated with this request.",
43223	//       "format": "int64",
43224	//       "location": "path",
43225	//       "required": true,
43226	//       "type": "string"
43227	//     }
43228	//   },
43229	//   "path": "userprofiles/{profileId}/remarketingLists",
43230	//   "request": {
43231	//     "$ref": "RemarketingList"
43232	//   },
43233	//   "response": {
43234	//     "$ref": "RemarketingList"
43235	//   },
43236	//   "scopes": [
43237	//     "https://www.googleapis.com/auth/dfatrafficking"
43238	//   ]
43239	// }
43240
43241}
43242
43243// method id "dfareporting.remarketingLists.update":
43244
43245type RemarketingListsUpdateCall struct {
43246	s               *Service
43247	profileId       int64
43248	remarketinglist *RemarketingList
43249	urlParams_      gensupport.URLParams
43250	ctx_            context.Context
43251	header_         http.Header
43252}
43253
43254// Update: Updates an existing remarketing list.
43255func (r *RemarketingListsService) Update(profileId int64, remarketinglist *RemarketingList) *RemarketingListsUpdateCall {
43256	c := &RemarketingListsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43257	c.profileId = profileId
43258	c.remarketinglist = remarketinglist
43259	return c
43260}
43261
43262// Fields allows partial responses to be retrieved. See
43263// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43264// for more information.
43265func (c *RemarketingListsUpdateCall) Fields(s ...googleapi.Field) *RemarketingListsUpdateCall {
43266	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43267	return c
43268}
43269
43270// Context sets the context to be used in this call's Do method. Any
43271// pending HTTP request will be aborted if the provided context is
43272// canceled.
43273func (c *RemarketingListsUpdateCall) Context(ctx context.Context) *RemarketingListsUpdateCall {
43274	c.ctx_ = ctx
43275	return c
43276}
43277
43278// Header returns an http.Header that can be modified by the caller to
43279// add HTTP headers to the request.
43280func (c *RemarketingListsUpdateCall) Header() http.Header {
43281	if c.header_ == nil {
43282		c.header_ = make(http.Header)
43283	}
43284	return c.header_
43285}
43286
43287func (c *RemarketingListsUpdateCall) doRequest(alt string) (*http.Response, error) {
43288	reqHeaders := make(http.Header)
43289	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
43290	for k, v := range c.header_ {
43291		reqHeaders[k] = v
43292	}
43293	reqHeaders.Set("User-Agent", c.s.userAgent())
43294	var body io.Reader = nil
43295	body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
43296	if err != nil {
43297		return nil, err
43298	}
43299	reqHeaders.Set("Content-Type", "application/json")
43300	c.urlParams_.Set("alt", alt)
43301	c.urlParams_.Set("prettyPrint", "false")
43302	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43303	urls += "?" + c.urlParams_.Encode()
43304	req, err := http.NewRequest("PUT", urls, body)
43305	if err != nil {
43306		return nil, err
43307	}
43308	req.Header = reqHeaders
43309	googleapi.Expand(req.URL, map[string]string{
43310		"profileId": strconv.FormatInt(c.profileId, 10),
43311	})
43312	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43313}
43314
43315// Do executes the "dfareporting.remarketingLists.update" call.
43316// Exactly one of *RemarketingList or error will be non-nil. Any non-2xx
43317// status code is an error. Response headers are in either
43318// *RemarketingList.ServerResponse.Header or (if a response was returned
43319// at all) in error.(*googleapi.Error).Header. Use
43320// googleapi.IsNotModified to check whether the returned error was
43321// because http.StatusNotModified was returned.
43322func (c *RemarketingListsUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43323	gensupport.SetOptions(c.urlParams_, opts...)
43324	res, err := c.doRequest("json")
43325	if res != nil && res.StatusCode == http.StatusNotModified {
43326		if res.Body != nil {
43327			res.Body.Close()
43328		}
43329		return nil, &googleapi.Error{
43330			Code:   res.StatusCode,
43331			Header: res.Header,
43332		}
43333	}
43334	if err != nil {
43335		return nil, err
43336	}
43337	defer googleapi.CloseBody(res)
43338	if err := googleapi.CheckResponse(res); err != nil {
43339		return nil, err
43340	}
43341	ret := &RemarketingList{
43342		ServerResponse: googleapi.ServerResponse{
43343			Header:         res.Header,
43344			HTTPStatusCode: res.StatusCode,
43345		},
43346	}
43347	target := &ret
43348	if err := gensupport.DecodeResponse(target, res); err != nil {
43349		return nil, err
43350	}
43351	return ret, nil
43352	// {
43353	//   "description": "Updates an existing remarketing list.",
43354	//   "httpMethod": "PUT",
43355	//   "id": "dfareporting.remarketingLists.update",
43356	//   "parameterOrder": [
43357	//     "profileId"
43358	//   ],
43359	//   "parameters": {
43360	//     "profileId": {
43361	//       "description": "User profile ID associated with this request.",
43362	//       "format": "int64",
43363	//       "location": "path",
43364	//       "required": true,
43365	//       "type": "string"
43366	//     }
43367	//   },
43368	//   "path": "userprofiles/{profileId}/remarketingLists",
43369	//   "request": {
43370	//     "$ref": "RemarketingList"
43371	//   },
43372	//   "response": {
43373	//     "$ref": "RemarketingList"
43374	//   },
43375	//   "scopes": [
43376	//     "https://www.googleapis.com/auth/dfatrafficking"
43377	//   ]
43378	// }
43379
43380}
43381
43382// method id "dfareporting.reports.delete":
43383
43384type ReportsDeleteCall struct {
43385	s          *Service
43386	profileId  int64
43387	reportId   int64
43388	urlParams_ gensupport.URLParams
43389	ctx_       context.Context
43390	header_    http.Header
43391}
43392
43393// Delete: Deletes a report by its ID.
43394func (r *ReportsService) Delete(profileId int64, reportId int64) *ReportsDeleteCall {
43395	c := &ReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43396	c.profileId = profileId
43397	c.reportId = reportId
43398	return c
43399}
43400
43401// Fields allows partial responses to be retrieved. See
43402// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43403// for more information.
43404func (c *ReportsDeleteCall) Fields(s ...googleapi.Field) *ReportsDeleteCall {
43405	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43406	return c
43407}
43408
43409// Context sets the context to be used in this call's Do method. Any
43410// pending HTTP request will be aborted if the provided context is
43411// canceled.
43412func (c *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
43413	c.ctx_ = ctx
43414	return c
43415}
43416
43417// Header returns an http.Header that can be modified by the caller to
43418// add HTTP headers to the request.
43419func (c *ReportsDeleteCall) Header() http.Header {
43420	if c.header_ == nil {
43421		c.header_ = make(http.Header)
43422	}
43423	return c.header_
43424}
43425
43426func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
43427	reqHeaders := make(http.Header)
43428	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
43429	for k, v := range c.header_ {
43430		reqHeaders[k] = v
43431	}
43432	reqHeaders.Set("User-Agent", c.s.userAgent())
43433	var body io.Reader = nil
43434	c.urlParams_.Set("alt", alt)
43435	c.urlParams_.Set("prettyPrint", "false")
43436	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
43437	urls += "?" + c.urlParams_.Encode()
43438	req, err := http.NewRequest("DELETE", urls, body)
43439	if err != nil {
43440		return nil, err
43441	}
43442	req.Header = reqHeaders
43443	googleapi.Expand(req.URL, map[string]string{
43444		"profileId": strconv.FormatInt(c.profileId, 10),
43445		"reportId":  strconv.FormatInt(c.reportId, 10),
43446	})
43447	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43448}
43449
43450// Do executes the "dfareporting.reports.delete" call.
43451func (c *ReportsDeleteCall) Do(opts ...googleapi.CallOption) error {
43452	gensupport.SetOptions(c.urlParams_, opts...)
43453	res, err := c.doRequest("json")
43454	if err != nil {
43455		return err
43456	}
43457	defer googleapi.CloseBody(res)
43458	if err := googleapi.CheckResponse(res); err != nil {
43459		return err
43460	}
43461	return nil
43462	// {
43463	//   "description": "Deletes a report by its ID.",
43464	//   "httpMethod": "DELETE",
43465	//   "id": "dfareporting.reports.delete",
43466	//   "parameterOrder": [
43467	//     "profileId",
43468	//     "reportId"
43469	//   ],
43470	//   "parameters": {
43471	//     "profileId": {
43472	//       "description": "The DFA user profile ID.",
43473	//       "format": "int64",
43474	//       "location": "path",
43475	//       "required": true,
43476	//       "type": "string"
43477	//     },
43478	//     "reportId": {
43479	//       "description": "The ID of the report.",
43480	//       "format": "int64",
43481	//       "location": "path",
43482	//       "required": true,
43483	//       "type": "string"
43484	//     }
43485	//   },
43486	//   "path": "userprofiles/{profileId}/reports/{reportId}",
43487	//   "scopes": [
43488	//     "https://www.googleapis.com/auth/dfareporting"
43489	//   ]
43490	// }
43491
43492}
43493
43494// method id "dfareporting.reports.get":
43495
43496type ReportsGetCall struct {
43497	s            *Service
43498	profileId    int64
43499	reportId     int64
43500	urlParams_   gensupport.URLParams
43501	ifNoneMatch_ string
43502	ctx_         context.Context
43503	header_      http.Header
43504}
43505
43506// Get: Retrieves a report by its ID.
43507func (r *ReportsService) Get(profileId int64, reportId int64) *ReportsGetCall {
43508	c := &ReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43509	c.profileId = profileId
43510	c.reportId = reportId
43511	return c
43512}
43513
43514// Fields allows partial responses to be retrieved. See
43515// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43516// for more information.
43517func (c *ReportsGetCall) Fields(s ...googleapi.Field) *ReportsGetCall {
43518	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43519	return c
43520}
43521
43522// IfNoneMatch sets the optional parameter which makes the operation
43523// fail if the object's ETag matches the given value. This is useful for
43524// getting updates only after the object has changed since the last
43525// request. Use googleapi.IsNotModified to check whether the response
43526// error from Do is the result of In-None-Match.
43527func (c *ReportsGetCall) IfNoneMatch(entityTag string) *ReportsGetCall {
43528	c.ifNoneMatch_ = entityTag
43529	return c
43530}
43531
43532// Context sets the context to be used in this call's Do method. Any
43533// pending HTTP request will be aborted if the provided context is
43534// canceled.
43535func (c *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
43536	c.ctx_ = ctx
43537	return c
43538}
43539
43540// Header returns an http.Header that can be modified by the caller to
43541// add HTTP headers to the request.
43542func (c *ReportsGetCall) Header() http.Header {
43543	if c.header_ == nil {
43544		c.header_ = make(http.Header)
43545	}
43546	return c.header_
43547}
43548
43549func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
43550	reqHeaders := make(http.Header)
43551	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
43552	for k, v := range c.header_ {
43553		reqHeaders[k] = v
43554	}
43555	reqHeaders.Set("User-Agent", c.s.userAgent())
43556	if c.ifNoneMatch_ != "" {
43557		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43558	}
43559	var body io.Reader = nil
43560	c.urlParams_.Set("alt", alt)
43561	c.urlParams_.Set("prettyPrint", "false")
43562	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
43563	urls += "?" + c.urlParams_.Encode()
43564	req, err := http.NewRequest("GET", urls, body)
43565	if err != nil {
43566		return nil, err
43567	}
43568	req.Header = reqHeaders
43569	googleapi.Expand(req.URL, map[string]string{
43570		"profileId": strconv.FormatInt(c.profileId, 10),
43571		"reportId":  strconv.FormatInt(c.reportId, 10),
43572	})
43573	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43574}
43575
43576// Do executes the "dfareporting.reports.get" call.
43577// Exactly one of *Report or error will be non-nil. Any non-2xx status
43578// code is an error. Response headers are in either
43579// *Report.ServerResponse.Header or (if a response was returned at all)
43580// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
43581// check whether the returned error was because http.StatusNotModified
43582// was returned.
43583func (c *ReportsGetCall) Do(opts ...googleapi.CallOption) (*Report, error) {
43584	gensupport.SetOptions(c.urlParams_, opts...)
43585	res, err := c.doRequest("json")
43586	if res != nil && res.StatusCode == http.StatusNotModified {
43587		if res.Body != nil {
43588			res.Body.Close()
43589		}
43590		return nil, &googleapi.Error{
43591			Code:   res.StatusCode,
43592			Header: res.Header,
43593		}
43594	}
43595	if err != nil {
43596		return nil, err
43597	}
43598	defer googleapi.CloseBody(res)
43599	if err := googleapi.CheckResponse(res); err != nil {
43600		return nil, err
43601	}
43602	ret := &Report{
43603		ServerResponse: googleapi.ServerResponse{
43604			Header:         res.Header,
43605			HTTPStatusCode: res.StatusCode,
43606		},
43607	}
43608	target := &ret
43609	if err := gensupport.DecodeResponse(target, res); err != nil {
43610		return nil, err
43611	}
43612	return ret, nil
43613	// {
43614	//   "description": "Retrieves a report by its ID.",
43615	//   "httpMethod": "GET",
43616	//   "id": "dfareporting.reports.get",
43617	//   "parameterOrder": [
43618	//     "profileId",
43619	//     "reportId"
43620	//   ],
43621	//   "parameters": {
43622	//     "profileId": {
43623	//       "description": "The DFA user profile ID.",
43624	//       "format": "int64",
43625	//       "location": "path",
43626	//       "required": true,
43627	//       "type": "string"
43628	//     },
43629	//     "reportId": {
43630	//       "description": "The ID of the report.",
43631	//       "format": "int64",
43632	//       "location": "path",
43633	//       "required": true,
43634	//       "type": "string"
43635	//     }
43636	//   },
43637	//   "path": "userprofiles/{profileId}/reports/{reportId}",
43638	//   "response": {
43639	//     "$ref": "Report"
43640	//   },
43641	//   "scopes": [
43642	//     "https://www.googleapis.com/auth/dfareporting"
43643	//   ]
43644	// }
43645
43646}
43647
43648// method id "dfareporting.reports.insert":
43649
43650type ReportsInsertCall struct {
43651	s          *Service
43652	profileId  int64
43653	report     *Report
43654	urlParams_ gensupport.URLParams
43655	ctx_       context.Context
43656	header_    http.Header
43657}
43658
43659// Insert: Creates a report.
43660func (r *ReportsService) Insert(profileId int64, report *Report) *ReportsInsertCall {
43661	c := &ReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43662	c.profileId = profileId
43663	c.report = report
43664	return c
43665}
43666
43667// Fields allows partial responses to be retrieved. See
43668// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43669// for more information.
43670func (c *ReportsInsertCall) Fields(s ...googleapi.Field) *ReportsInsertCall {
43671	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43672	return c
43673}
43674
43675// Context sets the context to be used in this call's Do method. Any
43676// pending HTTP request will be aborted if the provided context is
43677// canceled.
43678func (c *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
43679	c.ctx_ = ctx
43680	return c
43681}
43682
43683// Header returns an http.Header that can be modified by the caller to
43684// add HTTP headers to the request.
43685func (c *ReportsInsertCall) Header() http.Header {
43686	if c.header_ == nil {
43687		c.header_ = make(http.Header)
43688	}
43689	return c.header_
43690}
43691
43692func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
43693	reqHeaders := make(http.Header)
43694	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
43695	for k, v := range c.header_ {
43696		reqHeaders[k] = v
43697	}
43698	reqHeaders.Set("User-Agent", c.s.userAgent())
43699	var body io.Reader = nil
43700	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
43701	if err != nil {
43702		return nil, err
43703	}
43704	reqHeaders.Set("Content-Type", "application/json")
43705	c.urlParams_.Set("alt", alt)
43706	c.urlParams_.Set("prettyPrint", "false")
43707	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
43708	urls += "?" + c.urlParams_.Encode()
43709	req, err := http.NewRequest("POST", urls, body)
43710	if err != nil {
43711		return nil, err
43712	}
43713	req.Header = reqHeaders
43714	googleapi.Expand(req.URL, map[string]string{
43715		"profileId": strconv.FormatInt(c.profileId, 10),
43716	})
43717	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43718}
43719
43720// Do executes the "dfareporting.reports.insert" call.
43721// Exactly one of *Report or error will be non-nil. Any non-2xx status
43722// code is an error. Response headers are in either
43723// *Report.ServerResponse.Header or (if a response was returned at all)
43724// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
43725// check whether the returned error was because http.StatusNotModified
43726// was returned.
43727func (c *ReportsInsertCall) Do(opts ...googleapi.CallOption) (*Report, error) {
43728	gensupport.SetOptions(c.urlParams_, opts...)
43729	res, err := c.doRequest("json")
43730	if res != nil && res.StatusCode == http.StatusNotModified {
43731		if res.Body != nil {
43732			res.Body.Close()
43733		}
43734		return nil, &googleapi.Error{
43735			Code:   res.StatusCode,
43736			Header: res.Header,
43737		}
43738	}
43739	if err != nil {
43740		return nil, err
43741	}
43742	defer googleapi.CloseBody(res)
43743	if err := googleapi.CheckResponse(res); err != nil {
43744		return nil, err
43745	}
43746	ret := &Report{
43747		ServerResponse: googleapi.ServerResponse{
43748			Header:         res.Header,
43749			HTTPStatusCode: res.StatusCode,
43750		},
43751	}
43752	target := &ret
43753	if err := gensupport.DecodeResponse(target, res); err != nil {
43754		return nil, err
43755	}
43756	return ret, nil
43757	// {
43758	//   "description": "Creates a report.",
43759	//   "httpMethod": "POST",
43760	//   "id": "dfareporting.reports.insert",
43761	//   "parameterOrder": [
43762	//     "profileId"
43763	//   ],
43764	//   "parameters": {
43765	//     "profileId": {
43766	//       "description": "The DFA user profile ID.",
43767	//       "format": "int64",
43768	//       "location": "path",
43769	//       "required": true,
43770	//       "type": "string"
43771	//     }
43772	//   },
43773	//   "path": "userprofiles/{profileId}/reports",
43774	//   "request": {
43775	//     "$ref": "Report"
43776	//   },
43777	//   "response": {
43778	//     "$ref": "Report"
43779	//   },
43780	//   "scopes": [
43781	//     "https://www.googleapis.com/auth/dfareporting"
43782	//   ]
43783	// }
43784
43785}
43786
43787// method id "dfareporting.reports.list":
43788
43789type ReportsListCall struct {
43790	s            *Service
43791	profileId    int64
43792	urlParams_   gensupport.URLParams
43793	ifNoneMatch_ string
43794	ctx_         context.Context
43795	header_      http.Header
43796}
43797
43798// List: Retrieves list of reports.
43799func (r *ReportsService) List(profileId int64) *ReportsListCall {
43800	c := &ReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43801	c.profileId = profileId
43802	return c
43803}
43804
43805// MaxResults sets the optional parameter "maxResults": Maximum number
43806// of results to return.
43807func (c *ReportsListCall) MaxResults(maxResults int64) *ReportsListCall {
43808	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
43809	return c
43810}
43811
43812// PageToken sets the optional parameter "pageToken": The value of the
43813// nextToken from the previous result page.
43814func (c *ReportsListCall) PageToken(pageToken string) *ReportsListCall {
43815	c.urlParams_.Set("pageToken", pageToken)
43816	return c
43817}
43818
43819// Scope sets the optional parameter "scope": The scope that defines
43820// which results are returned.
43821//
43822// Possible values:
43823//   "ALL" - All reports in account.
43824//   "MINE" (default) - My reports.
43825func (c *ReportsListCall) Scope(scope string) *ReportsListCall {
43826	c.urlParams_.Set("scope", scope)
43827	return c
43828}
43829
43830// SortField sets the optional parameter "sortField": The field by which
43831// to sort the list.
43832//
43833// Possible values:
43834//   "ID" - Sort by report ID.
43835//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastModifiedTime' field.
43836//   "NAME" - Sort by name of reports.
43837func (c *ReportsListCall) SortField(sortField string) *ReportsListCall {
43838	c.urlParams_.Set("sortField", sortField)
43839	return c
43840}
43841
43842// SortOrder sets the optional parameter "sortOrder": Order of sorted
43843// results.
43844//
43845// Possible values:
43846//   "ASCENDING" - Ascending order.
43847//   "DESCENDING" (default) - Descending order.
43848func (c *ReportsListCall) SortOrder(sortOrder string) *ReportsListCall {
43849	c.urlParams_.Set("sortOrder", sortOrder)
43850	return c
43851}
43852
43853// Fields allows partial responses to be retrieved. See
43854// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43855// for more information.
43856func (c *ReportsListCall) Fields(s ...googleapi.Field) *ReportsListCall {
43857	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43858	return c
43859}
43860
43861// IfNoneMatch sets the optional parameter which makes the operation
43862// fail if the object's ETag matches the given value. This is useful for
43863// getting updates only after the object has changed since the last
43864// request. Use googleapi.IsNotModified to check whether the response
43865// error from Do is the result of In-None-Match.
43866func (c *ReportsListCall) IfNoneMatch(entityTag string) *ReportsListCall {
43867	c.ifNoneMatch_ = entityTag
43868	return c
43869}
43870
43871// Context sets the context to be used in this call's Do method. Any
43872// pending HTTP request will be aborted if the provided context is
43873// canceled.
43874func (c *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
43875	c.ctx_ = ctx
43876	return c
43877}
43878
43879// Header returns an http.Header that can be modified by the caller to
43880// add HTTP headers to the request.
43881func (c *ReportsListCall) Header() http.Header {
43882	if c.header_ == nil {
43883		c.header_ = make(http.Header)
43884	}
43885	return c.header_
43886}
43887
43888func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
43889	reqHeaders := make(http.Header)
43890	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
43891	for k, v := range c.header_ {
43892		reqHeaders[k] = v
43893	}
43894	reqHeaders.Set("User-Agent", c.s.userAgent())
43895	if c.ifNoneMatch_ != "" {
43896		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43897	}
43898	var body io.Reader = nil
43899	c.urlParams_.Set("alt", alt)
43900	c.urlParams_.Set("prettyPrint", "false")
43901	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
43902	urls += "?" + c.urlParams_.Encode()
43903	req, err := http.NewRequest("GET", urls, body)
43904	if err != nil {
43905		return nil, err
43906	}
43907	req.Header = reqHeaders
43908	googleapi.Expand(req.URL, map[string]string{
43909		"profileId": strconv.FormatInt(c.profileId, 10),
43910	})
43911	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43912}
43913
43914// Do executes the "dfareporting.reports.list" call.
43915// Exactly one of *ReportList or error will be non-nil. Any non-2xx
43916// status code is an error. Response headers are in either
43917// *ReportList.ServerResponse.Header or (if a response was returned at
43918// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
43919// to check whether the returned error was because
43920// http.StatusNotModified was returned.
43921func (c *ReportsListCall) Do(opts ...googleapi.CallOption) (*ReportList, error) {
43922	gensupport.SetOptions(c.urlParams_, opts...)
43923	res, err := c.doRequest("json")
43924	if res != nil && res.StatusCode == http.StatusNotModified {
43925		if res.Body != nil {
43926			res.Body.Close()
43927		}
43928		return nil, &googleapi.Error{
43929			Code:   res.StatusCode,
43930			Header: res.Header,
43931		}
43932	}
43933	if err != nil {
43934		return nil, err
43935	}
43936	defer googleapi.CloseBody(res)
43937	if err := googleapi.CheckResponse(res); err != nil {
43938		return nil, err
43939	}
43940	ret := &ReportList{
43941		ServerResponse: googleapi.ServerResponse{
43942			Header:         res.Header,
43943			HTTPStatusCode: res.StatusCode,
43944		},
43945	}
43946	target := &ret
43947	if err := gensupport.DecodeResponse(target, res); err != nil {
43948		return nil, err
43949	}
43950	return ret, nil
43951	// {
43952	//   "description": "Retrieves list of reports.",
43953	//   "httpMethod": "GET",
43954	//   "id": "dfareporting.reports.list",
43955	//   "parameterOrder": [
43956	//     "profileId"
43957	//   ],
43958	//   "parameters": {
43959	//     "maxResults": {
43960	//       "default": "10",
43961	//       "description": "Maximum number of results to return.",
43962	//       "format": "int32",
43963	//       "location": "query",
43964	//       "maximum": "10",
43965	//       "minimum": "0",
43966	//       "type": "integer"
43967	//     },
43968	//     "pageToken": {
43969	//       "description": "The value of the nextToken from the previous result page.",
43970	//       "location": "query",
43971	//       "type": "string"
43972	//     },
43973	//     "profileId": {
43974	//       "description": "The DFA user profile ID.",
43975	//       "format": "int64",
43976	//       "location": "path",
43977	//       "required": true,
43978	//       "type": "string"
43979	//     },
43980	//     "scope": {
43981	//       "default": "MINE",
43982	//       "description": "The scope that defines which results are returned.",
43983	//       "enum": [
43984	//         "ALL",
43985	//         "MINE"
43986	//       ],
43987	//       "enumDescriptions": [
43988	//         "All reports in account.",
43989	//         "My reports."
43990	//       ],
43991	//       "location": "query",
43992	//       "type": "string"
43993	//     },
43994	//     "sortField": {
43995	//       "default": "LAST_MODIFIED_TIME",
43996	//       "description": "The field by which to sort the list.",
43997	//       "enum": [
43998	//         "ID",
43999	//         "LAST_MODIFIED_TIME",
44000	//         "NAME"
44001	//       ],
44002	//       "enumDescriptions": [
44003	//         "Sort by report ID.",
44004	//         "Sort by 'lastModifiedTime' field.",
44005	//         "Sort by name of reports."
44006	//       ],
44007	//       "location": "query",
44008	//       "type": "string"
44009	//     },
44010	//     "sortOrder": {
44011	//       "default": "DESCENDING",
44012	//       "description": "Order of sorted results.",
44013	//       "enum": [
44014	//         "ASCENDING",
44015	//         "DESCENDING"
44016	//       ],
44017	//       "enumDescriptions": [
44018	//         "Ascending order.",
44019	//         "Descending order."
44020	//       ],
44021	//       "location": "query",
44022	//       "type": "string"
44023	//     }
44024	//   },
44025	//   "path": "userprofiles/{profileId}/reports",
44026	//   "response": {
44027	//     "$ref": "ReportList"
44028	//   },
44029	//   "scopes": [
44030	//     "https://www.googleapis.com/auth/dfareporting"
44031	//   ]
44032	// }
44033
44034}
44035
44036// Pages invokes f for each page of results.
44037// A non-nil error returned from f will halt the iteration.
44038// The provided context supersedes any context provided to the Context method.
44039func (c *ReportsListCall) Pages(ctx context.Context, f func(*ReportList) error) error {
44040	c.ctx_ = ctx
44041	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
44042	for {
44043		x, err := c.Do()
44044		if err != nil {
44045			return err
44046		}
44047		if err := f(x); err != nil {
44048			return err
44049		}
44050		if x.NextPageToken == "" {
44051			return nil
44052		}
44053		c.PageToken(x.NextPageToken)
44054	}
44055}
44056
44057// method id "dfareporting.reports.patch":
44058
44059type ReportsPatchCall struct {
44060	s          *Service
44061	profileId  int64
44062	reportId   int64
44063	report     *Report
44064	urlParams_ gensupport.URLParams
44065	ctx_       context.Context
44066	header_    http.Header
44067}
44068
44069// Patch: Updates a report. This method supports patch semantics.
44070func (r *ReportsService) Patch(profileId int64, reportId int64, report *Report) *ReportsPatchCall {
44071	c := &ReportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44072	c.profileId = profileId
44073	c.reportId = reportId
44074	c.report = report
44075	return c
44076}
44077
44078// Fields allows partial responses to be retrieved. See
44079// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44080// for more information.
44081func (c *ReportsPatchCall) Fields(s ...googleapi.Field) *ReportsPatchCall {
44082	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44083	return c
44084}
44085
44086// Context sets the context to be used in this call's Do method. Any
44087// pending HTTP request will be aborted if the provided context is
44088// canceled.
44089func (c *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
44090	c.ctx_ = ctx
44091	return c
44092}
44093
44094// Header returns an http.Header that can be modified by the caller to
44095// add HTTP headers to the request.
44096func (c *ReportsPatchCall) Header() http.Header {
44097	if c.header_ == nil {
44098		c.header_ = make(http.Header)
44099	}
44100	return c.header_
44101}
44102
44103func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
44104	reqHeaders := make(http.Header)
44105	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
44106	for k, v := range c.header_ {
44107		reqHeaders[k] = v
44108	}
44109	reqHeaders.Set("User-Agent", c.s.userAgent())
44110	var body io.Reader = nil
44111	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44112	if err != nil {
44113		return nil, err
44114	}
44115	reqHeaders.Set("Content-Type", "application/json")
44116	c.urlParams_.Set("alt", alt)
44117	c.urlParams_.Set("prettyPrint", "false")
44118	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
44119	urls += "?" + c.urlParams_.Encode()
44120	req, err := http.NewRequest("PATCH", urls, body)
44121	if err != nil {
44122		return nil, err
44123	}
44124	req.Header = reqHeaders
44125	googleapi.Expand(req.URL, map[string]string{
44126		"profileId": strconv.FormatInt(c.profileId, 10),
44127		"reportId":  strconv.FormatInt(c.reportId, 10),
44128	})
44129	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44130}
44131
44132// Do executes the "dfareporting.reports.patch" call.
44133// Exactly one of *Report or error will be non-nil. Any non-2xx status
44134// code is an error. Response headers are in either
44135// *Report.ServerResponse.Header or (if a response was returned at all)
44136// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
44137// check whether the returned error was because http.StatusNotModified
44138// was returned.
44139func (c *ReportsPatchCall) Do(opts ...googleapi.CallOption) (*Report, error) {
44140	gensupport.SetOptions(c.urlParams_, opts...)
44141	res, err := c.doRequest("json")
44142	if res != nil && res.StatusCode == http.StatusNotModified {
44143		if res.Body != nil {
44144			res.Body.Close()
44145		}
44146		return nil, &googleapi.Error{
44147			Code:   res.StatusCode,
44148			Header: res.Header,
44149		}
44150	}
44151	if err != nil {
44152		return nil, err
44153	}
44154	defer googleapi.CloseBody(res)
44155	if err := googleapi.CheckResponse(res); err != nil {
44156		return nil, err
44157	}
44158	ret := &Report{
44159		ServerResponse: googleapi.ServerResponse{
44160			Header:         res.Header,
44161			HTTPStatusCode: res.StatusCode,
44162		},
44163	}
44164	target := &ret
44165	if err := gensupport.DecodeResponse(target, res); err != nil {
44166		return nil, err
44167	}
44168	return ret, nil
44169	// {
44170	//   "description": "Updates a report. This method supports patch semantics.",
44171	//   "httpMethod": "PATCH",
44172	//   "id": "dfareporting.reports.patch",
44173	//   "parameterOrder": [
44174	//     "profileId",
44175	//     "reportId"
44176	//   ],
44177	//   "parameters": {
44178	//     "profileId": {
44179	//       "description": "The DFA user profile ID.",
44180	//       "format": "int64",
44181	//       "location": "path",
44182	//       "required": true,
44183	//       "type": "string"
44184	//     },
44185	//     "reportId": {
44186	//       "description": "The ID of the report.",
44187	//       "format": "int64",
44188	//       "location": "path",
44189	//       "required": true,
44190	//       "type": "string"
44191	//     }
44192	//   },
44193	//   "path": "userprofiles/{profileId}/reports/{reportId}",
44194	//   "request": {
44195	//     "$ref": "Report"
44196	//   },
44197	//   "response": {
44198	//     "$ref": "Report"
44199	//   },
44200	//   "scopes": [
44201	//     "https://www.googleapis.com/auth/dfareporting"
44202	//   ]
44203	// }
44204
44205}
44206
44207// method id "dfareporting.reports.run":
44208
44209type ReportsRunCall struct {
44210	s          *Service
44211	profileId  int64
44212	reportId   int64
44213	urlParams_ gensupport.URLParams
44214	ctx_       context.Context
44215	header_    http.Header
44216}
44217
44218// Run: Runs a report.
44219func (r *ReportsService) Run(profileId int64, reportId int64) *ReportsRunCall {
44220	c := &ReportsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44221	c.profileId = profileId
44222	c.reportId = reportId
44223	return c
44224}
44225
44226// Synchronous sets the optional parameter "synchronous": If set and
44227// true, tries to run the report synchronously.
44228func (c *ReportsRunCall) Synchronous(synchronous bool) *ReportsRunCall {
44229	c.urlParams_.Set("synchronous", fmt.Sprint(synchronous))
44230	return c
44231}
44232
44233// Fields allows partial responses to be retrieved. See
44234// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44235// for more information.
44236func (c *ReportsRunCall) Fields(s ...googleapi.Field) *ReportsRunCall {
44237	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44238	return c
44239}
44240
44241// Context sets the context to be used in this call's Do method. Any
44242// pending HTTP request will be aborted if the provided context is
44243// canceled.
44244func (c *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
44245	c.ctx_ = ctx
44246	return c
44247}
44248
44249// Header returns an http.Header that can be modified by the caller to
44250// add HTTP headers to the request.
44251func (c *ReportsRunCall) Header() http.Header {
44252	if c.header_ == nil {
44253		c.header_ = make(http.Header)
44254	}
44255	return c.header_
44256}
44257
44258func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
44259	reqHeaders := make(http.Header)
44260	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
44261	for k, v := range c.header_ {
44262		reqHeaders[k] = v
44263	}
44264	reqHeaders.Set("User-Agent", c.s.userAgent())
44265	var body io.Reader = nil
44266	c.urlParams_.Set("alt", alt)
44267	c.urlParams_.Set("prettyPrint", "false")
44268	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/run")
44269	urls += "?" + c.urlParams_.Encode()
44270	req, err := http.NewRequest("POST", urls, body)
44271	if err != nil {
44272		return nil, err
44273	}
44274	req.Header = reqHeaders
44275	googleapi.Expand(req.URL, map[string]string{
44276		"profileId": strconv.FormatInt(c.profileId, 10),
44277		"reportId":  strconv.FormatInt(c.reportId, 10),
44278	})
44279	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44280}
44281
44282// Do executes the "dfareporting.reports.run" call.
44283// Exactly one of *File or error will be non-nil. Any non-2xx status
44284// code is an error. Response headers are in either
44285// *File.ServerResponse.Header or (if a response was returned at all) in
44286// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
44287// whether the returned error was because http.StatusNotModified was
44288// returned.
44289func (c *ReportsRunCall) Do(opts ...googleapi.CallOption) (*File, error) {
44290	gensupport.SetOptions(c.urlParams_, opts...)
44291	res, err := c.doRequest("json")
44292	if res != nil && res.StatusCode == http.StatusNotModified {
44293		if res.Body != nil {
44294			res.Body.Close()
44295		}
44296		return nil, &googleapi.Error{
44297			Code:   res.StatusCode,
44298			Header: res.Header,
44299		}
44300	}
44301	if err != nil {
44302		return nil, err
44303	}
44304	defer googleapi.CloseBody(res)
44305	if err := googleapi.CheckResponse(res); err != nil {
44306		return nil, err
44307	}
44308	ret := &File{
44309		ServerResponse: googleapi.ServerResponse{
44310			Header:         res.Header,
44311			HTTPStatusCode: res.StatusCode,
44312		},
44313	}
44314	target := &ret
44315	if err := gensupport.DecodeResponse(target, res); err != nil {
44316		return nil, err
44317	}
44318	return ret, nil
44319	// {
44320	//   "description": "Runs a report.",
44321	//   "httpMethod": "POST",
44322	//   "id": "dfareporting.reports.run",
44323	//   "parameterOrder": [
44324	//     "profileId",
44325	//     "reportId"
44326	//   ],
44327	//   "parameters": {
44328	//     "profileId": {
44329	//       "description": "The DFA profile ID.",
44330	//       "format": "int64",
44331	//       "location": "path",
44332	//       "required": true,
44333	//       "type": "string"
44334	//     },
44335	//     "reportId": {
44336	//       "description": "The ID of the report.",
44337	//       "format": "int64",
44338	//       "location": "path",
44339	//       "required": true,
44340	//       "type": "string"
44341	//     },
44342	//     "synchronous": {
44343	//       "default": "false",
44344	//       "description": "If set and true, tries to run the report synchronously.",
44345	//       "location": "query",
44346	//       "type": "boolean"
44347	//     }
44348	//   },
44349	//   "path": "userprofiles/{profileId}/reports/{reportId}/run",
44350	//   "response": {
44351	//     "$ref": "File"
44352	//   },
44353	//   "scopes": [
44354	//     "https://www.googleapis.com/auth/dfareporting"
44355	//   ]
44356	// }
44357
44358}
44359
44360// method id "dfareporting.reports.update":
44361
44362type ReportsUpdateCall struct {
44363	s          *Service
44364	profileId  int64
44365	reportId   int64
44366	report     *Report
44367	urlParams_ gensupport.URLParams
44368	ctx_       context.Context
44369	header_    http.Header
44370}
44371
44372// Update: Updates a report.
44373func (r *ReportsService) Update(profileId int64, reportId int64, report *Report) *ReportsUpdateCall {
44374	c := &ReportsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44375	c.profileId = profileId
44376	c.reportId = reportId
44377	c.report = report
44378	return c
44379}
44380
44381// Fields allows partial responses to be retrieved. See
44382// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44383// for more information.
44384func (c *ReportsUpdateCall) Fields(s ...googleapi.Field) *ReportsUpdateCall {
44385	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44386	return c
44387}
44388
44389// Context sets the context to be used in this call's Do method. Any
44390// pending HTTP request will be aborted if the provided context is
44391// canceled.
44392func (c *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
44393	c.ctx_ = ctx
44394	return c
44395}
44396
44397// Header returns an http.Header that can be modified by the caller to
44398// add HTTP headers to the request.
44399func (c *ReportsUpdateCall) Header() http.Header {
44400	if c.header_ == nil {
44401		c.header_ = make(http.Header)
44402	}
44403	return c.header_
44404}
44405
44406func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
44407	reqHeaders := make(http.Header)
44408	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
44409	for k, v := range c.header_ {
44410		reqHeaders[k] = v
44411	}
44412	reqHeaders.Set("User-Agent", c.s.userAgent())
44413	var body io.Reader = nil
44414	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44415	if err != nil {
44416		return nil, err
44417	}
44418	reqHeaders.Set("Content-Type", "application/json")
44419	c.urlParams_.Set("alt", alt)
44420	c.urlParams_.Set("prettyPrint", "false")
44421	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
44422	urls += "?" + c.urlParams_.Encode()
44423	req, err := http.NewRequest("PUT", urls, body)
44424	if err != nil {
44425		return nil, err
44426	}
44427	req.Header = reqHeaders
44428	googleapi.Expand(req.URL, map[string]string{
44429		"profileId": strconv.FormatInt(c.profileId, 10),
44430		"reportId":  strconv.FormatInt(c.reportId, 10),
44431	})
44432	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44433}
44434
44435// Do executes the "dfareporting.reports.update" call.
44436// Exactly one of *Report or error will be non-nil. Any non-2xx status
44437// code is an error. Response headers are in either
44438// *Report.ServerResponse.Header or (if a response was returned at all)
44439// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
44440// check whether the returned error was because http.StatusNotModified
44441// was returned.
44442func (c *ReportsUpdateCall) Do(opts ...googleapi.CallOption) (*Report, error) {
44443	gensupport.SetOptions(c.urlParams_, opts...)
44444	res, err := c.doRequest("json")
44445	if res != nil && res.StatusCode == http.StatusNotModified {
44446		if res.Body != nil {
44447			res.Body.Close()
44448		}
44449		return nil, &googleapi.Error{
44450			Code:   res.StatusCode,
44451			Header: res.Header,
44452		}
44453	}
44454	if err != nil {
44455		return nil, err
44456	}
44457	defer googleapi.CloseBody(res)
44458	if err := googleapi.CheckResponse(res); err != nil {
44459		return nil, err
44460	}
44461	ret := &Report{
44462		ServerResponse: googleapi.ServerResponse{
44463			Header:         res.Header,
44464			HTTPStatusCode: res.StatusCode,
44465		},
44466	}
44467	target := &ret
44468	if err := gensupport.DecodeResponse(target, res); err != nil {
44469		return nil, err
44470	}
44471	return ret, nil
44472	// {
44473	//   "description": "Updates a report.",
44474	//   "httpMethod": "PUT",
44475	//   "id": "dfareporting.reports.update",
44476	//   "parameterOrder": [
44477	//     "profileId",
44478	//     "reportId"
44479	//   ],
44480	//   "parameters": {
44481	//     "profileId": {
44482	//       "description": "The DFA user profile ID.",
44483	//       "format": "int64",
44484	//       "location": "path",
44485	//       "required": true,
44486	//       "type": "string"
44487	//     },
44488	//     "reportId": {
44489	//       "description": "The ID of the report.",
44490	//       "format": "int64",
44491	//       "location": "path",
44492	//       "required": true,
44493	//       "type": "string"
44494	//     }
44495	//   },
44496	//   "path": "userprofiles/{profileId}/reports/{reportId}",
44497	//   "request": {
44498	//     "$ref": "Report"
44499	//   },
44500	//   "response": {
44501	//     "$ref": "Report"
44502	//   },
44503	//   "scopes": [
44504	//     "https://www.googleapis.com/auth/dfareporting"
44505	//   ]
44506	// }
44507
44508}
44509
44510// method id "dfareporting.reports.compatibleFields.query":
44511
44512type ReportsCompatibleFieldsQueryCall struct {
44513	s          *Service
44514	profileId  int64
44515	report     *Report
44516	urlParams_ gensupport.URLParams
44517	ctx_       context.Context
44518	header_    http.Header
44519}
44520
44521// Query: Returns the fields that are compatible to be selected in the
44522// respective sections of a report criteria, given the fields already
44523// selected in the input report and user permissions.
44524func (r *ReportsCompatibleFieldsService) Query(profileId int64, report *Report) *ReportsCompatibleFieldsQueryCall {
44525	c := &ReportsCompatibleFieldsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44526	c.profileId = profileId
44527	c.report = report
44528	return c
44529}
44530
44531// Fields allows partial responses to be retrieved. See
44532// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44533// for more information.
44534func (c *ReportsCompatibleFieldsQueryCall) Fields(s ...googleapi.Field) *ReportsCompatibleFieldsQueryCall {
44535	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44536	return c
44537}
44538
44539// Context sets the context to be used in this call's Do method. Any
44540// pending HTTP request will be aborted if the provided context is
44541// canceled.
44542func (c *ReportsCompatibleFieldsQueryCall) Context(ctx context.Context) *ReportsCompatibleFieldsQueryCall {
44543	c.ctx_ = ctx
44544	return c
44545}
44546
44547// Header returns an http.Header that can be modified by the caller to
44548// add HTTP headers to the request.
44549func (c *ReportsCompatibleFieldsQueryCall) Header() http.Header {
44550	if c.header_ == nil {
44551		c.header_ = make(http.Header)
44552	}
44553	return c.header_
44554}
44555
44556func (c *ReportsCompatibleFieldsQueryCall) doRequest(alt string) (*http.Response, error) {
44557	reqHeaders := make(http.Header)
44558	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
44559	for k, v := range c.header_ {
44560		reqHeaders[k] = v
44561	}
44562	reqHeaders.Set("User-Agent", c.s.userAgent())
44563	var body io.Reader = nil
44564	body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44565	if err != nil {
44566		return nil, err
44567	}
44568	reqHeaders.Set("Content-Type", "application/json")
44569	c.urlParams_.Set("alt", alt)
44570	c.urlParams_.Set("prettyPrint", "false")
44571	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/compatiblefields/query")
44572	urls += "?" + c.urlParams_.Encode()
44573	req, err := http.NewRequest("POST", urls, body)
44574	if err != nil {
44575		return nil, err
44576	}
44577	req.Header = reqHeaders
44578	googleapi.Expand(req.URL, map[string]string{
44579		"profileId": strconv.FormatInt(c.profileId, 10),
44580	})
44581	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44582}
44583
44584// Do executes the "dfareporting.reports.compatibleFields.query" call.
44585// Exactly one of *CompatibleFields or error will be non-nil. Any
44586// non-2xx status code is an error. Response headers are in either
44587// *CompatibleFields.ServerResponse.Header or (if a response was
44588// returned at all) in error.(*googleapi.Error).Header. Use
44589// googleapi.IsNotModified to check whether the returned error was
44590// because http.StatusNotModified was returned.
44591func (c *ReportsCompatibleFieldsQueryCall) Do(opts ...googleapi.CallOption) (*CompatibleFields, error) {
44592	gensupport.SetOptions(c.urlParams_, opts...)
44593	res, err := c.doRequest("json")
44594	if res != nil && res.StatusCode == http.StatusNotModified {
44595		if res.Body != nil {
44596			res.Body.Close()
44597		}
44598		return nil, &googleapi.Error{
44599			Code:   res.StatusCode,
44600			Header: res.Header,
44601		}
44602	}
44603	if err != nil {
44604		return nil, err
44605	}
44606	defer googleapi.CloseBody(res)
44607	if err := googleapi.CheckResponse(res); err != nil {
44608		return nil, err
44609	}
44610	ret := &CompatibleFields{
44611		ServerResponse: googleapi.ServerResponse{
44612			Header:         res.Header,
44613			HTTPStatusCode: res.StatusCode,
44614		},
44615	}
44616	target := &ret
44617	if err := gensupport.DecodeResponse(target, res); err != nil {
44618		return nil, err
44619	}
44620	return ret, nil
44621	// {
44622	//   "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.",
44623	//   "httpMethod": "POST",
44624	//   "id": "dfareporting.reports.compatibleFields.query",
44625	//   "parameterOrder": [
44626	//     "profileId"
44627	//   ],
44628	//   "parameters": {
44629	//     "profileId": {
44630	//       "description": "The DFA user profile ID.",
44631	//       "format": "int64",
44632	//       "location": "path",
44633	//       "required": true,
44634	//       "type": "string"
44635	//     }
44636	//   },
44637	//   "path": "userprofiles/{profileId}/reports/compatiblefields/query",
44638	//   "request": {
44639	//     "$ref": "Report"
44640	//   },
44641	//   "response": {
44642	//     "$ref": "CompatibleFields"
44643	//   },
44644	//   "scopes": [
44645	//     "https://www.googleapis.com/auth/dfareporting"
44646	//   ]
44647	// }
44648
44649}
44650
44651// method id "dfareporting.reports.files.get":
44652
44653type ReportsFilesGetCall struct {
44654	s            *Service
44655	profileId    int64
44656	reportId     int64
44657	fileId       int64
44658	urlParams_   gensupport.URLParams
44659	ifNoneMatch_ string
44660	ctx_         context.Context
44661	header_      http.Header
44662}
44663
44664// Get: Retrieves a report file. This method supports media download.
44665func (r *ReportsFilesService) Get(profileId int64, reportId int64, fileId int64) *ReportsFilesGetCall {
44666	c := &ReportsFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44667	c.profileId = profileId
44668	c.reportId = reportId
44669	c.fileId = fileId
44670	return c
44671}
44672
44673// Fields allows partial responses to be retrieved. See
44674// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44675// for more information.
44676func (c *ReportsFilesGetCall) Fields(s ...googleapi.Field) *ReportsFilesGetCall {
44677	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44678	return c
44679}
44680
44681// IfNoneMatch sets the optional parameter which makes the operation
44682// fail if the object's ETag matches the given value. This is useful for
44683// getting updates only after the object has changed since the last
44684// request. Use googleapi.IsNotModified to check whether the response
44685// error from Do is the result of In-None-Match.
44686func (c *ReportsFilesGetCall) IfNoneMatch(entityTag string) *ReportsFilesGetCall {
44687	c.ifNoneMatch_ = entityTag
44688	return c
44689}
44690
44691// Context sets the context to be used in this call's Do and Download
44692// methods. Any pending HTTP request will be aborted if the provided
44693// context is canceled.
44694func (c *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
44695	c.ctx_ = ctx
44696	return c
44697}
44698
44699// Header returns an http.Header that can be modified by the caller to
44700// add HTTP headers to the request.
44701func (c *ReportsFilesGetCall) Header() http.Header {
44702	if c.header_ == nil {
44703		c.header_ = make(http.Header)
44704	}
44705	return c.header_
44706}
44707
44708func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
44709	reqHeaders := make(http.Header)
44710	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
44711	for k, v := range c.header_ {
44712		reqHeaders[k] = v
44713	}
44714	reqHeaders.Set("User-Agent", c.s.userAgent())
44715	if c.ifNoneMatch_ != "" {
44716		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44717	}
44718	var body io.Reader = nil
44719	c.urlParams_.Set("alt", alt)
44720	c.urlParams_.Set("prettyPrint", "false")
44721	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files/{fileId}")
44722	urls += "?" + c.urlParams_.Encode()
44723	req, err := http.NewRequest("GET", urls, body)
44724	if err != nil {
44725		return nil, err
44726	}
44727	req.Header = reqHeaders
44728	googleapi.Expand(req.URL, map[string]string{
44729		"profileId": strconv.FormatInt(c.profileId, 10),
44730		"reportId":  strconv.FormatInt(c.reportId, 10),
44731		"fileId":    strconv.FormatInt(c.fileId, 10),
44732	})
44733	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44734}
44735
44736// Download fetches the API endpoint's "media" value, instead of the normal
44737// API response value. If the returned error is nil, the Response is guaranteed to
44738// have a 2xx status code. Callers must close the Response.Body as usual.
44739func (c *ReportsFilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
44740	gensupport.SetOptions(c.urlParams_, opts...)
44741	res, err := c.doRequest("media")
44742	if err != nil {
44743		return nil, err
44744	}
44745	if err := googleapi.CheckMediaResponse(res); err != nil {
44746		res.Body.Close()
44747		return nil, err
44748	}
44749	return res, nil
44750}
44751
44752// Do executes the "dfareporting.reports.files.get" call.
44753// Exactly one of *File or error will be non-nil. Any non-2xx status
44754// code is an error. Response headers are in either
44755// *File.ServerResponse.Header or (if a response was returned at all) in
44756// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
44757// whether the returned error was because http.StatusNotModified was
44758// returned.
44759func (c *ReportsFilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
44760	gensupport.SetOptions(c.urlParams_, opts...)
44761	res, err := c.doRequest("json")
44762	if res != nil && res.StatusCode == http.StatusNotModified {
44763		if res.Body != nil {
44764			res.Body.Close()
44765		}
44766		return nil, &googleapi.Error{
44767			Code:   res.StatusCode,
44768			Header: res.Header,
44769		}
44770	}
44771	if err != nil {
44772		return nil, err
44773	}
44774	defer googleapi.CloseBody(res)
44775	if err := googleapi.CheckResponse(res); err != nil {
44776		return nil, err
44777	}
44778	ret := &File{
44779		ServerResponse: googleapi.ServerResponse{
44780			Header:         res.Header,
44781			HTTPStatusCode: res.StatusCode,
44782		},
44783	}
44784	target := &ret
44785	if err := gensupport.DecodeResponse(target, res); err != nil {
44786		return nil, err
44787	}
44788	return ret, nil
44789	// {
44790	//   "description": "Retrieves a report file. This method supports media download.",
44791	//   "httpMethod": "GET",
44792	//   "id": "dfareporting.reports.files.get",
44793	//   "parameterOrder": [
44794	//     "profileId",
44795	//     "reportId",
44796	//     "fileId"
44797	//   ],
44798	//   "parameters": {
44799	//     "fileId": {
44800	//       "description": "The ID of the report file.",
44801	//       "format": "int64",
44802	//       "location": "path",
44803	//       "required": true,
44804	//       "type": "string"
44805	//     },
44806	//     "profileId": {
44807	//       "description": "The DFA profile ID.",
44808	//       "format": "int64",
44809	//       "location": "path",
44810	//       "required": true,
44811	//       "type": "string"
44812	//     },
44813	//     "reportId": {
44814	//       "description": "The ID of the report.",
44815	//       "format": "int64",
44816	//       "location": "path",
44817	//       "required": true,
44818	//       "type": "string"
44819	//     }
44820	//   },
44821	//   "path": "userprofiles/{profileId}/reports/{reportId}/files/{fileId}",
44822	//   "response": {
44823	//     "$ref": "File"
44824	//   },
44825	//   "scopes": [
44826	//     "https://www.googleapis.com/auth/dfareporting"
44827	//   ],
44828	//   "supportsMediaDownload": true
44829	// }
44830
44831}
44832
44833// method id "dfareporting.reports.files.list":
44834
44835type ReportsFilesListCall struct {
44836	s            *Service
44837	profileId    int64
44838	reportId     int64
44839	urlParams_   gensupport.URLParams
44840	ifNoneMatch_ string
44841	ctx_         context.Context
44842	header_      http.Header
44843}
44844
44845// List: Lists files for a report.
44846func (r *ReportsFilesService) List(profileId int64, reportId int64) *ReportsFilesListCall {
44847	c := &ReportsFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44848	c.profileId = profileId
44849	c.reportId = reportId
44850	return c
44851}
44852
44853// MaxResults sets the optional parameter "maxResults": Maximum number
44854// of results to return.
44855func (c *ReportsFilesListCall) MaxResults(maxResults int64) *ReportsFilesListCall {
44856	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
44857	return c
44858}
44859
44860// PageToken sets the optional parameter "pageToken": The value of the
44861// nextToken from the previous result page.
44862func (c *ReportsFilesListCall) PageToken(pageToken string) *ReportsFilesListCall {
44863	c.urlParams_.Set("pageToken", pageToken)
44864	return c
44865}
44866
44867// SortField sets the optional parameter "sortField": The field by which
44868// to sort the list.
44869//
44870// Possible values:
44871//   "ID" - Sort by file ID.
44872//   "LAST_MODIFIED_TIME" (default) - Sort by 'lastmodifiedAt' field.
44873func (c *ReportsFilesListCall) SortField(sortField string) *ReportsFilesListCall {
44874	c.urlParams_.Set("sortField", sortField)
44875	return c
44876}
44877
44878// SortOrder sets the optional parameter "sortOrder": Order of sorted
44879// results.
44880//
44881// Possible values:
44882//   "ASCENDING" - Ascending order.
44883//   "DESCENDING" (default) - Descending order.
44884func (c *ReportsFilesListCall) SortOrder(sortOrder string) *ReportsFilesListCall {
44885	c.urlParams_.Set("sortOrder", sortOrder)
44886	return c
44887}
44888
44889// Fields allows partial responses to be retrieved. See
44890// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44891// for more information.
44892func (c *ReportsFilesListCall) Fields(s ...googleapi.Field) *ReportsFilesListCall {
44893	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44894	return c
44895}
44896
44897// IfNoneMatch sets the optional parameter which makes the operation
44898// fail if the object's ETag matches the given value. This is useful for
44899// getting updates only after the object has changed since the last
44900// request. Use googleapi.IsNotModified to check whether the response
44901// error from Do is the result of In-None-Match.
44902func (c *ReportsFilesListCall) IfNoneMatch(entityTag string) *ReportsFilesListCall {
44903	c.ifNoneMatch_ = entityTag
44904	return c
44905}
44906
44907// Context sets the context to be used in this call's Do method. Any
44908// pending HTTP request will be aborted if the provided context is
44909// canceled.
44910func (c *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
44911	c.ctx_ = ctx
44912	return c
44913}
44914
44915// Header returns an http.Header that can be modified by the caller to
44916// add HTTP headers to the request.
44917func (c *ReportsFilesListCall) Header() http.Header {
44918	if c.header_ == nil {
44919		c.header_ = make(http.Header)
44920	}
44921	return c.header_
44922}
44923
44924func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
44925	reqHeaders := make(http.Header)
44926	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
44927	for k, v := range c.header_ {
44928		reqHeaders[k] = v
44929	}
44930	reqHeaders.Set("User-Agent", c.s.userAgent())
44931	if c.ifNoneMatch_ != "" {
44932		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44933	}
44934	var body io.Reader = nil
44935	c.urlParams_.Set("alt", alt)
44936	c.urlParams_.Set("prettyPrint", "false")
44937	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files")
44938	urls += "?" + c.urlParams_.Encode()
44939	req, err := http.NewRequest("GET", urls, body)
44940	if err != nil {
44941		return nil, err
44942	}
44943	req.Header = reqHeaders
44944	googleapi.Expand(req.URL, map[string]string{
44945		"profileId": strconv.FormatInt(c.profileId, 10),
44946		"reportId":  strconv.FormatInt(c.reportId, 10),
44947	})
44948	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44949}
44950
44951// Do executes the "dfareporting.reports.files.list" call.
44952// Exactly one of *FileList or error will be non-nil. Any non-2xx status
44953// code is an error. Response headers are in either
44954// *FileList.ServerResponse.Header or (if a response was returned at
44955// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
44956// to check whether the returned error was because
44957// http.StatusNotModified was returned.
44958func (c *ReportsFilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
44959	gensupport.SetOptions(c.urlParams_, opts...)
44960	res, err := c.doRequest("json")
44961	if res != nil && res.StatusCode == http.StatusNotModified {
44962		if res.Body != nil {
44963			res.Body.Close()
44964		}
44965		return nil, &googleapi.Error{
44966			Code:   res.StatusCode,
44967			Header: res.Header,
44968		}
44969	}
44970	if err != nil {
44971		return nil, err
44972	}
44973	defer googleapi.CloseBody(res)
44974	if err := googleapi.CheckResponse(res); err != nil {
44975		return nil, err
44976	}
44977	ret := &FileList{
44978		ServerResponse: googleapi.ServerResponse{
44979			Header:         res.Header,
44980			HTTPStatusCode: res.StatusCode,
44981		},
44982	}
44983	target := &ret
44984	if err := gensupport.DecodeResponse(target, res); err != nil {
44985		return nil, err
44986	}
44987	return ret, nil
44988	// {
44989	//   "description": "Lists files for a report.",
44990	//   "httpMethod": "GET",
44991	//   "id": "dfareporting.reports.files.list",
44992	//   "parameterOrder": [
44993	//     "profileId",
44994	//     "reportId"
44995	//   ],
44996	//   "parameters": {
44997	//     "maxResults": {
44998	//       "default": "10",
44999	//       "description": "Maximum number of results to return.",
45000	//       "format": "int32",
45001	//       "location": "query",
45002	//       "maximum": "10",
45003	//       "minimum": "0",
45004	//       "type": "integer"
45005	//     },
45006	//     "pageToken": {
45007	//       "description": "The value of the nextToken from the previous result page.",
45008	//       "location": "query",
45009	//       "type": "string"
45010	//     },
45011	//     "profileId": {
45012	//       "description": "The DFA profile ID.",
45013	//       "format": "int64",
45014	//       "location": "path",
45015	//       "required": true,
45016	//       "type": "string"
45017	//     },
45018	//     "reportId": {
45019	//       "description": "The ID of the parent report.",
45020	//       "format": "int64",
45021	//       "location": "path",
45022	//       "required": true,
45023	//       "type": "string"
45024	//     },
45025	//     "sortField": {
45026	//       "default": "LAST_MODIFIED_TIME",
45027	//       "description": "The field by which to sort the list.",
45028	//       "enum": [
45029	//         "ID",
45030	//         "LAST_MODIFIED_TIME"
45031	//       ],
45032	//       "enumDescriptions": [
45033	//         "Sort by file ID.",
45034	//         "Sort by 'lastmodifiedAt' field."
45035	//       ],
45036	//       "location": "query",
45037	//       "type": "string"
45038	//     },
45039	//     "sortOrder": {
45040	//       "default": "DESCENDING",
45041	//       "description": "Order of sorted results.",
45042	//       "enum": [
45043	//         "ASCENDING",
45044	//         "DESCENDING"
45045	//       ],
45046	//       "enumDescriptions": [
45047	//         "Ascending order.",
45048	//         "Descending order."
45049	//       ],
45050	//       "location": "query",
45051	//       "type": "string"
45052	//     }
45053	//   },
45054	//   "path": "userprofiles/{profileId}/reports/{reportId}/files",
45055	//   "response": {
45056	//     "$ref": "FileList"
45057	//   },
45058	//   "scopes": [
45059	//     "https://www.googleapis.com/auth/dfareporting"
45060	//   ]
45061	// }
45062
45063}
45064
45065// Pages invokes f for each page of results.
45066// A non-nil error returned from f will halt the iteration.
45067// The provided context supersedes any context provided to the Context method.
45068func (c *ReportsFilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
45069	c.ctx_ = ctx
45070	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45071	for {
45072		x, err := c.Do()
45073		if err != nil {
45074			return err
45075		}
45076		if err := f(x); err != nil {
45077			return err
45078		}
45079		if x.NextPageToken == "" {
45080			return nil
45081		}
45082		c.PageToken(x.NextPageToken)
45083	}
45084}
45085
45086// method id "dfareporting.sites.get":
45087
45088type SitesGetCall struct {
45089	s            *Service
45090	profileId    int64
45091	id           int64
45092	urlParams_   gensupport.URLParams
45093	ifNoneMatch_ string
45094	ctx_         context.Context
45095	header_      http.Header
45096}
45097
45098// Get: Gets one site by ID.
45099func (r *SitesService) Get(profileId int64, id int64) *SitesGetCall {
45100	c := &SitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45101	c.profileId = profileId
45102	c.id = id
45103	return c
45104}
45105
45106// Fields allows partial responses to be retrieved. See
45107// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45108// for more information.
45109func (c *SitesGetCall) Fields(s ...googleapi.Field) *SitesGetCall {
45110	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45111	return c
45112}
45113
45114// IfNoneMatch sets the optional parameter which makes the operation
45115// fail if the object's ETag matches the given value. This is useful for
45116// getting updates only after the object has changed since the last
45117// request. Use googleapi.IsNotModified to check whether the response
45118// error from Do is the result of In-None-Match.
45119func (c *SitesGetCall) IfNoneMatch(entityTag string) *SitesGetCall {
45120	c.ifNoneMatch_ = entityTag
45121	return c
45122}
45123
45124// Context sets the context to be used in this call's Do method. Any
45125// pending HTTP request will be aborted if the provided context is
45126// canceled.
45127func (c *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
45128	c.ctx_ = ctx
45129	return c
45130}
45131
45132// Header returns an http.Header that can be modified by the caller to
45133// add HTTP headers to the request.
45134func (c *SitesGetCall) Header() http.Header {
45135	if c.header_ == nil {
45136		c.header_ = make(http.Header)
45137	}
45138	return c.header_
45139}
45140
45141func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
45142	reqHeaders := make(http.Header)
45143	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
45144	for k, v := range c.header_ {
45145		reqHeaders[k] = v
45146	}
45147	reqHeaders.Set("User-Agent", c.s.userAgent())
45148	if c.ifNoneMatch_ != "" {
45149		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45150	}
45151	var body io.Reader = nil
45152	c.urlParams_.Set("alt", alt)
45153	c.urlParams_.Set("prettyPrint", "false")
45154	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites/{id}")
45155	urls += "?" + c.urlParams_.Encode()
45156	req, err := http.NewRequest("GET", urls, body)
45157	if err != nil {
45158		return nil, err
45159	}
45160	req.Header = reqHeaders
45161	googleapi.Expand(req.URL, map[string]string{
45162		"profileId": strconv.FormatInt(c.profileId, 10),
45163		"id":        strconv.FormatInt(c.id, 10),
45164	})
45165	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45166}
45167
45168// Do executes the "dfareporting.sites.get" call.
45169// Exactly one of *Site or error will be non-nil. Any non-2xx status
45170// code is an error. Response headers are in either
45171// *Site.ServerResponse.Header or (if a response was returned at all) in
45172// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45173// whether the returned error was because http.StatusNotModified was
45174// returned.
45175func (c *SitesGetCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45176	gensupport.SetOptions(c.urlParams_, opts...)
45177	res, err := c.doRequest("json")
45178	if res != nil && res.StatusCode == http.StatusNotModified {
45179		if res.Body != nil {
45180			res.Body.Close()
45181		}
45182		return nil, &googleapi.Error{
45183			Code:   res.StatusCode,
45184			Header: res.Header,
45185		}
45186	}
45187	if err != nil {
45188		return nil, err
45189	}
45190	defer googleapi.CloseBody(res)
45191	if err := googleapi.CheckResponse(res); err != nil {
45192		return nil, err
45193	}
45194	ret := &Site{
45195		ServerResponse: googleapi.ServerResponse{
45196			Header:         res.Header,
45197			HTTPStatusCode: res.StatusCode,
45198		},
45199	}
45200	target := &ret
45201	if err := gensupport.DecodeResponse(target, res); err != nil {
45202		return nil, err
45203	}
45204	return ret, nil
45205	// {
45206	//   "description": "Gets one site by ID.",
45207	//   "httpMethod": "GET",
45208	//   "id": "dfareporting.sites.get",
45209	//   "parameterOrder": [
45210	//     "profileId",
45211	//     "id"
45212	//   ],
45213	//   "parameters": {
45214	//     "id": {
45215	//       "description": "Site ID.",
45216	//       "format": "int64",
45217	//       "location": "path",
45218	//       "required": true,
45219	//       "type": "string"
45220	//     },
45221	//     "profileId": {
45222	//       "description": "User profile ID associated with this request.",
45223	//       "format": "int64",
45224	//       "location": "path",
45225	//       "required": true,
45226	//       "type": "string"
45227	//     }
45228	//   },
45229	//   "path": "userprofiles/{profileId}/sites/{id}",
45230	//   "response": {
45231	//     "$ref": "Site"
45232	//   },
45233	//   "scopes": [
45234	//     "https://www.googleapis.com/auth/dfatrafficking"
45235	//   ]
45236	// }
45237
45238}
45239
45240// method id "dfareporting.sites.insert":
45241
45242type SitesInsertCall struct {
45243	s          *Service
45244	profileId  int64
45245	site       *Site
45246	urlParams_ gensupport.URLParams
45247	ctx_       context.Context
45248	header_    http.Header
45249}
45250
45251// Insert: Inserts a new site.
45252func (r *SitesService) Insert(profileId int64, site *Site) *SitesInsertCall {
45253	c := &SitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45254	c.profileId = profileId
45255	c.site = site
45256	return c
45257}
45258
45259// Fields allows partial responses to be retrieved. See
45260// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45261// for more information.
45262func (c *SitesInsertCall) Fields(s ...googleapi.Field) *SitesInsertCall {
45263	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45264	return c
45265}
45266
45267// Context sets the context to be used in this call's Do method. Any
45268// pending HTTP request will be aborted if the provided context is
45269// canceled.
45270func (c *SitesInsertCall) Context(ctx context.Context) *SitesInsertCall {
45271	c.ctx_ = ctx
45272	return c
45273}
45274
45275// Header returns an http.Header that can be modified by the caller to
45276// add HTTP headers to the request.
45277func (c *SitesInsertCall) Header() http.Header {
45278	if c.header_ == nil {
45279		c.header_ = make(http.Header)
45280	}
45281	return c.header_
45282}
45283
45284func (c *SitesInsertCall) doRequest(alt string) (*http.Response, error) {
45285	reqHeaders := make(http.Header)
45286	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
45287	for k, v := range c.header_ {
45288		reqHeaders[k] = v
45289	}
45290	reqHeaders.Set("User-Agent", c.s.userAgent())
45291	var body io.Reader = nil
45292	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
45293	if err != nil {
45294		return nil, err
45295	}
45296	reqHeaders.Set("Content-Type", "application/json")
45297	c.urlParams_.Set("alt", alt)
45298	c.urlParams_.Set("prettyPrint", "false")
45299	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45300	urls += "?" + c.urlParams_.Encode()
45301	req, err := http.NewRequest("POST", urls, body)
45302	if err != nil {
45303		return nil, err
45304	}
45305	req.Header = reqHeaders
45306	googleapi.Expand(req.URL, map[string]string{
45307		"profileId": strconv.FormatInt(c.profileId, 10),
45308	})
45309	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45310}
45311
45312// Do executes the "dfareporting.sites.insert" call.
45313// Exactly one of *Site or error will be non-nil. Any non-2xx status
45314// code is an error. Response headers are in either
45315// *Site.ServerResponse.Header or (if a response was returned at all) in
45316// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45317// whether the returned error was because http.StatusNotModified was
45318// returned.
45319func (c *SitesInsertCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45320	gensupport.SetOptions(c.urlParams_, opts...)
45321	res, err := c.doRequest("json")
45322	if res != nil && res.StatusCode == http.StatusNotModified {
45323		if res.Body != nil {
45324			res.Body.Close()
45325		}
45326		return nil, &googleapi.Error{
45327			Code:   res.StatusCode,
45328			Header: res.Header,
45329		}
45330	}
45331	if err != nil {
45332		return nil, err
45333	}
45334	defer googleapi.CloseBody(res)
45335	if err := googleapi.CheckResponse(res); err != nil {
45336		return nil, err
45337	}
45338	ret := &Site{
45339		ServerResponse: googleapi.ServerResponse{
45340			Header:         res.Header,
45341			HTTPStatusCode: res.StatusCode,
45342		},
45343	}
45344	target := &ret
45345	if err := gensupport.DecodeResponse(target, res); err != nil {
45346		return nil, err
45347	}
45348	return ret, nil
45349	// {
45350	//   "description": "Inserts a new site.",
45351	//   "httpMethod": "POST",
45352	//   "id": "dfareporting.sites.insert",
45353	//   "parameterOrder": [
45354	//     "profileId"
45355	//   ],
45356	//   "parameters": {
45357	//     "profileId": {
45358	//       "description": "User profile ID associated with this request.",
45359	//       "format": "int64",
45360	//       "location": "path",
45361	//       "required": true,
45362	//       "type": "string"
45363	//     }
45364	//   },
45365	//   "path": "userprofiles/{profileId}/sites",
45366	//   "request": {
45367	//     "$ref": "Site"
45368	//   },
45369	//   "response": {
45370	//     "$ref": "Site"
45371	//   },
45372	//   "scopes": [
45373	//     "https://www.googleapis.com/auth/dfatrafficking"
45374	//   ]
45375	// }
45376
45377}
45378
45379// method id "dfareporting.sites.list":
45380
45381type SitesListCall struct {
45382	s            *Service
45383	profileId    int64
45384	urlParams_   gensupport.URLParams
45385	ifNoneMatch_ string
45386	ctx_         context.Context
45387	header_      http.Header
45388}
45389
45390// List: Retrieves a list of sites, possibly filtered. This method
45391// supports paging.
45392func (r *SitesService) List(profileId int64) *SitesListCall {
45393	c := &SitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45394	c.profileId = profileId
45395	return c
45396}
45397
45398// AcceptsInStreamVideoPlacements sets the optional parameter
45399// "acceptsInStreamVideoPlacements": This search filter is no longer
45400// supported and will have no effect on the results returned.
45401func (c *SitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *SitesListCall {
45402	c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
45403	return c
45404}
45405
45406// AcceptsInterstitialPlacements sets the optional parameter
45407// "acceptsInterstitialPlacements": This search filter is no longer
45408// supported and will have no effect on the results returned.
45409func (c *SitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *SitesListCall {
45410	c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
45411	return c
45412}
45413
45414// AcceptsPublisherPaidPlacements sets the optional parameter
45415// "acceptsPublisherPaidPlacements": Select only sites that accept
45416// publisher paid placements.
45417func (c *SitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *SitesListCall {
45418	c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
45419	return c
45420}
45421
45422// AdWordsSite sets the optional parameter "adWordsSite": Select only
45423// AdWords sites.
45424func (c *SitesListCall) AdWordsSite(adWordsSite bool) *SitesListCall {
45425	c.urlParams_.Set("adWordsSite", fmt.Sprint(adWordsSite))
45426	return c
45427}
45428
45429// Approved sets the optional parameter "approved": Select only approved
45430// sites.
45431func (c *SitesListCall) Approved(approved bool) *SitesListCall {
45432	c.urlParams_.Set("approved", fmt.Sprint(approved))
45433	return c
45434}
45435
45436// CampaignIds sets the optional parameter "campaignIds": Select only
45437// sites with these campaign IDs.
45438func (c *SitesListCall) CampaignIds(campaignIds ...int64) *SitesListCall {
45439	var campaignIds_ []string
45440	for _, v := range campaignIds {
45441		campaignIds_ = append(campaignIds_, fmt.Sprint(v))
45442	}
45443	c.urlParams_.SetMulti("campaignIds", campaignIds_)
45444	return c
45445}
45446
45447// DirectorySiteIds sets the optional parameter "directorySiteIds":
45448// Select only sites with these directory site IDs.
45449func (c *SitesListCall) DirectorySiteIds(directorySiteIds ...int64) *SitesListCall {
45450	var directorySiteIds_ []string
45451	for _, v := range directorySiteIds {
45452		directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
45453	}
45454	c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
45455	return c
45456}
45457
45458// Ids sets the optional parameter "ids": Select only sites with these
45459// IDs.
45460func (c *SitesListCall) Ids(ids ...int64) *SitesListCall {
45461	var ids_ []string
45462	for _, v := range ids {
45463		ids_ = append(ids_, fmt.Sprint(v))
45464	}
45465	c.urlParams_.SetMulti("ids", ids_)
45466	return c
45467}
45468
45469// MaxResults sets the optional parameter "maxResults": Maximum number
45470// of results to return.
45471func (c *SitesListCall) MaxResults(maxResults int64) *SitesListCall {
45472	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
45473	return c
45474}
45475
45476// PageToken sets the optional parameter "pageToken": Value of the
45477// nextPageToken from the previous result page.
45478func (c *SitesListCall) PageToken(pageToken string) *SitesListCall {
45479	c.urlParams_.Set("pageToken", pageToken)
45480	return c
45481}
45482
45483// SearchString sets the optional parameter "searchString": Allows
45484// searching for objects by name, ID or keyName. Wildcards (*) are
45485// allowed. For example, "site*2015" will return objects with names like
45486// "site June 2015", "site April 2015", or simply "site 2015". Most of
45487// the searches also add wildcards implicitly at the start and the end
45488// of the search string. For example, a search string of "site" will
45489// match objects with name "my site", "site 2015", or simply "site".
45490func (c *SitesListCall) SearchString(searchString string) *SitesListCall {
45491	c.urlParams_.Set("searchString", searchString)
45492	return c
45493}
45494
45495// SortField sets the optional parameter "sortField": Field by which to
45496// sort the list.
45497//
45498// Possible values:
45499//   "ID" (default)
45500//   "NAME"
45501func (c *SitesListCall) SortField(sortField string) *SitesListCall {
45502	c.urlParams_.Set("sortField", sortField)
45503	return c
45504}
45505
45506// SortOrder sets the optional parameter "sortOrder": Order of sorted
45507// results.
45508//
45509// Possible values:
45510//   "ASCENDING" (default)
45511//   "DESCENDING"
45512func (c *SitesListCall) SortOrder(sortOrder string) *SitesListCall {
45513	c.urlParams_.Set("sortOrder", sortOrder)
45514	return c
45515}
45516
45517// SubaccountId sets the optional parameter "subaccountId": Select only
45518// sites with this subaccount ID.
45519func (c *SitesListCall) SubaccountId(subaccountId int64) *SitesListCall {
45520	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
45521	return c
45522}
45523
45524// UnmappedSite sets the optional parameter "unmappedSite": Select only
45525// sites that have not been mapped to a directory site.
45526func (c *SitesListCall) UnmappedSite(unmappedSite bool) *SitesListCall {
45527	c.urlParams_.Set("unmappedSite", fmt.Sprint(unmappedSite))
45528	return c
45529}
45530
45531// Fields allows partial responses to be retrieved. See
45532// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45533// for more information.
45534func (c *SitesListCall) Fields(s ...googleapi.Field) *SitesListCall {
45535	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45536	return c
45537}
45538
45539// IfNoneMatch sets the optional parameter which makes the operation
45540// fail if the object's ETag matches the given value. This is useful for
45541// getting updates only after the object has changed since the last
45542// request. Use googleapi.IsNotModified to check whether the response
45543// error from Do is the result of In-None-Match.
45544func (c *SitesListCall) IfNoneMatch(entityTag string) *SitesListCall {
45545	c.ifNoneMatch_ = entityTag
45546	return c
45547}
45548
45549// Context sets the context to be used in this call's Do method. Any
45550// pending HTTP request will be aborted if the provided context is
45551// canceled.
45552func (c *SitesListCall) Context(ctx context.Context) *SitesListCall {
45553	c.ctx_ = ctx
45554	return c
45555}
45556
45557// Header returns an http.Header that can be modified by the caller to
45558// add HTTP headers to the request.
45559func (c *SitesListCall) Header() http.Header {
45560	if c.header_ == nil {
45561		c.header_ = make(http.Header)
45562	}
45563	return c.header_
45564}
45565
45566func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
45567	reqHeaders := make(http.Header)
45568	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
45569	for k, v := range c.header_ {
45570		reqHeaders[k] = v
45571	}
45572	reqHeaders.Set("User-Agent", c.s.userAgent())
45573	if c.ifNoneMatch_ != "" {
45574		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45575	}
45576	var body io.Reader = nil
45577	c.urlParams_.Set("alt", alt)
45578	c.urlParams_.Set("prettyPrint", "false")
45579	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45580	urls += "?" + c.urlParams_.Encode()
45581	req, err := http.NewRequest("GET", urls, body)
45582	if err != nil {
45583		return nil, err
45584	}
45585	req.Header = reqHeaders
45586	googleapi.Expand(req.URL, map[string]string{
45587		"profileId": strconv.FormatInt(c.profileId, 10),
45588	})
45589	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45590}
45591
45592// Do executes the "dfareporting.sites.list" call.
45593// Exactly one of *SitesListResponse or error will be non-nil. Any
45594// non-2xx status code is an error. Response headers are in either
45595// *SitesListResponse.ServerResponse.Header or (if a response was
45596// returned at all) in error.(*googleapi.Error).Header. Use
45597// googleapi.IsNotModified to check whether the returned error was
45598// because http.StatusNotModified was returned.
45599func (c *SitesListCall) Do(opts ...googleapi.CallOption) (*SitesListResponse, error) {
45600	gensupport.SetOptions(c.urlParams_, opts...)
45601	res, err := c.doRequest("json")
45602	if res != nil && res.StatusCode == http.StatusNotModified {
45603		if res.Body != nil {
45604			res.Body.Close()
45605		}
45606		return nil, &googleapi.Error{
45607			Code:   res.StatusCode,
45608			Header: res.Header,
45609		}
45610	}
45611	if err != nil {
45612		return nil, err
45613	}
45614	defer googleapi.CloseBody(res)
45615	if err := googleapi.CheckResponse(res); err != nil {
45616		return nil, err
45617	}
45618	ret := &SitesListResponse{
45619		ServerResponse: googleapi.ServerResponse{
45620			Header:         res.Header,
45621			HTTPStatusCode: res.StatusCode,
45622		},
45623	}
45624	target := &ret
45625	if err := gensupport.DecodeResponse(target, res); err != nil {
45626		return nil, err
45627	}
45628	return ret, nil
45629	// {
45630	//   "description": "Retrieves a list of sites, possibly filtered. This method supports paging.",
45631	//   "httpMethod": "GET",
45632	//   "id": "dfareporting.sites.list",
45633	//   "parameterOrder": [
45634	//     "profileId"
45635	//   ],
45636	//   "parameters": {
45637	//     "acceptsInStreamVideoPlacements": {
45638	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
45639	//       "location": "query",
45640	//       "type": "boolean"
45641	//     },
45642	//     "acceptsInterstitialPlacements": {
45643	//       "description": "This search filter is no longer supported and will have no effect on the results returned.",
45644	//       "location": "query",
45645	//       "type": "boolean"
45646	//     },
45647	//     "acceptsPublisherPaidPlacements": {
45648	//       "description": "Select only sites that accept publisher paid placements.",
45649	//       "location": "query",
45650	//       "type": "boolean"
45651	//     },
45652	//     "adWordsSite": {
45653	//       "description": "Select only AdWords sites.",
45654	//       "location": "query",
45655	//       "type": "boolean"
45656	//     },
45657	//     "approved": {
45658	//       "description": "Select only approved sites.",
45659	//       "location": "query",
45660	//       "type": "boolean"
45661	//     },
45662	//     "campaignIds": {
45663	//       "description": "Select only sites with these campaign IDs.",
45664	//       "format": "int64",
45665	//       "location": "query",
45666	//       "repeated": true,
45667	//       "type": "string"
45668	//     },
45669	//     "directorySiteIds": {
45670	//       "description": "Select only sites with these directory site IDs.",
45671	//       "format": "int64",
45672	//       "location": "query",
45673	//       "repeated": true,
45674	//       "type": "string"
45675	//     },
45676	//     "ids": {
45677	//       "description": "Select only sites with these IDs.",
45678	//       "format": "int64",
45679	//       "location": "query",
45680	//       "repeated": true,
45681	//       "type": "string"
45682	//     },
45683	//     "maxResults": {
45684	//       "default": "1000",
45685	//       "description": "Maximum number of results to return.",
45686	//       "format": "int32",
45687	//       "location": "query",
45688	//       "maximum": "1000",
45689	//       "minimum": "0",
45690	//       "type": "integer"
45691	//     },
45692	//     "pageToken": {
45693	//       "description": "Value of the nextPageToken from the previous result page.",
45694	//       "location": "query",
45695	//       "type": "string"
45696	//     },
45697	//     "profileId": {
45698	//       "description": "User profile ID associated with this request.",
45699	//       "format": "int64",
45700	//       "location": "path",
45701	//       "required": true,
45702	//       "type": "string"
45703	//     },
45704	//     "searchString": {
45705	//       "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\".",
45706	//       "location": "query",
45707	//       "type": "string"
45708	//     },
45709	//     "sortField": {
45710	//       "default": "ID",
45711	//       "description": "Field by which to sort the list.",
45712	//       "enum": [
45713	//         "ID",
45714	//         "NAME"
45715	//       ],
45716	//       "enumDescriptions": [
45717	//         "",
45718	//         ""
45719	//       ],
45720	//       "location": "query",
45721	//       "type": "string"
45722	//     },
45723	//     "sortOrder": {
45724	//       "default": "ASCENDING",
45725	//       "description": "Order of sorted results.",
45726	//       "enum": [
45727	//         "ASCENDING",
45728	//         "DESCENDING"
45729	//       ],
45730	//       "enumDescriptions": [
45731	//         "",
45732	//         ""
45733	//       ],
45734	//       "location": "query",
45735	//       "type": "string"
45736	//     },
45737	//     "subaccountId": {
45738	//       "description": "Select only sites with this subaccount ID.",
45739	//       "format": "int64",
45740	//       "location": "query",
45741	//       "type": "string"
45742	//     },
45743	//     "unmappedSite": {
45744	//       "description": "Select only sites that have not been mapped to a directory site.",
45745	//       "location": "query",
45746	//       "type": "boolean"
45747	//     }
45748	//   },
45749	//   "path": "userprofiles/{profileId}/sites",
45750	//   "response": {
45751	//     "$ref": "SitesListResponse"
45752	//   },
45753	//   "scopes": [
45754	//     "https://www.googleapis.com/auth/dfatrafficking"
45755	//   ]
45756	// }
45757
45758}
45759
45760// Pages invokes f for each page of results.
45761// A non-nil error returned from f will halt the iteration.
45762// The provided context supersedes any context provided to the Context method.
45763func (c *SitesListCall) Pages(ctx context.Context, f func(*SitesListResponse) error) error {
45764	c.ctx_ = ctx
45765	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45766	for {
45767		x, err := c.Do()
45768		if err != nil {
45769			return err
45770		}
45771		if err := f(x); err != nil {
45772			return err
45773		}
45774		if x.NextPageToken == "" {
45775			return nil
45776		}
45777		c.PageToken(x.NextPageToken)
45778	}
45779}
45780
45781// method id "dfareporting.sites.patch":
45782
45783type SitesPatchCall struct {
45784	s          *Service
45785	profileId  int64
45786	site       *Site
45787	urlParams_ gensupport.URLParams
45788	ctx_       context.Context
45789	header_    http.Header
45790}
45791
45792// Patch: Updates an existing site. This method supports patch
45793// semantics.
45794func (r *SitesService) Patch(profileId int64, id int64, site *Site) *SitesPatchCall {
45795	c := &SitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45796	c.profileId = profileId
45797	c.urlParams_.Set("id", fmt.Sprint(id))
45798	c.site = site
45799	return c
45800}
45801
45802// Fields allows partial responses to be retrieved. See
45803// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45804// for more information.
45805func (c *SitesPatchCall) Fields(s ...googleapi.Field) *SitesPatchCall {
45806	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45807	return c
45808}
45809
45810// Context sets the context to be used in this call's Do method. Any
45811// pending HTTP request will be aborted if the provided context is
45812// canceled.
45813func (c *SitesPatchCall) Context(ctx context.Context) *SitesPatchCall {
45814	c.ctx_ = ctx
45815	return c
45816}
45817
45818// Header returns an http.Header that can be modified by the caller to
45819// add HTTP headers to the request.
45820func (c *SitesPatchCall) Header() http.Header {
45821	if c.header_ == nil {
45822		c.header_ = make(http.Header)
45823	}
45824	return c.header_
45825}
45826
45827func (c *SitesPatchCall) doRequest(alt string) (*http.Response, error) {
45828	reqHeaders := make(http.Header)
45829	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
45830	for k, v := range c.header_ {
45831		reqHeaders[k] = v
45832	}
45833	reqHeaders.Set("User-Agent", c.s.userAgent())
45834	var body io.Reader = nil
45835	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
45836	if err != nil {
45837		return nil, err
45838	}
45839	reqHeaders.Set("Content-Type", "application/json")
45840	c.urlParams_.Set("alt", alt)
45841	c.urlParams_.Set("prettyPrint", "false")
45842	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45843	urls += "?" + c.urlParams_.Encode()
45844	req, err := http.NewRequest("PATCH", urls, body)
45845	if err != nil {
45846		return nil, err
45847	}
45848	req.Header = reqHeaders
45849	googleapi.Expand(req.URL, map[string]string{
45850		"profileId": strconv.FormatInt(c.profileId, 10),
45851	})
45852	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45853}
45854
45855// Do executes the "dfareporting.sites.patch" call.
45856// Exactly one of *Site or error will be non-nil. Any non-2xx status
45857// code is an error. Response headers are in either
45858// *Site.ServerResponse.Header or (if a response was returned at all) in
45859// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
45860// whether the returned error was because http.StatusNotModified was
45861// returned.
45862func (c *SitesPatchCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45863	gensupport.SetOptions(c.urlParams_, opts...)
45864	res, err := c.doRequest("json")
45865	if res != nil && res.StatusCode == http.StatusNotModified {
45866		if res.Body != nil {
45867			res.Body.Close()
45868		}
45869		return nil, &googleapi.Error{
45870			Code:   res.StatusCode,
45871			Header: res.Header,
45872		}
45873	}
45874	if err != nil {
45875		return nil, err
45876	}
45877	defer googleapi.CloseBody(res)
45878	if err := googleapi.CheckResponse(res); err != nil {
45879		return nil, err
45880	}
45881	ret := &Site{
45882		ServerResponse: googleapi.ServerResponse{
45883			Header:         res.Header,
45884			HTTPStatusCode: res.StatusCode,
45885		},
45886	}
45887	target := &ret
45888	if err := gensupport.DecodeResponse(target, res); err != nil {
45889		return nil, err
45890	}
45891	return ret, nil
45892	// {
45893	//   "description": "Updates an existing site. This method supports patch semantics.",
45894	//   "httpMethod": "PATCH",
45895	//   "id": "dfareporting.sites.patch",
45896	//   "parameterOrder": [
45897	//     "profileId",
45898	//     "id"
45899	//   ],
45900	//   "parameters": {
45901	//     "id": {
45902	//       "description": "Site ID.",
45903	//       "format": "int64",
45904	//       "location": "query",
45905	//       "required": true,
45906	//       "type": "string"
45907	//     },
45908	//     "profileId": {
45909	//       "description": "User profile ID associated with this request.",
45910	//       "format": "int64",
45911	//       "location": "path",
45912	//       "required": true,
45913	//       "type": "string"
45914	//     }
45915	//   },
45916	//   "path": "userprofiles/{profileId}/sites",
45917	//   "request": {
45918	//     "$ref": "Site"
45919	//   },
45920	//   "response": {
45921	//     "$ref": "Site"
45922	//   },
45923	//   "scopes": [
45924	//     "https://www.googleapis.com/auth/dfatrafficking"
45925	//   ]
45926	// }
45927
45928}
45929
45930// method id "dfareporting.sites.update":
45931
45932type SitesUpdateCall struct {
45933	s          *Service
45934	profileId  int64
45935	site       *Site
45936	urlParams_ gensupport.URLParams
45937	ctx_       context.Context
45938	header_    http.Header
45939}
45940
45941// Update: Updates an existing site.
45942func (r *SitesService) Update(profileId int64, site *Site) *SitesUpdateCall {
45943	c := &SitesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45944	c.profileId = profileId
45945	c.site = site
45946	return c
45947}
45948
45949// Fields allows partial responses to be retrieved. See
45950// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45951// for more information.
45952func (c *SitesUpdateCall) Fields(s ...googleapi.Field) *SitesUpdateCall {
45953	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45954	return c
45955}
45956
45957// Context sets the context to be used in this call's Do method. Any
45958// pending HTTP request will be aborted if the provided context is
45959// canceled.
45960func (c *SitesUpdateCall) Context(ctx context.Context) *SitesUpdateCall {
45961	c.ctx_ = ctx
45962	return c
45963}
45964
45965// Header returns an http.Header that can be modified by the caller to
45966// add HTTP headers to the request.
45967func (c *SitesUpdateCall) Header() http.Header {
45968	if c.header_ == nil {
45969		c.header_ = make(http.Header)
45970	}
45971	return c.header_
45972}
45973
45974func (c *SitesUpdateCall) doRequest(alt string) (*http.Response, error) {
45975	reqHeaders := make(http.Header)
45976	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
45977	for k, v := range c.header_ {
45978		reqHeaders[k] = v
45979	}
45980	reqHeaders.Set("User-Agent", c.s.userAgent())
45981	var body io.Reader = nil
45982	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
45983	if err != nil {
45984		return nil, err
45985	}
45986	reqHeaders.Set("Content-Type", "application/json")
45987	c.urlParams_.Set("alt", alt)
45988	c.urlParams_.Set("prettyPrint", "false")
45989	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
45990	urls += "?" + c.urlParams_.Encode()
45991	req, err := http.NewRequest("PUT", urls, body)
45992	if err != nil {
45993		return nil, err
45994	}
45995	req.Header = reqHeaders
45996	googleapi.Expand(req.URL, map[string]string{
45997		"profileId": strconv.FormatInt(c.profileId, 10),
45998	})
45999	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46000}
46001
46002// Do executes the "dfareporting.sites.update" call.
46003// Exactly one of *Site or error will be non-nil. Any non-2xx status
46004// code is an error. Response headers are in either
46005// *Site.ServerResponse.Header or (if a response was returned at all) in
46006// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46007// whether the returned error was because http.StatusNotModified was
46008// returned.
46009func (c *SitesUpdateCall) Do(opts ...googleapi.CallOption) (*Site, error) {
46010	gensupport.SetOptions(c.urlParams_, opts...)
46011	res, err := c.doRequest("json")
46012	if res != nil && res.StatusCode == http.StatusNotModified {
46013		if res.Body != nil {
46014			res.Body.Close()
46015		}
46016		return nil, &googleapi.Error{
46017			Code:   res.StatusCode,
46018			Header: res.Header,
46019		}
46020	}
46021	if err != nil {
46022		return nil, err
46023	}
46024	defer googleapi.CloseBody(res)
46025	if err := googleapi.CheckResponse(res); err != nil {
46026		return nil, err
46027	}
46028	ret := &Site{
46029		ServerResponse: googleapi.ServerResponse{
46030			Header:         res.Header,
46031			HTTPStatusCode: res.StatusCode,
46032		},
46033	}
46034	target := &ret
46035	if err := gensupport.DecodeResponse(target, res); err != nil {
46036		return nil, err
46037	}
46038	return ret, nil
46039	// {
46040	//   "description": "Updates an existing site.",
46041	//   "httpMethod": "PUT",
46042	//   "id": "dfareporting.sites.update",
46043	//   "parameterOrder": [
46044	//     "profileId"
46045	//   ],
46046	//   "parameters": {
46047	//     "profileId": {
46048	//       "description": "User profile ID associated with this request.",
46049	//       "format": "int64",
46050	//       "location": "path",
46051	//       "required": true,
46052	//       "type": "string"
46053	//     }
46054	//   },
46055	//   "path": "userprofiles/{profileId}/sites",
46056	//   "request": {
46057	//     "$ref": "Site"
46058	//   },
46059	//   "response": {
46060	//     "$ref": "Site"
46061	//   },
46062	//   "scopes": [
46063	//     "https://www.googleapis.com/auth/dfatrafficking"
46064	//   ]
46065	// }
46066
46067}
46068
46069// method id "dfareporting.sizes.get":
46070
46071type SizesGetCall struct {
46072	s            *Service
46073	profileId    int64
46074	id           int64
46075	urlParams_   gensupport.URLParams
46076	ifNoneMatch_ string
46077	ctx_         context.Context
46078	header_      http.Header
46079}
46080
46081// Get: Gets one size by ID.
46082func (r *SizesService) Get(profileId int64, id int64) *SizesGetCall {
46083	c := &SizesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46084	c.profileId = profileId
46085	c.id = id
46086	return c
46087}
46088
46089// Fields allows partial responses to be retrieved. See
46090// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46091// for more information.
46092func (c *SizesGetCall) Fields(s ...googleapi.Field) *SizesGetCall {
46093	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46094	return c
46095}
46096
46097// IfNoneMatch sets the optional parameter which makes the operation
46098// fail if the object's ETag matches the given value. This is useful for
46099// getting updates only after the object has changed since the last
46100// request. Use googleapi.IsNotModified to check whether the response
46101// error from Do is the result of In-None-Match.
46102func (c *SizesGetCall) IfNoneMatch(entityTag string) *SizesGetCall {
46103	c.ifNoneMatch_ = entityTag
46104	return c
46105}
46106
46107// Context sets the context to be used in this call's Do method. Any
46108// pending HTTP request will be aborted if the provided context is
46109// canceled.
46110func (c *SizesGetCall) Context(ctx context.Context) *SizesGetCall {
46111	c.ctx_ = ctx
46112	return c
46113}
46114
46115// Header returns an http.Header that can be modified by the caller to
46116// add HTTP headers to the request.
46117func (c *SizesGetCall) Header() http.Header {
46118	if c.header_ == nil {
46119		c.header_ = make(http.Header)
46120	}
46121	return c.header_
46122}
46123
46124func (c *SizesGetCall) doRequest(alt string) (*http.Response, error) {
46125	reqHeaders := make(http.Header)
46126	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
46127	for k, v := range c.header_ {
46128		reqHeaders[k] = v
46129	}
46130	reqHeaders.Set("User-Agent", c.s.userAgent())
46131	if c.ifNoneMatch_ != "" {
46132		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46133	}
46134	var body io.Reader = nil
46135	c.urlParams_.Set("alt", alt)
46136	c.urlParams_.Set("prettyPrint", "false")
46137	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes/{id}")
46138	urls += "?" + c.urlParams_.Encode()
46139	req, err := http.NewRequest("GET", urls, body)
46140	if err != nil {
46141		return nil, err
46142	}
46143	req.Header = reqHeaders
46144	googleapi.Expand(req.URL, map[string]string{
46145		"profileId": strconv.FormatInt(c.profileId, 10),
46146		"id":        strconv.FormatInt(c.id, 10),
46147	})
46148	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46149}
46150
46151// Do executes the "dfareporting.sizes.get" call.
46152// Exactly one of *Size or error will be non-nil. Any non-2xx status
46153// code is an error. Response headers are in either
46154// *Size.ServerResponse.Header or (if a response was returned at all) in
46155// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46156// whether the returned error was because http.StatusNotModified was
46157// returned.
46158func (c *SizesGetCall) Do(opts ...googleapi.CallOption) (*Size, error) {
46159	gensupport.SetOptions(c.urlParams_, opts...)
46160	res, err := c.doRequest("json")
46161	if res != nil && res.StatusCode == http.StatusNotModified {
46162		if res.Body != nil {
46163			res.Body.Close()
46164		}
46165		return nil, &googleapi.Error{
46166			Code:   res.StatusCode,
46167			Header: res.Header,
46168		}
46169	}
46170	if err != nil {
46171		return nil, err
46172	}
46173	defer googleapi.CloseBody(res)
46174	if err := googleapi.CheckResponse(res); err != nil {
46175		return nil, err
46176	}
46177	ret := &Size{
46178		ServerResponse: googleapi.ServerResponse{
46179			Header:         res.Header,
46180			HTTPStatusCode: res.StatusCode,
46181		},
46182	}
46183	target := &ret
46184	if err := gensupport.DecodeResponse(target, res); err != nil {
46185		return nil, err
46186	}
46187	return ret, nil
46188	// {
46189	//   "description": "Gets one size by ID.",
46190	//   "httpMethod": "GET",
46191	//   "id": "dfareporting.sizes.get",
46192	//   "parameterOrder": [
46193	//     "profileId",
46194	//     "id"
46195	//   ],
46196	//   "parameters": {
46197	//     "id": {
46198	//       "description": "Size ID.",
46199	//       "format": "int64",
46200	//       "location": "path",
46201	//       "required": true,
46202	//       "type": "string"
46203	//     },
46204	//     "profileId": {
46205	//       "description": "User profile ID associated with this request.",
46206	//       "format": "int64",
46207	//       "location": "path",
46208	//       "required": true,
46209	//       "type": "string"
46210	//     }
46211	//   },
46212	//   "path": "userprofiles/{profileId}/sizes/{id}",
46213	//   "response": {
46214	//     "$ref": "Size"
46215	//   },
46216	//   "scopes": [
46217	//     "https://www.googleapis.com/auth/dfatrafficking"
46218	//   ]
46219	// }
46220
46221}
46222
46223// method id "dfareporting.sizes.insert":
46224
46225type SizesInsertCall struct {
46226	s          *Service
46227	profileId  int64
46228	size       *Size
46229	urlParams_ gensupport.URLParams
46230	ctx_       context.Context
46231	header_    http.Header
46232}
46233
46234// Insert: Inserts a new size.
46235func (r *SizesService) Insert(profileId int64, size *Size) *SizesInsertCall {
46236	c := &SizesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46237	c.profileId = profileId
46238	c.size = size
46239	return c
46240}
46241
46242// Fields allows partial responses to be retrieved. See
46243// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46244// for more information.
46245func (c *SizesInsertCall) Fields(s ...googleapi.Field) *SizesInsertCall {
46246	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46247	return c
46248}
46249
46250// Context sets the context to be used in this call's Do method. Any
46251// pending HTTP request will be aborted if the provided context is
46252// canceled.
46253func (c *SizesInsertCall) Context(ctx context.Context) *SizesInsertCall {
46254	c.ctx_ = ctx
46255	return c
46256}
46257
46258// Header returns an http.Header that can be modified by the caller to
46259// add HTTP headers to the request.
46260func (c *SizesInsertCall) Header() http.Header {
46261	if c.header_ == nil {
46262		c.header_ = make(http.Header)
46263	}
46264	return c.header_
46265}
46266
46267func (c *SizesInsertCall) doRequest(alt string) (*http.Response, error) {
46268	reqHeaders := make(http.Header)
46269	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
46270	for k, v := range c.header_ {
46271		reqHeaders[k] = v
46272	}
46273	reqHeaders.Set("User-Agent", c.s.userAgent())
46274	var body io.Reader = nil
46275	body, err := googleapi.WithoutDataWrapper.JSONReader(c.size)
46276	if err != nil {
46277		return nil, err
46278	}
46279	reqHeaders.Set("Content-Type", "application/json")
46280	c.urlParams_.Set("alt", alt)
46281	c.urlParams_.Set("prettyPrint", "false")
46282	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
46283	urls += "?" + c.urlParams_.Encode()
46284	req, err := http.NewRequest("POST", urls, body)
46285	if err != nil {
46286		return nil, err
46287	}
46288	req.Header = reqHeaders
46289	googleapi.Expand(req.URL, map[string]string{
46290		"profileId": strconv.FormatInt(c.profileId, 10),
46291	})
46292	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46293}
46294
46295// Do executes the "dfareporting.sizes.insert" call.
46296// Exactly one of *Size or error will be non-nil. Any non-2xx status
46297// code is an error. Response headers are in either
46298// *Size.ServerResponse.Header or (if a response was returned at all) in
46299// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
46300// whether the returned error was because http.StatusNotModified was
46301// returned.
46302func (c *SizesInsertCall) Do(opts ...googleapi.CallOption) (*Size, error) {
46303	gensupport.SetOptions(c.urlParams_, opts...)
46304	res, err := c.doRequest("json")
46305	if res != nil && res.StatusCode == http.StatusNotModified {
46306		if res.Body != nil {
46307			res.Body.Close()
46308		}
46309		return nil, &googleapi.Error{
46310			Code:   res.StatusCode,
46311			Header: res.Header,
46312		}
46313	}
46314	if err != nil {
46315		return nil, err
46316	}
46317	defer googleapi.CloseBody(res)
46318	if err := googleapi.CheckResponse(res); err != nil {
46319		return nil, err
46320	}
46321	ret := &Size{
46322		ServerResponse: googleapi.ServerResponse{
46323			Header:         res.Header,
46324			HTTPStatusCode: res.StatusCode,
46325		},
46326	}
46327	target := &ret
46328	if err := gensupport.DecodeResponse(target, res); err != nil {
46329		return nil, err
46330	}
46331	return ret, nil
46332	// {
46333	//   "description": "Inserts a new size.",
46334	//   "httpMethod": "POST",
46335	//   "id": "dfareporting.sizes.insert",
46336	//   "parameterOrder": [
46337	//     "profileId"
46338	//   ],
46339	//   "parameters": {
46340	//     "profileId": {
46341	//       "description": "User profile ID associated with this request.",
46342	//       "format": "int64",
46343	//       "location": "path",
46344	//       "required": true,
46345	//       "type": "string"
46346	//     }
46347	//   },
46348	//   "path": "userprofiles/{profileId}/sizes",
46349	//   "request": {
46350	//     "$ref": "Size"
46351	//   },
46352	//   "response": {
46353	//     "$ref": "Size"
46354	//   },
46355	//   "scopes": [
46356	//     "https://www.googleapis.com/auth/dfatrafficking"
46357	//   ]
46358	// }
46359
46360}
46361
46362// method id "dfareporting.sizes.list":
46363
46364type SizesListCall struct {
46365	s            *Service
46366	profileId    int64
46367	urlParams_   gensupport.URLParams
46368	ifNoneMatch_ string
46369	ctx_         context.Context
46370	header_      http.Header
46371}
46372
46373// List: Retrieves a list of sizes, possibly filtered. Retrieved sizes
46374// are globally unique and may include values not currently in use by
46375// your account. Due to this, the list of sizes returned by this method
46376// may differ from the list seen in the Trafficking UI.
46377func (r *SizesService) List(profileId int64) *SizesListCall {
46378	c := &SizesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46379	c.profileId = profileId
46380	return c
46381}
46382
46383// Height sets the optional parameter "height": Select only sizes with
46384// this height.
46385func (c *SizesListCall) Height(height int64) *SizesListCall {
46386	c.urlParams_.Set("height", fmt.Sprint(height))
46387	return c
46388}
46389
46390// IabStandard sets the optional parameter "iabStandard": Select only
46391// IAB standard sizes.
46392func (c *SizesListCall) IabStandard(iabStandard bool) *SizesListCall {
46393	c.urlParams_.Set("iabStandard", fmt.Sprint(iabStandard))
46394	return c
46395}
46396
46397// Ids sets the optional parameter "ids": Select only sizes with these
46398// IDs.
46399func (c *SizesListCall) Ids(ids ...int64) *SizesListCall {
46400	var ids_ []string
46401	for _, v := range ids {
46402		ids_ = append(ids_, fmt.Sprint(v))
46403	}
46404	c.urlParams_.SetMulti("ids", ids_)
46405	return c
46406}
46407
46408// Width sets the optional parameter "width": Select only sizes with
46409// this width.
46410func (c *SizesListCall) Width(width int64) *SizesListCall {
46411	c.urlParams_.Set("width", fmt.Sprint(width))
46412	return c
46413}
46414
46415// Fields allows partial responses to be retrieved. See
46416// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46417// for more information.
46418func (c *SizesListCall) Fields(s ...googleapi.Field) *SizesListCall {
46419	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46420	return c
46421}
46422
46423// IfNoneMatch sets the optional parameter which makes the operation
46424// fail if the object's ETag matches the given value. This is useful for
46425// getting updates only after the object has changed since the last
46426// request. Use googleapi.IsNotModified to check whether the response
46427// error from Do is the result of In-None-Match.
46428func (c *SizesListCall) IfNoneMatch(entityTag string) *SizesListCall {
46429	c.ifNoneMatch_ = entityTag
46430	return c
46431}
46432
46433// Context sets the context to be used in this call's Do method. Any
46434// pending HTTP request will be aborted if the provided context is
46435// canceled.
46436func (c *SizesListCall) Context(ctx context.Context) *SizesListCall {
46437	c.ctx_ = ctx
46438	return c
46439}
46440
46441// Header returns an http.Header that can be modified by the caller to
46442// add HTTP headers to the request.
46443func (c *SizesListCall) Header() http.Header {
46444	if c.header_ == nil {
46445		c.header_ = make(http.Header)
46446	}
46447	return c.header_
46448}
46449
46450func (c *SizesListCall) doRequest(alt string) (*http.Response, error) {
46451	reqHeaders := make(http.Header)
46452	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
46453	for k, v := range c.header_ {
46454		reqHeaders[k] = v
46455	}
46456	reqHeaders.Set("User-Agent", c.s.userAgent())
46457	if c.ifNoneMatch_ != "" {
46458		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46459	}
46460	var body io.Reader = nil
46461	c.urlParams_.Set("alt", alt)
46462	c.urlParams_.Set("prettyPrint", "false")
46463	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
46464	urls += "?" + c.urlParams_.Encode()
46465	req, err := http.NewRequest("GET", urls, body)
46466	if err != nil {
46467		return nil, err
46468	}
46469	req.Header = reqHeaders
46470	googleapi.Expand(req.URL, map[string]string{
46471		"profileId": strconv.FormatInt(c.profileId, 10),
46472	})
46473	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46474}
46475
46476// Do executes the "dfareporting.sizes.list" call.
46477// Exactly one of *SizesListResponse or error will be non-nil. Any
46478// non-2xx status code is an error. Response headers are in either
46479// *SizesListResponse.ServerResponse.Header or (if a response was
46480// returned at all) in error.(*googleapi.Error).Header. Use
46481// googleapi.IsNotModified to check whether the returned error was
46482// because http.StatusNotModified was returned.
46483func (c *SizesListCall) Do(opts ...googleapi.CallOption) (*SizesListResponse, error) {
46484	gensupport.SetOptions(c.urlParams_, opts...)
46485	res, err := c.doRequest("json")
46486	if res != nil && res.StatusCode == http.StatusNotModified {
46487		if res.Body != nil {
46488			res.Body.Close()
46489		}
46490		return nil, &googleapi.Error{
46491			Code:   res.StatusCode,
46492			Header: res.Header,
46493		}
46494	}
46495	if err != nil {
46496		return nil, err
46497	}
46498	defer googleapi.CloseBody(res)
46499	if err := googleapi.CheckResponse(res); err != nil {
46500		return nil, err
46501	}
46502	ret := &SizesListResponse{
46503		ServerResponse: googleapi.ServerResponse{
46504			Header:         res.Header,
46505			HTTPStatusCode: res.StatusCode,
46506		},
46507	}
46508	target := &ret
46509	if err := gensupport.DecodeResponse(target, res); err != nil {
46510		return nil, err
46511	}
46512	return ret, nil
46513	// {
46514	//   "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.",
46515	//   "httpMethod": "GET",
46516	//   "id": "dfareporting.sizes.list",
46517	//   "parameterOrder": [
46518	//     "profileId"
46519	//   ],
46520	//   "parameters": {
46521	//     "height": {
46522	//       "description": "Select only sizes with this height.",
46523	//       "format": "int32",
46524	//       "location": "query",
46525	//       "maximum": "32767",
46526	//       "minimum": "0",
46527	//       "type": "integer"
46528	//     },
46529	//     "iabStandard": {
46530	//       "description": "Select only IAB standard sizes.",
46531	//       "location": "query",
46532	//       "type": "boolean"
46533	//     },
46534	//     "ids": {
46535	//       "description": "Select only sizes with these IDs.",
46536	//       "format": "int64",
46537	//       "location": "query",
46538	//       "repeated": true,
46539	//       "type": "string"
46540	//     },
46541	//     "profileId": {
46542	//       "description": "User profile ID associated with this request.",
46543	//       "format": "int64",
46544	//       "location": "path",
46545	//       "required": true,
46546	//       "type": "string"
46547	//     },
46548	//     "width": {
46549	//       "description": "Select only sizes with this width.",
46550	//       "format": "int32",
46551	//       "location": "query",
46552	//       "maximum": "32767",
46553	//       "minimum": "0",
46554	//       "type": "integer"
46555	//     }
46556	//   },
46557	//   "path": "userprofiles/{profileId}/sizes",
46558	//   "response": {
46559	//     "$ref": "SizesListResponse"
46560	//   },
46561	//   "scopes": [
46562	//     "https://www.googleapis.com/auth/dfatrafficking"
46563	//   ]
46564	// }
46565
46566}
46567
46568// method id "dfareporting.subaccounts.get":
46569
46570type SubaccountsGetCall struct {
46571	s            *Service
46572	profileId    int64
46573	id           int64
46574	urlParams_   gensupport.URLParams
46575	ifNoneMatch_ string
46576	ctx_         context.Context
46577	header_      http.Header
46578}
46579
46580// Get: Gets one subaccount by ID.
46581func (r *SubaccountsService) Get(profileId int64, id int64) *SubaccountsGetCall {
46582	c := &SubaccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46583	c.profileId = profileId
46584	c.id = id
46585	return c
46586}
46587
46588// Fields allows partial responses to be retrieved. See
46589// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46590// for more information.
46591func (c *SubaccountsGetCall) Fields(s ...googleapi.Field) *SubaccountsGetCall {
46592	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46593	return c
46594}
46595
46596// IfNoneMatch sets the optional parameter which makes the operation
46597// fail if the object's ETag matches the given value. This is useful for
46598// getting updates only after the object has changed since the last
46599// request. Use googleapi.IsNotModified to check whether the response
46600// error from Do is the result of In-None-Match.
46601func (c *SubaccountsGetCall) IfNoneMatch(entityTag string) *SubaccountsGetCall {
46602	c.ifNoneMatch_ = entityTag
46603	return c
46604}
46605
46606// Context sets the context to be used in this call's Do method. Any
46607// pending HTTP request will be aborted if the provided context is
46608// canceled.
46609func (c *SubaccountsGetCall) Context(ctx context.Context) *SubaccountsGetCall {
46610	c.ctx_ = ctx
46611	return c
46612}
46613
46614// Header returns an http.Header that can be modified by the caller to
46615// add HTTP headers to the request.
46616func (c *SubaccountsGetCall) Header() http.Header {
46617	if c.header_ == nil {
46618		c.header_ = make(http.Header)
46619	}
46620	return c.header_
46621}
46622
46623func (c *SubaccountsGetCall) doRequest(alt string) (*http.Response, error) {
46624	reqHeaders := make(http.Header)
46625	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
46626	for k, v := range c.header_ {
46627		reqHeaders[k] = v
46628	}
46629	reqHeaders.Set("User-Agent", c.s.userAgent())
46630	if c.ifNoneMatch_ != "" {
46631		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46632	}
46633	var body io.Reader = nil
46634	c.urlParams_.Set("alt", alt)
46635	c.urlParams_.Set("prettyPrint", "false")
46636	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts/{id}")
46637	urls += "?" + c.urlParams_.Encode()
46638	req, err := http.NewRequest("GET", urls, body)
46639	if err != nil {
46640		return nil, err
46641	}
46642	req.Header = reqHeaders
46643	googleapi.Expand(req.URL, map[string]string{
46644		"profileId": strconv.FormatInt(c.profileId, 10),
46645		"id":        strconv.FormatInt(c.id, 10),
46646	})
46647	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46648}
46649
46650// Do executes the "dfareporting.subaccounts.get" call.
46651// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
46652// status code is an error. Response headers are in either
46653// *Subaccount.ServerResponse.Header or (if a response was returned at
46654// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46655// to check whether the returned error was because
46656// http.StatusNotModified was returned.
46657func (c *SubaccountsGetCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
46658	gensupport.SetOptions(c.urlParams_, opts...)
46659	res, err := c.doRequest("json")
46660	if res != nil && res.StatusCode == http.StatusNotModified {
46661		if res.Body != nil {
46662			res.Body.Close()
46663		}
46664		return nil, &googleapi.Error{
46665			Code:   res.StatusCode,
46666			Header: res.Header,
46667		}
46668	}
46669	if err != nil {
46670		return nil, err
46671	}
46672	defer googleapi.CloseBody(res)
46673	if err := googleapi.CheckResponse(res); err != nil {
46674		return nil, err
46675	}
46676	ret := &Subaccount{
46677		ServerResponse: googleapi.ServerResponse{
46678			Header:         res.Header,
46679			HTTPStatusCode: res.StatusCode,
46680		},
46681	}
46682	target := &ret
46683	if err := gensupport.DecodeResponse(target, res); err != nil {
46684		return nil, err
46685	}
46686	return ret, nil
46687	// {
46688	//   "description": "Gets one subaccount by ID.",
46689	//   "httpMethod": "GET",
46690	//   "id": "dfareporting.subaccounts.get",
46691	//   "parameterOrder": [
46692	//     "profileId",
46693	//     "id"
46694	//   ],
46695	//   "parameters": {
46696	//     "id": {
46697	//       "description": "Subaccount ID.",
46698	//       "format": "int64",
46699	//       "location": "path",
46700	//       "required": true,
46701	//       "type": "string"
46702	//     },
46703	//     "profileId": {
46704	//       "description": "User profile ID associated with this request.",
46705	//       "format": "int64",
46706	//       "location": "path",
46707	//       "required": true,
46708	//       "type": "string"
46709	//     }
46710	//   },
46711	//   "path": "userprofiles/{profileId}/subaccounts/{id}",
46712	//   "response": {
46713	//     "$ref": "Subaccount"
46714	//   },
46715	//   "scopes": [
46716	//     "https://www.googleapis.com/auth/dfatrafficking"
46717	//   ]
46718	// }
46719
46720}
46721
46722// method id "dfareporting.subaccounts.insert":
46723
46724type SubaccountsInsertCall struct {
46725	s          *Service
46726	profileId  int64
46727	subaccount *Subaccount
46728	urlParams_ gensupport.URLParams
46729	ctx_       context.Context
46730	header_    http.Header
46731}
46732
46733// Insert: Inserts a new subaccount.
46734func (r *SubaccountsService) Insert(profileId int64, subaccount *Subaccount) *SubaccountsInsertCall {
46735	c := &SubaccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46736	c.profileId = profileId
46737	c.subaccount = subaccount
46738	return c
46739}
46740
46741// Fields allows partial responses to be retrieved. See
46742// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46743// for more information.
46744func (c *SubaccountsInsertCall) Fields(s ...googleapi.Field) *SubaccountsInsertCall {
46745	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46746	return c
46747}
46748
46749// Context sets the context to be used in this call's Do method. Any
46750// pending HTTP request will be aborted if the provided context is
46751// canceled.
46752func (c *SubaccountsInsertCall) Context(ctx context.Context) *SubaccountsInsertCall {
46753	c.ctx_ = ctx
46754	return c
46755}
46756
46757// Header returns an http.Header that can be modified by the caller to
46758// add HTTP headers to the request.
46759func (c *SubaccountsInsertCall) Header() http.Header {
46760	if c.header_ == nil {
46761		c.header_ = make(http.Header)
46762	}
46763	return c.header_
46764}
46765
46766func (c *SubaccountsInsertCall) doRequest(alt string) (*http.Response, error) {
46767	reqHeaders := make(http.Header)
46768	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
46769	for k, v := range c.header_ {
46770		reqHeaders[k] = v
46771	}
46772	reqHeaders.Set("User-Agent", c.s.userAgent())
46773	var body io.Reader = nil
46774	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
46775	if err != nil {
46776		return nil, err
46777	}
46778	reqHeaders.Set("Content-Type", "application/json")
46779	c.urlParams_.Set("alt", alt)
46780	c.urlParams_.Set("prettyPrint", "false")
46781	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
46782	urls += "?" + c.urlParams_.Encode()
46783	req, err := http.NewRequest("POST", urls, body)
46784	if err != nil {
46785		return nil, err
46786	}
46787	req.Header = reqHeaders
46788	googleapi.Expand(req.URL, map[string]string{
46789		"profileId": strconv.FormatInt(c.profileId, 10),
46790	})
46791	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46792}
46793
46794// Do executes the "dfareporting.subaccounts.insert" call.
46795// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
46796// status code is an error. Response headers are in either
46797// *Subaccount.ServerResponse.Header or (if a response was returned at
46798// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46799// to check whether the returned error was because
46800// http.StatusNotModified was returned.
46801func (c *SubaccountsInsertCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
46802	gensupport.SetOptions(c.urlParams_, opts...)
46803	res, err := c.doRequest("json")
46804	if res != nil && res.StatusCode == http.StatusNotModified {
46805		if res.Body != nil {
46806			res.Body.Close()
46807		}
46808		return nil, &googleapi.Error{
46809			Code:   res.StatusCode,
46810			Header: res.Header,
46811		}
46812	}
46813	if err != nil {
46814		return nil, err
46815	}
46816	defer googleapi.CloseBody(res)
46817	if err := googleapi.CheckResponse(res); err != nil {
46818		return nil, err
46819	}
46820	ret := &Subaccount{
46821		ServerResponse: googleapi.ServerResponse{
46822			Header:         res.Header,
46823			HTTPStatusCode: res.StatusCode,
46824		},
46825	}
46826	target := &ret
46827	if err := gensupport.DecodeResponse(target, res); err != nil {
46828		return nil, err
46829	}
46830	return ret, nil
46831	// {
46832	//   "description": "Inserts a new subaccount.",
46833	//   "httpMethod": "POST",
46834	//   "id": "dfareporting.subaccounts.insert",
46835	//   "parameterOrder": [
46836	//     "profileId"
46837	//   ],
46838	//   "parameters": {
46839	//     "profileId": {
46840	//       "description": "User profile ID associated with this request.",
46841	//       "format": "int64",
46842	//       "location": "path",
46843	//       "required": true,
46844	//       "type": "string"
46845	//     }
46846	//   },
46847	//   "path": "userprofiles/{profileId}/subaccounts",
46848	//   "request": {
46849	//     "$ref": "Subaccount"
46850	//   },
46851	//   "response": {
46852	//     "$ref": "Subaccount"
46853	//   },
46854	//   "scopes": [
46855	//     "https://www.googleapis.com/auth/dfatrafficking"
46856	//   ]
46857	// }
46858
46859}
46860
46861// method id "dfareporting.subaccounts.list":
46862
46863type SubaccountsListCall struct {
46864	s            *Service
46865	profileId    int64
46866	urlParams_   gensupport.URLParams
46867	ifNoneMatch_ string
46868	ctx_         context.Context
46869	header_      http.Header
46870}
46871
46872// List: Gets a list of subaccounts, possibly filtered. This method
46873// supports paging.
46874func (r *SubaccountsService) List(profileId int64) *SubaccountsListCall {
46875	c := &SubaccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46876	c.profileId = profileId
46877	return c
46878}
46879
46880// Ids sets the optional parameter "ids": Select only subaccounts with
46881// these IDs.
46882func (c *SubaccountsListCall) Ids(ids ...int64) *SubaccountsListCall {
46883	var ids_ []string
46884	for _, v := range ids {
46885		ids_ = append(ids_, fmt.Sprint(v))
46886	}
46887	c.urlParams_.SetMulti("ids", ids_)
46888	return c
46889}
46890
46891// MaxResults sets the optional parameter "maxResults": Maximum number
46892// of results to return.
46893func (c *SubaccountsListCall) MaxResults(maxResults int64) *SubaccountsListCall {
46894	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
46895	return c
46896}
46897
46898// PageToken sets the optional parameter "pageToken": Value of the
46899// nextPageToken from the previous result page.
46900func (c *SubaccountsListCall) PageToken(pageToken string) *SubaccountsListCall {
46901	c.urlParams_.Set("pageToken", pageToken)
46902	return c
46903}
46904
46905// SearchString sets the optional parameter "searchString": Allows
46906// searching for objects by name or ID. Wildcards (*) are allowed. For
46907// example, "subaccount*2015" will return objects with names like
46908// "subaccount June 2015", "subaccount April 2015", or simply
46909// "subaccount 2015". Most of the searches also add wildcards implicitly
46910// at the start and the end of the search string. For example, a search
46911// string of "subaccount" will match objects with name "my subaccount",
46912// "subaccount 2015", or simply "subaccount".
46913func (c *SubaccountsListCall) SearchString(searchString string) *SubaccountsListCall {
46914	c.urlParams_.Set("searchString", searchString)
46915	return c
46916}
46917
46918// SortField sets the optional parameter "sortField": Field by which to
46919// sort the list.
46920//
46921// Possible values:
46922//   "ID" (default)
46923//   "NAME"
46924func (c *SubaccountsListCall) SortField(sortField string) *SubaccountsListCall {
46925	c.urlParams_.Set("sortField", sortField)
46926	return c
46927}
46928
46929// SortOrder sets the optional parameter "sortOrder": Order of sorted
46930// results.
46931//
46932// Possible values:
46933//   "ASCENDING" (default)
46934//   "DESCENDING"
46935func (c *SubaccountsListCall) SortOrder(sortOrder string) *SubaccountsListCall {
46936	c.urlParams_.Set("sortOrder", sortOrder)
46937	return c
46938}
46939
46940// Fields allows partial responses to be retrieved. See
46941// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46942// for more information.
46943func (c *SubaccountsListCall) Fields(s ...googleapi.Field) *SubaccountsListCall {
46944	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46945	return c
46946}
46947
46948// IfNoneMatch sets the optional parameter which makes the operation
46949// fail if the object's ETag matches the given value. This is useful for
46950// getting updates only after the object has changed since the last
46951// request. Use googleapi.IsNotModified to check whether the response
46952// error from Do is the result of In-None-Match.
46953func (c *SubaccountsListCall) IfNoneMatch(entityTag string) *SubaccountsListCall {
46954	c.ifNoneMatch_ = entityTag
46955	return c
46956}
46957
46958// Context sets the context to be used in this call's Do method. Any
46959// pending HTTP request will be aborted if the provided context is
46960// canceled.
46961func (c *SubaccountsListCall) Context(ctx context.Context) *SubaccountsListCall {
46962	c.ctx_ = ctx
46963	return c
46964}
46965
46966// Header returns an http.Header that can be modified by the caller to
46967// add HTTP headers to the request.
46968func (c *SubaccountsListCall) Header() http.Header {
46969	if c.header_ == nil {
46970		c.header_ = make(http.Header)
46971	}
46972	return c.header_
46973}
46974
46975func (c *SubaccountsListCall) doRequest(alt string) (*http.Response, error) {
46976	reqHeaders := make(http.Header)
46977	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
46978	for k, v := range c.header_ {
46979		reqHeaders[k] = v
46980	}
46981	reqHeaders.Set("User-Agent", c.s.userAgent())
46982	if c.ifNoneMatch_ != "" {
46983		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46984	}
46985	var body io.Reader = nil
46986	c.urlParams_.Set("alt", alt)
46987	c.urlParams_.Set("prettyPrint", "false")
46988	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
46989	urls += "?" + c.urlParams_.Encode()
46990	req, err := http.NewRequest("GET", urls, body)
46991	if err != nil {
46992		return nil, err
46993	}
46994	req.Header = reqHeaders
46995	googleapi.Expand(req.URL, map[string]string{
46996		"profileId": strconv.FormatInt(c.profileId, 10),
46997	})
46998	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46999}
47000
47001// Do executes the "dfareporting.subaccounts.list" call.
47002// Exactly one of *SubaccountsListResponse or error will be non-nil. Any
47003// non-2xx status code is an error. Response headers are in either
47004// *SubaccountsListResponse.ServerResponse.Header or (if a response was
47005// returned at all) in error.(*googleapi.Error).Header. Use
47006// googleapi.IsNotModified to check whether the returned error was
47007// because http.StatusNotModified was returned.
47008func (c *SubaccountsListCall) Do(opts ...googleapi.CallOption) (*SubaccountsListResponse, error) {
47009	gensupport.SetOptions(c.urlParams_, opts...)
47010	res, err := c.doRequest("json")
47011	if res != nil && res.StatusCode == http.StatusNotModified {
47012		if res.Body != nil {
47013			res.Body.Close()
47014		}
47015		return nil, &googleapi.Error{
47016			Code:   res.StatusCode,
47017			Header: res.Header,
47018		}
47019	}
47020	if err != nil {
47021		return nil, err
47022	}
47023	defer googleapi.CloseBody(res)
47024	if err := googleapi.CheckResponse(res); err != nil {
47025		return nil, err
47026	}
47027	ret := &SubaccountsListResponse{
47028		ServerResponse: googleapi.ServerResponse{
47029			Header:         res.Header,
47030			HTTPStatusCode: res.StatusCode,
47031		},
47032	}
47033	target := &ret
47034	if err := gensupport.DecodeResponse(target, res); err != nil {
47035		return nil, err
47036	}
47037	return ret, nil
47038	// {
47039	//   "description": "Gets a list of subaccounts, possibly filtered. This method supports paging.",
47040	//   "httpMethod": "GET",
47041	//   "id": "dfareporting.subaccounts.list",
47042	//   "parameterOrder": [
47043	//     "profileId"
47044	//   ],
47045	//   "parameters": {
47046	//     "ids": {
47047	//       "description": "Select only subaccounts with these IDs.",
47048	//       "format": "int64",
47049	//       "location": "query",
47050	//       "repeated": true,
47051	//       "type": "string"
47052	//     },
47053	//     "maxResults": {
47054	//       "default": "1000",
47055	//       "description": "Maximum number of results to return.",
47056	//       "format": "int32",
47057	//       "location": "query",
47058	//       "maximum": "1000",
47059	//       "minimum": "0",
47060	//       "type": "integer"
47061	//     },
47062	//     "pageToken": {
47063	//       "description": "Value of the nextPageToken from the previous result page.",
47064	//       "location": "query",
47065	//       "type": "string"
47066	//     },
47067	//     "profileId": {
47068	//       "description": "User profile ID associated with this request.",
47069	//       "format": "int64",
47070	//       "location": "path",
47071	//       "required": true,
47072	//       "type": "string"
47073	//     },
47074	//     "searchString": {
47075	//       "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\".",
47076	//       "location": "query",
47077	//       "type": "string"
47078	//     },
47079	//     "sortField": {
47080	//       "default": "ID",
47081	//       "description": "Field by which to sort the list.",
47082	//       "enum": [
47083	//         "ID",
47084	//         "NAME"
47085	//       ],
47086	//       "enumDescriptions": [
47087	//         "",
47088	//         ""
47089	//       ],
47090	//       "location": "query",
47091	//       "type": "string"
47092	//     },
47093	//     "sortOrder": {
47094	//       "default": "ASCENDING",
47095	//       "description": "Order of sorted results.",
47096	//       "enum": [
47097	//         "ASCENDING",
47098	//         "DESCENDING"
47099	//       ],
47100	//       "enumDescriptions": [
47101	//         "",
47102	//         ""
47103	//       ],
47104	//       "location": "query",
47105	//       "type": "string"
47106	//     }
47107	//   },
47108	//   "path": "userprofiles/{profileId}/subaccounts",
47109	//   "response": {
47110	//     "$ref": "SubaccountsListResponse"
47111	//   },
47112	//   "scopes": [
47113	//     "https://www.googleapis.com/auth/dfatrafficking"
47114	//   ]
47115	// }
47116
47117}
47118
47119// Pages invokes f for each page of results.
47120// A non-nil error returned from f will halt the iteration.
47121// The provided context supersedes any context provided to the Context method.
47122func (c *SubaccountsListCall) Pages(ctx context.Context, f func(*SubaccountsListResponse) error) error {
47123	c.ctx_ = ctx
47124	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
47125	for {
47126		x, err := c.Do()
47127		if err != nil {
47128			return err
47129		}
47130		if err := f(x); err != nil {
47131			return err
47132		}
47133		if x.NextPageToken == "" {
47134			return nil
47135		}
47136		c.PageToken(x.NextPageToken)
47137	}
47138}
47139
47140// method id "dfareporting.subaccounts.patch":
47141
47142type SubaccountsPatchCall struct {
47143	s          *Service
47144	profileId  int64
47145	subaccount *Subaccount
47146	urlParams_ gensupport.URLParams
47147	ctx_       context.Context
47148	header_    http.Header
47149}
47150
47151// Patch: Updates an existing subaccount. This method supports patch
47152// semantics.
47153func (r *SubaccountsService) Patch(profileId int64, id int64, subaccount *Subaccount) *SubaccountsPatchCall {
47154	c := &SubaccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47155	c.profileId = profileId
47156	c.urlParams_.Set("id", fmt.Sprint(id))
47157	c.subaccount = subaccount
47158	return c
47159}
47160
47161// Fields allows partial responses to be retrieved. See
47162// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47163// for more information.
47164func (c *SubaccountsPatchCall) Fields(s ...googleapi.Field) *SubaccountsPatchCall {
47165	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47166	return c
47167}
47168
47169// Context sets the context to be used in this call's Do method. Any
47170// pending HTTP request will be aborted if the provided context is
47171// canceled.
47172func (c *SubaccountsPatchCall) Context(ctx context.Context) *SubaccountsPatchCall {
47173	c.ctx_ = ctx
47174	return c
47175}
47176
47177// Header returns an http.Header that can be modified by the caller to
47178// add HTTP headers to the request.
47179func (c *SubaccountsPatchCall) Header() http.Header {
47180	if c.header_ == nil {
47181		c.header_ = make(http.Header)
47182	}
47183	return c.header_
47184}
47185
47186func (c *SubaccountsPatchCall) doRequest(alt string) (*http.Response, error) {
47187	reqHeaders := make(http.Header)
47188	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
47189	for k, v := range c.header_ {
47190		reqHeaders[k] = v
47191	}
47192	reqHeaders.Set("User-Agent", c.s.userAgent())
47193	var body io.Reader = nil
47194	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
47195	if err != nil {
47196		return nil, err
47197	}
47198	reqHeaders.Set("Content-Type", "application/json")
47199	c.urlParams_.Set("alt", alt)
47200	c.urlParams_.Set("prettyPrint", "false")
47201	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47202	urls += "?" + c.urlParams_.Encode()
47203	req, err := http.NewRequest("PATCH", urls, body)
47204	if err != nil {
47205		return nil, err
47206	}
47207	req.Header = reqHeaders
47208	googleapi.Expand(req.URL, map[string]string{
47209		"profileId": strconv.FormatInt(c.profileId, 10),
47210	})
47211	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47212}
47213
47214// Do executes the "dfareporting.subaccounts.patch" call.
47215// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
47216// status code is an error. Response headers are in either
47217// *Subaccount.ServerResponse.Header or (if a response was returned at
47218// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47219// to check whether the returned error was because
47220// http.StatusNotModified was returned.
47221func (c *SubaccountsPatchCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
47222	gensupport.SetOptions(c.urlParams_, opts...)
47223	res, err := c.doRequest("json")
47224	if res != nil && res.StatusCode == http.StatusNotModified {
47225		if res.Body != nil {
47226			res.Body.Close()
47227		}
47228		return nil, &googleapi.Error{
47229			Code:   res.StatusCode,
47230			Header: res.Header,
47231		}
47232	}
47233	if err != nil {
47234		return nil, err
47235	}
47236	defer googleapi.CloseBody(res)
47237	if err := googleapi.CheckResponse(res); err != nil {
47238		return nil, err
47239	}
47240	ret := &Subaccount{
47241		ServerResponse: googleapi.ServerResponse{
47242			Header:         res.Header,
47243			HTTPStatusCode: res.StatusCode,
47244		},
47245	}
47246	target := &ret
47247	if err := gensupport.DecodeResponse(target, res); err != nil {
47248		return nil, err
47249	}
47250	return ret, nil
47251	// {
47252	//   "description": "Updates an existing subaccount. This method supports patch semantics.",
47253	//   "httpMethod": "PATCH",
47254	//   "id": "dfareporting.subaccounts.patch",
47255	//   "parameterOrder": [
47256	//     "profileId",
47257	//     "id"
47258	//   ],
47259	//   "parameters": {
47260	//     "id": {
47261	//       "description": "Subaccount ID.",
47262	//       "format": "int64",
47263	//       "location": "query",
47264	//       "required": true,
47265	//       "type": "string"
47266	//     },
47267	//     "profileId": {
47268	//       "description": "User profile ID associated with this request.",
47269	//       "format": "int64",
47270	//       "location": "path",
47271	//       "required": true,
47272	//       "type": "string"
47273	//     }
47274	//   },
47275	//   "path": "userprofiles/{profileId}/subaccounts",
47276	//   "request": {
47277	//     "$ref": "Subaccount"
47278	//   },
47279	//   "response": {
47280	//     "$ref": "Subaccount"
47281	//   },
47282	//   "scopes": [
47283	//     "https://www.googleapis.com/auth/dfatrafficking"
47284	//   ]
47285	// }
47286
47287}
47288
47289// method id "dfareporting.subaccounts.update":
47290
47291type SubaccountsUpdateCall struct {
47292	s          *Service
47293	profileId  int64
47294	subaccount *Subaccount
47295	urlParams_ gensupport.URLParams
47296	ctx_       context.Context
47297	header_    http.Header
47298}
47299
47300// Update: Updates an existing subaccount.
47301func (r *SubaccountsService) Update(profileId int64, subaccount *Subaccount) *SubaccountsUpdateCall {
47302	c := &SubaccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47303	c.profileId = profileId
47304	c.subaccount = subaccount
47305	return c
47306}
47307
47308// Fields allows partial responses to be retrieved. See
47309// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47310// for more information.
47311func (c *SubaccountsUpdateCall) Fields(s ...googleapi.Field) *SubaccountsUpdateCall {
47312	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47313	return c
47314}
47315
47316// Context sets the context to be used in this call's Do method. Any
47317// pending HTTP request will be aborted if the provided context is
47318// canceled.
47319func (c *SubaccountsUpdateCall) Context(ctx context.Context) *SubaccountsUpdateCall {
47320	c.ctx_ = ctx
47321	return c
47322}
47323
47324// Header returns an http.Header that can be modified by the caller to
47325// add HTTP headers to the request.
47326func (c *SubaccountsUpdateCall) Header() http.Header {
47327	if c.header_ == nil {
47328		c.header_ = make(http.Header)
47329	}
47330	return c.header_
47331}
47332
47333func (c *SubaccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
47334	reqHeaders := make(http.Header)
47335	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
47336	for k, v := range c.header_ {
47337		reqHeaders[k] = v
47338	}
47339	reqHeaders.Set("User-Agent", c.s.userAgent())
47340	var body io.Reader = nil
47341	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
47342	if err != nil {
47343		return nil, err
47344	}
47345	reqHeaders.Set("Content-Type", "application/json")
47346	c.urlParams_.Set("alt", alt)
47347	c.urlParams_.Set("prettyPrint", "false")
47348	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47349	urls += "?" + c.urlParams_.Encode()
47350	req, err := http.NewRequest("PUT", urls, body)
47351	if err != nil {
47352		return nil, err
47353	}
47354	req.Header = reqHeaders
47355	googleapi.Expand(req.URL, map[string]string{
47356		"profileId": strconv.FormatInt(c.profileId, 10),
47357	})
47358	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47359}
47360
47361// Do executes the "dfareporting.subaccounts.update" call.
47362// Exactly one of *Subaccount or error will be non-nil. Any non-2xx
47363// status code is an error. Response headers are in either
47364// *Subaccount.ServerResponse.Header or (if a response was returned at
47365// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47366// to check whether the returned error was because
47367// http.StatusNotModified was returned.
47368func (c *SubaccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
47369	gensupport.SetOptions(c.urlParams_, opts...)
47370	res, err := c.doRequest("json")
47371	if res != nil && res.StatusCode == http.StatusNotModified {
47372		if res.Body != nil {
47373			res.Body.Close()
47374		}
47375		return nil, &googleapi.Error{
47376			Code:   res.StatusCode,
47377			Header: res.Header,
47378		}
47379	}
47380	if err != nil {
47381		return nil, err
47382	}
47383	defer googleapi.CloseBody(res)
47384	if err := googleapi.CheckResponse(res); err != nil {
47385		return nil, err
47386	}
47387	ret := &Subaccount{
47388		ServerResponse: googleapi.ServerResponse{
47389			Header:         res.Header,
47390			HTTPStatusCode: res.StatusCode,
47391		},
47392	}
47393	target := &ret
47394	if err := gensupport.DecodeResponse(target, res); err != nil {
47395		return nil, err
47396	}
47397	return ret, nil
47398	// {
47399	//   "description": "Updates an existing subaccount.",
47400	//   "httpMethod": "PUT",
47401	//   "id": "dfareporting.subaccounts.update",
47402	//   "parameterOrder": [
47403	//     "profileId"
47404	//   ],
47405	//   "parameters": {
47406	//     "profileId": {
47407	//       "description": "User profile ID associated with this request.",
47408	//       "format": "int64",
47409	//       "location": "path",
47410	//       "required": true,
47411	//       "type": "string"
47412	//     }
47413	//   },
47414	//   "path": "userprofiles/{profileId}/subaccounts",
47415	//   "request": {
47416	//     "$ref": "Subaccount"
47417	//   },
47418	//   "response": {
47419	//     "$ref": "Subaccount"
47420	//   },
47421	//   "scopes": [
47422	//     "https://www.googleapis.com/auth/dfatrafficking"
47423	//   ]
47424	// }
47425
47426}
47427
47428// method id "dfareporting.targetableRemarketingLists.get":
47429
47430type TargetableRemarketingListsGetCall struct {
47431	s            *Service
47432	profileId    int64
47433	id           int64
47434	urlParams_   gensupport.URLParams
47435	ifNoneMatch_ string
47436	ctx_         context.Context
47437	header_      http.Header
47438}
47439
47440// Get: Gets one remarketing list by ID.
47441func (r *TargetableRemarketingListsService) Get(profileId int64, id int64) *TargetableRemarketingListsGetCall {
47442	c := &TargetableRemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47443	c.profileId = profileId
47444	c.id = id
47445	return c
47446}
47447
47448// Fields allows partial responses to be retrieved. See
47449// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47450// for more information.
47451func (c *TargetableRemarketingListsGetCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsGetCall {
47452	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47453	return c
47454}
47455
47456// IfNoneMatch sets the optional parameter which makes the operation
47457// fail if the object's ETag matches the given value. This is useful for
47458// getting updates only after the object has changed since the last
47459// request. Use googleapi.IsNotModified to check whether the response
47460// error from Do is the result of In-None-Match.
47461func (c *TargetableRemarketingListsGetCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsGetCall {
47462	c.ifNoneMatch_ = entityTag
47463	return c
47464}
47465
47466// Context sets the context to be used in this call's Do method. Any
47467// pending HTTP request will be aborted if the provided context is
47468// canceled.
47469func (c *TargetableRemarketingListsGetCall) Context(ctx context.Context) *TargetableRemarketingListsGetCall {
47470	c.ctx_ = ctx
47471	return c
47472}
47473
47474// Header returns an http.Header that can be modified by the caller to
47475// add HTTP headers to the request.
47476func (c *TargetableRemarketingListsGetCall) Header() http.Header {
47477	if c.header_ == nil {
47478		c.header_ = make(http.Header)
47479	}
47480	return c.header_
47481}
47482
47483func (c *TargetableRemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
47484	reqHeaders := make(http.Header)
47485	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
47486	for k, v := range c.header_ {
47487		reqHeaders[k] = v
47488	}
47489	reqHeaders.Set("User-Agent", c.s.userAgent())
47490	if c.ifNoneMatch_ != "" {
47491		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47492	}
47493	var body io.Reader = nil
47494	c.urlParams_.Set("alt", alt)
47495	c.urlParams_.Set("prettyPrint", "false")
47496	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists/{id}")
47497	urls += "?" + c.urlParams_.Encode()
47498	req, err := http.NewRequest("GET", urls, body)
47499	if err != nil {
47500		return nil, err
47501	}
47502	req.Header = reqHeaders
47503	googleapi.Expand(req.URL, map[string]string{
47504		"profileId": strconv.FormatInt(c.profileId, 10),
47505		"id":        strconv.FormatInt(c.id, 10),
47506	})
47507	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47508}
47509
47510// Do executes the "dfareporting.targetableRemarketingLists.get" call.
47511// Exactly one of *TargetableRemarketingList or error will be non-nil.
47512// Any non-2xx status code is an error. Response headers are in either
47513// *TargetableRemarketingList.ServerResponse.Header or (if a response
47514// was returned at all) in error.(*googleapi.Error).Header. Use
47515// googleapi.IsNotModified to check whether the returned error was
47516// because http.StatusNotModified was returned.
47517func (c *TargetableRemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingList, error) {
47518	gensupport.SetOptions(c.urlParams_, opts...)
47519	res, err := c.doRequest("json")
47520	if res != nil && res.StatusCode == http.StatusNotModified {
47521		if res.Body != nil {
47522			res.Body.Close()
47523		}
47524		return nil, &googleapi.Error{
47525			Code:   res.StatusCode,
47526			Header: res.Header,
47527		}
47528	}
47529	if err != nil {
47530		return nil, err
47531	}
47532	defer googleapi.CloseBody(res)
47533	if err := googleapi.CheckResponse(res); err != nil {
47534		return nil, err
47535	}
47536	ret := &TargetableRemarketingList{
47537		ServerResponse: googleapi.ServerResponse{
47538			Header:         res.Header,
47539			HTTPStatusCode: res.StatusCode,
47540		},
47541	}
47542	target := &ret
47543	if err := gensupport.DecodeResponse(target, res); err != nil {
47544		return nil, err
47545	}
47546	return ret, nil
47547	// {
47548	//   "description": "Gets one remarketing list by ID.",
47549	//   "httpMethod": "GET",
47550	//   "id": "dfareporting.targetableRemarketingLists.get",
47551	//   "parameterOrder": [
47552	//     "profileId",
47553	//     "id"
47554	//   ],
47555	//   "parameters": {
47556	//     "id": {
47557	//       "description": "Remarketing list ID.",
47558	//       "format": "int64",
47559	//       "location": "path",
47560	//       "required": true,
47561	//       "type": "string"
47562	//     },
47563	//     "profileId": {
47564	//       "description": "User profile ID associated with this request.",
47565	//       "format": "int64",
47566	//       "location": "path",
47567	//       "required": true,
47568	//       "type": "string"
47569	//     }
47570	//   },
47571	//   "path": "userprofiles/{profileId}/targetableRemarketingLists/{id}",
47572	//   "response": {
47573	//     "$ref": "TargetableRemarketingList"
47574	//   },
47575	//   "scopes": [
47576	//     "https://www.googleapis.com/auth/dfatrafficking"
47577	//   ]
47578	// }
47579
47580}
47581
47582// method id "dfareporting.targetableRemarketingLists.list":
47583
47584type TargetableRemarketingListsListCall struct {
47585	s            *Service
47586	profileId    int64
47587	urlParams_   gensupport.URLParams
47588	ifNoneMatch_ string
47589	ctx_         context.Context
47590	header_      http.Header
47591}
47592
47593// List: Retrieves a list of targetable remarketing lists, possibly
47594// filtered. This method supports paging.
47595func (r *TargetableRemarketingListsService) List(profileId int64, advertiserId int64) *TargetableRemarketingListsListCall {
47596	c := &TargetableRemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47597	c.profileId = profileId
47598	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
47599	return c
47600}
47601
47602// Active sets the optional parameter "active": Select only active or
47603// only inactive targetable remarketing lists.
47604func (c *TargetableRemarketingListsListCall) Active(active bool) *TargetableRemarketingListsListCall {
47605	c.urlParams_.Set("active", fmt.Sprint(active))
47606	return c
47607}
47608
47609// MaxResults sets the optional parameter "maxResults": Maximum number
47610// of results to return.
47611func (c *TargetableRemarketingListsListCall) MaxResults(maxResults int64) *TargetableRemarketingListsListCall {
47612	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
47613	return c
47614}
47615
47616// Name sets the optional parameter "name": Allows searching for objects
47617// by name or ID. Wildcards (*) are allowed. For example, "remarketing
47618// list*2015" will return objects with names like "remarketing list June
47619// 2015", "remarketing list April 2015", or simply "remarketing list
47620// 2015". Most of the searches also add wildcards implicitly at the
47621// start and the end of the search string. For example, a search string
47622// of "remarketing list" will match objects with name "my remarketing
47623// list", "remarketing list 2015", or simply "remarketing list".
47624func (c *TargetableRemarketingListsListCall) Name(name string) *TargetableRemarketingListsListCall {
47625	c.urlParams_.Set("name", name)
47626	return c
47627}
47628
47629// PageToken sets the optional parameter "pageToken": Value of the
47630// nextPageToken from the previous result page.
47631func (c *TargetableRemarketingListsListCall) PageToken(pageToken string) *TargetableRemarketingListsListCall {
47632	c.urlParams_.Set("pageToken", pageToken)
47633	return c
47634}
47635
47636// SortField sets the optional parameter "sortField": Field by which to
47637// sort the list.
47638//
47639// Possible values:
47640//   "ID" (default)
47641//   "NAME"
47642func (c *TargetableRemarketingListsListCall) SortField(sortField string) *TargetableRemarketingListsListCall {
47643	c.urlParams_.Set("sortField", sortField)
47644	return c
47645}
47646
47647// SortOrder sets the optional parameter "sortOrder": Order of sorted
47648// results.
47649//
47650// Possible values:
47651//   "ASCENDING" (default)
47652//   "DESCENDING"
47653func (c *TargetableRemarketingListsListCall) SortOrder(sortOrder string) *TargetableRemarketingListsListCall {
47654	c.urlParams_.Set("sortOrder", sortOrder)
47655	return c
47656}
47657
47658// Fields allows partial responses to be retrieved. See
47659// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47660// for more information.
47661func (c *TargetableRemarketingListsListCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsListCall {
47662	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47663	return c
47664}
47665
47666// IfNoneMatch sets the optional parameter which makes the operation
47667// fail if the object's ETag matches the given value. This is useful for
47668// getting updates only after the object has changed since the last
47669// request. Use googleapi.IsNotModified to check whether the response
47670// error from Do is the result of In-None-Match.
47671func (c *TargetableRemarketingListsListCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsListCall {
47672	c.ifNoneMatch_ = entityTag
47673	return c
47674}
47675
47676// Context sets the context to be used in this call's Do method. Any
47677// pending HTTP request will be aborted if the provided context is
47678// canceled.
47679func (c *TargetableRemarketingListsListCall) Context(ctx context.Context) *TargetableRemarketingListsListCall {
47680	c.ctx_ = ctx
47681	return c
47682}
47683
47684// Header returns an http.Header that can be modified by the caller to
47685// add HTTP headers to the request.
47686func (c *TargetableRemarketingListsListCall) Header() http.Header {
47687	if c.header_ == nil {
47688		c.header_ = make(http.Header)
47689	}
47690	return c.header_
47691}
47692
47693func (c *TargetableRemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
47694	reqHeaders := make(http.Header)
47695	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
47696	for k, v := range c.header_ {
47697		reqHeaders[k] = v
47698	}
47699	reqHeaders.Set("User-Agent", c.s.userAgent())
47700	if c.ifNoneMatch_ != "" {
47701		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47702	}
47703	var body io.Reader = nil
47704	c.urlParams_.Set("alt", alt)
47705	c.urlParams_.Set("prettyPrint", "false")
47706	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists")
47707	urls += "?" + c.urlParams_.Encode()
47708	req, err := http.NewRequest("GET", urls, body)
47709	if err != nil {
47710		return nil, err
47711	}
47712	req.Header = reqHeaders
47713	googleapi.Expand(req.URL, map[string]string{
47714		"profileId": strconv.FormatInt(c.profileId, 10),
47715	})
47716	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47717}
47718
47719// Do executes the "dfareporting.targetableRemarketingLists.list" call.
47720// Exactly one of *TargetableRemarketingListsListResponse or error will
47721// be non-nil. Any non-2xx status code is an error. Response headers are
47722// in either
47723// *TargetableRemarketingListsListResponse.ServerResponse.Header or (if
47724// a response was returned at all) in error.(*googleapi.Error).Header.
47725// Use googleapi.IsNotModified to check whether the returned error was
47726// because http.StatusNotModified was returned.
47727func (c *TargetableRemarketingListsListCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingListsListResponse, error) {
47728	gensupport.SetOptions(c.urlParams_, opts...)
47729	res, err := c.doRequest("json")
47730	if res != nil && res.StatusCode == http.StatusNotModified {
47731		if res.Body != nil {
47732			res.Body.Close()
47733		}
47734		return nil, &googleapi.Error{
47735			Code:   res.StatusCode,
47736			Header: res.Header,
47737		}
47738	}
47739	if err != nil {
47740		return nil, err
47741	}
47742	defer googleapi.CloseBody(res)
47743	if err := googleapi.CheckResponse(res); err != nil {
47744		return nil, err
47745	}
47746	ret := &TargetableRemarketingListsListResponse{
47747		ServerResponse: googleapi.ServerResponse{
47748			Header:         res.Header,
47749			HTTPStatusCode: res.StatusCode,
47750		},
47751	}
47752	target := &ret
47753	if err := gensupport.DecodeResponse(target, res); err != nil {
47754		return nil, err
47755	}
47756	return ret, nil
47757	// {
47758	//   "description": "Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging.",
47759	//   "httpMethod": "GET",
47760	//   "id": "dfareporting.targetableRemarketingLists.list",
47761	//   "parameterOrder": [
47762	//     "profileId",
47763	//     "advertiserId"
47764	//   ],
47765	//   "parameters": {
47766	//     "active": {
47767	//       "description": "Select only active or only inactive targetable remarketing lists.",
47768	//       "location": "query",
47769	//       "type": "boolean"
47770	//     },
47771	//     "advertiserId": {
47772	//       "description": "Select only targetable remarketing lists targetable by these advertisers.",
47773	//       "format": "int64",
47774	//       "location": "query",
47775	//       "required": true,
47776	//       "type": "string"
47777	//     },
47778	//     "maxResults": {
47779	//       "default": "1000",
47780	//       "description": "Maximum number of results to return.",
47781	//       "format": "int32",
47782	//       "location": "query",
47783	//       "maximum": "1000",
47784	//       "minimum": "0",
47785	//       "type": "integer"
47786	//     },
47787	//     "name": {
47788	//       "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\".",
47789	//       "location": "query",
47790	//       "type": "string"
47791	//     },
47792	//     "pageToken": {
47793	//       "description": "Value of the nextPageToken from the previous result page.",
47794	//       "location": "query",
47795	//       "type": "string"
47796	//     },
47797	//     "profileId": {
47798	//       "description": "User profile ID associated with this request.",
47799	//       "format": "int64",
47800	//       "location": "path",
47801	//       "required": true,
47802	//       "type": "string"
47803	//     },
47804	//     "sortField": {
47805	//       "default": "ID",
47806	//       "description": "Field by which to sort the list.",
47807	//       "enum": [
47808	//         "ID",
47809	//         "NAME"
47810	//       ],
47811	//       "enumDescriptions": [
47812	//         "",
47813	//         ""
47814	//       ],
47815	//       "location": "query",
47816	//       "type": "string"
47817	//     },
47818	//     "sortOrder": {
47819	//       "default": "ASCENDING",
47820	//       "description": "Order of sorted results.",
47821	//       "enum": [
47822	//         "ASCENDING",
47823	//         "DESCENDING"
47824	//       ],
47825	//       "enumDescriptions": [
47826	//         "",
47827	//         ""
47828	//       ],
47829	//       "location": "query",
47830	//       "type": "string"
47831	//     }
47832	//   },
47833	//   "path": "userprofiles/{profileId}/targetableRemarketingLists",
47834	//   "response": {
47835	//     "$ref": "TargetableRemarketingListsListResponse"
47836	//   },
47837	//   "scopes": [
47838	//     "https://www.googleapis.com/auth/dfatrafficking"
47839	//   ]
47840	// }
47841
47842}
47843
47844// Pages invokes f for each page of results.
47845// A non-nil error returned from f will halt the iteration.
47846// The provided context supersedes any context provided to the Context method.
47847func (c *TargetableRemarketingListsListCall) Pages(ctx context.Context, f func(*TargetableRemarketingListsListResponse) error) error {
47848	c.ctx_ = ctx
47849	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
47850	for {
47851		x, err := c.Do()
47852		if err != nil {
47853			return err
47854		}
47855		if err := f(x); err != nil {
47856			return err
47857		}
47858		if x.NextPageToken == "" {
47859			return nil
47860		}
47861		c.PageToken(x.NextPageToken)
47862	}
47863}
47864
47865// method id "dfareporting.targetingTemplates.get":
47866
47867type TargetingTemplatesGetCall struct {
47868	s            *Service
47869	profileId    int64
47870	id           int64
47871	urlParams_   gensupport.URLParams
47872	ifNoneMatch_ string
47873	ctx_         context.Context
47874	header_      http.Header
47875}
47876
47877// Get: Gets one targeting template by ID.
47878func (r *TargetingTemplatesService) Get(profileId int64, id int64) *TargetingTemplatesGetCall {
47879	c := &TargetingTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47880	c.profileId = profileId
47881	c.id = id
47882	return c
47883}
47884
47885// Fields allows partial responses to be retrieved. See
47886// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47887// for more information.
47888func (c *TargetingTemplatesGetCall) Fields(s ...googleapi.Field) *TargetingTemplatesGetCall {
47889	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47890	return c
47891}
47892
47893// IfNoneMatch sets the optional parameter which makes the operation
47894// fail if the object's ETag matches the given value. This is useful for
47895// getting updates only after the object has changed since the last
47896// request. Use googleapi.IsNotModified to check whether the response
47897// error from Do is the result of In-None-Match.
47898func (c *TargetingTemplatesGetCall) IfNoneMatch(entityTag string) *TargetingTemplatesGetCall {
47899	c.ifNoneMatch_ = entityTag
47900	return c
47901}
47902
47903// Context sets the context to be used in this call's Do method. Any
47904// pending HTTP request will be aborted if the provided context is
47905// canceled.
47906func (c *TargetingTemplatesGetCall) Context(ctx context.Context) *TargetingTemplatesGetCall {
47907	c.ctx_ = ctx
47908	return c
47909}
47910
47911// Header returns an http.Header that can be modified by the caller to
47912// add HTTP headers to the request.
47913func (c *TargetingTemplatesGetCall) Header() http.Header {
47914	if c.header_ == nil {
47915		c.header_ = make(http.Header)
47916	}
47917	return c.header_
47918}
47919
47920func (c *TargetingTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
47921	reqHeaders := make(http.Header)
47922	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
47923	for k, v := range c.header_ {
47924		reqHeaders[k] = v
47925	}
47926	reqHeaders.Set("User-Agent", c.s.userAgent())
47927	if c.ifNoneMatch_ != "" {
47928		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47929	}
47930	var body io.Reader = nil
47931	c.urlParams_.Set("alt", alt)
47932	c.urlParams_.Set("prettyPrint", "false")
47933	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates/{id}")
47934	urls += "?" + c.urlParams_.Encode()
47935	req, err := http.NewRequest("GET", urls, body)
47936	if err != nil {
47937		return nil, err
47938	}
47939	req.Header = reqHeaders
47940	googleapi.Expand(req.URL, map[string]string{
47941		"profileId": strconv.FormatInt(c.profileId, 10),
47942		"id":        strconv.FormatInt(c.id, 10),
47943	})
47944	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47945}
47946
47947// Do executes the "dfareporting.targetingTemplates.get" call.
47948// Exactly one of *TargetingTemplate or error will be non-nil. Any
47949// non-2xx status code is an error. Response headers are in either
47950// *TargetingTemplate.ServerResponse.Header or (if a response was
47951// returned at all) in error.(*googleapi.Error).Header. Use
47952// googleapi.IsNotModified to check whether the returned error was
47953// because http.StatusNotModified was returned.
47954func (c *TargetingTemplatesGetCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
47955	gensupport.SetOptions(c.urlParams_, opts...)
47956	res, err := c.doRequest("json")
47957	if res != nil && res.StatusCode == http.StatusNotModified {
47958		if res.Body != nil {
47959			res.Body.Close()
47960		}
47961		return nil, &googleapi.Error{
47962			Code:   res.StatusCode,
47963			Header: res.Header,
47964		}
47965	}
47966	if err != nil {
47967		return nil, err
47968	}
47969	defer googleapi.CloseBody(res)
47970	if err := googleapi.CheckResponse(res); err != nil {
47971		return nil, err
47972	}
47973	ret := &TargetingTemplate{
47974		ServerResponse: googleapi.ServerResponse{
47975			Header:         res.Header,
47976			HTTPStatusCode: res.StatusCode,
47977		},
47978	}
47979	target := &ret
47980	if err := gensupport.DecodeResponse(target, res); err != nil {
47981		return nil, err
47982	}
47983	return ret, nil
47984	// {
47985	//   "description": "Gets one targeting template by ID.",
47986	//   "httpMethod": "GET",
47987	//   "id": "dfareporting.targetingTemplates.get",
47988	//   "parameterOrder": [
47989	//     "profileId",
47990	//     "id"
47991	//   ],
47992	//   "parameters": {
47993	//     "id": {
47994	//       "description": "Targeting template ID.",
47995	//       "format": "int64",
47996	//       "location": "path",
47997	//       "required": true,
47998	//       "type": "string"
47999	//     },
48000	//     "profileId": {
48001	//       "description": "User profile ID associated with this request.",
48002	//       "format": "int64",
48003	//       "location": "path",
48004	//       "required": true,
48005	//       "type": "string"
48006	//     }
48007	//   },
48008	//   "path": "userprofiles/{profileId}/targetingTemplates/{id}",
48009	//   "response": {
48010	//     "$ref": "TargetingTemplate"
48011	//   },
48012	//   "scopes": [
48013	//     "https://www.googleapis.com/auth/dfatrafficking"
48014	//   ]
48015	// }
48016
48017}
48018
48019// method id "dfareporting.targetingTemplates.insert":
48020
48021type TargetingTemplatesInsertCall struct {
48022	s                 *Service
48023	profileId         int64
48024	targetingtemplate *TargetingTemplate
48025	urlParams_        gensupport.URLParams
48026	ctx_              context.Context
48027	header_           http.Header
48028}
48029
48030// Insert: Inserts a new targeting template.
48031func (r *TargetingTemplatesService) Insert(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesInsertCall {
48032	c := &TargetingTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48033	c.profileId = profileId
48034	c.targetingtemplate = targetingtemplate
48035	return c
48036}
48037
48038// Fields allows partial responses to be retrieved. See
48039// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48040// for more information.
48041func (c *TargetingTemplatesInsertCall) Fields(s ...googleapi.Field) *TargetingTemplatesInsertCall {
48042	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48043	return c
48044}
48045
48046// Context sets the context to be used in this call's Do method. Any
48047// pending HTTP request will be aborted if the provided context is
48048// canceled.
48049func (c *TargetingTemplatesInsertCall) Context(ctx context.Context) *TargetingTemplatesInsertCall {
48050	c.ctx_ = ctx
48051	return c
48052}
48053
48054// Header returns an http.Header that can be modified by the caller to
48055// add HTTP headers to the request.
48056func (c *TargetingTemplatesInsertCall) Header() http.Header {
48057	if c.header_ == nil {
48058		c.header_ = make(http.Header)
48059	}
48060	return c.header_
48061}
48062
48063func (c *TargetingTemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
48064	reqHeaders := make(http.Header)
48065	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
48066	for k, v := range c.header_ {
48067		reqHeaders[k] = v
48068	}
48069	reqHeaders.Set("User-Agent", c.s.userAgent())
48070	var body io.Reader = nil
48071	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48072	if err != nil {
48073		return nil, err
48074	}
48075	reqHeaders.Set("Content-Type", "application/json")
48076	c.urlParams_.Set("alt", alt)
48077	c.urlParams_.Set("prettyPrint", "false")
48078	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48079	urls += "?" + c.urlParams_.Encode()
48080	req, err := http.NewRequest("POST", urls, body)
48081	if err != nil {
48082		return nil, err
48083	}
48084	req.Header = reqHeaders
48085	googleapi.Expand(req.URL, map[string]string{
48086		"profileId": strconv.FormatInt(c.profileId, 10),
48087	})
48088	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48089}
48090
48091// Do executes the "dfareporting.targetingTemplates.insert" call.
48092// Exactly one of *TargetingTemplate or error will be non-nil. Any
48093// non-2xx status code is an error. Response headers are in either
48094// *TargetingTemplate.ServerResponse.Header or (if a response was
48095// returned at all) in error.(*googleapi.Error).Header. Use
48096// googleapi.IsNotModified to check whether the returned error was
48097// because http.StatusNotModified was returned.
48098func (c *TargetingTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48099	gensupport.SetOptions(c.urlParams_, opts...)
48100	res, err := c.doRequest("json")
48101	if res != nil && res.StatusCode == http.StatusNotModified {
48102		if res.Body != nil {
48103			res.Body.Close()
48104		}
48105		return nil, &googleapi.Error{
48106			Code:   res.StatusCode,
48107			Header: res.Header,
48108		}
48109	}
48110	if err != nil {
48111		return nil, err
48112	}
48113	defer googleapi.CloseBody(res)
48114	if err := googleapi.CheckResponse(res); err != nil {
48115		return nil, err
48116	}
48117	ret := &TargetingTemplate{
48118		ServerResponse: googleapi.ServerResponse{
48119			Header:         res.Header,
48120			HTTPStatusCode: res.StatusCode,
48121		},
48122	}
48123	target := &ret
48124	if err := gensupport.DecodeResponse(target, res); err != nil {
48125		return nil, err
48126	}
48127	return ret, nil
48128	// {
48129	//   "description": "Inserts a new targeting template.",
48130	//   "httpMethod": "POST",
48131	//   "id": "dfareporting.targetingTemplates.insert",
48132	//   "parameterOrder": [
48133	//     "profileId"
48134	//   ],
48135	//   "parameters": {
48136	//     "profileId": {
48137	//       "description": "User profile ID associated with this request.",
48138	//       "format": "int64",
48139	//       "location": "path",
48140	//       "required": true,
48141	//       "type": "string"
48142	//     }
48143	//   },
48144	//   "path": "userprofiles/{profileId}/targetingTemplates",
48145	//   "request": {
48146	//     "$ref": "TargetingTemplate"
48147	//   },
48148	//   "response": {
48149	//     "$ref": "TargetingTemplate"
48150	//   },
48151	//   "scopes": [
48152	//     "https://www.googleapis.com/auth/dfatrafficking"
48153	//   ]
48154	// }
48155
48156}
48157
48158// method id "dfareporting.targetingTemplates.list":
48159
48160type TargetingTemplatesListCall struct {
48161	s            *Service
48162	profileId    int64
48163	urlParams_   gensupport.URLParams
48164	ifNoneMatch_ string
48165	ctx_         context.Context
48166	header_      http.Header
48167}
48168
48169// List: Retrieves a list of targeting templates, optionally filtered.
48170// This method supports paging.
48171func (r *TargetingTemplatesService) List(profileId int64) *TargetingTemplatesListCall {
48172	c := &TargetingTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48173	c.profileId = profileId
48174	return c
48175}
48176
48177// AdvertiserId sets the optional parameter "advertiserId": Select only
48178// targeting templates with this advertiser ID.
48179func (c *TargetingTemplatesListCall) AdvertiserId(advertiserId int64) *TargetingTemplatesListCall {
48180	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
48181	return c
48182}
48183
48184// Ids sets the optional parameter "ids": Select only targeting
48185// templates with these IDs.
48186func (c *TargetingTemplatesListCall) Ids(ids ...int64) *TargetingTemplatesListCall {
48187	var ids_ []string
48188	for _, v := range ids {
48189		ids_ = append(ids_, fmt.Sprint(v))
48190	}
48191	c.urlParams_.SetMulti("ids", ids_)
48192	return c
48193}
48194
48195// MaxResults sets the optional parameter "maxResults": Maximum number
48196// of results to return.
48197func (c *TargetingTemplatesListCall) MaxResults(maxResults int64) *TargetingTemplatesListCall {
48198	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
48199	return c
48200}
48201
48202// PageToken sets the optional parameter "pageToken": Value of the
48203// nextPageToken from the previous result page.
48204func (c *TargetingTemplatesListCall) PageToken(pageToken string) *TargetingTemplatesListCall {
48205	c.urlParams_.Set("pageToken", pageToken)
48206	return c
48207}
48208
48209// SearchString sets the optional parameter "searchString": Allows
48210// searching for objects by name or ID. Wildcards (*) are allowed. For
48211// example, "template*2015" will return objects with names like
48212// "template June 2015", "template April 2015", or simply "template
48213// 2015". Most of the searches also add wildcards implicitly at the
48214// start and the end of the search string. For example, a search string
48215// of "template" will match objects with name "my template", "template
48216// 2015", or simply "template".
48217func (c *TargetingTemplatesListCall) SearchString(searchString string) *TargetingTemplatesListCall {
48218	c.urlParams_.Set("searchString", searchString)
48219	return c
48220}
48221
48222// SortField sets the optional parameter "sortField": Field by which to
48223// sort the list.
48224//
48225// Possible values:
48226//   "ID" (default)
48227//   "NAME"
48228func (c *TargetingTemplatesListCall) SortField(sortField string) *TargetingTemplatesListCall {
48229	c.urlParams_.Set("sortField", sortField)
48230	return c
48231}
48232
48233// SortOrder sets the optional parameter "sortOrder": Order of sorted
48234// results.
48235//
48236// Possible values:
48237//   "ASCENDING" (default)
48238//   "DESCENDING"
48239func (c *TargetingTemplatesListCall) SortOrder(sortOrder string) *TargetingTemplatesListCall {
48240	c.urlParams_.Set("sortOrder", sortOrder)
48241	return c
48242}
48243
48244// Fields allows partial responses to be retrieved. See
48245// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48246// for more information.
48247func (c *TargetingTemplatesListCall) Fields(s ...googleapi.Field) *TargetingTemplatesListCall {
48248	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48249	return c
48250}
48251
48252// IfNoneMatch sets the optional parameter which makes the operation
48253// fail if the object's ETag matches the given value. This is useful for
48254// getting updates only after the object has changed since the last
48255// request. Use googleapi.IsNotModified to check whether the response
48256// error from Do is the result of In-None-Match.
48257func (c *TargetingTemplatesListCall) IfNoneMatch(entityTag string) *TargetingTemplatesListCall {
48258	c.ifNoneMatch_ = entityTag
48259	return c
48260}
48261
48262// Context sets the context to be used in this call's Do method. Any
48263// pending HTTP request will be aborted if the provided context is
48264// canceled.
48265func (c *TargetingTemplatesListCall) Context(ctx context.Context) *TargetingTemplatesListCall {
48266	c.ctx_ = ctx
48267	return c
48268}
48269
48270// Header returns an http.Header that can be modified by the caller to
48271// add HTTP headers to the request.
48272func (c *TargetingTemplatesListCall) Header() http.Header {
48273	if c.header_ == nil {
48274		c.header_ = make(http.Header)
48275	}
48276	return c.header_
48277}
48278
48279func (c *TargetingTemplatesListCall) doRequest(alt string) (*http.Response, error) {
48280	reqHeaders := make(http.Header)
48281	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
48282	for k, v := range c.header_ {
48283		reqHeaders[k] = v
48284	}
48285	reqHeaders.Set("User-Agent", c.s.userAgent())
48286	if c.ifNoneMatch_ != "" {
48287		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48288	}
48289	var body io.Reader = nil
48290	c.urlParams_.Set("alt", alt)
48291	c.urlParams_.Set("prettyPrint", "false")
48292	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48293	urls += "?" + c.urlParams_.Encode()
48294	req, err := http.NewRequest("GET", urls, body)
48295	if err != nil {
48296		return nil, err
48297	}
48298	req.Header = reqHeaders
48299	googleapi.Expand(req.URL, map[string]string{
48300		"profileId": strconv.FormatInt(c.profileId, 10),
48301	})
48302	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48303}
48304
48305// Do executes the "dfareporting.targetingTemplates.list" call.
48306// Exactly one of *TargetingTemplatesListResponse or error will be
48307// non-nil. Any non-2xx status code is an error. Response headers are in
48308// either *TargetingTemplatesListResponse.ServerResponse.Header or (if a
48309// response was returned at all) in error.(*googleapi.Error).Header. Use
48310// googleapi.IsNotModified to check whether the returned error was
48311// because http.StatusNotModified was returned.
48312func (c *TargetingTemplatesListCall) Do(opts ...googleapi.CallOption) (*TargetingTemplatesListResponse, error) {
48313	gensupport.SetOptions(c.urlParams_, opts...)
48314	res, err := c.doRequest("json")
48315	if res != nil && res.StatusCode == http.StatusNotModified {
48316		if res.Body != nil {
48317			res.Body.Close()
48318		}
48319		return nil, &googleapi.Error{
48320			Code:   res.StatusCode,
48321			Header: res.Header,
48322		}
48323	}
48324	if err != nil {
48325		return nil, err
48326	}
48327	defer googleapi.CloseBody(res)
48328	if err := googleapi.CheckResponse(res); err != nil {
48329		return nil, err
48330	}
48331	ret := &TargetingTemplatesListResponse{
48332		ServerResponse: googleapi.ServerResponse{
48333			Header:         res.Header,
48334			HTTPStatusCode: res.StatusCode,
48335		},
48336	}
48337	target := &ret
48338	if err := gensupport.DecodeResponse(target, res); err != nil {
48339		return nil, err
48340	}
48341	return ret, nil
48342	// {
48343	//   "description": "Retrieves a list of targeting templates, optionally filtered. This method supports paging.",
48344	//   "httpMethod": "GET",
48345	//   "id": "dfareporting.targetingTemplates.list",
48346	//   "parameterOrder": [
48347	//     "profileId"
48348	//   ],
48349	//   "parameters": {
48350	//     "advertiserId": {
48351	//       "description": "Select only targeting templates with this advertiser ID.",
48352	//       "format": "int64",
48353	//       "location": "query",
48354	//       "type": "string"
48355	//     },
48356	//     "ids": {
48357	//       "description": "Select only targeting templates with these IDs.",
48358	//       "format": "int64",
48359	//       "location": "query",
48360	//       "repeated": true,
48361	//       "type": "string"
48362	//     },
48363	//     "maxResults": {
48364	//       "default": "1000",
48365	//       "description": "Maximum number of results to return.",
48366	//       "format": "int32",
48367	//       "location": "query",
48368	//       "maximum": "1000",
48369	//       "minimum": "0",
48370	//       "type": "integer"
48371	//     },
48372	//     "pageToken": {
48373	//       "description": "Value of the nextPageToken from the previous result page.",
48374	//       "location": "query",
48375	//       "type": "string"
48376	//     },
48377	//     "profileId": {
48378	//       "description": "User profile ID associated with this request.",
48379	//       "format": "int64",
48380	//       "location": "path",
48381	//       "required": true,
48382	//       "type": "string"
48383	//     },
48384	//     "searchString": {
48385	//       "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\".",
48386	//       "location": "query",
48387	//       "type": "string"
48388	//     },
48389	//     "sortField": {
48390	//       "default": "ID",
48391	//       "description": "Field by which to sort the list.",
48392	//       "enum": [
48393	//         "ID",
48394	//         "NAME"
48395	//       ],
48396	//       "enumDescriptions": [
48397	//         "",
48398	//         ""
48399	//       ],
48400	//       "location": "query",
48401	//       "type": "string"
48402	//     },
48403	//     "sortOrder": {
48404	//       "default": "ASCENDING",
48405	//       "description": "Order of sorted results.",
48406	//       "enum": [
48407	//         "ASCENDING",
48408	//         "DESCENDING"
48409	//       ],
48410	//       "enumDescriptions": [
48411	//         "",
48412	//         ""
48413	//       ],
48414	//       "location": "query",
48415	//       "type": "string"
48416	//     }
48417	//   },
48418	//   "path": "userprofiles/{profileId}/targetingTemplates",
48419	//   "response": {
48420	//     "$ref": "TargetingTemplatesListResponse"
48421	//   },
48422	//   "scopes": [
48423	//     "https://www.googleapis.com/auth/dfatrafficking"
48424	//   ]
48425	// }
48426
48427}
48428
48429// Pages invokes f for each page of results.
48430// A non-nil error returned from f will halt the iteration.
48431// The provided context supersedes any context provided to the Context method.
48432func (c *TargetingTemplatesListCall) Pages(ctx context.Context, f func(*TargetingTemplatesListResponse) error) error {
48433	c.ctx_ = ctx
48434	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
48435	for {
48436		x, err := c.Do()
48437		if err != nil {
48438			return err
48439		}
48440		if err := f(x); err != nil {
48441			return err
48442		}
48443		if x.NextPageToken == "" {
48444			return nil
48445		}
48446		c.PageToken(x.NextPageToken)
48447	}
48448}
48449
48450// method id "dfareporting.targetingTemplates.patch":
48451
48452type TargetingTemplatesPatchCall struct {
48453	s                 *Service
48454	profileId         int64
48455	targetingtemplate *TargetingTemplate
48456	urlParams_        gensupport.URLParams
48457	ctx_              context.Context
48458	header_           http.Header
48459}
48460
48461// Patch: Updates an existing targeting template. This method supports
48462// patch semantics.
48463func (r *TargetingTemplatesService) Patch(profileId int64, id int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesPatchCall {
48464	c := &TargetingTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48465	c.profileId = profileId
48466	c.urlParams_.Set("id", fmt.Sprint(id))
48467	c.targetingtemplate = targetingtemplate
48468	return c
48469}
48470
48471// Fields allows partial responses to be retrieved. See
48472// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48473// for more information.
48474func (c *TargetingTemplatesPatchCall) Fields(s ...googleapi.Field) *TargetingTemplatesPatchCall {
48475	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48476	return c
48477}
48478
48479// Context sets the context to be used in this call's Do method. Any
48480// pending HTTP request will be aborted if the provided context is
48481// canceled.
48482func (c *TargetingTemplatesPatchCall) Context(ctx context.Context) *TargetingTemplatesPatchCall {
48483	c.ctx_ = ctx
48484	return c
48485}
48486
48487// Header returns an http.Header that can be modified by the caller to
48488// add HTTP headers to the request.
48489func (c *TargetingTemplatesPatchCall) Header() http.Header {
48490	if c.header_ == nil {
48491		c.header_ = make(http.Header)
48492	}
48493	return c.header_
48494}
48495
48496func (c *TargetingTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
48497	reqHeaders := make(http.Header)
48498	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
48499	for k, v := range c.header_ {
48500		reqHeaders[k] = v
48501	}
48502	reqHeaders.Set("User-Agent", c.s.userAgent())
48503	var body io.Reader = nil
48504	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48505	if err != nil {
48506		return nil, err
48507	}
48508	reqHeaders.Set("Content-Type", "application/json")
48509	c.urlParams_.Set("alt", alt)
48510	c.urlParams_.Set("prettyPrint", "false")
48511	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48512	urls += "?" + c.urlParams_.Encode()
48513	req, err := http.NewRequest("PATCH", urls, body)
48514	if err != nil {
48515		return nil, err
48516	}
48517	req.Header = reqHeaders
48518	googleapi.Expand(req.URL, map[string]string{
48519		"profileId": strconv.FormatInt(c.profileId, 10),
48520	})
48521	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48522}
48523
48524// Do executes the "dfareporting.targetingTemplates.patch" call.
48525// Exactly one of *TargetingTemplate or error will be non-nil. Any
48526// non-2xx status code is an error. Response headers are in either
48527// *TargetingTemplate.ServerResponse.Header or (if a response was
48528// returned at all) in error.(*googleapi.Error).Header. Use
48529// googleapi.IsNotModified to check whether the returned error was
48530// because http.StatusNotModified was returned.
48531func (c *TargetingTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48532	gensupport.SetOptions(c.urlParams_, opts...)
48533	res, err := c.doRequest("json")
48534	if res != nil && res.StatusCode == http.StatusNotModified {
48535		if res.Body != nil {
48536			res.Body.Close()
48537		}
48538		return nil, &googleapi.Error{
48539			Code:   res.StatusCode,
48540			Header: res.Header,
48541		}
48542	}
48543	if err != nil {
48544		return nil, err
48545	}
48546	defer googleapi.CloseBody(res)
48547	if err := googleapi.CheckResponse(res); err != nil {
48548		return nil, err
48549	}
48550	ret := &TargetingTemplate{
48551		ServerResponse: googleapi.ServerResponse{
48552			Header:         res.Header,
48553			HTTPStatusCode: res.StatusCode,
48554		},
48555	}
48556	target := &ret
48557	if err := gensupport.DecodeResponse(target, res); err != nil {
48558		return nil, err
48559	}
48560	return ret, nil
48561	// {
48562	//   "description": "Updates an existing targeting template. This method supports patch semantics.",
48563	//   "httpMethod": "PATCH",
48564	//   "id": "dfareporting.targetingTemplates.patch",
48565	//   "parameterOrder": [
48566	//     "profileId",
48567	//     "id"
48568	//   ],
48569	//   "parameters": {
48570	//     "id": {
48571	//       "description": "Targeting template ID.",
48572	//       "format": "int64",
48573	//       "location": "query",
48574	//       "required": true,
48575	//       "type": "string"
48576	//     },
48577	//     "profileId": {
48578	//       "description": "User profile ID associated with this request.",
48579	//       "format": "int64",
48580	//       "location": "path",
48581	//       "required": true,
48582	//       "type": "string"
48583	//     }
48584	//   },
48585	//   "path": "userprofiles/{profileId}/targetingTemplates",
48586	//   "request": {
48587	//     "$ref": "TargetingTemplate"
48588	//   },
48589	//   "response": {
48590	//     "$ref": "TargetingTemplate"
48591	//   },
48592	//   "scopes": [
48593	//     "https://www.googleapis.com/auth/dfatrafficking"
48594	//   ]
48595	// }
48596
48597}
48598
48599// method id "dfareporting.targetingTemplates.update":
48600
48601type TargetingTemplatesUpdateCall struct {
48602	s                 *Service
48603	profileId         int64
48604	targetingtemplate *TargetingTemplate
48605	urlParams_        gensupport.URLParams
48606	ctx_              context.Context
48607	header_           http.Header
48608}
48609
48610// Update: Updates an existing targeting template.
48611func (r *TargetingTemplatesService) Update(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesUpdateCall {
48612	c := &TargetingTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48613	c.profileId = profileId
48614	c.targetingtemplate = targetingtemplate
48615	return c
48616}
48617
48618// Fields allows partial responses to be retrieved. See
48619// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48620// for more information.
48621func (c *TargetingTemplatesUpdateCall) Fields(s ...googleapi.Field) *TargetingTemplatesUpdateCall {
48622	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48623	return c
48624}
48625
48626// Context sets the context to be used in this call's Do method. Any
48627// pending HTTP request will be aborted if the provided context is
48628// canceled.
48629func (c *TargetingTemplatesUpdateCall) Context(ctx context.Context) *TargetingTemplatesUpdateCall {
48630	c.ctx_ = ctx
48631	return c
48632}
48633
48634// Header returns an http.Header that can be modified by the caller to
48635// add HTTP headers to the request.
48636func (c *TargetingTemplatesUpdateCall) Header() http.Header {
48637	if c.header_ == nil {
48638		c.header_ = make(http.Header)
48639	}
48640	return c.header_
48641}
48642
48643func (c *TargetingTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
48644	reqHeaders := make(http.Header)
48645	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
48646	for k, v := range c.header_ {
48647		reqHeaders[k] = v
48648	}
48649	reqHeaders.Set("User-Agent", c.s.userAgent())
48650	var body io.Reader = nil
48651	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48652	if err != nil {
48653		return nil, err
48654	}
48655	reqHeaders.Set("Content-Type", "application/json")
48656	c.urlParams_.Set("alt", alt)
48657	c.urlParams_.Set("prettyPrint", "false")
48658	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48659	urls += "?" + c.urlParams_.Encode()
48660	req, err := http.NewRequest("PUT", urls, body)
48661	if err != nil {
48662		return nil, err
48663	}
48664	req.Header = reqHeaders
48665	googleapi.Expand(req.URL, map[string]string{
48666		"profileId": strconv.FormatInt(c.profileId, 10),
48667	})
48668	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48669}
48670
48671// Do executes the "dfareporting.targetingTemplates.update" call.
48672// Exactly one of *TargetingTemplate or error will be non-nil. Any
48673// non-2xx status code is an error. Response headers are in either
48674// *TargetingTemplate.ServerResponse.Header or (if a response was
48675// returned at all) in error.(*googleapi.Error).Header. Use
48676// googleapi.IsNotModified to check whether the returned error was
48677// because http.StatusNotModified was returned.
48678func (c *TargetingTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48679	gensupport.SetOptions(c.urlParams_, opts...)
48680	res, err := c.doRequest("json")
48681	if res != nil && res.StatusCode == http.StatusNotModified {
48682		if res.Body != nil {
48683			res.Body.Close()
48684		}
48685		return nil, &googleapi.Error{
48686			Code:   res.StatusCode,
48687			Header: res.Header,
48688		}
48689	}
48690	if err != nil {
48691		return nil, err
48692	}
48693	defer googleapi.CloseBody(res)
48694	if err := googleapi.CheckResponse(res); err != nil {
48695		return nil, err
48696	}
48697	ret := &TargetingTemplate{
48698		ServerResponse: googleapi.ServerResponse{
48699			Header:         res.Header,
48700			HTTPStatusCode: res.StatusCode,
48701		},
48702	}
48703	target := &ret
48704	if err := gensupport.DecodeResponse(target, res); err != nil {
48705		return nil, err
48706	}
48707	return ret, nil
48708	// {
48709	//   "description": "Updates an existing targeting template.",
48710	//   "httpMethod": "PUT",
48711	//   "id": "dfareporting.targetingTemplates.update",
48712	//   "parameterOrder": [
48713	//     "profileId"
48714	//   ],
48715	//   "parameters": {
48716	//     "profileId": {
48717	//       "description": "User profile ID associated with this request.",
48718	//       "format": "int64",
48719	//       "location": "path",
48720	//       "required": true,
48721	//       "type": "string"
48722	//     }
48723	//   },
48724	//   "path": "userprofiles/{profileId}/targetingTemplates",
48725	//   "request": {
48726	//     "$ref": "TargetingTemplate"
48727	//   },
48728	//   "response": {
48729	//     "$ref": "TargetingTemplate"
48730	//   },
48731	//   "scopes": [
48732	//     "https://www.googleapis.com/auth/dfatrafficking"
48733	//   ]
48734	// }
48735
48736}
48737
48738// method id "dfareporting.userProfiles.get":
48739
48740type UserProfilesGetCall struct {
48741	s            *Service
48742	profileId    int64
48743	urlParams_   gensupport.URLParams
48744	ifNoneMatch_ string
48745	ctx_         context.Context
48746	header_      http.Header
48747}
48748
48749// Get: Gets one user profile by ID.
48750func (r *UserProfilesService) Get(profileId int64) *UserProfilesGetCall {
48751	c := &UserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48752	c.profileId = profileId
48753	return c
48754}
48755
48756// Fields allows partial responses to be retrieved. See
48757// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48758// for more information.
48759func (c *UserProfilesGetCall) Fields(s ...googleapi.Field) *UserProfilesGetCall {
48760	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48761	return c
48762}
48763
48764// IfNoneMatch sets the optional parameter which makes the operation
48765// fail if the object's ETag matches the given value. This is useful for
48766// getting updates only after the object has changed since the last
48767// request. Use googleapi.IsNotModified to check whether the response
48768// error from Do is the result of In-None-Match.
48769func (c *UserProfilesGetCall) IfNoneMatch(entityTag string) *UserProfilesGetCall {
48770	c.ifNoneMatch_ = entityTag
48771	return c
48772}
48773
48774// Context sets the context to be used in this call's Do method. Any
48775// pending HTTP request will be aborted if the provided context is
48776// canceled.
48777func (c *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
48778	c.ctx_ = ctx
48779	return c
48780}
48781
48782// Header returns an http.Header that can be modified by the caller to
48783// add HTTP headers to the request.
48784func (c *UserProfilesGetCall) Header() http.Header {
48785	if c.header_ == nil {
48786		c.header_ = make(http.Header)
48787	}
48788	return c.header_
48789}
48790
48791func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
48792	reqHeaders := make(http.Header)
48793	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
48794	for k, v := range c.header_ {
48795		reqHeaders[k] = v
48796	}
48797	reqHeaders.Set("User-Agent", c.s.userAgent())
48798	if c.ifNoneMatch_ != "" {
48799		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48800	}
48801	var body io.Reader = nil
48802	c.urlParams_.Set("alt", alt)
48803	c.urlParams_.Set("prettyPrint", "false")
48804	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}")
48805	urls += "?" + c.urlParams_.Encode()
48806	req, err := http.NewRequest("GET", urls, body)
48807	if err != nil {
48808		return nil, err
48809	}
48810	req.Header = reqHeaders
48811	googleapi.Expand(req.URL, map[string]string{
48812		"profileId": strconv.FormatInt(c.profileId, 10),
48813	})
48814	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48815}
48816
48817// Do executes the "dfareporting.userProfiles.get" call.
48818// Exactly one of *UserProfile or error will be non-nil. Any non-2xx
48819// status code is an error. Response headers are in either
48820// *UserProfile.ServerResponse.Header or (if a response was returned at
48821// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
48822// to check whether the returned error was because
48823// http.StatusNotModified was returned.
48824func (c *UserProfilesGetCall) Do(opts ...googleapi.CallOption) (*UserProfile, error) {
48825	gensupport.SetOptions(c.urlParams_, opts...)
48826	res, err := c.doRequest("json")
48827	if res != nil && res.StatusCode == http.StatusNotModified {
48828		if res.Body != nil {
48829			res.Body.Close()
48830		}
48831		return nil, &googleapi.Error{
48832			Code:   res.StatusCode,
48833			Header: res.Header,
48834		}
48835	}
48836	if err != nil {
48837		return nil, err
48838	}
48839	defer googleapi.CloseBody(res)
48840	if err := googleapi.CheckResponse(res); err != nil {
48841		return nil, err
48842	}
48843	ret := &UserProfile{
48844		ServerResponse: googleapi.ServerResponse{
48845			Header:         res.Header,
48846			HTTPStatusCode: res.StatusCode,
48847		},
48848	}
48849	target := &ret
48850	if err := gensupport.DecodeResponse(target, res); err != nil {
48851		return nil, err
48852	}
48853	return ret, nil
48854	// {
48855	//   "description": "Gets one user profile by ID.",
48856	//   "httpMethod": "GET",
48857	//   "id": "dfareporting.userProfiles.get",
48858	//   "parameterOrder": [
48859	//     "profileId"
48860	//   ],
48861	//   "parameters": {
48862	//     "profileId": {
48863	//       "description": "The user profile ID.",
48864	//       "format": "int64",
48865	//       "location": "path",
48866	//       "required": true,
48867	//       "type": "string"
48868	//     }
48869	//   },
48870	//   "path": "userprofiles/{profileId}",
48871	//   "response": {
48872	//     "$ref": "UserProfile"
48873	//   },
48874	//   "scopes": [
48875	//     "https://www.googleapis.com/auth/dfareporting",
48876	//     "https://www.googleapis.com/auth/dfatrafficking"
48877	//   ]
48878	// }
48879
48880}
48881
48882// method id "dfareporting.userProfiles.list":
48883
48884type UserProfilesListCall struct {
48885	s            *Service
48886	urlParams_   gensupport.URLParams
48887	ifNoneMatch_ string
48888	ctx_         context.Context
48889	header_      http.Header
48890}
48891
48892// List: Retrieves list of user profiles for a user.
48893func (r *UserProfilesService) List() *UserProfilesListCall {
48894	c := &UserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48895	return c
48896}
48897
48898// Fields allows partial responses to be retrieved. See
48899// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48900// for more information.
48901func (c *UserProfilesListCall) Fields(s ...googleapi.Field) *UserProfilesListCall {
48902	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48903	return c
48904}
48905
48906// IfNoneMatch sets the optional parameter which makes the operation
48907// fail if the object's ETag matches the given value. This is useful for
48908// getting updates only after the object has changed since the last
48909// request. Use googleapi.IsNotModified to check whether the response
48910// error from Do is the result of In-None-Match.
48911func (c *UserProfilesListCall) IfNoneMatch(entityTag string) *UserProfilesListCall {
48912	c.ifNoneMatch_ = entityTag
48913	return c
48914}
48915
48916// Context sets the context to be used in this call's Do method. Any
48917// pending HTTP request will be aborted if the provided context is
48918// canceled.
48919func (c *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
48920	c.ctx_ = ctx
48921	return c
48922}
48923
48924// Header returns an http.Header that can be modified by the caller to
48925// add HTTP headers to the request.
48926func (c *UserProfilesListCall) Header() http.Header {
48927	if c.header_ == nil {
48928		c.header_ = make(http.Header)
48929	}
48930	return c.header_
48931}
48932
48933func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
48934	reqHeaders := make(http.Header)
48935	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
48936	for k, v := range c.header_ {
48937		reqHeaders[k] = v
48938	}
48939	reqHeaders.Set("User-Agent", c.s.userAgent())
48940	if c.ifNoneMatch_ != "" {
48941		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48942	}
48943	var body io.Reader = nil
48944	c.urlParams_.Set("alt", alt)
48945	c.urlParams_.Set("prettyPrint", "false")
48946	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles")
48947	urls += "?" + c.urlParams_.Encode()
48948	req, err := http.NewRequest("GET", urls, body)
48949	if err != nil {
48950		return nil, err
48951	}
48952	req.Header = reqHeaders
48953	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48954}
48955
48956// Do executes the "dfareporting.userProfiles.list" call.
48957// Exactly one of *UserProfileList or error will be non-nil. Any non-2xx
48958// status code is an error. Response headers are in either
48959// *UserProfileList.ServerResponse.Header or (if a response was returned
48960// at all) in error.(*googleapi.Error).Header. Use
48961// googleapi.IsNotModified to check whether the returned error was
48962// because http.StatusNotModified was returned.
48963func (c *UserProfilesListCall) Do(opts ...googleapi.CallOption) (*UserProfileList, error) {
48964	gensupport.SetOptions(c.urlParams_, opts...)
48965	res, err := c.doRequest("json")
48966	if res != nil && res.StatusCode == http.StatusNotModified {
48967		if res.Body != nil {
48968			res.Body.Close()
48969		}
48970		return nil, &googleapi.Error{
48971			Code:   res.StatusCode,
48972			Header: res.Header,
48973		}
48974	}
48975	if err != nil {
48976		return nil, err
48977	}
48978	defer googleapi.CloseBody(res)
48979	if err := googleapi.CheckResponse(res); err != nil {
48980		return nil, err
48981	}
48982	ret := &UserProfileList{
48983		ServerResponse: googleapi.ServerResponse{
48984			Header:         res.Header,
48985			HTTPStatusCode: res.StatusCode,
48986		},
48987	}
48988	target := &ret
48989	if err := gensupport.DecodeResponse(target, res); err != nil {
48990		return nil, err
48991	}
48992	return ret, nil
48993	// {
48994	//   "description": "Retrieves list of user profiles for a user.",
48995	//   "httpMethod": "GET",
48996	//   "id": "dfareporting.userProfiles.list",
48997	//   "path": "userprofiles",
48998	//   "response": {
48999	//     "$ref": "UserProfileList"
49000	//   },
49001	//   "scopes": [
49002	//     "https://www.googleapis.com/auth/dfareporting",
49003	//     "https://www.googleapis.com/auth/dfatrafficking"
49004	//   ]
49005	// }
49006
49007}
49008
49009// method id "dfareporting.userRolePermissionGroups.get":
49010
49011type UserRolePermissionGroupsGetCall struct {
49012	s            *Service
49013	profileId    int64
49014	id           int64
49015	urlParams_   gensupport.URLParams
49016	ifNoneMatch_ string
49017	ctx_         context.Context
49018	header_      http.Header
49019}
49020
49021// Get: Gets one user role permission group by ID.
49022func (r *UserRolePermissionGroupsService) Get(profileId int64, id int64) *UserRolePermissionGroupsGetCall {
49023	c := &UserRolePermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49024	c.profileId = profileId
49025	c.id = id
49026	return c
49027}
49028
49029// Fields allows partial responses to be retrieved. See
49030// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49031// for more information.
49032func (c *UserRolePermissionGroupsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsGetCall {
49033	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49034	return c
49035}
49036
49037// IfNoneMatch sets the optional parameter which makes the operation
49038// fail if the object's ETag matches the given value. This is useful for
49039// getting updates only after the object has changed since the last
49040// request. Use googleapi.IsNotModified to check whether the response
49041// error from Do is the result of In-None-Match.
49042func (c *UserRolePermissionGroupsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsGetCall {
49043	c.ifNoneMatch_ = entityTag
49044	return c
49045}
49046
49047// Context sets the context to be used in this call's Do method. Any
49048// pending HTTP request will be aborted if the provided context is
49049// canceled.
49050func (c *UserRolePermissionGroupsGetCall) Context(ctx context.Context) *UserRolePermissionGroupsGetCall {
49051	c.ctx_ = ctx
49052	return c
49053}
49054
49055// Header returns an http.Header that can be modified by the caller to
49056// add HTTP headers to the request.
49057func (c *UserRolePermissionGroupsGetCall) Header() http.Header {
49058	if c.header_ == nil {
49059		c.header_ = make(http.Header)
49060	}
49061	return c.header_
49062}
49063
49064func (c *UserRolePermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
49065	reqHeaders := make(http.Header)
49066	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
49067	for k, v := range c.header_ {
49068		reqHeaders[k] = v
49069	}
49070	reqHeaders.Set("User-Agent", c.s.userAgent())
49071	if c.ifNoneMatch_ != "" {
49072		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49073	}
49074	var body io.Reader = nil
49075	c.urlParams_.Set("alt", alt)
49076	c.urlParams_.Set("prettyPrint", "false")
49077	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups/{id}")
49078	urls += "?" + c.urlParams_.Encode()
49079	req, err := http.NewRequest("GET", urls, body)
49080	if err != nil {
49081		return nil, err
49082	}
49083	req.Header = reqHeaders
49084	googleapi.Expand(req.URL, map[string]string{
49085		"profileId": strconv.FormatInt(c.profileId, 10),
49086		"id":        strconv.FormatInt(c.id, 10),
49087	})
49088	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49089}
49090
49091// Do executes the "dfareporting.userRolePermissionGroups.get" call.
49092// Exactly one of *UserRolePermissionGroup or error will be non-nil. Any
49093// non-2xx status code is an error. Response headers are in either
49094// *UserRolePermissionGroup.ServerResponse.Header or (if a response was
49095// returned at all) in error.(*googleapi.Error).Header. Use
49096// googleapi.IsNotModified to check whether the returned error was
49097// because http.StatusNotModified was returned.
49098func (c *UserRolePermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroup, error) {
49099	gensupport.SetOptions(c.urlParams_, opts...)
49100	res, err := c.doRequest("json")
49101	if res != nil && res.StatusCode == http.StatusNotModified {
49102		if res.Body != nil {
49103			res.Body.Close()
49104		}
49105		return nil, &googleapi.Error{
49106			Code:   res.StatusCode,
49107			Header: res.Header,
49108		}
49109	}
49110	if err != nil {
49111		return nil, err
49112	}
49113	defer googleapi.CloseBody(res)
49114	if err := googleapi.CheckResponse(res); err != nil {
49115		return nil, err
49116	}
49117	ret := &UserRolePermissionGroup{
49118		ServerResponse: googleapi.ServerResponse{
49119			Header:         res.Header,
49120			HTTPStatusCode: res.StatusCode,
49121		},
49122	}
49123	target := &ret
49124	if err := gensupport.DecodeResponse(target, res); err != nil {
49125		return nil, err
49126	}
49127	return ret, nil
49128	// {
49129	//   "description": "Gets one user role permission group by ID.",
49130	//   "httpMethod": "GET",
49131	//   "id": "dfareporting.userRolePermissionGroups.get",
49132	//   "parameterOrder": [
49133	//     "profileId",
49134	//     "id"
49135	//   ],
49136	//   "parameters": {
49137	//     "id": {
49138	//       "description": "User role permission group ID.",
49139	//       "format": "int64",
49140	//       "location": "path",
49141	//       "required": true,
49142	//       "type": "string"
49143	//     },
49144	//     "profileId": {
49145	//       "description": "User profile ID associated with this request.",
49146	//       "format": "int64",
49147	//       "location": "path",
49148	//       "required": true,
49149	//       "type": "string"
49150	//     }
49151	//   },
49152	//   "path": "userprofiles/{profileId}/userRolePermissionGroups/{id}",
49153	//   "response": {
49154	//     "$ref": "UserRolePermissionGroup"
49155	//   },
49156	//   "scopes": [
49157	//     "https://www.googleapis.com/auth/dfatrafficking"
49158	//   ]
49159	// }
49160
49161}
49162
49163// method id "dfareporting.userRolePermissionGroups.list":
49164
49165type UserRolePermissionGroupsListCall struct {
49166	s            *Service
49167	profileId    int64
49168	urlParams_   gensupport.URLParams
49169	ifNoneMatch_ string
49170	ctx_         context.Context
49171	header_      http.Header
49172}
49173
49174// List: Gets a list of all supported user role permission groups.
49175func (r *UserRolePermissionGroupsService) List(profileId int64) *UserRolePermissionGroupsListCall {
49176	c := &UserRolePermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49177	c.profileId = profileId
49178	return c
49179}
49180
49181// Fields allows partial responses to be retrieved. See
49182// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49183// for more information.
49184func (c *UserRolePermissionGroupsListCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsListCall {
49185	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49186	return c
49187}
49188
49189// IfNoneMatch sets the optional parameter which makes the operation
49190// fail if the object's ETag matches the given value. This is useful for
49191// getting updates only after the object has changed since the last
49192// request. Use googleapi.IsNotModified to check whether the response
49193// error from Do is the result of In-None-Match.
49194func (c *UserRolePermissionGroupsListCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsListCall {
49195	c.ifNoneMatch_ = entityTag
49196	return c
49197}
49198
49199// Context sets the context to be used in this call's Do method. Any
49200// pending HTTP request will be aborted if the provided context is
49201// canceled.
49202func (c *UserRolePermissionGroupsListCall) Context(ctx context.Context) *UserRolePermissionGroupsListCall {
49203	c.ctx_ = ctx
49204	return c
49205}
49206
49207// Header returns an http.Header that can be modified by the caller to
49208// add HTTP headers to the request.
49209func (c *UserRolePermissionGroupsListCall) Header() http.Header {
49210	if c.header_ == nil {
49211		c.header_ = make(http.Header)
49212	}
49213	return c.header_
49214}
49215
49216func (c *UserRolePermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
49217	reqHeaders := make(http.Header)
49218	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
49219	for k, v := range c.header_ {
49220		reqHeaders[k] = v
49221	}
49222	reqHeaders.Set("User-Agent", c.s.userAgent())
49223	if c.ifNoneMatch_ != "" {
49224		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49225	}
49226	var body io.Reader = nil
49227	c.urlParams_.Set("alt", alt)
49228	c.urlParams_.Set("prettyPrint", "false")
49229	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups")
49230	urls += "?" + c.urlParams_.Encode()
49231	req, err := http.NewRequest("GET", urls, body)
49232	if err != nil {
49233		return nil, err
49234	}
49235	req.Header = reqHeaders
49236	googleapi.Expand(req.URL, map[string]string{
49237		"profileId": strconv.FormatInt(c.profileId, 10),
49238	})
49239	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49240}
49241
49242// Do executes the "dfareporting.userRolePermissionGroups.list" call.
49243// Exactly one of *UserRolePermissionGroupsListResponse or error will be
49244// non-nil. Any non-2xx status code is an error. Response headers are in
49245// either *UserRolePermissionGroupsListResponse.ServerResponse.Header or
49246// (if a response was returned at all) in
49247// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
49248// whether the returned error was because http.StatusNotModified was
49249// returned.
49250func (c *UserRolePermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroupsListResponse, error) {
49251	gensupport.SetOptions(c.urlParams_, opts...)
49252	res, err := c.doRequest("json")
49253	if res != nil && res.StatusCode == http.StatusNotModified {
49254		if res.Body != nil {
49255			res.Body.Close()
49256		}
49257		return nil, &googleapi.Error{
49258			Code:   res.StatusCode,
49259			Header: res.Header,
49260		}
49261	}
49262	if err != nil {
49263		return nil, err
49264	}
49265	defer googleapi.CloseBody(res)
49266	if err := googleapi.CheckResponse(res); err != nil {
49267		return nil, err
49268	}
49269	ret := &UserRolePermissionGroupsListResponse{
49270		ServerResponse: googleapi.ServerResponse{
49271			Header:         res.Header,
49272			HTTPStatusCode: res.StatusCode,
49273		},
49274	}
49275	target := &ret
49276	if err := gensupport.DecodeResponse(target, res); err != nil {
49277		return nil, err
49278	}
49279	return ret, nil
49280	// {
49281	//   "description": "Gets a list of all supported user role permission groups.",
49282	//   "httpMethod": "GET",
49283	//   "id": "dfareporting.userRolePermissionGroups.list",
49284	//   "parameterOrder": [
49285	//     "profileId"
49286	//   ],
49287	//   "parameters": {
49288	//     "profileId": {
49289	//       "description": "User profile ID associated with this request.",
49290	//       "format": "int64",
49291	//       "location": "path",
49292	//       "required": true,
49293	//       "type": "string"
49294	//     }
49295	//   },
49296	//   "path": "userprofiles/{profileId}/userRolePermissionGroups",
49297	//   "response": {
49298	//     "$ref": "UserRolePermissionGroupsListResponse"
49299	//   },
49300	//   "scopes": [
49301	//     "https://www.googleapis.com/auth/dfatrafficking"
49302	//   ]
49303	// }
49304
49305}
49306
49307// method id "dfareporting.userRolePermissions.get":
49308
49309type UserRolePermissionsGetCall struct {
49310	s            *Service
49311	profileId    int64
49312	id           int64
49313	urlParams_   gensupport.URLParams
49314	ifNoneMatch_ string
49315	ctx_         context.Context
49316	header_      http.Header
49317}
49318
49319// Get: Gets one user role permission by ID.
49320func (r *UserRolePermissionsService) Get(profileId int64, id int64) *UserRolePermissionsGetCall {
49321	c := &UserRolePermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49322	c.profileId = profileId
49323	c.id = id
49324	return c
49325}
49326
49327// Fields allows partial responses to be retrieved. See
49328// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49329// for more information.
49330func (c *UserRolePermissionsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionsGetCall {
49331	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49332	return c
49333}
49334
49335// IfNoneMatch sets the optional parameter which makes the operation
49336// fail if the object's ETag matches the given value. This is useful for
49337// getting updates only after the object has changed since the last
49338// request. Use googleapi.IsNotModified to check whether the response
49339// error from Do is the result of In-None-Match.
49340func (c *UserRolePermissionsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionsGetCall {
49341	c.ifNoneMatch_ = entityTag
49342	return c
49343}
49344
49345// Context sets the context to be used in this call's Do method. Any
49346// pending HTTP request will be aborted if the provided context is
49347// canceled.
49348func (c *UserRolePermissionsGetCall) Context(ctx context.Context) *UserRolePermissionsGetCall {
49349	c.ctx_ = ctx
49350	return c
49351}
49352
49353// Header returns an http.Header that can be modified by the caller to
49354// add HTTP headers to the request.
49355func (c *UserRolePermissionsGetCall) Header() http.Header {
49356	if c.header_ == nil {
49357		c.header_ = make(http.Header)
49358	}
49359	return c.header_
49360}
49361
49362func (c *UserRolePermissionsGetCall) doRequest(alt string) (*http.Response, error) {
49363	reqHeaders := make(http.Header)
49364	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
49365	for k, v := range c.header_ {
49366		reqHeaders[k] = v
49367	}
49368	reqHeaders.Set("User-Agent", c.s.userAgent())
49369	if c.ifNoneMatch_ != "" {
49370		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49371	}
49372	var body io.Reader = nil
49373	c.urlParams_.Set("alt", alt)
49374	c.urlParams_.Set("prettyPrint", "false")
49375	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions/{id}")
49376	urls += "?" + c.urlParams_.Encode()
49377	req, err := http.NewRequest("GET", urls, body)
49378	if err != nil {
49379		return nil, err
49380	}
49381	req.Header = reqHeaders
49382	googleapi.Expand(req.URL, map[string]string{
49383		"profileId": strconv.FormatInt(c.profileId, 10),
49384		"id":        strconv.FormatInt(c.id, 10),
49385	})
49386	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49387}
49388
49389// Do executes the "dfareporting.userRolePermissions.get" call.
49390// Exactly one of *UserRolePermission or error will be non-nil. Any
49391// non-2xx status code is an error. Response headers are in either
49392// *UserRolePermission.ServerResponse.Header or (if a response was
49393// returned at all) in error.(*googleapi.Error).Header. Use
49394// googleapi.IsNotModified to check whether the returned error was
49395// because http.StatusNotModified was returned.
49396func (c *UserRolePermissionsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermission, error) {
49397	gensupport.SetOptions(c.urlParams_, opts...)
49398	res, err := c.doRequest("json")
49399	if res != nil && res.StatusCode == http.StatusNotModified {
49400		if res.Body != nil {
49401			res.Body.Close()
49402		}
49403		return nil, &googleapi.Error{
49404			Code:   res.StatusCode,
49405			Header: res.Header,
49406		}
49407	}
49408	if err != nil {
49409		return nil, err
49410	}
49411	defer googleapi.CloseBody(res)
49412	if err := googleapi.CheckResponse(res); err != nil {
49413		return nil, err
49414	}
49415	ret := &UserRolePermission{
49416		ServerResponse: googleapi.ServerResponse{
49417			Header:         res.Header,
49418			HTTPStatusCode: res.StatusCode,
49419		},
49420	}
49421	target := &ret
49422	if err := gensupport.DecodeResponse(target, res); err != nil {
49423		return nil, err
49424	}
49425	return ret, nil
49426	// {
49427	//   "description": "Gets one user role permission by ID.",
49428	//   "httpMethod": "GET",
49429	//   "id": "dfareporting.userRolePermissions.get",
49430	//   "parameterOrder": [
49431	//     "profileId",
49432	//     "id"
49433	//   ],
49434	//   "parameters": {
49435	//     "id": {
49436	//       "description": "User role permission ID.",
49437	//       "format": "int64",
49438	//       "location": "path",
49439	//       "required": true,
49440	//       "type": "string"
49441	//     },
49442	//     "profileId": {
49443	//       "description": "User profile ID associated with this request.",
49444	//       "format": "int64",
49445	//       "location": "path",
49446	//       "required": true,
49447	//       "type": "string"
49448	//     }
49449	//   },
49450	//   "path": "userprofiles/{profileId}/userRolePermissions/{id}",
49451	//   "response": {
49452	//     "$ref": "UserRolePermission"
49453	//   },
49454	//   "scopes": [
49455	//     "https://www.googleapis.com/auth/dfatrafficking"
49456	//   ]
49457	// }
49458
49459}
49460
49461// method id "dfareporting.userRolePermissions.list":
49462
49463type UserRolePermissionsListCall struct {
49464	s            *Service
49465	profileId    int64
49466	urlParams_   gensupport.URLParams
49467	ifNoneMatch_ string
49468	ctx_         context.Context
49469	header_      http.Header
49470}
49471
49472// List: Gets a list of user role permissions, possibly filtered.
49473func (r *UserRolePermissionsService) List(profileId int64) *UserRolePermissionsListCall {
49474	c := &UserRolePermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49475	c.profileId = profileId
49476	return c
49477}
49478
49479// Ids sets the optional parameter "ids": Select only user role
49480// permissions with these IDs.
49481func (c *UserRolePermissionsListCall) Ids(ids ...int64) *UserRolePermissionsListCall {
49482	var ids_ []string
49483	for _, v := range ids {
49484		ids_ = append(ids_, fmt.Sprint(v))
49485	}
49486	c.urlParams_.SetMulti("ids", ids_)
49487	return c
49488}
49489
49490// Fields allows partial responses to be retrieved. See
49491// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49492// for more information.
49493func (c *UserRolePermissionsListCall) Fields(s ...googleapi.Field) *UserRolePermissionsListCall {
49494	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49495	return c
49496}
49497
49498// IfNoneMatch sets the optional parameter which makes the operation
49499// fail if the object's ETag matches the given value. This is useful for
49500// getting updates only after the object has changed since the last
49501// request. Use googleapi.IsNotModified to check whether the response
49502// error from Do is the result of In-None-Match.
49503func (c *UserRolePermissionsListCall) IfNoneMatch(entityTag string) *UserRolePermissionsListCall {
49504	c.ifNoneMatch_ = entityTag
49505	return c
49506}
49507
49508// Context sets the context to be used in this call's Do method. Any
49509// pending HTTP request will be aborted if the provided context is
49510// canceled.
49511func (c *UserRolePermissionsListCall) Context(ctx context.Context) *UserRolePermissionsListCall {
49512	c.ctx_ = ctx
49513	return c
49514}
49515
49516// Header returns an http.Header that can be modified by the caller to
49517// add HTTP headers to the request.
49518func (c *UserRolePermissionsListCall) Header() http.Header {
49519	if c.header_ == nil {
49520		c.header_ = make(http.Header)
49521	}
49522	return c.header_
49523}
49524
49525func (c *UserRolePermissionsListCall) doRequest(alt string) (*http.Response, error) {
49526	reqHeaders := make(http.Header)
49527	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
49528	for k, v := range c.header_ {
49529		reqHeaders[k] = v
49530	}
49531	reqHeaders.Set("User-Agent", c.s.userAgent())
49532	if c.ifNoneMatch_ != "" {
49533		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49534	}
49535	var body io.Reader = nil
49536	c.urlParams_.Set("alt", alt)
49537	c.urlParams_.Set("prettyPrint", "false")
49538	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions")
49539	urls += "?" + c.urlParams_.Encode()
49540	req, err := http.NewRequest("GET", urls, body)
49541	if err != nil {
49542		return nil, err
49543	}
49544	req.Header = reqHeaders
49545	googleapi.Expand(req.URL, map[string]string{
49546		"profileId": strconv.FormatInt(c.profileId, 10),
49547	})
49548	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49549}
49550
49551// Do executes the "dfareporting.userRolePermissions.list" call.
49552// Exactly one of *UserRolePermissionsListResponse or error will be
49553// non-nil. Any non-2xx status code is an error. Response headers are in
49554// either *UserRolePermissionsListResponse.ServerResponse.Header or (if
49555// a response was returned at all) in error.(*googleapi.Error).Header.
49556// Use googleapi.IsNotModified to check whether the returned error was
49557// because http.StatusNotModified was returned.
49558func (c *UserRolePermissionsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionsListResponse, error) {
49559	gensupport.SetOptions(c.urlParams_, opts...)
49560	res, err := c.doRequest("json")
49561	if res != nil && res.StatusCode == http.StatusNotModified {
49562		if res.Body != nil {
49563			res.Body.Close()
49564		}
49565		return nil, &googleapi.Error{
49566			Code:   res.StatusCode,
49567			Header: res.Header,
49568		}
49569	}
49570	if err != nil {
49571		return nil, err
49572	}
49573	defer googleapi.CloseBody(res)
49574	if err := googleapi.CheckResponse(res); err != nil {
49575		return nil, err
49576	}
49577	ret := &UserRolePermissionsListResponse{
49578		ServerResponse: googleapi.ServerResponse{
49579			Header:         res.Header,
49580			HTTPStatusCode: res.StatusCode,
49581		},
49582	}
49583	target := &ret
49584	if err := gensupport.DecodeResponse(target, res); err != nil {
49585		return nil, err
49586	}
49587	return ret, nil
49588	// {
49589	//   "description": "Gets a list of user role permissions, possibly filtered.",
49590	//   "httpMethod": "GET",
49591	//   "id": "dfareporting.userRolePermissions.list",
49592	//   "parameterOrder": [
49593	//     "profileId"
49594	//   ],
49595	//   "parameters": {
49596	//     "ids": {
49597	//       "description": "Select only user role permissions with these IDs.",
49598	//       "format": "int64",
49599	//       "location": "query",
49600	//       "repeated": true,
49601	//       "type": "string"
49602	//     },
49603	//     "profileId": {
49604	//       "description": "User profile ID associated with this request.",
49605	//       "format": "int64",
49606	//       "location": "path",
49607	//       "required": true,
49608	//       "type": "string"
49609	//     }
49610	//   },
49611	//   "path": "userprofiles/{profileId}/userRolePermissions",
49612	//   "response": {
49613	//     "$ref": "UserRolePermissionsListResponse"
49614	//   },
49615	//   "scopes": [
49616	//     "https://www.googleapis.com/auth/dfatrafficking"
49617	//   ]
49618	// }
49619
49620}
49621
49622// method id "dfareporting.userRoles.delete":
49623
49624type UserRolesDeleteCall struct {
49625	s          *Service
49626	profileId  int64
49627	id         int64
49628	urlParams_ gensupport.URLParams
49629	ctx_       context.Context
49630	header_    http.Header
49631}
49632
49633// Delete: Deletes an existing user role.
49634func (r *UserRolesService) Delete(profileId int64, id int64) *UserRolesDeleteCall {
49635	c := &UserRolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49636	c.profileId = profileId
49637	c.id = id
49638	return c
49639}
49640
49641// Fields allows partial responses to be retrieved. See
49642// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49643// for more information.
49644func (c *UserRolesDeleteCall) Fields(s ...googleapi.Field) *UserRolesDeleteCall {
49645	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49646	return c
49647}
49648
49649// Context sets the context to be used in this call's Do method. Any
49650// pending HTTP request will be aborted if the provided context is
49651// canceled.
49652func (c *UserRolesDeleteCall) Context(ctx context.Context) *UserRolesDeleteCall {
49653	c.ctx_ = ctx
49654	return c
49655}
49656
49657// Header returns an http.Header that can be modified by the caller to
49658// add HTTP headers to the request.
49659func (c *UserRolesDeleteCall) Header() http.Header {
49660	if c.header_ == nil {
49661		c.header_ = make(http.Header)
49662	}
49663	return c.header_
49664}
49665
49666func (c *UserRolesDeleteCall) doRequest(alt string) (*http.Response, error) {
49667	reqHeaders := make(http.Header)
49668	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
49669	for k, v := range c.header_ {
49670		reqHeaders[k] = v
49671	}
49672	reqHeaders.Set("User-Agent", c.s.userAgent())
49673	var body io.Reader = nil
49674	c.urlParams_.Set("alt", alt)
49675	c.urlParams_.Set("prettyPrint", "false")
49676	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
49677	urls += "?" + c.urlParams_.Encode()
49678	req, err := http.NewRequest("DELETE", urls, body)
49679	if err != nil {
49680		return nil, err
49681	}
49682	req.Header = reqHeaders
49683	googleapi.Expand(req.URL, map[string]string{
49684		"profileId": strconv.FormatInt(c.profileId, 10),
49685		"id":        strconv.FormatInt(c.id, 10),
49686	})
49687	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49688}
49689
49690// Do executes the "dfareporting.userRoles.delete" call.
49691func (c *UserRolesDeleteCall) Do(opts ...googleapi.CallOption) error {
49692	gensupport.SetOptions(c.urlParams_, opts...)
49693	res, err := c.doRequest("json")
49694	if err != nil {
49695		return err
49696	}
49697	defer googleapi.CloseBody(res)
49698	if err := googleapi.CheckResponse(res); err != nil {
49699		return err
49700	}
49701	return nil
49702	// {
49703	//   "description": "Deletes an existing user role.",
49704	//   "httpMethod": "DELETE",
49705	//   "id": "dfareporting.userRoles.delete",
49706	//   "parameterOrder": [
49707	//     "profileId",
49708	//     "id"
49709	//   ],
49710	//   "parameters": {
49711	//     "id": {
49712	//       "description": "User role ID.",
49713	//       "format": "int64",
49714	//       "location": "path",
49715	//       "required": true,
49716	//       "type": "string"
49717	//     },
49718	//     "profileId": {
49719	//       "description": "User profile ID associated with this request.",
49720	//       "format": "int64",
49721	//       "location": "path",
49722	//       "required": true,
49723	//       "type": "string"
49724	//     }
49725	//   },
49726	//   "path": "userprofiles/{profileId}/userRoles/{id}",
49727	//   "scopes": [
49728	//     "https://www.googleapis.com/auth/dfatrafficking"
49729	//   ]
49730	// }
49731
49732}
49733
49734// method id "dfareporting.userRoles.get":
49735
49736type UserRolesGetCall struct {
49737	s            *Service
49738	profileId    int64
49739	id           int64
49740	urlParams_   gensupport.URLParams
49741	ifNoneMatch_ string
49742	ctx_         context.Context
49743	header_      http.Header
49744}
49745
49746// Get: Gets one user role by ID.
49747func (r *UserRolesService) Get(profileId int64, id int64) *UserRolesGetCall {
49748	c := &UserRolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49749	c.profileId = profileId
49750	c.id = id
49751	return c
49752}
49753
49754// Fields allows partial responses to be retrieved. See
49755// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49756// for more information.
49757func (c *UserRolesGetCall) Fields(s ...googleapi.Field) *UserRolesGetCall {
49758	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49759	return c
49760}
49761
49762// IfNoneMatch sets the optional parameter which makes the operation
49763// fail if the object's ETag matches the given value. This is useful for
49764// getting updates only after the object has changed since the last
49765// request. Use googleapi.IsNotModified to check whether the response
49766// error from Do is the result of In-None-Match.
49767func (c *UserRolesGetCall) IfNoneMatch(entityTag string) *UserRolesGetCall {
49768	c.ifNoneMatch_ = entityTag
49769	return c
49770}
49771
49772// Context sets the context to be used in this call's Do method. Any
49773// pending HTTP request will be aborted if the provided context is
49774// canceled.
49775func (c *UserRolesGetCall) Context(ctx context.Context) *UserRolesGetCall {
49776	c.ctx_ = ctx
49777	return c
49778}
49779
49780// Header returns an http.Header that can be modified by the caller to
49781// add HTTP headers to the request.
49782func (c *UserRolesGetCall) Header() http.Header {
49783	if c.header_ == nil {
49784		c.header_ = make(http.Header)
49785	}
49786	return c.header_
49787}
49788
49789func (c *UserRolesGetCall) doRequest(alt string) (*http.Response, error) {
49790	reqHeaders := make(http.Header)
49791	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
49792	for k, v := range c.header_ {
49793		reqHeaders[k] = v
49794	}
49795	reqHeaders.Set("User-Agent", c.s.userAgent())
49796	if c.ifNoneMatch_ != "" {
49797		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49798	}
49799	var body io.Reader = nil
49800	c.urlParams_.Set("alt", alt)
49801	c.urlParams_.Set("prettyPrint", "false")
49802	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
49803	urls += "?" + c.urlParams_.Encode()
49804	req, err := http.NewRequest("GET", urls, body)
49805	if err != nil {
49806		return nil, err
49807	}
49808	req.Header = reqHeaders
49809	googleapi.Expand(req.URL, map[string]string{
49810		"profileId": strconv.FormatInt(c.profileId, 10),
49811		"id":        strconv.FormatInt(c.id, 10),
49812	})
49813	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49814}
49815
49816// Do executes the "dfareporting.userRoles.get" call.
49817// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
49818// code is an error. Response headers are in either
49819// *UserRole.ServerResponse.Header or (if a response was returned at
49820// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
49821// to check whether the returned error was because
49822// http.StatusNotModified was returned.
49823func (c *UserRolesGetCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
49824	gensupport.SetOptions(c.urlParams_, opts...)
49825	res, err := c.doRequest("json")
49826	if res != nil && res.StatusCode == http.StatusNotModified {
49827		if res.Body != nil {
49828			res.Body.Close()
49829		}
49830		return nil, &googleapi.Error{
49831			Code:   res.StatusCode,
49832			Header: res.Header,
49833		}
49834	}
49835	if err != nil {
49836		return nil, err
49837	}
49838	defer googleapi.CloseBody(res)
49839	if err := googleapi.CheckResponse(res); err != nil {
49840		return nil, err
49841	}
49842	ret := &UserRole{
49843		ServerResponse: googleapi.ServerResponse{
49844			Header:         res.Header,
49845			HTTPStatusCode: res.StatusCode,
49846		},
49847	}
49848	target := &ret
49849	if err := gensupport.DecodeResponse(target, res); err != nil {
49850		return nil, err
49851	}
49852	return ret, nil
49853	// {
49854	//   "description": "Gets one user role by ID.",
49855	//   "httpMethod": "GET",
49856	//   "id": "dfareporting.userRoles.get",
49857	//   "parameterOrder": [
49858	//     "profileId",
49859	//     "id"
49860	//   ],
49861	//   "parameters": {
49862	//     "id": {
49863	//       "description": "User role ID.",
49864	//       "format": "int64",
49865	//       "location": "path",
49866	//       "required": true,
49867	//       "type": "string"
49868	//     },
49869	//     "profileId": {
49870	//       "description": "User profile ID associated with this request.",
49871	//       "format": "int64",
49872	//       "location": "path",
49873	//       "required": true,
49874	//       "type": "string"
49875	//     }
49876	//   },
49877	//   "path": "userprofiles/{profileId}/userRoles/{id}",
49878	//   "response": {
49879	//     "$ref": "UserRole"
49880	//   },
49881	//   "scopes": [
49882	//     "https://www.googleapis.com/auth/dfatrafficking"
49883	//   ]
49884	// }
49885
49886}
49887
49888// method id "dfareporting.userRoles.insert":
49889
49890type UserRolesInsertCall struct {
49891	s          *Service
49892	profileId  int64
49893	userrole   *UserRole
49894	urlParams_ gensupport.URLParams
49895	ctx_       context.Context
49896	header_    http.Header
49897}
49898
49899// Insert: Inserts a new user role.
49900func (r *UserRolesService) Insert(profileId int64, userrole *UserRole) *UserRolesInsertCall {
49901	c := &UserRolesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49902	c.profileId = profileId
49903	c.userrole = userrole
49904	return c
49905}
49906
49907// Fields allows partial responses to be retrieved. See
49908// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49909// for more information.
49910func (c *UserRolesInsertCall) Fields(s ...googleapi.Field) *UserRolesInsertCall {
49911	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49912	return c
49913}
49914
49915// Context sets the context to be used in this call's Do method. Any
49916// pending HTTP request will be aborted if the provided context is
49917// canceled.
49918func (c *UserRolesInsertCall) Context(ctx context.Context) *UserRolesInsertCall {
49919	c.ctx_ = ctx
49920	return c
49921}
49922
49923// Header returns an http.Header that can be modified by the caller to
49924// add HTTP headers to the request.
49925func (c *UserRolesInsertCall) Header() http.Header {
49926	if c.header_ == nil {
49927		c.header_ = make(http.Header)
49928	}
49929	return c.header_
49930}
49931
49932func (c *UserRolesInsertCall) doRequest(alt string) (*http.Response, error) {
49933	reqHeaders := make(http.Header)
49934	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
49935	for k, v := range c.header_ {
49936		reqHeaders[k] = v
49937	}
49938	reqHeaders.Set("User-Agent", c.s.userAgent())
49939	var body io.Reader = nil
49940	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
49941	if err != nil {
49942		return nil, err
49943	}
49944	reqHeaders.Set("Content-Type", "application/json")
49945	c.urlParams_.Set("alt", alt)
49946	c.urlParams_.Set("prettyPrint", "false")
49947	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
49948	urls += "?" + c.urlParams_.Encode()
49949	req, err := http.NewRequest("POST", urls, body)
49950	if err != nil {
49951		return nil, err
49952	}
49953	req.Header = reqHeaders
49954	googleapi.Expand(req.URL, map[string]string{
49955		"profileId": strconv.FormatInt(c.profileId, 10),
49956	})
49957	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49958}
49959
49960// Do executes the "dfareporting.userRoles.insert" call.
49961// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
49962// code is an error. Response headers are in either
49963// *UserRole.ServerResponse.Header or (if a response was returned at
49964// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
49965// to check whether the returned error was because
49966// http.StatusNotModified was returned.
49967func (c *UserRolesInsertCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
49968	gensupport.SetOptions(c.urlParams_, opts...)
49969	res, err := c.doRequest("json")
49970	if res != nil && res.StatusCode == http.StatusNotModified {
49971		if res.Body != nil {
49972			res.Body.Close()
49973		}
49974		return nil, &googleapi.Error{
49975			Code:   res.StatusCode,
49976			Header: res.Header,
49977		}
49978	}
49979	if err != nil {
49980		return nil, err
49981	}
49982	defer googleapi.CloseBody(res)
49983	if err := googleapi.CheckResponse(res); err != nil {
49984		return nil, err
49985	}
49986	ret := &UserRole{
49987		ServerResponse: googleapi.ServerResponse{
49988			Header:         res.Header,
49989			HTTPStatusCode: res.StatusCode,
49990		},
49991	}
49992	target := &ret
49993	if err := gensupport.DecodeResponse(target, res); err != nil {
49994		return nil, err
49995	}
49996	return ret, nil
49997	// {
49998	//   "description": "Inserts a new user role.",
49999	//   "httpMethod": "POST",
50000	//   "id": "dfareporting.userRoles.insert",
50001	//   "parameterOrder": [
50002	//     "profileId"
50003	//   ],
50004	//   "parameters": {
50005	//     "profileId": {
50006	//       "description": "User profile ID associated with this request.",
50007	//       "format": "int64",
50008	//       "location": "path",
50009	//       "required": true,
50010	//       "type": "string"
50011	//     }
50012	//   },
50013	//   "path": "userprofiles/{profileId}/userRoles",
50014	//   "request": {
50015	//     "$ref": "UserRole"
50016	//   },
50017	//   "response": {
50018	//     "$ref": "UserRole"
50019	//   },
50020	//   "scopes": [
50021	//     "https://www.googleapis.com/auth/dfatrafficking"
50022	//   ]
50023	// }
50024
50025}
50026
50027// method id "dfareporting.userRoles.list":
50028
50029type UserRolesListCall struct {
50030	s            *Service
50031	profileId    int64
50032	urlParams_   gensupport.URLParams
50033	ifNoneMatch_ string
50034	ctx_         context.Context
50035	header_      http.Header
50036}
50037
50038// List: Retrieves a list of user roles, possibly filtered. This method
50039// supports paging.
50040func (r *UserRolesService) List(profileId int64) *UserRolesListCall {
50041	c := &UserRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50042	c.profileId = profileId
50043	return c
50044}
50045
50046// AccountUserRoleOnly sets the optional parameter
50047// "accountUserRoleOnly": Select only account level user roles not
50048// associated with any specific subaccount.
50049func (c *UserRolesListCall) AccountUserRoleOnly(accountUserRoleOnly bool) *UserRolesListCall {
50050	c.urlParams_.Set("accountUserRoleOnly", fmt.Sprint(accountUserRoleOnly))
50051	return c
50052}
50053
50054// Ids sets the optional parameter "ids": Select only user roles with
50055// the specified IDs.
50056func (c *UserRolesListCall) Ids(ids ...int64) *UserRolesListCall {
50057	var ids_ []string
50058	for _, v := range ids {
50059		ids_ = append(ids_, fmt.Sprint(v))
50060	}
50061	c.urlParams_.SetMulti("ids", ids_)
50062	return c
50063}
50064
50065// MaxResults sets the optional parameter "maxResults": Maximum number
50066// of results to return.
50067func (c *UserRolesListCall) MaxResults(maxResults int64) *UserRolesListCall {
50068	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
50069	return c
50070}
50071
50072// PageToken sets the optional parameter "pageToken": Value of the
50073// nextPageToken from the previous result page.
50074func (c *UserRolesListCall) PageToken(pageToken string) *UserRolesListCall {
50075	c.urlParams_.Set("pageToken", pageToken)
50076	return c
50077}
50078
50079// SearchString sets the optional parameter "searchString": Allows
50080// searching for objects by name or ID. Wildcards (*) are allowed. For
50081// example, "userrole*2015" will return objects with names like
50082// "userrole June 2015", "userrole April 2015", or simply "userrole
50083// 2015". Most of the searches also add wildcards implicitly at the
50084// start and the end of the search string. For example, a search string
50085// of "userrole" will match objects with name "my userrole", "userrole
50086// 2015", or simply "userrole".
50087func (c *UserRolesListCall) SearchString(searchString string) *UserRolesListCall {
50088	c.urlParams_.Set("searchString", searchString)
50089	return c
50090}
50091
50092// SortField sets the optional parameter "sortField": Field by which to
50093// sort the list.
50094//
50095// Possible values:
50096//   "ID" (default)
50097//   "NAME"
50098func (c *UserRolesListCall) SortField(sortField string) *UserRolesListCall {
50099	c.urlParams_.Set("sortField", sortField)
50100	return c
50101}
50102
50103// SortOrder sets the optional parameter "sortOrder": Order of sorted
50104// results.
50105//
50106// Possible values:
50107//   "ASCENDING" (default)
50108//   "DESCENDING"
50109func (c *UserRolesListCall) SortOrder(sortOrder string) *UserRolesListCall {
50110	c.urlParams_.Set("sortOrder", sortOrder)
50111	return c
50112}
50113
50114// SubaccountId sets the optional parameter "subaccountId": Select only
50115// user roles that belong to this subaccount.
50116func (c *UserRolesListCall) SubaccountId(subaccountId int64) *UserRolesListCall {
50117	c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
50118	return c
50119}
50120
50121// Fields allows partial responses to be retrieved. See
50122// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50123// for more information.
50124func (c *UserRolesListCall) Fields(s ...googleapi.Field) *UserRolesListCall {
50125	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50126	return c
50127}
50128
50129// IfNoneMatch sets the optional parameter which makes the operation
50130// fail if the object's ETag matches the given value. This is useful for
50131// getting updates only after the object has changed since the last
50132// request. Use googleapi.IsNotModified to check whether the response
50133// error from Do is the result of In-None-Match.
50134func (c *UserRolesListCall) IfNoneMatch(entityTag string) *UserRolesListCall {
50135	c.ifNoneMatch_ = entityTag
50136	return c
50137}
50138
50139// Context sets the context to be used in this call's Do method. Any
50140// pending HTTP request will be aborted if the provided context is
50141// canceled.
50142func (c *UserRolesListCall) Context(ctx context.Context) *UserRolesListCall {
50143	c.ctx_ = ctx
50144	return c
50145}
50146
50147// Header returns an http.Header that can be modified by the caller to
50148// add HTTP headers to the request.
50149func (c *UserRolesListCall) Header() http.Header {
50150	if c.header_ == nil {
50151		c.header_ = make(http.Header)
50152	}
50153	return c.header_
50154}
50155
50156func (c *UserRolesListCall) doRequest(alt string) (*http.Response, error) {
50157	reqHeaders := make(http.Header)
50158	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
50159	for k, v := range c.header_ {
50160		reqHeaders[k] = v
50161	}
50162	reqHeaders.Set("User-Agent", c.s.userAgent())
50163	if c.ifNoneMatch_ != "" {
50164		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50165	}
50166	var body io.Reader = nil
50167	c.urlParams_.Set("alt", alt)
50168	c.urlParams_.Set("prettyPrint", "false")
50169	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50170	urls += "?" + c.urlParams_.Encode()
50171	req, err := http.NewRequest("GET", urls, body)
50172	if err != nil {
50173		return nil, err
50174	}
50175	req.Header = reqHeaders
50176	googleapi.Expand(req.URL, map[string]string{
50177		"profileId": strconv.FormatInt(c.profileId, 10),
50178	})
50179	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50180}
50181
50182// Do executes the "dfareporting.userRoles.list" call.
50183// Exactly one of *UserRolesListResponse or error will be non-nil. Any
50184// non-2xx status code is an error. Response headers are in either
50185// *UserRolesListResponse.ServerResponse.Header or (if a response was
50186// returned at all) in error.(*googleapi.Error).Header. Use
50187// googleapi.IsNotModified to check whether the returned error was
50188// because http.StatusNotModified was returned.
50189func (c *UserRolesListCall) Do(opts ...googleapi.CallOption) (*UserRolesListResponse, error) {
50190	gensupport.SetOptions(c.urlParams_, opts...)
50191	res, err := c.doRequest("json")
50192	if res != nil && res.StatusCode == http.StatusNotModified {
50193		if res.Body != nil {
50194			res.Body.Close()
50195		}
50196		return nil, &googleapi.Error{
50197			Code:   res.StatusCode,
50198			Header: res.Header,
50199		}
50200	}
50201	if err != nil {
50202		return nil, err
50203	}
50204	defer googleapi.CloseBody(res)
50205	if err := googleapi.CheckResponse(res); err != nil {
50206		return nil, err
50207	}
50208	ret := &UserRolesListResponse{
50209		ServerResponse: googleapi.ServerResponse{
50210			Header:         res.Header,
50211			HTTPStatusCode: res.StatusCode,
50212		},
50213	}
50214	target := &ret
50215	if err := gensupport.DecodeResponse(target, res); err != nil {
50216		return nil, err
50217	}
50218	return ret, nil
50219	// {
50220	//   "description": "Retrieves a list of user roles, possibly filtered. This method supports paging.",
50221	//   "httpMethod": "GET",
50222	//   "id": "dfareporting.userRoles.list",
50223	//   "parameterOrder": [
50224	//     "profileId"
50225	//   ],
50226	//   "parameters": {
50227	//     "accountUserRoleOnly": {
50228	//       "description": "Select only account level user roles not associated with any specific subaccount.",
50229	//       "location": "query",
50230	//       "type": "boolean"
50231	//     },
50232	//     "ids": {
50233	//       "description": "Select only user roles with the specified IDs.",
50234	//       "format": "int64",
50235	//       "location": "query",
50236	//       "repeated": true,
50237	//       "type": "string"
50238	//     },
50239	//     "maxResults": {
50240	//       "default": "1000",
50241	//       "description": "Maximum number of results to return.",
50242	//       "format": "int32",
50243	//       "location": "query",
50244	//       "maximum": "1000",
50245	//       "minimum": "0",
50246	//       "type": "integer"
50247	//     },
50248	//     "pageToken": {
50249	//       "description": "Value of the nextPageToken from the previous result page.",
50250	//       "location": "query",
50251	//       "type": "string"
50252	//     },
50253	//     "profileId": {
50254	//       "description": "User profile ID associated with this request.",
50255	//       "format": "int64",
50256	//       "location": "path",
50257	//       "required": true,
50258	//       "type": "string"
50259	//     },
50260	//     "searchString": {
50261	//       "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\".",
50262	//       "location": "query",
50263	//       "type": "string"
50264	//     },
50265	//     "sortField": {
50266	//       "default": "ID",
50267	//       "description": "Field by which to sort the list.",
50268	//       "enum": [
50269	//         "ID",
50270	//         "NAME"
50271	//       ],
50272	//       "enumDescriptions": [
50273	//         "",
50274	//         ""
50275	//       ],
50276	//       "location": "query",
50277	//       "type": "string"
50278	//     },
50279	//     "sortOrder": {
50280	//       "default": "ASCENDING",
50281	//       "description": "Order of sorted results.",
50282	//       "enum": [
50283	//         "ASCENDING",
50284	//         "DESCENDING"
50285	//       ],
50286	//       "enumDescriptions": [
50287	//         "",
50288	//         ""
50289	//       ],
50290	//       "location": "query",
50291	//       "type": "string"
50292	//     },
50293	//     "subaccountId": {
50294	//       "description": "Select only user roles that belong to this subaccount.",
50295	//       "format": "int64",
50296	//       "location": "query",
50297	//       "type": "string"
50298	//     }
50299	//   },
50300	//   "path": "userprofiles/{profileId}/userRoles",
50301	//   "response": {
50302	//     "$ref": "UserRolesListResponse"
50303	//   },
50304	//   "scopes": [
50305	//     "https://www.googleapis.com/auth/dfatrafficking"
50306	//   ]
50307	// }
50308
50309}
50310
50311// Pages invokes f for each page of results.
50312// A non-nil error returned from f will halt the iteration.
50313// The provided context supersedes any context provided to the Context method.
50314func (c *UserRolesListCall) Pages(ctx context.Context, f func(*UserRolesListResponse) error) error {
50315	c.ctx_ = ctx
50316	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
50317	for {
50318		x, err := c.Do()
50319		if err != nil {
50320			return err
50321		}
50322		if err := f(x); err != nil {
50323			return err
50324		}
50325		if x.NextPageToken == "" {
50326			return nil
50327		}
50328		c.PageToken(x.NextPageToken)
50329	}
50330}
50331
50332// method id "dfareporting.userRoles.patch":
50333
50334type UserRolesPatchCall struct {
50335	s          *Service
50336	profileId  int64
50337	userrole   *UserRole
50338	urlParams_ gensupport.URLParams
50339	ctx_       context.Context
50340	header_    http.Header
50341}
50342
50343// Patch: Updates an existing user role. This method supports patch
50344// semantics.
50345func (r *UserRolesService) Patch(profileId int64, id int64, userrole *UserRole) *UserRolesPatchCall {
50346	c := &UserRolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50347	c.profileId = profileId
50348	c.urlParams_.Set("id", fmt.Sprint(id))
50349	c.userrole = userrole
50350	return c
50351}
50352
50353// Fields allows partial responses to be retrieved. See
50354// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50355// for more information.
50356func (c *UserRolesPatchCall) Fields(s ...googleapi.Field) *UserRolesPatchCall {
50357	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50358	return c
50359}
50360
50361// Context sets the context to be used in this call's Do method. Any
50362// pending HTTP request will be aborted if the provided context is
50363// canceled.
50364func (c *UserRolesPatchCall) Context(ctx context.Context) *UserRolesPatchCall {
50365	c.ctx_ = ctx
50366	return c
50367}
50368
50369// Header returns an http.Header that can be modified by the caller to
50370// add HTTP headers to the request.
50371func (c *UserRolesPatchCall) Header() http.Header {
50372	if c.header_ == nil {
50373		c.header_ = make(http.Header)
50374	}
50375	return c.header_
50376}
50377
50378func (c *UserRolesPatchCall) doRequest(alt string) (*http.Response, error) {
50379	reqHeaders := make(http.Header)
50380	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
50381	for k, v := range c.header_ {
50382		reqHeaders[k] = v
50383	}
50384	reqHeaders.Set("User-Agent", c.s.userAgent())
50385	var body io.Reader = nil
50386	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50387	if err != nil {
50388		return nil, err
50389	}
50390	reqHeaders.Set("Content-Type", "application/json")
50391	c.urlParams_.Set("alt", alt)
50392	c.urlParams_.Set("prettyPrint", "false")
50393	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50394	urls += "?" + c.urlParams_.Encode()
50395	req, err := http.NewRequest("PATCH", urls, body)
50396	if err != nil {
50397		return nil, err
50398	}
50399	req.Header = reqHeaders
50400	googleapi.Expand(req.URL, map[string]string{
50401		"profileId": strconv.FormatInt(c.profileId, 10),
50402	})
50403	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50404}
50405
50406// Do executes the "dfareporting.userRoles.patch" call.
50407// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50408// code is an error. Response headers are in either
50409// *UserRole.ServerResponse.Header or (if a response was returned at
50410// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50411// to check whether the returned error was because
50412// http.StatusNotModified was returned.
50413func (c *UserRolesPatchCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50414	gensupport.SetOptions(c.urlParams_, opts...)
50415	res, err := c.doRequest("json")
50416	if res != nil && res.StatusCode == http.StatusNotModified {
50417		if res.Body != nil {
50418			res.Body.Close()
50419		}
50420		return nil, &googleapi.Error{
50421			Code:   res.StatusCode,
50422			Header: res.Header,
50423		}
50424	}
50425	if err != nil {
50426		return nil, err
50427	}
50428	defer googleapi.CloseBody(res)
50429	if err := googleapi.CheckResponse(res); err != nil {
50430		return nil, err
50431	}
50432	ret := &UserRole{
50433		ServerResponse: googleapi.ServerResponse{
50434			Header:         res.Header,
50435			HTTPStatusCode: res.StatusCode,
50436		},
50437	}
50438	target := &ret
50439	if err := gensupport.DecodeResponse(target, res); err != nil {
50440		return nil, err
50441	}
50442	return ret, nil
50443	// {
50444	//   "description": "Updates an existing user role. This method supports patch semantics.",
50445	//   "httpMethod": "PATCH",
50446	//   "id": "dfareporting.userRoles.patch",
50447	//   "parameterOrder": [
50448	//     "profileId",
50449	//     "id"
50450	//   ],
50451	//   "parameters": {
50452	//     "id": {
50453	//       "description": "User role ID.",
50454	//       "format": "int64",
50455	//       "location": "query",
50456	//       "required": true,
50457	//       "type": "string"
50458	//     },
50459	//     "profileId": {
50460	//       "description": "User profile ID associated with this request.",
50461	//       "format": "int64",
50462	//       "location": "path",
50463	//       "required": true,
50464	//       "type": "string"
50465	//     }
50466	//   },
50467	//   "path": "userprofiles/{profileId}/userRoles",
50468	//   "request": {
50469	//     "$ref": "UserRole"
50470	//   },
50471	//   "response": {
50472	//     "$ref": "UserRole"
50473	//   },
50474	//   "scopes": [
50475	//     "https://www.googleapis.com/auth/dfatrafficking"
50476	//   ]
50477	// }
50478
50479}
50480
50481// method id "dfareporting.userRoles.update":
50482
50483type UserRolesUpdateCall struct {
50484	s          *Service
50485	profileId  int64
50486	userrole   *UserRole
50487	urlParams_ gensupport.URLParams
50488	ctx_       context.Context
50489	header_    http.Header
50490}
50491
50492// Update: Updates an existing user role.
50493func (r *UserRolesService) Update(profileId int64, userrole *UserRole) *UserRolesUpdateCall {
50494	c := &UserRolesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50495	c.profileId = profileId
50496	c.userrole = userrole
50497	return c
50498}
50499
50500// Fields allows partial responses to be retrieved. See
50501// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50502// for more information.
50503func (c *UserRolesUpdateCall) Fields(s ...googleapi.Field) *UserRolesUpdateCall {
50504	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50505	return c
50506}
50507
50508// Context sets the context to be used in this call's Do method. Any
50509// pending HTTP request will be aborted if the provided context is
50510// canceled.
50511func (c *UserRolesUpdateCall) Context(ctx context.Context) *UserRolesUpdateCall {
50512	c.ctx_ = ctx
50513	return c
50514}
50515
50516// Header returns an http.Header that can be modified by the caller to
50517// add HTTP headers to the request.
50518func (c *UserRolesUpdateCall) Header() http.Header {
50519	if c.header_ == nil {
50520		c.header_ = make(http.Header)
50521	}
50522	return c.header_
50523}
50524
50525func (c *UserRolesUpdateCall) doRequest(alt string) (*http.Response, error) {
50526	reqHeaders := make(http.Header)
50527	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
50528	for k, v := range c.header_ {
50529		reqHeaders[k] = v
50530	}
50531	reqHeaders.Set("User-Agent", c.s.userAgent())
50532	var body io.Reader = nil
50533	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50534	if err != nil {
50535		return nil, err
50536	}
50537	reqHeaders.Set("Content-Type", "application/json")
50538	c.urlParams_.Set("alt", alt)
50539	c.urlParams_.Set("prettyPrint", "false")
50540	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50541	urls += "?" + c.urlParams_.Encode()
50542	req, err := http.NewRequest("PUT", urls, body)
50543	if err != nil {
50544		return nil, err
50545	}
50546	req.Header = reqHeaders
50547	googleapi.Expand(req.URL, map[string]string{
50548		"profileId": strconv.FormatInt(c.profileId, 10),
50549	})
50550	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50551}
50552
50553// Do executes the "dfareporting.userRoles.update" call.
50554// Exactly one of *UserRole or error will be non-nil. Any non-2xx status
50555// code is an error. Response headers are in either
50556// *UserRole.ServerResponse.Header or (if a response was returned at
50557// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50558// to check whether the returned error was because
50559// http.StatusNotModified was returned.
50560func (c *UserRolesUpdateCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50561	gensupport.SetOptions(c.urlParams_, opts...)
50562	res, err := c.doRequest("json")
50563	if res != nil && res.StatusCode == http.StatusNotModified {
50564		if res.Body != nil {
50565			res.Body.Close()
50566		}
50567		return nil, &googleapi.Error{
50568			Code:   res.StatusCode,
50569			Header: res.Header,
50570		}
50571	}
50572	if err != nil {
50573		return nil, err
50574	}
50575	defer googleapi.CloseBody(res)
50576	if err := googleapi.CheckResponse(res); err != nil {
50577		return nil, err
50578	}
50579	ret := &UserRole{
50580		ServerResponse: googleapi.ServerResponse{
50581			Header:         res.Header,
50582			HTTPStatusCode: res.StatusCode,
50583		},
50584	}
50585	target := &ret
50586	if err := gensupport.DecodeResponse(target, res); err != nil {
50587		return nil, err
50588	}
50589	return ret, nil
50590	// {
50591	//   "description": "Updates an existing user role.",
50592	//   "httpMethod": "PUT",
50593	//   "id": "dfareporting.userRoles.update",
50594	//   "parameterOrder": [
50595	//     "profileId"
50596	//   ],
50597	//   "parameters": {
50598	//     "profileId": {
50599	//       "description": "User profile ID associated with this request.",
50600	//       "format": "int64",
50601	//       "location": "path",
50602	//       "required": true,
50603	//       "type": "string"
50604	//     }
50605	//   },
50606	//   "path": "userprofiles/{profileId}/userRoles",
50607	//   "request": {
50608	//     "$ref": "UserRole"
50609	//   },
50610	//   "response": {
50611	//     "$ref": "UserRole"
50612	//   },
50613	//   "scopes": [
50614	//     "https://www.googleapis.com/auth/dfatrafficking"
50615	//   ]
50616	// }
50617
50618}
50619
50620// method id "dfareporting.videoFormats.get":
50621
50622type VideoFormatsGetCall struct {
50623	s            *Service
50624	profileId    int64
50625	id           int64
50626	urlParams_   gensupport.URLParams
50627	ifNoneMatch_ string
50628	ctx_         context.Context
50629	header_      http.Header
50630}
50631
50632// Get: Gets one video format by ID.
50633func (r *VideoFormatsService) Get(profileId int64, id int64) *VideoFormatsGetCall {
50634	c := &VideoFormatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50635	c.profileId = profileId
50636	c.id = id
50637	return c
50638}
50639
50640// Fields allows partial responses to be retrieved. See
50641// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50642// for more information.
50643func (c *VideoFormatsGetCall) Fields(s ...googleapi.Field) *VideoFormatsGetCall {
50644	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50645	return c
50646}
50647
50648// IfNoneMatch sets the optional parameter which makes the operation
50649// fail if the object's ETag matches the given value. This is useful for
50650// getting updates only after the object has changed since the last
50651// request. Use googleapi.IsNotModified to check whether the response
50652// error from Do is the result of In-None-Match.
50653func (c *VideoFormatsGetCall) IfNoneMatch(entityTag string) *VideoFormatsGetCall {
50654	c.ifNoneMatch_ = entityTag
50655	return c
50656}
50657
50658// Context sets the context to be used in this call's Do method. Any
50659// pending HTTP request will be aborted if the provided context is
50660// canceled.
50661func (c *VideoFormatsGetCall) Context(ctx context.Context) *VideoFormatsGetCall {
50662	c.ctx_ = ctx
50663	return c
50664}
50665
50666// Header returns an http.Header that can be modified by the caller to
50667// add HTTP headers to the request.
50668func (c *VideoFormatsGetCall) Header() http.Header {
50669	if c.header_ == nil {
50670		c.header_ = make(http.Header)
50671	}
50672	return c.header_
50673}
50674
50675func (c *VideoFormatsGetCall) doRequest(alt string) (*http.Response, error) {
50676	reqHeaders := make(http.Header)
50677	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
50678	for k, v := range c.header_ {
50679		reqHeaders[k] = v
50680	}
50681	reqHeaders.Set("User-Agent", c.s.userAgent())
50682	if c.ifNoneMatch_ != "" {
50683		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50684	}
50685	var body io.Reader = nil
50686	c.urlParams_.Set("alt", alt)
50687	c.urlParams_.Set("prettyPrint", "false")
50688	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats/{id}")
50689	urls += "?" + c.urlParams_.Encode()
50690	req, err := http.NewRequest("GET", urls, body)
50691	if err != nil {
50692		return nil, err
50693	}
50694	req.Header = reqHeaders
50695	googleapi.Expand(req.URL, map[string]string{
50696		"profileId": strconv.FormatInt(c.profileId, 10),
50697		"id":        strconv.FormatInt(c.id, 10),
50698	})
50699	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50700}
50701
50702// Do executes the "dfareporting.videoFormats.get" call.
50703// Exactly one of *VideoFormat or error will be non-nil. Any non-2xx
50704// status code is an error. Response headers are in either
50705// *VideoFormat.ServerResponse.Header or (if a response was returned at
50706// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50707// to check whether the returned error was because
50708// http.StatusNotModified was returned.
50709func (c *VideoFormatsGetCall) Do(opts ...googleapi.CallOption) (*VideoFormat, error) {
50710	gensupport.SetOptions(c.urlParams_, opts...)
50711	res, err := c.doRequest("json")
50712	if res != nil && res.StatusCode == http.StatusNotModified {
50713		if res.Body != nil {
50714			res.Body.Close()
50715		}
50716		return nil, &googleapi.Error{
50717			Code:   res.StatusCode,
50718			Header: res.Header,
50719		}
50720	}
50721	if err != nil {
50722		return nil, err
50723	}
50724	defer googleapi.CloseBody(res)
50725	if err := googleapi.CheckResponse(res); err != nil {
50726		return nil, err
50727	}
50728	ret := &VideoFormat{
50729		ServerResponse: googleapi.ServerResponse{
50730			Header:         res.Header,
50731			HTTPStatusCode: res.StatusCode,
50732		},
50733	}
50734	target := &ret
50735	if err := gensupport.DecodeResponse(target, res); err != nil {
50736		return nil, err
50737	}
50738	return ret, nil
50739	// {
50740	//   "description": "Gets one video format by ID.",
50741	//   "httpMethod": "GET",
50742	//   "id": "dfareporting.videoFormats.get",
50743	//   "parameterOrder": [
50744	//     "profileId",
50745	//     "id"
50746	//   ],
50747	//   "parameters": {
50748	//     "id": {
50749	//       "description": "Video format ID.",
50750	//       "format": "int32",
50751	//       "location": "path",
50752	//       "required": true,
50753	//       "type": "integer"
50754	//     },
50755	//     "profileId": {
50756	//       "description": "User profile ID associated with this request.",
50757	//       "format": "int64",
50758	//       "location": "path",
50759	//       "required": true,
50760	//       "type": "string"
50761	//     }
50762	//   },
50763	//   "path": "userprofiles/{profileId}/videoFormats/{id}",
50764	//   "response": {
50765	//     "$ref": "VideoFormat"
50766	//   },
50767	//   "scopes": [
50768	//     "https://www.googleapis.com/auth/dfatrafficking"
50769	//   ]
50770	// }
50771
50772}
50773
50774// method id "dfareporting.videoFormats.list":
50775
50776type VideoFormatsListCall struct {
50777	s            *Service
50778	profileId    int64
50779	urlParams_   gensupport.URLParams
50780	ifNoneMatch_ string
50781	ctx_         context.Context
50782	header_      http.Header
50783}
50784
50785// List: Lists available video formats.
50786func (r *VideoFormatsService) List(profileId int64) *VideoFormatsListCall {
50787	c := &VideoFormatsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50788	c.profileId = profileId
50789	return c
50790}
50791
50792// Fields allows partial responses to be retrieved. See
50793// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50794// for more information.
50795func (c *VideoFormatsListCall) Fields(s ...googleapi.Field) *VideoFormatsListCall {
50796	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50797	return c
50798}
50799
50800// IfNoneMatch sets the optional parameter which makes the operation
50801// fail if the object's ETag matches the given value. This is useful for
50802// getting updates only after the object has changed since the last
50803// request. Use googleapi.IsNotModified to check whether the response
50804// error from Do is the result of In-None-Match.
50805func (c *VideoFormatsListCall) IfNoneMatch(entityTag string) *VideoFormatsListCall {
50806	c.ifNoneMatch_ = entityTag
50807	return c
50808}
50809
50810// Context sets the context to be used in this call's Do method. Any
50811// pending HTTP request will be aborted if the provided context is
50812// canceled.
50813func (c *VideoFormatsListCall) Context(ctx context.Context) *VideoFormatsListCall {
50814	c.ctx_ = ctx
50815	return c
50816}
50817
50818// Header returns an http.Header that can be modified by the caller to
50819// add HTTP headers to the request.
50820func (c *VideoFormatsListCall) Header() http.Header {
50821	if c.header_ == nil {
50822		c.header_ = make(http.Header)
50823	}
50824	return c.header_
50825}
50826
50827func (c *VideoFormatsListCall) doRequest(alt string) (*http.Response, error) {
50828	reqHeaders := make(http.Header)
50829	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
50830	for k, v := range c.header_ {
50831		reqHeaders[k] = v
50832	}
50833	reqHeaders.Set("User-Agent", c.s.userAgent())
50834	if c.ifNoneMatch_ != "" {
50835		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50836	}
50837	var body io.Reader = nil
50838	c.urlParams_.Set("alt", alt)
50839	c.urlParams_.Set("prettyPrint", "false")
50840	urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats")
50841	urls += "?" + c.urlParams_.Encode()
50842	req, err := http.NewRequest("GET", urls, body)
50843	if err != nil {
50844		return nil, err
50845	}
50846	req.Header = reqHeaders
50847	googleapi.Expand(req.URL, map[string]string{
50848		"profileId": strconv.FormatInt(c.profileId, 10),
50849	})
50850	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50851}
50852
50853// Do executes the "dfareporting.videoFormats.list" call.
50854// Exactly one of *VideoFormatsListResponse or error will be non-nil.
50855// Any non-2xx status code is an error. Response headers are in either
50856// *VideoFormatsListResponse.ServerResponse.Header or (if a response was
50857// returned at all) in error.(*googleapi.Error).Header. Use
50858// googleapi.IsNotModified to check whether the returned error was
50859// because http.StatusNotModified was returned.
50860func (c *VideoFormatsListCall) Do(opts ...googleapi.CallOption) (*VideoFormatsListResponse, error) {
50861	gensupport.SetOptions(c.urlParams_, opts...)
50862	res, err := c.doRequest("json")
50863	if res != nil && res.StatusCode == http.StatusNotModified {
50864		if res.Body != nil {
50865			res.Body.Close()
50866		}
50867		return nil, &googleapi.Error{
50868			Code:   res.StatusCode,
50869			Header: res.Header,
50870		}
50871	}
50872	if err != nil {
50873		return nil, err
50874	}
50875	defer googleapi.CloseBody(res)
50876	if err := googleapi.CheckResponse(res); err != nil {
50877		return nil, err
50878	}
50879	ret := &VideoFormatsListResponse{
50880		ServerResponse: googleapi.ServerResponse{
50881			Header:         res.Header,
50882			HTTPStatusCode: res.StatusCode,
50883		},
50884	}
50885	target := &ret
50886	if err := gensupport.DecodeResponse(target, res); err != nil {
50887		return nil, err
50888	}
50889	return ret, nil
50890	// {
50891	//   "description": "Lists available video formats.",
50892	//   "httpMethod": "GET",
50893	//   "id": "dfareporting.videoFormats.list",
50894	//   "parameterOrder": [
50895	//     "profileId"
50896	//   ],
50897	//   "parameters": {
50898	//     "profileId": {
50899	//       "description": "User profile ID associated with this request.",
50900	//       "format": "int64",
50901	//       "location": "path",
50902	//       "required": true,
50903	//       "type": "string"
50904	//     }
50905	//   },
50906	//   "path": "userprofiles/{profileId}/videoFormats",
50907	//   "response": {
50908	//     "$ref": "VideoFormatsListResponse"
50909	//   },
50910	//   "scopes": [
50911	//     "https://www.googleapis.com/auth/dfatrafficking"
50912	//   ]
50913	// }
50914
50915}
50916